XMLString.h 751 B

1234567891011121314151617181920212223242526272829
  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 MAX_URL
  8. class XMLString : public ifc_xmlreadercallback
  9. {
  10. public:
  11. XMLString();
  12. void Reset();
  13. const wchar_t *GetString();
  14. void ManualSet(const wchar_t *string);
  15. private:
  16. /* XML callbacks */
  17. void StartTag(const wchar_t *xmlpath, const wchar_t *xmltag, ifc_xmlreaderparams *params);
  18. void EndTag(const wchar_t *xmlpath, const wchar_t *xmltag);
  19. void TextHandler(const wchar_t *xmlpath, const wchar_t *xmltag, const wchar_t *str);
  20. wchar_t data[XMLSTRING_SIZE]; // for now, we'll make it dynamic later
  21. RECVS_DISPATCH;
  22. };
  23. #endif