1
0

pl_entry.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef NULLSOFT_ML_PLAYLISTS_PL_ENTRY_H
  2. #define NULLSOFT_ML_PLAYLISTS_PL_ENTRY_H
  3. #include "ifc_plentryinfo.h"
  4. #include <windows.h>
  5. #include <map>
  6. #include <iostream>
  7. class pl_entry
  8. {
  9. public:
  10. pl_entry() {}
  11. pl_entry( const wchar_t *p_filename, const wchar_t *p_title, int p_length_ms );
  12. pl_entry( const wchar_t *p_filename, const wchar_t *p_title, int p_length_ms, int p_size );
  13. pl_entry( const wchar_t *p_filename, const wchar_t *p_title, int p_length_ms, ifc_plentryinfo *p_info );
  14. pl_entry( const wchar_t *p_filename, const wchar_t *p_title, int p_length_ms, int p_size, ifc_plentryinfo *p_info );
  15. pl_entry( const wchar_t *p_filename, const wchar_t *p_title, int p_length_ms,
  16. const wchar_t *mediahash, const wchar_t *metahash,
  17. const wchar_t *cloud_id, const wchar_t *cloud_status,
  18. const wchar_t *cloud_devices );
  19. ~pl_entry();
  20. size_t GetFilename( wchar_t *p_filename, size_t filenameCch );
  21. size_t GetTitle( wchar_t *title, size_t titleCch );
  22. int GetLengthInMilliseconds();
  23. int GetSizeInBytes();
  24. size_t GetExtendedInfo( const wchar_t *metadata, wchar_t *info, size_t infoCch );
  25. void SetFilename( const wchar_t *p_filename );
  26. void SetTitle( const wchar_t *title );
  27. void SetLengthMilliseconds( int length );
  28. void SetSizeBytes( int size );
  29. void SetMediahash( const wchar_t *mediahash );
  30. void SetMetahash( const wchar_t *metahash );
  31. void SetCloudID( const wchar_t *cloud_id );
  32. void SetCloudStatus( const wchar_t *cloud_status );
  33. void SetCloudDevices( const wchar_t *cloud_devices );
  34. bool isLocal() const { return _is_local_file; }
  35. wchar_t *filename = 0;
  36. wchar_t *filetitle = 0;
  37. wchar_t *mediahash = 0;
  38. wchar_t *metahash = 0;
  39. wchar_t *cloud_id = 0;
  40. wchar_t *cloud_status = 0;
  41. wchar_t *cloud_devices = 0;
  42. std::map<std::wstring, std::wstring> _extended_infos;
  43. int length = -1;
  44. int size = 0;
  45. bool cached = false;
  46. bool _is_local_file = false;
  47. };
  48. #endif