00001 // @(#)root/clarens:$Id: TXmlRpc.h 20882 2007-11-19 11:31:26Z rdm $ 00002 // Author: Maarten Ballintijn 25/10/2004 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TXmlRpc 00013 #define ROOT_TXmlRpc 00014 00015 ////////////////////////////////////////////////////////////////////////// 00016 // // 00017 // TXmlRpc // 00018 // // 00019 // // 00020 ////////////////////////////////////////////////////////////////////////// 00021 00022 #if !defined(__CINT__) 00023 #include "xmlrpc.h" 00024 #include "xmlrpc_client.h" 00025 #else 00026 struct xmlrpc_env; 00027 struct xmlrpc_server_info; 00028 struct xmlrpc_value; 00029 #endif 00030 00031 #ifndef ROOT_TObject 00032 #include "TObject.h" 00033 #endif 00034 00035 #ifndef ROOT_TClSession 00036 #include "TClSession.h" 00037 #endif 00038 00039 class TXmlRpc : public TObject { 00040 private: 00041 TClSession *fSession; //Clarens session info 00042 xmlrpc_env *fEnv; //call enviroment 00043 TString fService; //our service 00044 00045 public: 00046 TXmlRpc(TClSession *session); 00047 virtual ~TXmlRpc(); 00048 00049 void SetService(const Char_t *svc) {fService = svc;} 00050 const Char_t *GetService() const {return fService;} 00051 00052 xmlrpc_env *GetEnv() {xmlrpc_env_clean(fEnv); 00053 xmlrpc_env_init(fEnv); 00054 return fEnv;} 00055 xmlrpc_server_info *GetServerInfo() {return fSession->GetServerInfo();} 00056 const Char_t *GetServer() {return fSession->GetServer();} 00057 xmlrpc_value *Call(const Char_t *method, xmlrpc_value *arg); 00058 Bool_t RpcFailed(const Char_t *where, const Char_t *what); 00059 void PrintValue(xmlrpc_value *val); 00060 00061 ClassDef(TXmlRpc,0); // XMLRPC interface class 00062 }; 00063 00064 #endif