diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/playlist/B4SLoader.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/playlist/B4SLoader.h')
-rw-r--r-- | Src/playlist/B4SLoader.h | 46 |
1 files changed, 46 insertions, 0 deletions
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 <api/service/waServiceFactory.h> +#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 |