1
0

B4SLoader.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef NULLSOFT_WINAMP_B4S_H
  2. #define NULLSOFT_WINAMP_B4S_H
  3. #include "../xml/obj_xml.h"
  4. #include "../xml/ifc_xmlreadercallback.h"
  5. #include "api__playlist.h"
  6. #include <api/service/waServiceFactory.h>
  7. #include "XMLString.h"
  8. #include "main.h"
  9. #include "ifc_playlistloader.h"
  10. class B4SXML : public ifc_xmlreadercallback
  11. {
  12. public:
  13. B4SXML();
  14. ifc_playlistloadercallback *playlist;
  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. XMLString /*name, artist, */title/*, album*/, length; // wa2 only supports title and length in the playlist anyway
  20. RECVS_DISPATCH;
  21. wchar_t filename[FILENAME_SIZE];
  22. };
  23. class B4SLoader : public ifc_playlistloader
  24. {
  25. public:
  26. B4SLoader();
  27. ~B4SLoader();
  28. void LoadFile(const char *filename);
  29. void LoadURL(const char *url);
  30. int Load(const wchar_t *filename, ifc_playlistloadercallback *playlist);
  31. RECVS_DISPATCH;
  32. obj_xml *parser;
  33. waServiceFactory *parserFactory;
  34. B4SXML b4sXml;
  35. };
  36. #endif