XmlRpcUtil.h
Go to the documentation of this file.00001 #ifndef _XMLRPCUTIL_H_
00002 #define _XMLRPCUTIL_H_
00003
00004
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
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 }
00066
00067 #endif // _XMLRPCUTIL_H_