1 #ifndef DISABLE_NETWORK
12 #include <lib/base/eptrlist.h>
13 #include <lib/network/httpd.h>
15 #define INSERT(KEY,VALUE) insert(std::pair<std::string, eXMLRPCVariant*>(KEY,VALUE))
19 std::map<std::string,eXMLRPCVariant*> *_struct;
20 std::vector<eXMLRPCVariant> *_array;
25 // QDateTime *_datetime;
26 // QByteArray *_base64;
29 eXMLRPCVariant(std::map<std::string,eXMLRPCVariant*> *_struct);
30 eXMLRPCVariant(std::vector<eXMLRPCVariant> *_array);
31 eXMLRPCVariant(__s32 *_i4);
32 eXMLRPCVariant(bool *_boolean);
33 eXMLRPCVariant(std::string *_string);
34 eXMLRPCVariant(double *_double);
35 // eXMLRPCVariant(QDateTime *_datetime);
36 // eXMLRPCVariant(QByteArray *_base64);
37 eXMLRPCVariant(const eXMLRPCVariant &c);
40 std::map<std::string,eXMLRPCVariant*> *getStruct();
41 std::vector<eXMLRPCVariant> *getArray();
44 std::string *getString();
46 // QDateTime *getDatetime();
47 // QByteArray *getBase64();
49 void toXML(std::string &);
52 class eXMLRPCResponse: public eHTTPDataSource
60 eXMLRPCResponse(eHTTPConnection *c);
64 void haveData(void *data, int len);
67 void xmlrpc_initialize(eHTTPD *httpd);
68 void xmlrpc_addMethod(std::string methodName, int (*)(std::vector<eXMLRPCVariant>&, ePtrList<eXMLRPCVariant>&));
69 void xmlrpc_fault(ePtrList<eXMLRPCVariant> &res, int faultCode, std::string faultString);
70 int xmlrpc_checkArgs(std::string args, std::vector<eXMLRPCVariant>&, ePtrList<eXMLRPCVariant> &res);
72 class eHTTPXMLRPCResolver: public iHTTPPathResolver
74 DECLARE_REF(eHTTPXMLRPCResolver);
76 eHTTPXMLRPCResolver();
77 eHTTPDataSource *getDataSource(std::string request, std::string path, eHTTPConnection *conn);
82 #endif //DISABLE_NETWORK