XmlRpcUtil.h

Go to the documentation of this file.
00001 #ifndef _XMLRPCUTIL_H_
00002 #define _XMLRPCUTIL_H_
00003 //
00004 // XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
00005 //
00006 
00012 #if defined(_MSC_VER)
00013 # pragma warning(disable:4786)    // identifier was truncated in debug info
00014 #endif
00015 
00016 #ifndef MAKEDEPEND
00017 # include <string>
00018 #endif
00019 
00020 #if defined(_MSC_VER)
00021 # define snprintf           _snprintf
00022 # define vsnprintf    _vsnprintf
00023 # define strcasecmp       _stricmp
00024 # define strncasecmp    _strnicmp
00025 #elif defined(__BORLANDC__)
00026 # define strcasecmp stricmp
00027 # define strncasecmp strnicmp
00028 #endif
00029 
00030 namespace XmlRpc {
00031 
00033   class XmlRpcUtil {
00034   public:
00035     // hokey xml parsing
00037     static std::string parseTag(const char* tag, std::string const& xml, int* offset);
00038 
00040     static bool findTag(const char* tag, std::string const& xml, int* offset);
00041 
00044     static std::string getNextTag(std::string const& xml, int* offset);
00045 
00048     static bool nextTagIs(const char* tag, std::string const& xml, int* offset);
00049 
00050 
00052     static std::string xmlEncode(const std::string& raw);
00053 
00055     static std::string xmlDecode(const std::string& encoded);
00056 
00057 
00059     static void log(int level, const char* fmt, ...);
00060 
00062     static void error(const char* fmt, ...);
00063 
00064   };
00065 } // namespace XmlRpc
00066 
00067 #endif // _XMLRPCUTIL_H_
Generated on Wed May 26 16:21:15 2010 for OverSim by  doxygen 1.6.3