Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
kodi::addon::CInstancePVRClient Class Referenceabstract

#include <PVR.h>

Inheritance diagram for kodi::addon::CInstancePVRClient:
kodi::addon::IAddonInstance

Public Member Functions

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

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