mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 20:20:44 +00:00
25 lines
574 B
C++
25 lines
574 B
C++
#include "client.h"
|
|
#include "xmlrpcclient.h"
|
|
|
|
#include <QVariantList>
|
|
|
|
Client::Client( const QString &address, quint16 port, QObject *parent )
|
|
: QObject( parent ), address( address ), port( port )
|
|
{
|
|
|
|
}
|
|
|
|
|
|
void Client::testFunc( const QVariant ¶m )
|
|
{
|
|
XmlRpcClient *client = new XmlRpcClient( address, port );
|
|
connect( client, SIGNAL( dataReady(QVariant) ), this, SLOT( onDataReady(QVariant) ) );
|
|
client->execute( "testFunc", QVariantList() << param );
|
|
}
|
|
|
|
|
|
void Client::onDataReady( const QVariant &response )
|
|
{
|
|
qDebug() << response;
|
|
}
|