summaryrefslogtreecommitdiff
path: root/cPlexOsdItem.h
blob: 2e345814d1457d8d19af80b6601165c3602d240d (plain)
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
#ifndef CPLEXOSDITEM_H
#define CPLEXOSDITEM_H

#include <memory>

#include <vdr/osd.h> // Base class: cOsdItem
#include <vdr/interface.h>
#include <vdr/plugin.h>

#include "PVideo.h"
#include "Stream.h"
#include "Directory.h"
#include "Plexservice.h"

class cPlexOsdItem : public cOsdItem
{
private:
	plexclient::Video* item;
	plexclient::Directory* dir;
	plexclient::Stream stream;
	std::shared_ptr<plexclient::Plexservice> pservice;
	bool m_bVideo;	
	bool m_bDir;

public:
	cPlexOsdItem(const char* title);
	cPlexOsdItem(const char* title, std::shared_ptr<plexclient::Plexservice> service);
	cPlexOsdItem(const char* title, plexclient::Video* obj);
	cPlexOsdItem(const char* title, plexclient::Directory* obj);
/**
 * @brief 
 * @param title Title
 * @param obj will be copied
 */
	cPlexOsdItem(const char* title, plexclient::Stream* obj);
	plexclient::Video* GetAttachedVideo();
	plexclient::Directory* GetAttachedDirectory();
	plexclient::Stream& GetAttachedStream() { return stream; }
	std::shared_ptr<plexclient::Plexservice> GetAttachedService();
	
	bool IsVideo() const {
		return m_bVideo;
	}
	bool IsDir() const {
		return m_bDir;
	}

	//virtual eOSState ProcessKey(eKeys Key);
	//virtual void Set(void);
	//virtual void SetMenuItem(cSkinDisplayMenu* DisplayMenu, int Index, bool Current, bool Selectable);
};

#endif // CPLEXOSDITEM_H