mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-17 03:00:46 +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;
|
||
|
}
|