Handler.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. #ifndef NULLSOFT_PLAYLISTS_HANDLER_H
  2. #define NULLSOFT_PLAYLISTS_HANDLER_H
  3. #include "svc_playlisthandler.h"
  4. #include <bfc/platform/types.h>
  5. #define DECLARE_HANDLER(className, IS_WRITER) class className ## Handler : public svc_playlisthandler {\
  6. public:\
  7. const wchar_t *enumExtensions(size_t n); \
  8. int SupportedFilename(const wchar_t *filename); \
  9. ifc_playlistloader *CreateLoader(const wchar_t *filename);\
  10. void ReleaseLoader(ifc_playlistloader *loader);\
  11. const wchar_t *GetName(); \
  12. int HasWriter() { return IS_WRITER; }\
  13. protected: RECVS_DISPATCH;}
  14. DECLARE_HANDLER(M3U, 1);
  15. DECLARE_HANDLER(PLS, 1);
  16. DECLARE_HANDLER(B4S, 0);
  17. // {8D031378-4209-4bfe-AC94-03C57C896214}
  18. static const GUID m3uHandlerGUID =
  19. { 0x8d031378, 0x4209, 0x4bfe, { 0xac, 0x94, 0x3, 0xc5, 0x7c, 0x89, 0x62, 0x14 } };
  20. // {4FF33CC0-F82C-4550-8E4A-DDF90036BE85}
  21. static const GUID plsHandlerGUID =
  22. { 0x4ff33cc0, 0xf82c, 0x4550, { 0x8e, 0x4a, 0xdd, 0xf9, 0x0, 0x36, 0xbe, 0x85 } };
  23. static const GUID b4sHandlerGUID =
  24. { 0x6f62cbb8, 0x7e1f, 0x43eb, { 0xb3, 0xf6, 0x1, 0xc2, 0x60, 0x10, 0x29, 0xa3 } };
  25. #endif