00001 #ifndef _XMLRPC_H_
00002 #define _XMLRPC_H_
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 #if defined(_MSC_VER)
00021 # pragma warning(disable:4786)    // identifier was truncated in debug info
00022 #endif
00023 
00024 #ifndef MAKEDEPEND
00025 # include <string>
00026 #endif
00027 
00028 #include "XmlRpcClient.h"
00029 #include "XmlRpcException.h"
00030 #include "XmlRpcServer.h"
00031 #include "XmlRpcServerMethod.h"
00032 #include "XmlRpcValue.h"
00033 #include "XmlRpcUtil.h"
00034 
00035 namespace XmlRpc {
00036 
00037 
00039   class XmlRpcErrorHandler {
00040   public:
00042     static XmlRpcErrorHandler* getErrorHandler() 
00043     { return _errorHandler; }
00044 
00046     static void setErrorHandler(XmlRpcErrorHandler* eh)
00047     { _errorHandler = eh; }
00048 
00050     virtual void error(const char* msg) = 0;
00051 
00052   protected:
00053     static XmlRpcErrorHandler* _errorHandler;
00054   };
00055 
00057   class XmlRpcLogHandler {
00058   public:
00060     static XmlRpcLogHandler* getLogHandler() 
00061     { return _logHandler; }
00062 
00064     static void setLogHandler(XmlRpcLogHandler* lh)
00065     { _logHandler = lh; }
00066 
00068     static int getVerbosity() 
00069     { return _verbosity; }
00070 
00072     static void setVerbosity(int v) 
00073     { _verbosity = v; }
00074 
00076     virtual void log(int level, const char* msg) = 0;
00077 
00078   protected:
00079     static XmlRpcLogHandler* _logHandler;
00080     static int _verbosity;
00081   };
00082 
00084   int getVerbosity();
00086   void setVerbosity(int level);
00087 
00088 
00090   extern const char XMLRPC_VERSION[];
00091 
00092 } 
00093 
00094 #endif // _XMLRPC_H_