aboutsummaryrefslogtreecommitdiff
path: root/Src/Plugins/Input/in_wmvdrm/WMPlaylist.h
blob: 8147e5d0f1b9e3cc7f01fd078c422fb612f7a4e7 (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
#ifndef NULLSOFT_IN_WMVDRM_WMPLAYLIST_H
#define NULLSOFT_IN_WMVDRM_WMPLAYLIST_H

#include "../playlist/ifc_playlistloadercallback.h"

class WMPlaylist : public ifc_playlistloadercallback
{
public:
	WMPlaylist()                                                      {}

	~WMPlaylist()
	{
		if ( playstring )
			free( playstring );

		if ( playlistFilename )
			free( playlistFilename );
	}

	void Clear()
	{
		if ( playstring )
			free( playstring );

		playstring = 0;

		if ( playlistFilename )
			free( playlistFilename );

		playlistFilename = 0;
	}

	void OnFile( const wchar_t *filename, const wchar_t *title, int lengthInMS, ifc_plentryinfo *info );

	const wchar_t *GetFileName();
	const wchar_t *GetOriginalFileName();
	/* TODO: need something like these, just not sure exact what yet
	bool ForceStartTime(int &);
	bool ForceLength(int &);
	bool ForceNoSeek();
	*/
	bool IsMe( const char *filename );
	bool IsMe( const wchar_t *filename );


protected:
	RECVS_DISPATCH;

public:
	wchar_t *playstring       = 0;
	wchar_t *playlistFilename = 0;
};

extern WMPlaylist activePlaylist;

#endif  // !NULLSOFT_IN_WMVDRM_WMPLAYLIST_H