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