Functions to manage the addon and get basic information about it
These are e.g. GetCapabilities to know supported groups at this addon or the others to get information about the source of the PVR stream.
The with "Valid implementation required." declared functions are mandatory, all others are an option.
Basic parts in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.
|
inline |
PVR client class constructor.
Used by an add-on that only supports only PVR and only in one instance.
Here's example about the use of this:
|
inlineexplicit |
PVR client class constructor used to support multiple instance types.
[in] | instance | The instance value given to kodi::addon::CAddonBase::CreateInstance(...) . |
Here's example about the use of this:
|
overridedefault |
Destructor.
|
pure virtual |
Get the list of features that this add-on provides.
Called by Kodi to query the add-on's capabilities. Used to check which options should be presented in the UI, which methods to call, etc. All capabilities that the add-on supports should be set to true.
capabilities | The with class PVRCapabilities defined add-on's capabilities. |
The following table contains values that can be set with class PVRCapabilities :
Example:
Get the name reported by the backend that will be displayed in the UI.
[out] | name | The name reported by the backend that will be displayed in the UI. |
Example:
Get the version string reported by the backend that will be displayed in the UI.
[out] | version | The version string reported by the backend that will be displayed in the UI. |
Example:
Get the hostname of the pvr backend server.
[out] | hostname | Hostname as ip address or alias. If backend does not utilize a server, return empty string. |
To get the connection string reported by the backend that will be displayed in the UI.
[out] | connection | The connection string reported by the backend that will be displayed in the UI. |
Get the disk space reported by the backend (if supported).
[in] | total | The total disk space in KiB. |
[in] | used | The used disk space in KiB. |
Example:
|
inlinevirtual |
Call one of the settings related menu hooks (if supported).
Supported menu hook instances have to be added in constructor()
, by calling AddMenuHook() on the callback.
[in] | menuhook | The hook to call. |
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 |
Example:
|
inline |
Callback to Kodi Function\nAdd or replace a menu hook for the context menu for this add-on
This is a callback function, called from addon to give Kodi his context menu's.
[in] | menuhook | The with class PVRMenuhook defined hook to add |
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 |
Here's an example of the use of it:
Here another way:
|
inline |
Callback to Kodi Function
Notify a state change for a PVR backend connection.
[in] | connectionString | The connection string reported by the backend that can be displayed in the UI. |
[in] | newState | The by PVR_CONNECTION_STATE defined new state. |
[in] | message | A localized addon-defined string representing the new state, that can be displayed in the UI or empty if the Kodi-defined default string for the new state shall be displayed. |
Here's an example of the use of it:
|
inline |
Callback to Kodi Function
Get user data path of the PVR addon.
|
inline |
Callback to Kodi Function
Get main client path of the PVR addon.