added: much better improved UPnP Renderer support. Now provides didl for currently...
[xbmc:xbmc-antiquated.git] / xbmc / lib / libUPnP / Platinum / Source / Devices / MediaRenderer / PltMediaRenderer.h
1 /*****************************************************************
2 |
3 |   Platinum - AV Media Renderer Device
4 |
5 |   Copyright (c) 2004-2008 Sylvain Rebaud
6 |   Author: Sylvain Rebaud (sylvain@rebaud.com)
7 |
8  ****************************************************************/
9
10 #ifndef _PLT_MEDIA_RENDERER_H_
11 #define _PLT_MEDIA_RENDERER_H_
12
13 /*----------------------------------------------------------------------
14 |   includes
15 +---------------------------------------------------------------------*/
16 #include "PltDeviceHost.h"
17
18 /*----------------------------------------------------------------------
19 |   PLT_MediaRenderer class
20 +---------------------------------------------------------------------*/
21 class PlaybackCmdListener
22 {
23 public:
24     NPT_Result OnNext();
25     NPT_Result OnPause();
26     NPT_Result OnPlay();
27     NPT_Result OnPrevious();
28     NPT_Result OnSeek();
29     NPT_Result OnStop();
30     NPT_Result OnOpen();
31     NPT_Result OnSetPlayMode();
32 };
33
34 /*----------------------------------------------------------------------
35 |   PLT_MediaRenderer class
36 +---------------------------------------------------------------------*/
37 class PLT_MediaRenderer : public PLT_DeviceHost
38 {
39 public:
40     PLT_MediaRenderer(PlaybackCmdListener* listener,
41                       const char*          friendly_name,
42                       bool                 show_ip = false,
43                       const char*          uuid = NULL,
44                       unsigned int         port = 0);
45
46     // PLT_DeviceHost methods
47     virtual NPT_Result OnAction(PLT_ActionReference&          action, 
48                                 const NPT_HttpRequestContext& context);
49
50     void ReportPlaybackStatus();
51
52 protected:
53     virtual ~PLT_MediaRenderer();
54
55     // ConnectionManager
56     virtual NPT_Result OnGetCurrentConnectionInfo(PLT_ActionReference& action);
57
58     // AVTransport
59     virtual NPT_Result OnNext(PLT_ActionReference& action);
60     virtual NPT_Result OnPause(PLT_ActionReference& action);
61     virtual NPT_Result OnPlay(PLT_ActionReference& action);
62     virtual NPT_Result OnPrevious(PLT_ActionReference& action);
63     virtual NPT_Result OnSeek(PLT_ActionReference& action);
64     virtual NPT_Result OnStop(PLT_ActionReference& action);
65     virtual NPT_Result OnSetAVTransportURI(PLT_ActionReference& action);
66     virtual NPT_Result OnSetPlayMode(PLT_ActionReference& action);
67
68     // RenderingControl
69     //virtual NPT_Result OnGetVolume(PLT_ActionReference& action);
70     virtual NPT_Result OnSetVolume(PLT_ActionReference& action);
71     virtual NPT_Result OnSetMute(PLT_ActionReference& action);
72 };
73
74 #endif /* _PLT_MEDIA_RENDERER_H_ */