From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/playlist/B4SLoader.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Src/playlist/B4SLoader.h (limited to 'Src/playlist/B4SLoader.h') diff --git a/Src/playlist/B4SLoader.h b/Src/playlist/B4SLoader.h new file mode 100644 index 00000000..0c8e4bf5 --- /dev/null +++ b/Src/playlist/B4SLoader.h @@ -0,0 +1,46 @@ +#ifndef NULLSOFT_WINAMP_B4S_H +#define NULLSOFT_WINAMP_B4S_H + +#include "../xml/obj_xml.h" +#include "../xml/ifc_xmlreadercallback.h" +#include "api__playlist.h" +#include +#include "XMLString.h" +#include "main.h" +#include "ifc_playlistloader.h" + +class B4SXML : public ifc_xmlreadercallback +{ +public: + B4SXML(); + ifc_playlistloadercallback *playlist; + //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); + + XMLString /*name, artist, */title/*, album*/, length; // wa2 only supports title and length in the playlist anyway + RECVS_DISPATCH; + wchar_t filename[FILENAME_SIZE]; +}; + +class B4SLoader : public ifc_playlistloader +{ +public: + B4SLoader(); + ~B4SLoader(); + + void LoadFile(const char *filename); + void LoadURL(const char *url); + + int Load(const wchar_t *filename, ifc_playlistloadercallback *playlist); + + RECVS_DISPATCH; + + obj_xml *parser; + waServiceFactory *parserFactory; + B4SXML b4sXml; +}; + +#endif \ No newline at end of file -- cgit