1
0

ifc_playlistT.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #pragma once
  2. #include "ifc_playlist.h"
  3. template <class T>
  4. class ifc_playlistT : public ifc_playlist
  5. {
  6. protected:
  7. ifc_playlistT() {}
  8. ~ifc_playlistT() {}
  9. void Clear();
  10. //void AppendWithInfo(const wchar_t *filename, const char *title, int lengthInMS);
  11. //void Append(const wchar_t *filename);
  12. size_t GetNumItems() { return 0; }
  13. size_t GetItem( size_t item, wchar_t *filename, size_t filenameCch ) { return 0; }
  14. size_t GetItemTitle( size_t item, wchar_t *title, size_t titleCch ) { return 0; }
  15. int GetItemLengthMilliseconds( size_t item ) { return -1; }
  16. size_t GetItemExtendedInfo( size_t item, const wchar_t *metadata, wchar_t *info, size_t infoCch ) { return 0; }
  17. int Reverse() { return PLAYLIST_UNIMPLEMENTED; }
  18. int Swap( size_t item1, size_t item2 ) { return PLAYLIST_UNIMPLEMENTED; }
  19. int Randomize( int ( *generator )( ) ) { return PLAYLIST_UNIMPLEMENTED; }
  20. void Remove( size_t item ) {}
  21. int SortByTitle() { return 0; }
  22. int SortByFilename() { return 0; }
  23. int SortByDirectory() { return 0; }
  24. #define CBCLASS T
  25. #define CBCLASST ifc_playlistT<T>
  26. START_DISPATCH_INLINE;
  27. VCBT( IFC_PLAYLIST_CLEAR, Clear )
  28. //M_VCB( IFC_PLAYLIST_APPENDWITHINFO, AppendWithInfo)
  29. //M_VCB( IFC_PLAYLIST_APPEND, Append)
  30. CBT( IFC_PLAYLIST_GETNUMITEMS, GetNumItems )
  31. CBT( IFC_PLAYLIST_GETITEM, GetItem )
  32. CBT( IFC_PLAYLIST_GETITEMTITLE, GetItemTitle )
  33. CBT( IFC_PLAYLIST_GETITEMLENGTHMILLISECONDS, GetItemLengthMilliseconds )
  34. CBT( IFC_PLAYLIST_GETITEMEXTENDEDINFO, GetItemExtendedInfo )
  35. CBT( IFC_PLAYLIST_REVERSE, Reverse )
  36. CBT( IFC_PLAYLIST_SWAP, Swap )
  37. CBT( IFC_PLAYLIST_RANDOMIZE, Randomize )
  38. VCBT( IFC_PLAYLIST_REMOVE, Remove )
  39. CBT( IFC_PLAYLIST_SORTBYTITLE, SortByTitle )
  40. CBT( IFC_PLAYLIST_SORTBYFILENAME, SortByFilename )
  41. CBT( IFC_PLAYLIST_SORTBYDIRECTORY, SortByDirectory )
  42. END_DISPATCH;
  43. #undef CBCLASS
  44. #undef CBCLASST
  45. };