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


xmlrpcpp
Author(s): Chris Morley and Konstantin Pilipchuk, slight modifications and ROS wrapping by Morgan Quigley
autogenerated on Sat Dec 28 2013 17:42:59