PlaylistInfo.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef NULLSOFT_ML_PLAYLISTS_PLAYLIST_INFO_H
  2. #define NULLSOFT_ML_PLAYLISTS_PLAYLIST_INFO_H
  3. #include <windows.h> // for MAX_PATH
  4. #include <iostream> // for std::wstring
  5. // REVIEW: what if we want this to be an ifc_playlist * from elsewhere instead of a physical m3u file
  6. // maybe this should be a playlist factory instead?
  7. class PlaylistInfo
  8. {
  9. /* --- Methods --- */
  10. public:
  11. PlaylistInfo();
  12. PlaylistInfo( GUID _playlist_guid );
  13. PlaylistInfo( size_t p_index ); // as a pre-condition, AGAVE_API_PLAYLISTS needs to be locked
  14. PlaylistInfo( const PlaylistInfo &copy );
  15. bool Valid();
  16. bool Associate( INT_PTR _treeId );
  17. size_t GetIndex();
  18. const wchar_t *GetFilename();
  19. const wchar_t *GetName();
  20. size_t GetLength();
  21. void SetLength( size_t newLength );
  22. size_t GetSize();
  23. void SetSize( size_t newSize );
  24. size_t GetCloud();
  25. void SetCloud( size_t newCloud );
  26. void Refresh();
  27. void IssueSaveCallback();
  28. private:
  29. void Clear();
  30. /* --- Data --- */
  31. public:
  32. INT_PTR treeId; // if it's being displayed as a media library tree, the id is here (0 otherwise)
  33. GUID playlist_guid;
  34. private:
  35. size_t index;
  36. size_t iterator;
  37. size_t length; // in seconds
  38. size_t numItems;
  39. size_t cloud;
  40. std::wstring _title;
  41. std::wstring _filename;
  42. };
  43. #endif