#ifndef _PLT_MEDIA_RENDERER_H_
#define _PLT_MEDIA_RENDERER_H_
#include "PltDeviceHost.h"
class PLT_MediaRendererDelegate
{
public:
virtual ~PLT_MediaRendererDelegate() {}
virtual NPT_Result OnGetCurrentConnectionInfo(PLT_ActionReference& action) = 0;
virtual NPT_Result OnNext(PLT_ActionReference& action) = 0;
virtual NPT_Result OnPause(PLT_ActionReference& action) = 0;
virtual NPT_Result OnPlay(PLT_ActionReference& action) = 0;
virtual NPT_Result OnPrevious(PLT_ActionReference& action) = 0;
virtual NPT_Result OnSeek(PLT_ActionReference& action) = 0;
virtual NPT_Result OnStop(PLT_ActionReference& action) = 0;
virtual NPT_Result OnSetAVTransportURI(PLT_ActionReference& action) = 0;
virtual NPT_Result OnSetPlayMode(PLT_ActionReference& action) = 0;
virtual NPT_Result OnSetVolume(PLT_ActionReference& action) = 0;
virtual NPT_Result OnSetVolumeDB(PLT_ActionReference& action) = 0;
virtual NPT_Result OnGetVolumeDBRange(PLT_ActionReference& action) = 0;
virtual NPT_Result OnSetMute(PLT_ActionReference& action) = 0;
};
class PLT_MediaRenderer : public PLT_DeviceHost
{
public:
PLT_MediaRenderer(const char* friendly_name,
bool show_ip = false,
const char* uuid = NULL,
unsigned int port = 0,
bool port_rebind = false);
virtual void SetDelegate(PLT_MediaRendererDelegate* delegate) { m_Delegate = delegate; }
virtual NPT_Result SetupServices();
virtual NPT_Result OnAction(PLT_ActionReference& action,
const PLT_HttpRequestContext& context);
protected:
virtual ~PLT_MediaRenderer();
virtual NPT_Result OnGetCurrentConnectionInfo(PLT_ActionReference& action);
virtual NPT_Result OnNext(PLT_ActionReference& action);
virtual NPT_Result OnPause(PLT_ActionReference& action);
virtual NPT_Result OnPlay(PLT_ActionReference& action);
virtual NPT_Result OnPrevious(PLT_ActionReference& action);
virtual NPT_Result OnSeek(PLT_ActionReference& action);
virtual NPT_Result OnStop(PLT_ActionReference& action);
virtual NPT_Result OnSetAVTransportURI(PLT_ActionReference& action);
virtual NPT_Result OnSetPlayMode(PLT_ActionReference& action);
virtual NPT_Result OnSetVolume(PLT_ActionReference& action);
virtual NPT_Result OnSetVolumeDB(PLT_ActionReference &action);
virtual NPT_Result OnGetVolumeDBRange(PLT_ActionReference &action);
virtual NPT_Result OnSetMute(PLT_ActionReference& action);
private:
PLT_MediaRendererDelegate* m_Delegate;
};
#endif