XmlRpc++: XmlRpcUtil.h Source File

- Main Page
- Classes
- Files

# XmlRpcUtil.h

    00001 #ifndef _XMLRPCUTIL_H_
    00002 #define _XMLRPCUTIL_H_
    00003 //
    00004 // XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
    00005 //
    00006 #if defined(_MSC_VER)
    00007 # pragma warning(disable:4786)    // identifier was truncated in debug info
    00008 #endif
    00009
    00010 #ifndef MAKEDEPEND
    00011 # include <string>
    00012 #endif
    00013
    00014 #if defined(_MSC_VER)
    00015 # define snprintf           _snprintf
    00016 # define vsnprintf    _vsnprintf
    00017 # define strcasecmp       _stricmp
    00018 # define strncasecmp    _strnicmp
    00019 #elif defined(__BORLANDC__)
    00020 # define strcasecmp stricmp
    00021 # define strncasecmp strnicmp
    00022 #endif
    00023
    00024 namespace XmlRpc {
    00025
    00027   class XmlRpcUtil {
    00028   public:
    00029     // hokey xml parsing
    00031     static std::string parseTag(const char* tag, std::string const& xml, int* offset);
    00032
    00034     static bool findTag(const char* tag, std::string const& xml, int* offset);
    00035
    00038     static std::string getNextTag(std::string const& xml, int* offset);
    00039
    00042     static bool nextTagIs(const char* tag, std::string const& xml, int* offset);
    00043
    00044
    00046     static std::string xmlEncode(const std::string& raw);
    00047
    00049     static std::string xmlDecode(const std::string& encoded);
    00050
    00051
    00053     static void log(int level, const char* fmt, ...);
    00054
    00056     static void error(const char* fmt, ...);
    00057
    00058   };
    00059 } // namespace XmlRpc
    00060
    00061 #endif // _XMLRPCUTIL_H_