[pvr] Increase API version to 1.9.4 (addon relevant part)
authorAlwinEsch <alwin.esch@web.de>
Sun, 15 Feb 2015 14:07:40 +0000 (15:07 +0100)
committerAlwinEsch <alwin.esch@web.de>
Sun, 15 Feb 2015 15:38:57 +0000 (16:38 +0100)
addons/xbmc.pvr/addon.xml
xbmc/addons/include/xbmc_pvr_dll.h
xbmc/addons/include/xbmc_pvr_types.h

index 0d9187f..aa99e9f 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<addon id="xbmc.pvr" version="1.9.3" provider-name="Team-Kodi">
+<addon id="xbmc.pvr" version="1.9.4" provider-name="Team-Kodi">
   <requires>
     <import addon="xbmc.core" version="0.1.0"/>
   </requires>
index 6ef21f3..3ad46fc 100644 (file)
@@ -176,8 +176,9 @@ extern "C"
    * 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.
@@ -201,7 +202,7 @@ extern "C"
    * 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);
 
@@ -209,7 +210,7 @@ extern "C"
    * 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);
 
@@ -217,7 +218,7 @@ extern "C"
    * 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);
 
@@ -225,17 +226,19 @@ extern "C"
    * 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
@@ -245,19 +248,21 @@ extern "C"
    */
   //@{
   /*!
-   * @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.
@@ -268,6 +273,20 @@ extern "C"
   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.
@@ -617,7 +636,7 @@ extern "C"
     pClient->GetBackendName                 = GetBackendName;
     pClient->GetBackendVersion              = GetBackendVersion;
     pClient->GetDriveSpace                  = GetDriveSpace;
-    pClient->DialogChannelScan              = DialogChannelScan;
+    pClient->OpenDialogChannelScan          = OpenDialogChannelScan;
     pClient->MenuHook                       = CallMenuHook;
 
     pClient->GetEpg                         = GetEPGForChannel;
@@ -631,12 +650,14 @@ extern "C"
     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;
index 8d78818..5285bd1 100644 (file)
@@ -75,10 +75,10 @@ struct DemuxPacket;
 #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" {
@@ -122,13 +122,14 @@ 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;
 
   /*!
@@ -150,9 +151,11 @@ extern "C" {
     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. */
@@ -295,6 +298,7 @@ extern "C" {
     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;
 
   /*!
@@ -349,17 +353,19 @@ extern "C" {
     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);