* Show the channel scan dialog if this backend supports it.
* @return PVR_ERROR_NO_ERROR if the dialog was displayed successfully.
* @remarks Required if bSupportsChannelScan is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
+ * @note see libXBMC_gui.h about related parts
*/
- PVR_ERROR DialogChannelScan(void);
+ PVR_ERROR OpenDialogChannelScan(void);
/*!
* @return The total amount of channels on the backend, or -1 on error.
* Delete a channel from the backend.
* @param channel The channel to delete.
* @return PVR_ERROR_NO_ERROR if the channel has been deleted successfully.
- * @remarks Optional. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
+ * @remarks Required if bSupportsChannelSettings is set to true.
*/
PVR_ERROR DeleteChannel(const PVR_CHANNEL& channel);
* Rename a channel on the backend.
* @param channel The channel to rename, containing the new channel name.
* @return PVR_ERROR_NO_ERROR if the channel has been renamed successfully.
- * @remarks Optional. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
+ * @remarks Optional, and only used if bSupportsChannelSettings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
*/
PVR_ERROR RenameChannel(const PVR_CHANNEL& channel);
* Move a channel to another channel number on the backend.
* @param channel The channel to move, containing the new channel number.
* @return PVR_ERROR_NO_ERROR if the channel has been moved successfully.
- * @remarks Optional. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
+ * @remarks Optional, and only used if bSupportsChannelSettings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
*/
PVR_ERROR MoveChannel(const PVR_CHANNEL& channel);
* Show the channel settings dialog, if supported by the backend.
* @param channel The channel to show the dialog for.
* @return PVR_ERROR_NO_ERROR if the dialog has been displayed successfully.
- * @remarks Optional. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
+ * @remarks Required if bSupportsChannelSettings is set to true.
+ * @note see libXBMC_gui.h about related parts
*/
- PVR_ERROR DialogChannelSettings(const PVR_CHANNEL& channel);
+ PVR_ERROR OpenDialogChannelSettings(const PVR_CHANNEL& channel);
/*!
* Show the dialog to add a channel on the backend, if supported by the backend.
* @param channel The channel to add.
* @return PVR_ERROR_NO_ERROR if the channel has been added successfully.
- * @remarks Optional. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
+ * @remarks Required if bSupportsChannelSettings is set to true.
+ * @note see libXBMC_gui.h about related parts
*/
- PVR_ERROR DialogAddChannel(const PVR_CHANNEL& channel);
+ PVR_ERROR OpenDialogChannelAdd(const PVR_CHANNEL& channel);
//@}
/** @name PVR recording methods
*/
//@{
/*!
- * @return The total amount of channels on the backend or -1 on error.
+ * @return The total amount of recordings on the backend or -1 on error.
+ * @param deleted if set return deleted recording (called if bSupportsRecordingsUndelete set to true)
* @remarks Required if bSupportsRecordings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
*/
- int GetRecordingsAmount(void);
+ int GetRecordingsAmount(bool deleted);
/*!
* Request the list of all recordings from the backend, if supported.
* Recording entries are added to XBMC by calling TransferRecordingEntry() on the callback.
* @param handle Handle to pass to the callback method.
+ * @param deleted if set return deleted recording (called if bSupportsRecordingsUndelete set to true)
* @return PVR_ERROR_NO_ERROR if the recordings have been fetched successfully.
* @remarks Required if bSupportsRecordings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
*/
- PVR_ERROR GetRecordings(ADDON_HANDLE handle);
+ PVR_ERROR GetRecordings(ADDON_HANDLE handle, bool deleted);
/*!
* Delete a recording on the backend.
PVR_ERROR DeleteRecording(const PVR_RECORDING& recording);
/*!
+ * Undelete a recording on the backend.
+ * @param recording The recording to undelete.
+ * @return PVR_ERROR_NO_ERROR if the recording has been undeleted successfully.
+ * @remarks Optional, and only used if bSupportsRecordingsUndelete is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
+ */
+ PVR_ERROR UndeleteRecording(const PVR_RECORDING& recording);
+
+ /*!
+ * @brief Delete all recordings permanent which in the deleted folder on the backend.
+ * @return PVR_ERROR_NO_ERROR if the recordings has been deleted successfully.
+ */
+ PVR_ERROR DeleteAllRecordingsFromTrash();
+
+ /*!
* Rename a recording on the backend.
* @param recording The recording to rename, containing the new name.
* @return PVR_ERROR_NO_ERROR if the recording has been renamed successfully.
pClient->GetBackendName = GetBackendName;
pClient->GetBackendVersion = GetBackendVersion;
pClient->GetDriveSpace = GetDriveSpace;
- pClient->DialogChannelScan = DialogChannelScan;
+ pClient->OpenDialogChannelScan = OpenDialogChannelScan;
pClient->MenuHook = CallMenuHook;
pClient->GetEpg = GetEPGForChannel;
pClient->DeleteChannel = DeleteChannel;
pClient->RenameChannel = RenameChannel;
pClient->MoveChannel = MoveChannel;
- pClient->DialogChannelSettings = DialogChannelSettings;
- pClient->DialogAddChannel = DialogAddChannel;
+ pClient->OpenDialogChannelSettings = OpenDialogChannelSettings;
+ pClient->OpenDialogChannelAdd = OpenDialogChannelAdd;
pClient->GetRecordingsAmount = GetRecordingsAmount;
pClient->GetRecordings = GetRecordings;
pClient->DeleteRecording = DeleteRecording;
+ pClient->UndeleteRecording = UndeleteRecording;
+ pClient->DeleteAllRecordingsFromTrash = DeleteAllRecordingsFromTrash;
pClient->RenameRecording = RenameRecording;
pClient->SetRecordingPlayCount = SetRecordingPlayCount;
pClient->SetRecordingLastPlayedPosition = SetRecordingLastPlayedPosition;
#define PVR_STREAM_MAX_STREAMS 20
/* current PVR API version */
-#define XBMC_PVR_API_VERSION "1.9.3"
+#define XBMC_PVR_API_VERSION "1.9.4"
/* min. PVR API version */
-#define XBMC_PVR_MIN_API_VERSION "1.9.3"
+#define XBMC_PVR_MIN_API_VERSION "1.9.4"
#ifdef __cplusplus
extern "C" {
*/
typedef enum
{
- PVR_MENUHOOK_UNKNOWN =-1, /*!< @brief unknown menu hook */
- PVR_MENUHOOK_ALL = 0, /*!< @brief all categories */
- PVR_MENUHOOK_CHANNEL = 1, /*!< @brief for channels */
- PVR_MENUHOOK_TIMER = 2, /*!< @brief for timers */
- PVR_MENUHOOK_EPG = 3, /*!< @brief for EPG */
- PVR_MENUHOOK_RECORDING = 4, /*!< @brief for recordings */
- PVR_MENUHOOK_SETTING = 5, /*!< @brief for settings */
+ PVR_MENUHOOK_UNKNOWN =-1, /*!< @brief unknown menu hook */
+ PVR_MENUHOOK_ALL = 0, /*!< @brief all categories */
+ PVR_MENUHOOK_CHANNEL = 1, /*!< @brief for channels */
+ PVR_MENUHOOK_TIMER = 2, /*!< @brief for timers */
+ PVR_MENUHOOK_EPG = 3, /*!< @brief for EPG */
+ PVR_MENUHOOK_RECORDING = 4, /*!< @brief for recordings */
+ PVR_MENUHOOK_DELETED_RECORDING = 5, /*!< @brief for deleted recordings */
+ PVR_MENUHOOK_SETTING = 6, /*!< @brief for settings */
} PVR_MENUHOOK_CAT;
/*!
bool bSupportsTV; /*!< @brief true if this add-on provides TV channels */
bool bSupportsRadio; /*!< @brief true if this add-on supports radio channels */
bool bSupportsRecordings; /*!< @brief true if this add-on supports playback of recordings stored on the backend */
+ bool bSupportsRecordingsUndelete; /*!< @brief true if this add-on supports undelete of recordings stored on the backend */
bool bSupportsTimers; /*!< @brief true if this add-on supports the creation and editing of timers */
bool bSupportsChannelGroups; /*!< @brief true if this add-on supports channel groups */
bool bSupportsChannelScan; /*!< @brief true if this add-on support scanning for new channels on the backend */
+ bool bSupportsChannelSettings; /*!< @brief true if this add-on supports the following functions: DeleteChannel, RenameChannel, MoveChannel, DialogChannelSettings and DialogAddChannel */
bool bHandlesInputStream; /*!< @brief true if this add-on provides an input stream. false if XBMC handles the stream. */
bool bHandlesDemuxing; /*!< @brief true if this add-on demultiplexes packets. */
bool bSupportsRecordingFolders; /*!< @brief true if the backend supports timers / recordings in folders. */
int iGenreSubType; /*!< @brief (optional) genre sub type */
int iPlayCount; /*!< @brief (optional) play count of this recording on the client */
int iLastPlayedPosition; /*!< @brief (optional) last played position of this recording on the client */
+ bool bIsDeleted; /*!< @brief (optional) shows this recording is deleted and can be undelete */
} ATTRIBUTE_PACKED PVR_RECORDING;
/*!
int (__cdecl* GetChannelGroupsAmount)(void);
PVR_ERROR (__cdecl* GetChannelGroups)(ADDON_HANDLE, bool);
PVR_ERROR (__cdecl* GetChannelGroupMembers)(ADDON_HANDLE, const PVR_CHANNEL_GROUP&);
- PVR_ERROR (__cdecl* DialogChannelScan)(void);
+ PVR_ERROR (__cdecl* OpenDialogChannelScan)(void);
int (__cdecl* GetChannelsAmount)(void);
PVR_ERROR (__cdecl* GetChannels)(ADDON_HANDLE, bool);
PVR_ERROR (__cdecl* DeleteChannel)(const PVR_CHANNEL&);
PVR_ERROR (__cdecl* RenameChannel)(const PVR_CHANNEL&);
PVR_ERROR (__cdecl* MoveChannel)(const PVR_CHANNEL&);
- PVR_ERROR (__cdecl* DialogChannelSettings)(const PVR_CHANNEL&);
- PVR_ERROR (__cdecl* DialogAddChannel)(const PVR_CHANNEL&);
- int (__cdecl* GetRecordingsAmount)(void);
- PVR_ERROR (__cdecl* GetRecordings)(ADDON_HANDLE);
+ PVR_ERROR (__cdecl* OpenDialogChannelSettings)(const PVR_CHANNEL&);
+ PVR_ERROR (__cdecl* OpenDialogChannelAdd)(const PVR_CHANNEL&);
+ int (__cdecl* GetRecordingsAmount)(bool);
+ PVR_ERROR (__cdecl* GetRecordings)(ADDON_HANDLE, bool);
PVR_ERROR (__cdecl* DeleteRecording)(const PVR_RECORDING&);
+ PVR_ERROR (__cdecl* UndeleteRecording)(const PVR_RECORDING&);
+ PVR_ERROR (__cdecl* DeleteAllRecordingsFromTrash)(void);
PVR_ERROR (__cdecl* RenameRecording)(const PVR_RECORDING&);
PVR_ERROR (__cdecl* SetRecordingPlayCount)(const PVR_RECORDING&, int);
PVR_ERROR (__cdecl* SetRecordingLastPlayedPosition)(const PVR_RECORDING&, int);