diff options
Diffstat (limited to 'Src/auth/XMLString.h')
-rw-r--r-- | Src/auth/XMLString.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Src/auth/XMLString.h b/Src/auth/XMLString.h new file mode 100644 index 00000000..4c36c0b8 --- /dev/null +++ b/Src/auth/XMLString.h @@ -0,0 +1,30 @@ +#ifndef NULLSOFT_WINAMP_XMLSTRING_H +#define NULLSOFT_WINAMP_XMLSTRING_H + + +#include "../xml/ifc_xmlreadercallback.h" +/* +this one is an xml callback that just saves the last encountered string +*/ + +#define XMLSTRING_SIZE 2048 +class XMLString : public ifc_xmlreadercallback +{ +public: + XMLString(); + void Reset(); + const wchar_t *GetString(); + uint32_t GetUInt32(); + void ManualSet(const wchar_t *string); +private: + /* XML callbacks */ + void StartTag(const wchar_t *xmlpath, const wchar_t *xmltag, ifc_xmlreaderparams *params); + void EndTag(const wchar_t *xmlpath, const wchar_t *xmltag); + void TextHandler(const wchar_t *xmlpath, const wchar_t *xmltag, const wchar_t *str); + + wchar_t data[XMLSTRING_SIZE]; // for now, we'll make it dynamic later + + RECVS_DISPATCH; +}; + +#endif
\ No newline at end of file |