Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
4. Channel edit (optional)

Bring in this functions if you have set supportsChannelSettings to true or for OpenDialogChannelScan() set supportsChannelScan to true
The support of this is a pure option and not mandatory. More...

Functions

virtual PVR_ERROR kodi::addon::CInstancePVRClient::DeleteChannel (const kodi::addon::PVRChannel &channel)
 Delete a channel from the backend.
 
virtual PVR_ERROR kodi::addon::CInstancePVRClient::RenameChannel (const kodi::addon::PVRChannel &channel)
 Rename a channel on the backend.
 
virtual PVR_ERROR kodi::addon::CInstancePVRClient::OpenDialogChannelSettings (const kodi::addon::PVRChannel &channel)
 Show the channel settings dialog, if supported by the backend.
 
virtual PVR_ERROR kodi::addon::CInstancePVRClient::OpenDialogChannelAdd (const kodi::addon::PVRChannel &channel)
 Show the dialog to add a channel on the backend, if supported by the backend.
 
virtual PVR_ERROR kodi::addon::CInstancePVRClient::OpenDialogChannelScan ()
 Show the channel scan dialog if this backend supports it.
 
virtual PVR_ERROR kodi::addon::CInstancePVRClient::CallChannelMenuHook (const kodi::addon::PVRMenuhook &menuhook, const kodi::addon::PVRChannel &item)
 Call one of the channel related menu hooks (if supported).
 

Detailed Description

Bring in this functions if you have set supportsChannelSettings to true or for OpenDialogChannelScan() set supportsChannelScan to true
The support of this is a pure option and not mandatory.


Channel edit parts in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.

Function Documentation

◆ CallChannelMenuHook()

virtual PVR_ERROR kodi::addon::CInstancePVRClient::CallChannelMenuHook ( const kodi::addon::PVRMenuhook & menuhook,
const kodi::addon::PVRChannel & item )
inlinevirtual

Call one of the channel related menu hooks (if supported).

Supported class PVRMenuhook instances have to be added in constructor(), by calling AddMenuHook() on the callback.

Parameters
[in]menuhookThe hook to call.
[in]itemThe selected channel item for which the hook was called.
Returns
PVR_ERROR_NO_ERROR if the hook was called successfully.

The following table contains values that can be set with class PVRMenuhook :

Name Type Set call Get call Usage
This hook's identifier unsigned int SetHookId GetHookId required to set
Localized string Identifier unsigned int SetLocalizedStringId GetLocalizedStringId required to set
Category of menu hook PVR_MENUHOOK_CAT SetCategory GetCategory required to set

◆ DeleteChannel()

virtual PVR_ERROR kodi::addon::CInstancePVRClient::DeleteChannel ( const kodi::addon::PVRChannel & channel)
inlinevirtual

Delete a channel from the backend.

Parameters
[in]channelThe channel to delete.
Returns
PVR_ERROR_NO_ERROR if the channel has been deleted successfully.
Remarks
Required if supportsChannelSettings is set to true.

◆ OpenDialogChannelAdd()

virtual PVR_ERROR kodi::addon::CInstancePVRClient::OpenDialogChannelAdd ( const kodi::addon::PVRChannel & channel)
inlinevirtual

Show the dialog to add a channel on the backend, if supported by the backend.

Parameters
[in]channelThe channel to add.
Returns
PVR_ERROR_NO_ERROR if the channel has been added successfully.
Remarks
Required if supportsChannelSettings is set to true.
Note
Use kodi::gui::CWindow to create dialog for them.

◆ OpenDialogChannelScan()

virtual PVR_ERROR kodi::addon::CInstancePVRClient::OpenDialogChannelScan ( )
inlinevirtual

Show the channel scan dialog if this backend supports it.

Returns
PVR_ERROR_NO_ERROR if the dialog was displayed successfully.
Remarks
Required if supportsChannelScan is set to true.
Note
Use kodi::gui::CWindow to create dialog for them.

◆ OpenDialogChannelSettings()

virtual PVR_ERROR kodi::addon::CInstancePVRClient::OpenDialogChannelSettings ( const kodi::addon::PVRChannel & channel)
inlinevirtual

Show the channel settings dialog, if supported by the backend.

Parameters
[in]channelThe channel to show the dialog for.
Returns
PVR_ERROR_NO_ERROR if the dialog has been displayed successfully.
Remarks
Required if supportsChannelSettings is set to true.
Note
Use kodi::gui::CWindow to create dialog for them.

◆ RenameChannel()

virtual PVR_ERROR kodi::addon::CInstancePVRClient::RenameChannel ( const kodi::addon::PVRChannel & channel)
inlinevirtual

Rename a channel on the backend.

Parameters
[in]channelThe channel to rename, containing the new channel name.
Returns
PVR_ERROR_NO_ERROR if the channel has been renamed successfully.

The following table contains values that can be set with class PVRChannel :

Name Type Set call Get call Usage
Unique id unsigned int SetUniqueId GetUniqueId required to set
Is radio bool SetIsRadio GetIsRadio required to set
Channel number unsigned int SetChannelNumber GetChannelNumber optional
Sub channel number unsigned int SetSubChannelNumber GetSubChannelNumber optional
Channel name std::string SetChannelName GetChannelName optional
Mime type std::string SetMimeType GetMimeType optional
Encryption system unsigned int SetEncryptionSystem GetEncryptionSystem optional
Icon path std::string SetIconPath GetIconPath optional
Is hidden bool SetIsHidden GetIsHidden optional
Has archive bool SetHasArchive GetHasArchive optional
Order int SetOrder GetOrder optional
Client provider unique identifier int SetClientProviderUid GetClientProviderUid optional

Remarks
Optional, and only used if supportsChannelSettings is set to true.