PVR timer methods
For editing and displaying timed work, such as video recording.
More...
PVR timer methods
For editing and displaying timed work, such as video recording.
Timer parts in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.
◆ AddTimer()
Add a timer on the backend.
- Parameters
-
[in] | timer | The timer to add. |
- Returns
- PVR_ERROR_NO_ERROR if the timer has been added successfully.
- Note
- Required to use if supportsTimers is set to true.
◆ CallTimerMenuHook()
Call one of the timer related menu hooks (if supported).
Supported class PVRMenuhook instances have to be added in constructor()
, by calling AddMenuHook() on the callback.
- Parameters
-
[in] | menuhook | The hook to call. |
[in] | item | The selected timer 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 :
◆ DeleteTimer()
Delete a timer on the backend.
- Parameters
-
[in] | timer | The timer to delete. |
[in] | forceDelete | Set to true to delete a timer that is currently recording a program. |
- Returns
- PVR_ERROR_NO_ERROR if the timer has been deleted successfully.
- Note
- Required to use if supportsTimers is set to true.
◆ GetTimers()
Request the list of all timers from the backend if supported.
- Parameters
-
- Returns
- PVR_ERROR_NO_ERROR if the list has been fetched successfully.
- Note
- Required to use if supportsTimers is set to true.
The following table contains values that can be set with class PVRTimer :
Example:
...
{
...
}
...
@ PVR_ERROR_NO_ERROR
0 : No error occurred.
Definition pvr_general.h:38
@ PVR_TIMER_STATE_SCHEDULED
1 : The timer is scheduled for recording.
Definition pvr_timers.h:299
void SetClientIndex(unsigned int clientIndex)
required The index of this timer given by the client.
Definition Timers.h:104
void SetState(PVR_TIMER_STATE state)
required The state of this timer.
Definition Timers.h:123
void SetTitle(const std::string &title)
required A title for this timer.
Definition Timers.h:156
void Add(const kodi::addon::PVRTimer &tag)
To add and give content from addon to Kodi on related call.
Definition Timers.h:560
◆ GetTimersAmount()
virtual PVR_ERROR kodi::addon::CInstancePVRClient::GetTimersAmount |
( |
int & | amount | ) |
|
|
inlinevirtual |
To get total amount of timers on the backend or -1 on error.
- Parameters
-
[out] | amount | The total amount of timers on the backend |
- Returns
- PVR_ERROR_NO_ERROR if the amount has been fetched successfully.
- Note
- Required to use if supportsTimers is set to true.
◆ GetTimerTypes()
Retrieve the timer types supported by the backend.
- Parameters
-
[out] | types | The function has to write the definition of the class PVRTimerType types into this array. |
- Returns
- PVR_ERROR_NO_ERROR if the types were successfully written to the array.
- Note
- Maximal 32 entries are allowed inside.
@ingroup cpp_kodi_addon_pvr_Defs_Timer_PVRTimerType
The following table contains values that can be set with class PVRTimerType :
◆ TriggerTimerUpdate()
void kodi::addon::CInstancePVRClient::TriggerTimerUpdate |
( |
| ) |
|
|
inline |
Callback to Kodi Function
Request Kodi to update it's list of timers.
◆ UpdateTimer()
Update the timer information on the backend.
- Parameters
-
[in] | timer | The timer to update. |
- Returns
- PVR_ERROR_NO_ERROR if the timer has been updated successfully.
- Note
- Required to use if supportsTimers is set to true.