#include #include "sfi/sfi.h" using namespace sfa; int main (int argc, char** argv) { QApplication app(argc, argv); Sfi sfi; return 0; //return app.exec(); } /* class TestClient : public QObject { Q_OBJECT public: TestClient(QObject* parent = 0); virtual ~TestClient(); void test(); void get_credential(); void list(); private slots: void processReturnValue(int request_id, QVariant value); void processSslErrors(const QList &errs); private: QString user_cred; xmlrpc::SslClient* ssl_client; QMap auth; }; // end class TestClient::TestClient(QObject* parent) : QObject(parent) { ssl_client = new xmlrpc::SslClient(this); connect( ssl_client, SIGNAL(done( int, QVariant )), this, SLOT(processReturnValue( int, QVariant )) ); } TestClient::~TestClient() { if (ssl_client) { delete ssl_client; } } void TestClient::test() { PLCAPI //auth["AuthMethod"] = QString("password"); //auth["Username"] = QString("tmetin@sophia.inria.fr"); //auth["AuthString"] = QString("***"); auth["AuthMethod"] = QString("anonymous"); ssl_client->setHost("www.planet-lab.eu", 443, "/PLCAPI/"); ssl_client->request("GetNodeGroups", auth); ssl_client->setKey("/home/baris/src/sface/root.pkey"); ssl_client->setCert("/home/baris/src/sface/root.cert"); ssl_client->setHost("138.96.255.225", 12345); ssl_client->setUserAgent("SFAce"); get_credential(); } void TestClient::get_credential() { ssl_client->request("get_credential", xmlrpc::Variant(), QString("user"), QString("plefake.ple.root")); } void TestClient::list() { ssl_client->request("list", user_cred, QString("plefake.ple")); } void TestClient::processReturnValue(int request_id, QVariant value) { qDebug() << "Request ID: " << request_id << " (" << ssl_client->methodName(request_id) << ")"; if (ssl_client->methodName(request_id) == "get_credential") { user_cred = value.toString(); list(); } } void TestClient::processSslErrors(const QList &errs) { QSslError err; foreach (err, errs) { qDebug() << err.errorString(); } } */