1
0

XMLString.h 771 B

123456789101112131415161718192021222324252627282930
  1. #ifndef NULLSOFT_WINAMP_XMLSTRING_H
  2. #define NULLSOFT_WINAMP_XMLSTRING_H
  3. #include "../xml/ifc_xmlreadercallback.h"
  4. /*
  5. this one is an xml callback that just saves the last encountered string
  6. */
  7. #define XMLSTRING_SIZE 2048
  8. class XMLString : public ifc_xmlreadercallback
  9. {
  10. public:
  11. XMLString();
  12. void Reset();
  13. const wchar_t *GetString();
  14. uint32_t GetUInt32();
  15. void ManualSet(const wchar_t *string);
  16. private:
  17. /* XML callbacks */
  18. void StartTag(const wchar_t *xmlpath, const wchar_t *xmltag, ifc_xmlreaderparams *params);
  19. void EndTag(const wchar_t *xmlpath, const wchar_t *xmltag);
  20. void TextHandler(const wchar_t *xmlpath, const wchar_t *xmltag, const wchar_t *str);
  21. wchar_t data[XMLSTRING_SIZE]; // for now, we'll make it dynamic later
  22. RECVS_DISPATCH;
  23. };
  24. #endif