Kodi Development  20.0
for Binary and Script based Add-Ons
CInstancePVRClientabstract

Inherits IAddonInstance.

Public Member Functions

void AddMenuHook (const kodi::addon::PVRMenuhook &hook)
 Callback to Kodi Function\nAdd or replace a menu hook for the context menu for this add-on More...
 
virtual PVR_ERROR AddTimer (const kodi::addon::PVRTimer &timer)
 Add a timer on the backend. More...
 
DEMUX_PACKETAllocateDemuxPacket (int iDataSize)
 Callback to Kodi Function
Allocate a demux packet. Free with FreeDemuxPacket(). More...
 
virtual PVR_ERROR CallChannelMenuHook (const kodi::addon::PVRMenuhook &menuhook, const kodi::addon::PVRChannel &item)
 Call one of the channel related menu hooks (if supported). More...
 
virtual PVR_ERROR CallEPGMenuHook (const kodi::addon::PVRMenuhook &menuhook, const kodi::addon::PVREPGTag &tag)
 Call one of the EPG related menu hooks (if supported). More...
 
virtual PVR_ERROR CallRecordingMenuHook (const kodi::addon::PVRMenuhook &menuhook, const kodi::addon::PVRRecording &item)
 Call one of the recording related menu hooks (if supported). More...
 
virtual PVR_ERROR CallSettingsMenuHook (const kodi::addon::PVRMenuhook &menuhook)
 Call one of the settings related menu hooks (if supported). More...
 
virtual PVR_ERROR CallTimerMenuHook (const kodi::addon::PVRMenuhook &menuhook, const kodi::addon::PVRTimer &item)
 Call one of the timer related menu hooks (if supported). More...
 
virtual bool CanPauseStream ()
 Check if the backend support pausing the currently playing stream. More...
 
virtual bool CanSeekStream ()
 Check if the backend supports seeking for the currently playing stream. More...
 
 CInstancePVRClient ()
 PVR client class constructor. More...
 
 CInstancePVRClient (KODI_HANDLE instance, const std::string &kodiVersion="")
 PVR client class constructor used to support multiple instance types. More...
 
std::string ClientPath () const
 Callback to Kodi Function
Get main client path of the PVR addon. More...
 
virtual void CloseLiveStream ()
 Close an open live stream. More...
 
virtual void CloseRecordedStream ()
 Close an open stream from a recording. More...
 
void ConnectionStateChange (const std::string &connectionString, PVR_CONNECTION_STATE newState, const std::string &message)
 Callback to Kodi Function
Notify a state change for a PVR backend connection. More...
 
virtual PVR_ERROR DeleteAllRecordingsFromTrash ()
 Delete all recordings permanent which in the deleted folder on the backend. More...
 
virtual PVR_ERROR DeleteChannel (const kodi::addon::PVRChannel &channel)
 Delete a channel from the backend. More...
 
virtual PVR_ERROR DeleteRecording (const kodi::addon::PVRRecording &recording)
 Delete a recording on the backend. More...
 
virtual PVR_ERROR DeleteTimer (const kodi::addon::PVRTimer &timer, bool forceDelete)
 Delete a timer on the backend. More...
 
virtual void DemuxAbort ()
 Abort the demultiplexer thread in the add-on. More...
 
virtual void DemuxFlush ()
 Flush all data that's currently in the demultiplexer buffer in the add-on. More...
 
virtual DEMUX_PACKETDemuxRead ()
 Read the next packet from the demultiplexer, if there is one. More...
 
virtual void DemuxReset ()
 Reset the demultiplexer in the add-on. More...
 
void EpgEventStateChange (kodi::addon::PVREPGTag &tag, EPG_EVENT_STATE newState)
 Callback to Kodi Function
Notify a state change for an EPG event. More...
 
int EpgMaxFutureDays () const
 Callback to Kodi Function
Get the Max future days handled by Kodi. More...
 
int EpgMaxPastDays () const
 Callback to Kodi Function
Get the Max past days handled by Kodi. More...
 
virtual void FillBuffer (bool mode)
 Notify the pvr addon/demuxer that Kodi wishes to fill demux queue. More...
 
void FreeDemuxPacket (DEMUX_PACKET *pPacket)
 Callback to Kodi Function
Free a packet that was allocated with AllocateDemuxPacket(). More...
 
virtual PVR_ERROR GetBackendHostname (std::string &hostname)
 Get the hostname of the pvr backend server. More...
 
virtual PVR_ERROR GetBackendName (std::string &name)=0
 Get the name reported by the backend that will be displayed in the UI. More...
 
virtual PVR_ERROR GetBackendVersion (std::string &version)=0
 Get the version string reported by the backend that will be displayed in the UI. More...
 
virtual PVR_ERROR GetCapabilities (kodi::addon::PVRCapabilities &capabilities)=0
 Get the list of features that this add-on provides. More...
 
virtual PVR_ERROR GetChannelGroupMembers (const kodi::addon::PVRChannelGroup &group, kodi::addon::PVRChannelGroupMembersResultSet &results)
 Get a list of members on a group. More...
 
virtual PVR_ERROR GetChannelGroups (bool radio, kodi::addon::PVRChannelGroupsResultSet &results)
 Get a list of available channel groups on addon. More...
 
virtual PVR_ERROR GetChannelGroupsAmount (int &amount)
 Get the total amount of channel groups on the backend if it supports channel groups. More...
 
virtual PVR_ERROR GetChannels (bool radio, kodi::addon::PVRChannelsResultSet &results)
 Request the list of all channels from the backend. More...
 
virtual PVR_ERROR GetChannelsAmount (int &amount)
 The total amount of channels on the backend. More...
 
virtual PVR_ERROR GetChannelStreamProperties (const kodi::addon::PVRChannel &channel, std::vector< kodi::addon::PVRStreamProperty > &properties)
 Get the stream properties for a channel from the backend. More...
 
PVRCodec GetCodecByName (const std::string &codecName) const
 Callback to Kodi Function
Get the codec id used by Kodi. More...
 
virtual PVR_ERROR GetConnectionString (std::string &connection)
 To get the connection string reported by the backend that will be displayed in the UI. More...
 
virtual PVR_ERROR GetDescrambleInfo (int channelUid, kodi::addon::PVRDescrambleInfo &descrambleInfo)
 Get the descramble information of the stream that's currently open. More...
 
virtual PVR_ERROR GetDriveSpace (uint64_t &total, uint64_t &used)
 Get the disk space reported by the backend (if supported). More...
 
virtual PVR_ERROR GetEPGForChannel (int channelUid, time_t start, time_t end, kodi::addon::PVREPGTagsResultSet &results)
 Request the EPG for a channel from the backend. More...
 
virtual PVR_ERROR GetEPGTagEdl (const kodi::addon::PVREPGTag &tag, std::vector< kodi::addon::PVREDLEntry > &edl)
 Retrieve the edit decision list (EDL) of an EPG tag on the backend. More...
 
virtual PVR_ERROR GetEPGTagStreamProperties (const kodi::addon::PVREPGTag &tag, std::vector< kodi::addon::PVRStreamProperty > &properties)
 Get the stream properties for an epg tag from the backend. More...
 
virtual PVR_ERROR GetProviders (kodi::addon::PVRProvidersResultSet &results)
 Request the list of all providers from the backend. More...
 
virtual PVR_ERROR GetProvidersAmount (int &amount)
 The total amount of providers on the backend. More...
 
virtual PVR_ERROR GetRecordingEdl (const kodi::addon::PVRRecording &recording, std::vector< kodi::addon::PVREDLEntry > &edl)
 Retrieve the edit decision list (EDL) of a recording on the backend. More...
 
virtual PVR_ERROR GetRecordingLastPlayedPosition (const kodi::addon::PVRRecording &recording, int &position)
 Retrieve the last watched position of a recording on the backend. More...
 
virtual PVR_ERROR GetRecordings (bool deleted, kodi::addon::PVRRecordingsResultSet &results)
 Request the list of all recordings from the backend, if supported. More...
 
virtual PVR_ERROR GetRecordingsAmount (bool deleted, int &amount)
 To get amount of recording present on backend. More...
 
virtual PVR_ERROR GetRecordingSize (const kodi::addon::PVRRecording &recording, int64_t &size)
 Retrieve the size of a recording on the backend. More...
 
virtual PVR_ERROR GetRecordingStreamProperties (const kodi::addon::PVRRecording &recording, std::vector< kodi::addon::PVRStreamProperty > &properties)
 Get the stream properties for a recording from the backend. More...
 
virtual PVR_ERROR GetSignalStatus (int channelUid, kodi::addon::PVRSignalStatus &signalStatus)
 Get the signal status of the stream that's currently open. More...
 
virtual PVR_ERROR GetStreamProperties (std::vector< kodi::addon::PVRStreamProperties > &properties)
 Get the stream properties of the stream that's currently being read. More...
 
virtual PVR_ERROR GetStreamReadChunkSize (int &chunksize)
 Obtain the chunk size to use when reading streams. More...
 
virtual PVR_ERROR GetStreamTimes (kodi::addon::PVRStreamTimes &times)
 Get stream times. More...
 
virtual PVR_ERROR GetTimers (kodi::addon::PVRTimersResultSet &results)
 Request the list of all timers from the backend if supported. More...
 
virtual PVR_ERROR GetTimersAmount (int &amount)
 To get total amount of timers on the backend or -1 on error. More...
 
virtual PVR_ERROR GetTimerTypes (std::vector< kodi::addon::PVRTimerType > &types)
 Retrieve the timer types supported by the backend. More...
 
virtual PVR_ERROR IsEPGTagPlayable (const kodi::addon::PVREPGTag &tag, bool &isPlayable)
 Check if the given EPG tag can be played. More...
 
virtual PVR_ERROR IsEPGTagRecordable (const kodi::addon::PVREPGTag &tag, bool &isRecordable)
 Check if the given EPG tag can be recorded. More...
 
virtual bool IsRealTimeStream ()
 Check for real-time streaming. More...
 
virtual int64_t LengthLiveStream ()
 Obtain the length of a live stream. More...
 
virtual int64_t LengthRecordedStream ()
 Obtain the length of a recorded stream. More...
 
virtual PVR_ERROR OnPowerSavingActivated ()
 To notify addon power saving on system is activated. More...
 
virtual PVR_ERROR OnPowerSavingDeactivated ()
 To notify addon power saving on system is deactivated. More...
 
virtual PVR_ERROR OnSystemSleep ()
 To notify addon about system sleep. More...
 
virtual PVR_ERROR OnSystemWake ()
 To notify addon about system wake up. More...
 
virtual PVR_ERROR OpenDialogChannelAdd (const kodi::addon::PVRChannel &channel)
 Show the dialog to add a channel on the backend, if supported by the backend. More...
 
virtual PVR_ERROR OpenDialogChannelScan ()
 Show the channel scan dialog if this backend supports it. More...
 
virtual PVR_ERROR OpenDialogChannelSettings (const kodi::addon::PVRChannel &channel)
 Show the channel settings dialog, if supported by the backend. More...
 
virtual bool OpenLiveStream (const kodi::addon::PVRChannel &channel)
 Open a live stream on the backend. More...
 
virtual bool OpenRecordedStream (const kodi::addon::PVRRecording &recording)
 Open a stream to a recording on the backend. More...
 
virtual void PauseStream (bool paused)
 Notify the pvr addon that Kodi (un)paused the currently playing stream. More...
 
virtual int ReadLiveStream (unsigned char *buffer, unsigned int size)
 Read from an open live stream. More...
 
virtual int ReadRecordedStream (unsigned char *buffer, unsigned int size)
 Read from a recording. More...
 
void RecordingNotification (const std::string &recordingName, const std::string &fileName, bool on)
 Callback to Kodi Function
Display a notification in Kodi that a recording started or stopped on the server. More...
 
virtual PVR_ERROR RenameChannel (const kodi::addon::PVRChannel &channel)
 Rename a channel on the backend. More...
 
virtual PVR_ERROR RenameRecording (const kodi::addon::PVRRecording &recording)
 Rename a recording on the backend. More...
 
virtual int64_t SeekLiveStream (int64_t position, int whence)
 Seek in a live stream on a backend that supports timeshifting. More...
 
virtual int64_t SeekRecordedStream (int64_t position, int whence)
 Seek in a recorded stream. More...
 
virtual bool SeekTime (double time, bool backwards, double &startpts)
 Notify the pvr addon/demuxer that Kodi wishes to seek the stream by time. More...
 
virtual PVR_ERROR SetEPGMaxFutureDays (int futureDays)
 Tell the client the future time frame to use when notifying epg events back to Kodi. More...
 
virtual PVR_ERROR SetEPGMaxPastDays (int pastDays)
 Tell the client the past time frame to use when notifying epg events back to Kodi. More...
 
virtual PVR_ERROR SetRecordingLastPlayedPosition (const kodi::addon::PVRRecording &recording, int lastplayedposition)
 Set the last watched position of a recording on the backend. More...
 
virtual PVR_ERROR SetRecordingLifetime (const kodi::addon::PVRRecording &recording)
 Set the lifetime of a recording on the backend. More...
 
virtual PVR_ERROR SetRecordingPlayCount (const kodi::addon::PVRRecording &recording, int count)
 Set the play count of a recording on the backend. More...
 
virtual void SetSpeed (int speed)
 Notify the pvr addon/demuxer that Kodi wishes to change playback speed. More...
 
void TriggerChannelGroupsUpdate ()
 Callback to Kodi Function
Request Kodi to update it's list of channel groups. More...
 
void TriggerChannelUpdate ()
 Callback to Kodi Function
Request Kodi to update it's list of channels. More...
 
void TriggerEpgUpdate (unsigned int channelUid)
 Callback to Kodi Function
Schedule an EPG update for the given channel channel. More...
 
void TriggerProvidersUpdate ()
 Callback to Kodi Function
Request Kodi to update it's list of providers. More...
 
void TriggerRecordingUpdate ()
 Callback to Kodi Function
Request Kodi to update it's list of recordings. More...
 
void TriggerTimerUpdate ()
 Callback to Kodi Function
Request Kodi to update it's list of timers. More...
 
virtual PVR_ERROR UndeleteRecording (const kodi::addon::PVRRecording &recording)
 Undelete a recording on the backend. More...
 
virtual PVR_ERROR UpdateTimer (const kodi::addon::PVRTimer &timer)
 Update the timer information on the backend. More...
 
std::string UserPath () const
 Callback to Kodi Function
Get user data path of the PVR addon. More...
 
 ~CInstancePVRClient () override=default
 Destructor. More...
 
- Public Member Functions inherited from IAddonInstance
virtual ADDON_STATUS CreateInstance (int instanceType, const std::string &instanceID, KODI_HANDLE instance, const std::string &version, KODI_HANDLE &addonInstance)
 
 IAddonInstance (ADDON_TYPE type, const std::string &version)
 

Additional Inherited Members

- Public Attributes inherited from IAddonInstance
std::string m_id
 
const std::string m_kodiVersion
 
const ADDON_TYPE m_type
 

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