00001 #ifndef _XMLRPC_H_ 00002 #define _XMLRPC_H_ 00003 // 00004 // XmlRpc++ Copyright (c) 2002-2003 by Chris Morley 00005 // This library is free software; you can redistribute it and/or 00006 // modify it under the terms of the GNU Lesser General Public 00007 // License as published by the Free Software Foundation; either 00008 // version 2.1 of the License, or (at your option) any later version. 00009 // 00010 // This library is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 // Lesser General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public 00016 // License along with this library; if not, write to the Free Software 00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00018 // 00019 // The XmlRpc++ home page is http://xmlrpcpp.sourceforge.net/ 00020 // My home page is http://www.vermontel.net/~cmorley/ 00021 // 00022 00028 #if defined(_MSC_VER) 00029 # pragma warning(disable:4786) // identifier was truncated in debug info 00030 #endif 00031 00032 #ifndef MAKEDEPEND 00033 # include <string> 00034 #endif 00035 00036 #include "XmlRpcClient.h" 00037 #include "XmlRpcException.h" 00038 #include "XmlRpcServer.h" 00039 #include "XmlRpcServerMethod.h" 00040 #include "XmlRpcValue.h" 00041 #include "XmlRpcUtil.h" 00042 00043 namespace XmlRpc { 00044 00045 00047 class XmlRpcErrorHandler { 00048 public: 00049 virtual ~XmlRpcErrorHandler() {} 00050 00052 static XmlRpcErrorHandler* getErrorHandler() 00053 { return _errorHandler; } 00054 00056 static void setErrorHandler(XmlRpcErrorHandler* eh) 00057 { _errorHandler = eh; } 00058 00060 virtual void error(const char* msg) = 0; 00061 00062 protected: 00063 static XmlRpcErrorHandler* _errorHandler; 00064 }; 00065 00067 class XmlRpcLogHandler { 00068 public: 00069 virtual ~XmlRpcLogHandler() {}; 00070 00072 static XmlRpcLogHandler* getLogHandler() 00073 { return _logHandler; } 00074 00076 static void setLogHandler(XmlRpcLogHandler* lh) 00077 { _logHandler = lh; } 00078 00080 static int getVerbosity() 00081 { return _verbosity; } 00082 00084 static void setVerbosity(int v) 00085 { _verbosity = v; } 00086 00088 virtual void log(int level, const char* msg) = 0; 00089 00090 protected: 00091 static XmlRpcLogHandler* _logHandler; 00092 static int _verbosity; 00093 }; 00094 00096 int getVerbosity(); 00098 void setVerbosity(int level); 00099 00100 00102 extern const char XMLRPC_VERSION[]; 00103 00104 } // namespace XmlRpc 00105 00106 #endif // _XMLRPC_H_