Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > d2229253b8f3127ab89b179a82cc8466 > files > 387

libqxt-devel-0.6.1-2.fc15.i686.rpm

#include <QCoreApplication>
#include <QxtJSONRpcClient>
#include <QxtJSONRpcCall>
#include <QDebug>
#include <QStringList>
#include <QxtSignalWaiter>



int main(int argc, char ** argv){
    QCoreApplication app(argc,argv);

    if(app.arguments().count()<2){
        qDebug()<<"usage:  ./qxtjsonrpcclient method [arguments] \n  see http://www.raboof.com/projects/JayRock/Demo.ashx?help for methods to use";
        exit(1);
    }


    QxtJSONRpcClient client;
    client.setServiceUrl(QString("http://www.raboof.com/projects/JayRock/Demo.ashx"));



    QxtJSONRpcCall * call = client.call(app.arguments()[1],QVariant(app.arguments().mid(2)).toList());
    QxtSignalWaiter w(call,SIGNAL(finished()));
    w.wait();

    qDebug()<<call->result();
}