CPPMyth
Library to interoperate with MythTV server
Myth::WSAPI Class Reference
Collaboration diagram for Myth::WSAPI:

Public Member Functions

 WSAPI (const std::string &server, unsigned port, const std::string &securityPin)
 
unsigned CheckService ()
 
WSServiceVersion_t CheckService (WSServiceId_t id)
 
void InvalidateService ()
 
std::string GetServerHostName ()
 
VersionPtr GetVersion ()
 
std::string ResolveHostName (const std::string &hostname)
 
SettingPtr GetSetting (const std::string &key, const std::string &hostname)
 GET Myth/GetSetting.
 
SettingPtr GetSetting (const std::string &key, bool myhost)
 GET Myth/GetSetting.
 
SettingMapPtr GetSettings (const std::string &hostname)
 GET Myth/GetSetting.
 
SettingMapPtr GetSettings (bool myhost)
 GET Myth/GetSetting.
 
bool PutSetting (const std::string &key, const std::string &value, bool myhost)
 POST Myth/PutSetting.
 
CaptureCardListPtr GetCaptureCardList ()
 GET Capture/GetCaptureCardList.
 
VideoSourceListPtr GetVideoSourceList ()
 GET Channel/GetVideoSourceList.
 
ChannelListPtr GetChannelList (uint32_t sourceid, bool onlyVisible=true)
 GET Channel/GetChannelInfoList.
 
ChannelPtr GetChannel (uint32_t chanid)
 GET Channel/GetChannelInfo.
 
ProgramMapPtr GetProgramGuide (uint32_t chanid, time_t starttime, time_t endtime)
 GET Guide/GetProgramGuide for the given channel.
 
std::map< uint32_t, ProgramMapPtr > GetProgramGuide (time_t starttime, time_t endtime)
 GET Guide/GetProgramGuide.
 
ProgramListPtr GetRecordedList (unsigned n=0, bool descending=false)
 GET Dvr/GetRecordedList.
 
ProgramPtr GetRecorded (uint32_t chanid, time_t recstartts)
 GET Dvr/GetRecorded.
 
ProgramPtr GetRecorded (uint32_t recordedid)
 GET Dvr/GetRecorded.
 
bool UpdateRecordedWatchedStatus (uint32_t chanid, time_t recstartts, bool watched)
 POST Dvr/UpdateRecordedWatchedStatus.
 
bool UpdateRecordedWatchedStatus (uint32_t recordedid, bool watched)
 POST Dvr/UpdateRecordedWatchedStatus.
 
bool DeleteRecording (uint32_t chanid, time_t recstartts, bool forceDelete=false, bool allowRerecord=false)
 POST Dvr/DeleteRecording.
 
bool DeleteRecording (uint32_t recordedid, bool forceDelete=false, bool allowRerecord=false)
 POST Dvr/DeleteRecording.
 
bool UnDeleteRecording (uint32_t chanid, time_t recstartts)
 POST Dvr/UnDeleteRecording.
 
bool UnDeleteRecording (uint32_t recordedid)
 POST Dvr/UnDeleteRecording.
 
RecordScheduleListPtr GetRecordScheduleList ()
 GET Dvr/GetRecordScheduleList.
 
RecordSchedulePtr GetRecordSchedule (uint32_t recordid)
 GET Dvr/GetRecordSchedule.
 
bool AddRecordSchedule (RecordSchedule &record)
 POST Dvr/AddRecordSchedule.
 
bool UpdateRecordSchedule (RecordSchedule &record)
 POST Dvr/UpdateRecordSchedule.
 
bool DisableRecordSchedule (uint32_t recordid)
 POST Dvr/DisableRecordSchedule.
 
bool EnableRecordSchedule (uint32_t recordid)
 POST Dvr/EnableRecordSchedule.
 
bool RemoveRecordSchedule (uint32_t recordid)
 POST Dvr/RemoveRecordSchedule.
 
ProgramListPtr GetUpcomingList ()
 GET Dvr/GetUpcomingList.
 
ProgramListPtr GetConflictList ()
 GET Dvr/GetConflictList.
 
ProgramListPtr GetExpiringList ()
 GET Dvr/GetExpiringList.
 
StringListPtr GetRecGroupList ()
 GET Dvr/GetRecGroupList.
 
WSStreamPtr GetFile (const std::string &filename, const std::string &sgname)
 GET Content/GetFile.
 
WSStreamPtr GetChannelIcon (uint32_t chanid, unsigned width=0, unsigned height=0)
 GET Guide/GetChannelIcon.
 
std::string GetChannelIconUrl (uint32_t chanid, unsigned width=0, unsigned height=0)
 Returns URL for channel icon.
 
WSStreamPtr GetPreviewImage (uint32_t chanid, time_t recstartts, unsigned width=0, unsigned height=0)
 GET Content/GetPreviewImage.
 
std::string GetPreviewImageUrl (uint32_t chanid, time_t recstartts, unsigned width=0, unsigned height=0)
 Returns URL for preview image.
 
WSStreamPtr GetRecordingArtwork (const std::string &type, const std::string &inetref, uint16_t season, unsigned width=0, unsigned height=0)
 GET Content/GetRecordingArtwork.
 
std::string GetRecordingArtworkUrl (const std::string &type, const std::string &inetref, uint16_t season, unsigned width=0, unsigned height=0)
 Returns URL for recording artwork.
 
ArtworkListPtr GetRecordingArtworkList (uint32_t chanid, time_t recstartts)
 GET Content/GetRecordingArtworkList.
 
MarkListPtr GetRecordedCommBreak (uint32_t recordedid, int unit)
 GET Dvr/GetRecordedCommBreak. More...
 
MarkListPtr GetRecordedCutList (uint32_t recordedid, int unit)
 GET Dvr/GetRecordedCutList. More...
 
bool SetSavedBookmark (uint32_t recordedid, int unit, int64_t value)
 POST Dvr/SetSavedBookmark. More...
 
int64_t GetSavedBookmark (uint32_t recordedid, int unit)
 GET Dvr/GetSavedBookmark. More...
 

Private Member Functions

 WSAPI (const WSAPI &)
 
WSAPIoperator= (const WSAPI &)
 
bool InitWSAPI ()
 
bool GetServiceVersion (WSServiceId_t id, WSServiceVersion_t &version)
 
bool CheckServerHostName2_0 ()
 
bool CheckVersion2_0 ()
 
SettingPtr GetSetting2_0 (const std::string &key, const std::string &hostname)
 
SettingPtr GetSetting5_0 (const std::string &key, const std::string &hostname)
 
SettingMapPtr GetSettings2_0 (const std::string &hostname)
 
SettingMapPtr GetSettings5_0 (const std::string &hostname)
 
bool PutSetting2_0 (const std::string &key, const std::string &value, bool myhost)
 
CaptureCardListPtr GetCaptureCardList1_4 ()
 
VideoSourceListPtr GetVideoSourceList1_2 ()
 
ChannelListPtr GetChannelList1_2 (uint32_t sourceid, bool onlyVisible)
 
ChannelListPtr GetChannelList1_5 (uint32_t sourceid, bool onlyVisible)
 
ChannelPtr GetChannel1_2 (uint32_t chanid)
 
std::map< uint32_t, ProgramMapPtr > GetProgramGuide1_0 (time_t starttime, time_t endtime)
 
ProgramMapPtr GetProgramGuide1_0 (uint32_t chanid, time_t starttime, time_t endtime)
 
std::map< uint32_t, ProgramMapPtr > GetProgramGuide2_2 (time_t starttime, time_t endtime)
 
ProgramMapPtr GetProgramList2_2 (uint32_t chanid, time_t starttime, time_t endtime)
 
ProgramListPtr GetRecordedList1_5 (unsigned n, bool descending)
 
ProgramPtr GetRecorded1_5 (uint32_t chanid, time_t recstartts)
 
ProgramPtr GetRecorded6_0 (uint32_t recordedid)
 
bool DeleteRecording2_1 (uint32_t chanid, time_t recstartts, bool forceDelete, bool allowRerecord)
 
bool DeleteRecording6_0 (uint32_t recordedid, bool forceDelete, bool allowRerecord)
 
bool UnDeleteRecording2_1 (uint32_t chanid, time_t recstartts)
 
bool UnDeleteRecording6_0 (uint32_t recordedid)
 
bool UpdateRecordedWatchedStatus4_5 (uint32_t chanid, time_t recstartts, bool watched)
 
bool UpdateRecordedWatchedStatus6_0 (uint32_t recordedid, bool watched)
 
MarkListPtr GetRecordedCommBreak6_1 (uint32_t recordedid, int unit)
 
MarkListPtr GetRecordedCutList6_1 (uint32_t recordedid, int unit)
 
bool SetSavedBookmark6_2 (uint32_t recordedid, int unit, int64_t value)
 
int64_t GetSavedBookmark6_2 (uint32_t recordedid, int unit)
 
RecordScheduleListPtr GetRecordScheduleList1_5 ()
 
RecordSchedulePtr GetRecordSchedule1_5 (uint32_t recordid)
 
bool AddRecordSchedule1_5 (RecordSchedule &record)
 
bool AddRecordSchedule1_7 (RecordSchedule &record)
 
bool UpdateRecordSchedule1_7 (RecordSchedule &record)
 
bool DisableRecordSchedule1_5 (uint32_t recordid)
 
bool EnableRecordSchedule1_5 (uint32_t recordid)
 
bool RemoveRecordSchedule1_5 (uint32_t recordid)
 
ProgramListPtr GetUpcomingList1_5 ()
 
ProgramListPtr GetUpcomingList2_2 ()
 
ProgramListPtr GetConflictList1_5 ()
 
ProgramListPtr GetExpiringList1_5 ()
 
StringListPtr GetRecGroupList1_5 ()
 
WSStreamPtr GetFile1_32 (const std::string &filename, const std::string &sgname)
 
WSStreamPtr GetChannelIcon1_32 (uint32_t chanid, unsigned width, unsigned height)
 
std::string GetChannelIconUrl1_32 (uint32_t chanid, unsigned width, unsigned height)
 
WSStreamPtr GetPreviewImage1_32 (uint32_t chanid, time_t recstartts, unsigned width, unsigned height)
 
std::string GetPreviewImageUrl1_32 (uint32_t chanid, time_t recstartts, unsigned width, unsigned height)
 
WSStreamPtr GetRecordingArtwork1_32 (const std::string &type, const std::string &inetref, uint16_t season, unsigned width, unsigned height)
 
std::string GetRecordingArtworkUrl1_32 (const std::string &type, const std::string &inetref, uint16_t season, unsigned width, unsigned height)
 
ArtworkListPtr GetRecordingArtworkList1_32 (uint32_t chanid, time_t recstartts)
 

Private Attributes

OS::CMutex * m_mutex
 
std::string m_server
 
unsigned m_port
 
std::string m_securityPin
 
bool m_checked
 
Version m_version
 
std::string m_serverHostName
 
WSServiceVersion_t m_serviceVersion [WS_INVALID+1]
 
std::map< std::string, std::string > m_namedCache
 

Detailed Description

Definition at line 57 of file mythwsapi.h.

Member Function Documentation

◆ GetRecordedCommBreak()

MarkListPtr Myth::WSAPI::GetRecordedCommBreak ( uint32_t  recordedid,
int  unit 
)
inline

GET Dvr/GetRecordedCommBreak.

Parameters
recordedid
unit0 = Frame count, 1 = Position, 2 = Duration ms
Returns
MarkListPtr

Definition at line 463 of file mythwsapi.h.

Referenced by Myth::Control::GetCommBreakList().

Here is the caller graph for this function:

◆ GetRecordedCutList()

MarkListPtr Myth::WSAPI::GetRecordedCutList ( uint32_t  recordedid,
int  unit 
)
inline

GET Dvr/GetRecordedCutList.

Parameters
recordedid
unit0 = Frame count, 1 = Position, 2 = Duration ms
Returns
MarkListPtr

Definition at line 476 of file mythwsapi.h.

Referenced by Myth::Control::GetCutList().

Here is the caller graph for this function:

◆ GetSavedBookmark()

int64_t Myth::WSAPI::GetSavedBookmark ( uint32_t  recordedid,
int  unit 
)
inline

GET Dvr/GetSavedBookmark.

Parameters
recordedid
unit1 = Position, 2 = Duration ms
Returns
value

Definition at line 504 of file mythwsapi.h.

Referenced by Myth::Control::GetSavedBookmark().

Here is the caller graph for this function:

◆ GetServiceVersion()

bool WSAPI::GetServiceVersion ( WSServiceId_t  id,
WSServiceVersion_t version 
)
private

< WS_Myth

< WS_Capture

< WS_Channel

< WS_Guide

< WS_Content

< WS_Dvr

< WS_INVALID

Definition at line 102 of file mythwsapi.cpp.

References MythDTO::getVersionBindArray().

◆ SetSavedBookmark()

bool Myth::WSAPI::SetSavedBookmark ( uint32_t  recordedid,
int  unit,
int64_t  value 
)
inline

POST Dvr/SetSavedBookmark.

Parameters
recordedid
unit1 = Position, 2 = Duration ms
valueof mark
Returns
boolean

Definition at line 490 of file mythwsapi.h.

Referenced by Myth::Control::SetSavedBookmark().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: