diff options
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr')
10 files changed, 0 insertions, 3779 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/CMakeLists.txt b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/CMakeLists.txt deleted file mode 100644 index 946849e..0000000 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/CMakeLists.txt +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | set(HEADERS ChannelGroups.h | ||
| 2 | Channels.h | ||
| 3 | EDL.h | ||
| 4 | EPG.h | ||
| 5 | General.h | ||
| 6 | MenuHook.h | ||
| 7 | Recordings.h | ||
| 8 | Stream.h | ||
| 9 | Timers.h) | ||
| 10 | |||
| 11 | if(NOT ENABLE_STATIC_LIBS) | ||
| 12 | core_add_library(addons_kodi-addon-dev-kit_include_kodi_addon-instance_pvr) | ||
| 13 | endif() | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/ChannelGroups.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/ChannelGroups.h deleted file mode 100644 index 17995bb..0000000 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/ChannelGroups.h +++ /dev/null | |||
| @@ -1,271 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #include "../../AddonBase.h" | ||
| 12 | #include "../../c-api/addon-instance/pvr.h" | ||
| 13 | |||
| 14 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 15 | // "C++" Definitions group 3 - PVR channel group | ||
| 16 | #ifdef __cplusplus | ||
| 17 | |||
| 18 | namespace kodi | ||
| 19 | { | ||
| 20 | namespace addon | ||
| 21 | { | ||
| 22 | |||
| 23 | //============================================================================== | ||
| 24 | /// @defgroup cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroup class PVRChannelGroup | ||
| 25 | /// @ingroup cpp_kodi_addon_pvr_Defs_ChannelGroup | ||
| 26 | /// @brief **PVR add-on channel group**\n | ||
| 27 | /// To define a group for channels, this becomes be asked from | ||
| 28 | /// @ref kodi::addon::CInstancePVRClient::GetChannelGroups() and used on | ||
| 29 | /// @ref kodi::addon::CInstancePVRClient::GetChannelGroupMembers() to get his | ||
| 30 | /// content with @ref cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroupMember "PVRChannelGroupMember". | ||
| 31 | /// | ||
| 32 | /// ---------------------------------------------------------------------------- | ||
| 33 | /// | ||
| 34 | /// @copydetails cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroup_Help | ||
| 35 | /// | ||
| 36 | ///@{ | ||
| 37 | class PVRChannelGroup : public CStructHdl<PVRChannelGroup, PVR_CHANNEL_GROUP> | ||
| 38 | { | ||
| 39 | friend class CInstancePVRClient; | ||
| 40 | |||
| 41 | public: | ||
| 42 | /*! \cond PRIVATE */ | ||
| 43 | PVRChannelGroup() { memset(m_cStructure, 0, sizeof(PVR_CHANNEL_GROUP)); } | ||
| 44 | PVRChannelGroup(const PVRChannelGroup& channel) : CStructHdl(channel) {} | ||
| 45 | /*! \endcond */ | ||
| 46 | |||
| 47 | /// @defgroup cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroup_Help Value Help | ||
| 48 | /// @ingroup cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroup | ||
| 49 | /// | ||
| 50 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroup :</b> | ||
| 51 | /// | Name | Type | Set call | Get call | Usage | ||
| 52 | /// |------|------|----------|----------|----------- | ||
| 53 | /// | **Group name** | `std::string` | @ref PVRChannelGroup::SetGroupName "SetGroupName" | @ref PVRChannelGroup::GetGroupName "GetGroupName" | *required to set* | ||
| 54 | /// | **Is radio** | `bool` | @ref PVRChannelGroup::SetIsRadio "SetIsRadio" | @ref PVRChannelGroup::GetIsRadio "GetIsRadio" | *required to set* | ||
| 55 | /// | **Position** | `unsigned int` | @ref PVRChannelGroup::SetPosition "SetPosition" | @ref PVRChannelGroup::GetPosition "GetPosition" | *optional* | ||
| 56 | /// | ||
| 57 | |||
| 58 | /// @ingroup cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroup | ||
| 59 | ///@{ | ||
| 60 | |||
| 61 | /// @brief **required**\n | ||
| 62 | /// Name of this channel group. | ||
| 63 | void SetGroupName(const std::string& groupName) | ||
| 64 | { | ||
| 65 | strncpy(m_cStructure->strGroupName, groupName.c_str(), sizeof(m_cStructure->strGroupName) - 1); | ||
| 66 | } | ||
| 67 | |||
| 68 | /// @brief To get with @ref SetGroupName changed values. | ||
| 69 | std::string GetGroupName() const { return m_cStructure->strGroupName; } | ||
| 70 | |||
| 71 | /// @brief **required**\n | ||
| 72 | /// **true** If this is a radio channel group, **false** otherwise. | ||
| 73 | void SetIsRadio(bool isRadio) { m_cStructure->bIsRadio = isRadio; } | ||
| 74 | |||
| 75 | /// @brief To get with @ref SetIsRadio changed values. | ||
| 76 | bool GetIsRadio() const { return m_cStructure->bIsRadio; } | ||
| 77 | |||
| 78 | /// @brief **optional**\n | ||
| 79 | /// Sort position of the group (<b>`0`</b> indicates that the backend doesn't | ||
| 80 | /// support sorting of groups). | ||
| 81 | void SetPosition(unsigned int position) { m_cStructure->iPosition = position; } | ||
| 82 | |||
| 83 | /// @brief To get with @ref SetPosition changed values. | ||
| 84 | unsigned int GetPosition() const { return m_cStructure->iPosition; } | ||
| 85 | |||
| 86 | ///@} | ||
| 87 | |||
| 88 | private: | ||
| 89 | PVRChannelGroup(const PVR_CHANNEL_GROUP* channel) : CStructHdl(channel) {} | ||
| 90 | PVRChannelGroup(PVR_CHANNEL_GROUP* channel) : CStructHdl(channel) {} | ||
| 91 | }; | ||
| 92 | ///@} | ||
| 93 | //------------------------------------------------------------------------------ | ||
| 94 | |||
| 95 | //============================================================================== | ||
| 96 | /// @defgroup cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroupsResultSet class PVRChannelGroupsResultSet | ||
| 97 | /// @ingroup cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroup | ||
| 98 | /// @brief **PVR add-on channel group member transfer class**\n | ||
| 99 | /// To transfer the content of @ref kodi::addon::CInstancePVRClient::GetChannelGroups(). | ||
| 100 | /// | ||
| 101 | ///@{ | ||
| 102 | class PVRChannelGroupsResultSet | ||
| 103 | { | ||
| 104 | public: | ||
| 105 | /*! \cond PRIVATE */ | ||
| 106 | PVRChannelGroupsResultSet() = delete; | ||
| 107 | PVRChannelGroupsResultSet(const AddonInstance_PVR* instance, ADDON_HANDLE handle) | ||
| 108 | : m_instance(instance), m_handle(handle) | ||
| 109 | { | ||
| 110 | } | ||
| 111 | /*! \endcond */ | ||
| 112 | |||
| 113 | |||
| 114 | /// @addtogroup cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroupsResultSet | ||
| 115 | ///@{ | ||
| 116 | |||
| 117 | /// @brief To add and give content from addon to Kodi on related call. | ||
| 118 | /// | ||
| 119 | /// @param[in] tag The to transferred data. | ||
| 120 | void Add(const kodi::addon::PVRChannelGroup& tag) | ||
| 121 | { | ||
| 122 | m_instance->toKodi->TransferChannelGroup(m_instance->toKodi->kodiInstance, m_handle, tag); | ||
| 123 | } | ||
| 124 | |||
| 125 | ///@} | ||
| 126 | |||
| 127 | private: | ||
| 128 | const AddonInstance_PVR* m_instance = nullptr; | ||
| 129 | const ADDON_HANDLE m_handle; | ||
| 130 | }; | ||
| 131 | ///@} | ||
| 132 | //------------------------------------------------------------------------------ | ||
| 133 | |||
| 134 | //============================================================================== | ||
| 135 | /// @defgroup cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroupMember class PVRChannelGroupMember | ||
| 136 | /// @ingroup cpp_kodi_addon_pvr_Defs_ChannelGroup | ||
| 137 | /// @brief **PVR add-on channel group member**\n | ||
| 138 | /// To define the content of @ref kodi::addon::CInstancePVRClient::GetChannelGroups() | ||
| 139 | /// given groups. | ||
| 140 | /// | ||
| 141 | /// This content becomes then requested with @ref kodi::addon::CInstancePVRClient::GetChannelGroupMembers(). | ||
| 142 | /// | ||
| 143 | /// ---------------------------------------------------------------------------- | ||
| 144 | /// | ||
| 145 | /// @copydetails cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroupMember_Help | ||
| 146 | /// | ||
| 147 | ///@{ | ||
| 148 | class PVRChannelGroupMember : public CStructHdl<PVRChannelGroupMember, PVR_CHANNEL_GROUP_MEMBER> | ||
| 149 | { | ||
| 150 | friend class CInstancePVRClient; | ||
| 151 | |||
| 152 | public: | ||
| 153 | /*! \cond PRIVATE */ | ||
| 154 | PVRChannelGroupMember() { memset(m_cStructure, 0, sizeof(PVR_CHANNEL_GROUP_MEMBER)); } | ||
| 155 | PVRChannelGroupMember(const PVRChannelGroupMember& channel) : CStructHdl(channel) {} | ||
| 156 | /*! \endcond */ | ||
| 157 | |||
| 158 | /// @defgroup cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroupMember_Help Value Help | ||
| 159 | /// @ingroup cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroupMember | ||
| 160 | /// | ||
| 161 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroupMember :</b> | ||
| 162 | /// | Name | Type | Set call | Get call | Usage | ||
| 163 | /// |-------|-------|-----------|----------|----------- | ||
| 164 | /// | **Group name** | `std::string` | @ref PVRChannelGroupMember::SetGroupName "SetGroupName" | @ref PVRChannelGroupMember::GetGroupName "GetGroupName" | *required to set* | ||
| 165 | /// | **Channel unique id** | `unsigned int` | @ref PVRChannelGroupMember::SetChannelUniqueId "SetChannelUniqueId" | @ref PVRChannelGroupMember::GetChannelUniqueId "GetChannelUniqueId" | *required to set* | ||
| 166 | /// | **Channel Number** | `unsigned int` | @ref PVRChannelGroupMember::SetChannelNumber "SetChannelNumber" | @ref PVRChannelGroupMember::GetChannelNumber "GetChannelNumber" | *optional* | ||
| 167 | /// | **Sub channel number** | `unsigned int` | @ref PVRChannelGroupMember::SetSubChannelNumber "SetSubChannelNumber"| @ref PVRChannelGroupMember::GetSubChannelNumber "GetSubChannelNumber" | *optional* | ||
| 168 | /// | **Order** | `int` | @ref PVRChannel::SetOrder "SetOrder" | @ref PVRChannel::GetOrder "GetOrder" | *optional* | ||
| 169 | /// | ||
| 170 | |||
| 171 | /// @addtogroup cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroupMember | ||
| 172 | ///@{ | ||
| 173 | |||
| 174 | /// @brief **required**\n | ||
| 175 | /// Name of the channel group to add the channel to. | ||
| 176 | void SetGroupName(const std::string& groupName) | ||
| 177 | { | ||
| 178 | strncpy(m_cStructure->strGroupName, groupName.c_str(), sizeof(m_cStructure->strGroupName) - 1); | ||
| 179 | } | ||
| 180 | |||
| 181 | /// @brief To get with @ref SetGroupName changed values. | ||
| 182 | std::string GetGroupName() const { return m_cStructure->strGroupName; } | ||
| 183 | |||
| 184 | /// @brief **required**\n | ||
| 185 | /// Unique id of the member. | ||
| 186 | void SetChannelUniqueId(unsigned int channelUniqueId) | ||
| 187 | { | ||
| 188 | m_cStructure->iChannelUniqueId = channelUniqueId; | ||
| 189 | } | ||
| 190 | |||
| 191 | /// @brief To get with @ref SetChannelUniqueId changed values. | ||
| 192 | unsigned int GetChannelUniqueId() const { return m_cStructure->iChannelUniqueId; } | ||
| 193 | |||
| 194 | /// @brief **optional**\n | ||
| 195 | /// Channel number within the group. | ||
| 196 | void SetChannelNumber(unsigned int channelNumber) | ||
| 197 | { | ||
| 198 | m_cStructure->iChannelNumber = channelNumber; | ||
| 199 | } | ||
| 200 | |||
| 201 | /// @brief To get with @ref SetChannelNumber changed values. | ||
| 202 | unsigned int GetChannelNumber() const { return m_cStructure->iChannelNumber; } | ||
| 203 | |||
| 204 | /// @brief **optional**\n | ||
| 205 | /// Sub channel number within the group (ATSC). | ||
| 206 | void SetSubChannelNumber(unsigned int subChannelNumber) | ||
| 207 | { | ||
| 208 | m_cStructure->iSubChannelNumber = subChannelNumber; | ||
| 209 | } | ||
| 210 | |||
| 211 | /// @brief To get with @ref SetSubChannelNumber changed values. | ||
| 212 | unsigned int GetSubChannelNumber() const { return m_cStructure->iSubChannelNumber; } | ||
| 213 | |||
| 214 | /// @brief **optional**\n | ||
| 215 | /// The value denoting the order of this channel in the <b>'All channels'</b> group. | ||
| 216 | void SetOrder(bool order) { m_cStructure->iOrder = order; } | ||
| 217 | |||
| 218 | /// @brief To get with @ref SetOrder changed values. | ||
| 219 | bool GetOrder() const { return m_cStructure->iOrder; } | ||
| 220 | |||
| 221 | ///@} | ||
| 222 | |||
| 223 | private: | ||
| 224 | PVRChannelGroupMember(const PVR_CHANNEL_GROUP_MEMBER* channel) : CStructHdl(channel) {} | ||
| 225 | PVRChannelGroupMember(PVR_CHANNEL_GROUP_MEMBER* channel) : CStructHdl(channel) {} | ||
| 226 | }; | ||
| 227 | ///@} | ||
| 228 | //------------------------------------------------------------------------------ | ||
| 229 | |||
| 230 | //============================================================================== | ||
| 231 | /// @defgroup cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroupMembersResultSet class PVRChannelGroupMembersResultSet | ||
| 232 | /// @ingroup cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroupMember | ||
| 233 | /// @brief **PVR add-on channel group member transfer class**\n | ||
| 234 | /// To transfer the content of @ref kodi::addon::CInstancePVRClient::GetChannelGroupMembers(). | ||
| 235 | /// | ||
| 236 | ///@{ | ||
| 237 | class PVRChannelGroupMembersResultSet | ||
| 238 | { | ||
| 239 | public: | ||
| 240 | /*! \cond PRIVATE */ | ||
| 241 | PVRChannelGroupMembersResultSet() = delete; | ||
| 242 | PVRChannelGroupMembersResultSet(const AddonInstance_PVR* instance, ADDON_HANDLE handle) | ||
| 243 | : m_instance(instance), m_handle(handle) | ||
| 244 | { | ||
| 245 | } | ||
| 246 | /*! \endcond */ | ||
| 247 | |||
| 248 | /// @addtogroup cpp_kodi_addon_pvr_Defs_ChannelGroup_PVRChannelGroupMembersResultSet | ||
| 249 | ///@{ | ||
| 250 | |||
| 251 | /// @brief To add and give content from addon to Kodi on related call. | ||
| 252 | /// | ||
| 253 | /// @param[in] tag The to transferred data. | ||
| 254 | void Add(const kodi::addon::PVRChannelGroupMember& tag) | ||
| 255 | { | ||
| 256 | m_instance->toKodi->TransferChannelGroupMember(m_instance->toKodi->kodiInstance, m_handle, tag); | ||
| 257 | } | ||
| 258 | |||
| 259 | ///@} | ||
| 260 | |||
| 261 | private: | ||
| 262 | const AddonInstance_PVR* m_instance = nullptr; | ||
| 263 | const ADDON_HANDLE m_handle; | ||
| 264 | }; | ||
| 265 | ///@} | ||
| 266 | //------------------------------------------------------------------------------ | ||
| 267 | |||
| 268 | } /* namespace addon */ | ||
| 269 | } /* namespace kodi */ | ||
| 270 | |||
| 271 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/Channels.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/Channels.h deleted file mode 100644 index 9c2f5d2..0000000 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/Channels.h +++ /dev/null | |||
| @@ -1,518 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #include "../../AddonBase.h" | ||
| 12 | #include "../../c-api/addon-instance/pvr.h" | ||
| 13 | |||
| 14 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 15 | // "C++" Definitions group 2 - PVR channel | ||
| 16 | #ifdef __cplusplus | ||
| 17 | |||
| 18 | namespace kodi | ||
| 19 | { | ||
| 20 | namespace addon | ||
| 21 | { | ||
| 22 | |||
| 23 | //============================================================================== | ||
| 24 | /// @defgroup cpp_kodi_addon_pvr_Defs_Channel_PVRChannel class PVRChannel | ||
| 25 | /// @ingroup cpp_kodi_addon_pvr_Defs_Channel | ||
| 26 | /// @brief **Channel data structure**\n | ||
| 27 | /// Representation of a TV or radio channel. | ||
| 28 | /// | ||
| 29 | /// This is used to store all the necessary TV or radio channel data and can | ||
| 30 | /// either provide the necessary data from / to Kodi for the associated | ||
| 31 | /// functions or can also be used in the addon to store its data. | ||
| 32 | /// | ||
| 33 | /// ---------------------------------------------------------------------------- | ||
| 34 | /// | ||
| 35 | /// @copydetails cpp_kodi_addon_pvr_Defs_Channel_PVRChannel_Help | ||
| 36 | /// | ||
| 37 | ///@{ | ||
| 38 | class PVRChannel : public CStructHdl<PVRChannel, PVR_CHANNEL> | ||
| 39 | { | ||
| 40 | friend class CInstancePVRClient; | ||
| 41 | |||
| 42 | public: | ||
| 43 | /*! \cond PRIVATE */ | ||
| 44 | PVRChannel() { memset(m_cStructure, 0, sizeof(PVR_CHANNEL)); } | ||
| 45 | PVRChannel(const PVRChannel& channel) : CStructHdl(channel) {} | ||
| 46 | /*! \endcond */ | ||
| 47 | |||
| 48 | /// @defgroup cpp_kodi_addon_pvr_Defs_Channel_PVRChannel_Help Value Help | ||
| 49 | /// @ingroup cpp_kodi_addon_pvr_Defs_Channel_PVRChannel | ||
| 50 | /// | ||
| 51 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_Channel_PVRChannel :</b> | ||
| 52 | /// | Name | Type | Set call | Get call | Usage | ||
| 53 | /// |------|------|----------|----------|----------- | ||
| 54 | /// | **Unique id** | `unsigned int` | @ref PVRChannel::SetUniqueId "SetUniqueId" | @ref PVRChannel::GetUniqueId "GetUniqueId" | *required to set* | ||
| 55 | /// | **Is radio** | `bool` | @ref PVRChannel::SetIsRadio "SetIsRadio" | @ref PVRChannel::GetIsRadio "GetIsRadio" | *required to set* | ||
| 56 | /// | **Channel number** | `unsigned int` | @ref PVRChannel::SetChannelNumber "SetChannelNumber" | @ref PVRChannel::GetChannelNumber "GetChannelNumber" | *optional* | ||
| 57 | /// | **Sub channel number** | `unsigned int` | @ref PVRChannel::SetSubChannelNumber "SetSubChannelNumber" | @ref PVRChannel::GetSubChannelNumber "GetSubChannelNumber" | *optional* | ||
| 58 | /// | **Channel name** | `std::string` | @ref PVRChannel::SetChannelName "SetChannelName" | @ref PVRChannel::GetChannelName "GetChannelName" | *optional* | ||
| 59 | /// | **Mime type** | `std::string` | @ref PVRChannel::SetMimeType "SetMimeType" | @ref PVRChannel::GetMimeType "GetMimeType" | *optional* | ||
| 60 | /// | **Encryption system** | `unsigned int` | @ref PVRChannel::SetEncryptionSystem "SetEncryptionSystem" | @ref PVRChannel::GetEncryptionSystem "GetEncryptionSystem" | *optional* | ||
| 61 | /// | **Icon path** | `std::string` | @ref PVRChannel::SetIconPath "SetIconPath" | @ref PVRChannel::GetIconPath "GetIconPath" | *optional* | ||
| 62 | /// | **Is hidden** | `bool` | @ref PVRChannel::SetIsHidden "SetIsHidden" | @ref PVRChannel::GetIsHidden "GetIsHidden" | *optional* | ||
| 63 | /// | **Has archive** | `bool` | @ref PVRChannel::SetHasArchive "SetHasArchive" | @ref PVRChannel::GetHasArchive "GetHasArchive" | *optional* | ||
| 64 | /// | **Order** | `int` | @ref PVRChannel::SetOrder "SetOrder" | @ref PVRChannel::GetOrder "GetOrder" | *optional* | ||
| 65 | /// | ||
| 66 | |||
| 67 | /// @addtogroup cpp_kodi_addon_pvr_Defs_Channel_PVRChannel | ||
| 68 | ///@{ | ||
| 69 | |||
| 70 | /// @brief **required**\n | ||
| 71 | /// Unique identifier for this channel. | ||
| 72 | void SetUniqueId(unsigned int uniqueId) { m_cStructure->iUniqueId = uniqueId; } | ||
| 73 | |||
| 74 | /// @brief To get with @ref SetUniqueId changed values. | ||
| 75 | unsigned int GetUniqueId() const { return m_cStructure->iUniqueId; } | ||
| 76 | |||
| 77 | /// @brief **required**\n | ||
| 78 | /// **true** if this is a radio channel, **false** if it's a TV channel. | ||
| 79 | void SetIsRadio(bool isRadio) { m_cStructure->bIsRadio = isRadio; } | ||
| 80 | |||
| 81 | /// @brief To get with @ref SetIsRadio changed values. | ||
| 82 | bool GetIsRadio() const { return m_cStructure->bIsRadio; } | ||
| 83 | |||
| 84 | /// @brief **optional**\n | ||
| 85 | /// Channel number of this channel on the backend. | ||
| 86 | void SetChannelNumber(unsigned int channelNumber) | ||
| 87 | { | ||
| 88 | m_cStructure->iChannelNumber = channelNumber; | ||
| 89 | } | ||
| 90 | |||
| 91 | /// @brief To get with @ref SetChannelNumber changed values. | ||
| 92 | unsigned int GetChannelNumber() const { return m_cStructure->iChannelNumber; } | ||
| 93 | |||
| 94 | /// @brief **optional**\n | ||
| 95 | /// Sub channel number of this channel on the backend (ATSC). | ||
| 96 | void SetSubChannelNumber(unsigned int subChannelNumber) | ||
| 97 | { | ||
| 98 | m_cStructure->iSubChannelNumber = subChannelNumber; | ||
| 99 | } | ||
| 100 | |||
| 101 | /// @brief To get with @ref SetSubChannelNumber changed values. | ||
| 102 | unsigned int GetSubChannelNumber() const { return m_cStructure->iSubChannelNumber; } | ||
| 103 | |||
| 104 | /// @brief **optional**\n | ||
| 105 | /// Channel name given to this channel. | ||
| 106 | void SetChannelName(const std::string& channelName) | ||
| 107 | { | ||
| 108 | strncpy(m_cStructure->strChannelName, channelName.c_str(), | ||
| 109 | sizeof(m_cStructure->strChannelName) - 1); | ||
| 110 | } | ||
| 111 | |||
| 112 | /// @brief To get with @ref SetChannelName changed values. | ||
| 113 | std::string GetChannelName() const { return m_cStructure->strChannelName; } | ||
| 114 | |||
| 115 | /// @brief **optional**\n | ||
| 116 | /// Input format mime type. | ||
| 117 | /// | ||
| 118 | /// Available types can be found in https://www.iana.org/assignments/media-types/media-types.xhtml | ||
| 119 | /// on "application" and "video" or leave empty if unknown. | ||
| 120 | /// | ||
| 121 | void SetMimeType(const std::string& inputFormat) | ||
| 122 | { | ||
| 123 | strncpy(m_cStructure->strMimeType, inputFormat.c_str(), sizeof(m_cStructure->strMimeType) - 1); | ||
| 124 | } | ||
| 125 | |||
| 126 | /// @brief To get with @ref SetMimeType changed values. | ||
| 127 | std::string GetMimeType() const { return m_cStructure->strMimeType; } | ||
| 128 | |||
| 129 | /// @brief **optional**\n | ||
| 130 | /// The encryption ID or CaID of this channel (Conditional access systems). | ||
| 131 | /// | ||
| 132 | /// Lists about available ID's: | ||
| 133 | /// - http://www.dvb.org/index.php?id=174 | ||
| 134 | /// - http://en.wikipedia.org/wiki/Conditional_access_system | ||
| 135 | /// | ||
| 136 | void SetEncryptionSystem(unsigned int encryptionSystem) | ||
| 137 | { | ||
| 138 | m_cStructure->iEncryptionSystem = encryptionSystem; | ||
| 139 | } | ||
| 140 | |||
| 141 | /// @brief To get with @ref SetEncryptionSystem changed values. | ||
| 142 | unsigned int GetEncryptionSystem() const { return m_cStructure->iEncryptionSystem; } | ||
| 143 | |||
| 144 | /// @brief **optional**\n | ||
| 145 | /// Path to the channel icon (if present). | ||
| 146 | void SetIconPath(const std::string& iconPath) | ||
| 147 | { | ||
| 148 | strncpy(m_cStructure->strIconPath, iconPath.c_str(), sizeof(m_cStructure->strIconPath) - 1); | ||
| 149 | } | ||
| 150 | |||
| 151 | /// @brief To get with @ref SetIconPath changed values. | ||
| 152 | std::string GetIconPath() const { return m_cStructure->strIconPath; } | ||
| 153 | |||
| 154 | /// @brief **optional**\n | ||
| 155 | /// **true** if this channel is marked as hidden. | ||
| 156 | void SetIsHidden(bool isHidden) { m_cStructure->bIsHidden = isHidden; } | ||
| 157 | |||
| 158 | /// @brief To get with @ref GetIsRadio changed values. | ||
| 159 | bool GetIsHidden() const { return m_cStructure->bIsHidden; } | ||
| 160 | |||
| 161 | /// @brief **optional**\n | ||
| 162 | /// **true** if this channel has a server-side back buffer. | ||
| 163 | void SetHasArchive(bool hasArchive) { m_cStructure->bHasArchive = hasArchive; } | ||
| 164 | |||
| 165 | /// @brief To get with @ref GetIsRadio changed values. | ||
| 166 | bool GetHasArchive() const { return m_cStructure->bHasArchive; } | ||
| 167 | |||
| 168 | /// @brief **optional**\n | ||
| 169 | /// The value denoting the order of this channel in the 'All channels' group. | ||
| 170 | void SetOrder(bool order) { m_cStructure->iOrder = order; } | ||
| 171 | |||
| 172 | /// @brief To get with @ref SetOrder changed values. | ||
| 173 | bool GetOrder() const { return m_cStructure->iOrder; } | ||
| 174 | ///@} | ||
| 175 | |||
| 176 | private: | ||
| 177 | PVRChannel(const PVR_CHANNEL* channel) : CStructHdl(channel) {} | ||
| 178 | PVRChannel(PVR_CHANNEL* channel) : CStructHdl(channel) {} | ||
| 179 | }; | ||
| 180 | ///@} | ||
| 181 | //------------------------------------------------------------------------------ | ||
| 182 | |||
| 183 | //============================================================================== | ||
| 184 | /// @defgroup cpp_kodi_addon_pvr_Defs_Channel_PVRChannelsResultSet class PVRChannelsResultSet | ||
| 185 | /// @ingroup cpp_kodi_addon_pvr_Defs_Channel_PVRChannel | ||
| 186 | /// @brief **PVR add-on channel transfer class**\n | ||
| 187 | /// To transfer the content of @ref kodi::addon::CInstancePVRClient::GetChannels(). | ||
| 188 | /// | ||
| 189 | ///@{ | ||
| 190 | class PVRChannelsResultSet | ||
| 191 | { | ||
| 192 | public: | ||
| 193 | /*! \cond PRIVATE */ | ||
| 194 | PVRChannelsResultSet() = delete; | ||
| 195 | PVRChannelsResultSet(const AddonInstance_PVR* instance, ADDON_HANDLE handle) | ||
| 196 | : m_instance(instance), m_handle(handle) | ||
| 197 | { | ||
| 198 | } | ||
| 199 | /*! \endcond */ | ||
| 200 | |||
| 201 | /// @addtogroup cpp_kodi_addon_pvr_Defs_Channel_PVRChannelsResultSet | ||
| 202 | ///@{ | ||
| 203 | |||
| 204 | /// @brief To add and give content from addon to Kodi on related call. | ||
| 205 | /// | ||
| 206 | /// @param[in] tag The to transferred data. | ||
| 207 | void Add(const kodi::addon::PVRChannel& tag) | ||
| 208 | { | ||
| 209 | m_instance->toKodi->TransferChannelEntry(m_instance->toKodi->kodiInstance, m_handle, tag); | ||
| 210 | } | ||
| 211 | |||
| 212 | ///@} | ||
| 213 | |||
| 214 | private: | ||
| 215 | const AddonInstance_PVR* m_instance = nullptr; | ||
| 216 | const ADDON_HANDLE m_handle; | ||
| 217 | }; | ||
| 218 | ///@} | ||
| 219 | //------------------------------------------------------------------------------ | ||
| 220 | |||
| 221 | //============================================================================== | ||
| 222 | /// @defgroup cpp_kodi_addon_pvr_Defs_Channel_PVRSignalStatus class PVRSignalStatus | ||
| 223 | /// @ingroup cpp_kodi_addon_pvr_Defs_Channel | ||
| 224 | /// @brief **PVR Signal status information**\n | ||
| 225 | /// This class gives current status information from stream to Kodi. | ||
| 226 | /// | ||
| 227 | /// Used to get information for user by call of @ref kodi::addon::CInstancePVRClient::GetSignalStatus() | ||
| 228 | /// to see current quality and source. | ||
| 229 | /// | ||
| 230 | /// ---------------------------------------------------------------------------- | ||
| 231 | /// | ||
| 232 | /// @copydetails cpp_kodi_addon_pvr_Defs_Channel_PVRSignalStatus_Help | ||
| 233 | /// | ||
| 234 | ///@{ | ||
| 235 | class PVRSignalStatus : public CStructHdl<PVRSignalStatus, PVR_SIGNAL_STATUS> | ||
| 236 | { | ||
| 237 | friend class CInstancePVRClient; | ||
| 238 | |||
| 239 | public: | ||
| 240 | /*! \cond PRIVATE */ | ||
| 241 | PVRSignalStatus() = default; | ||
| 242 | PVRSignalStatus(const PVRSignalStatus& type) : CStructHdl(type) {} | ||
| 243 | /*! \endcond */ | ||
| 244 | |||
| 245 | |||
| 246 | /// @defgroup cpp_kodi_addon_pvr_Defs_Channel_PVRSignalStatus_Help Value Help | ||
| 247 | /// @ingroup cpp_kodi_addon_pvr_Defs_Channel_PVRSignalStatus | ||
| 248 | /// | ||
| 249 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_Channel_PVRSignalStatus :</b> | ||
| 250 | /// | Name | Type | Set call | Get call | Usage | ||
| 251 | /// |------|------|----------|----------|----------- | ||
| 252 | /// | **Adapter name** | `std::string` | @ref PVRSignalStatus::SetAdapterName "SetAdapterName" | @ref PVRSignalStatus::GetAdapterName "GetAdapterName" | *optional* | ||
| 253 | /// | **Adapter status** | `std::string` | @ref PVRSignalStatus::SetAdapterStatus "SetAdapterStatus" | @ref PVRSignalStatus::GetAdapterStatus "GetAdapterStatus" | *optional* | ||
| 254 | /// | **Service name** | `std::string` | @ref PVRSignalStatus::SetServiceName "SetServiceName" | @ref PVRSignalStatus::GetServiceName "GetServiceName" | *optional* | ||
| 255 | /// | **Provider name** | `std::string` | @ref PVRSignalStatus::SetProviderName "SetProviderName" | @ref PVRSignalStatus::GetProviderName "GetProviderName" | *optional* | ||
| 256 | /// | **Mux name** | `std::string` | @ref PVRSignalStatus::SetMuxName "SetMuxName" | @ref PVRSignalStatus::GetMuxName "GetMuxName" | *optional* | ||
| 257 | /// | **Signal/noise ratio** | `int` | @ref PVRSignalStatus::SetSNR "SetSNR" | @ref PVRSignalStatus::GetSNR "GetSNR" | *optional* | ||
| 258 | /// | **Signal strength** | `int` | @ref PVRSignalStatus::SetSignal "SetSignal" | @ref PVRSignalStatus::GetSignal "GetSignal" | *optional* | ||
| 259 | /// | **Bit error rate** | `long` | @ref PVRSignalStatus::SetBER "SetBER" | @ref PVRSignalStatus::GetBER "GetBER" | *optional* | ||
| 260 | /// | **Uncorrected blocks** | `long` | @ref PVRSignalStatus::SetUNC "SetUNC" | @ref PVRSignalStatus::GetUNC "GetUNC" | *optional* | ||
| 261 | /// | ||
| 262 | |||
| 263 | /// @addtogroup cpp_kodi_addon_pvr_Defs_Channel_PVRSignalStatus | ||
| 264 | ///@{ | ||
| 265 | |||
| 266 | /// @brief **optional**\n | ||
| 267 | /// Name of the adapter that's being used. | ||
| 268 | void SetAdapterName(const std::string& adapterName) | ||
| 269 | { | ||
| 270 | strncpy(m_cStructure->strAdapterName, adapterName.c_str(), | ||
| 271 | sizeof(m_cStructure->strAdapterName) - 1); | ||
| 272 | } | ||
| 273 | |||
| 274 | /// @brief To get with @ref SetAdapterName changed values. | ||
| 275 | std::string GetAdapterName() const { return m_cStructure->strAdapterName; } | ||
| 276 | |||
| 277 | /// @brief **optional**\n | ||
| 278 | /// Status of the adapter that's being used. | ||
| 279 | void SetAdapterStatus(const std::string& adapterStatus) | ||
| 280 | { | ||
| 281 | strncpy(m_cStructure->strAdapterStatus, adapterStatus.c_str(), | ||
| 282 | sizeof(m_cStructure->strAdapterStatus) - 1); | ||
| 283 | } | ||
| 284 | |||
| 285 | /// @brief To get with @ref SetAdapterStatus changed values. | ||
| 286 | std::string GetAdapterStatus() const { return m_cStructure->strAdapterStatus; } | ||
| 287 | |||
| 288 | /// @brief **optional**\n | ||
| 289 | /// Name of the current service. | ||
| 290 | void SetServiceName(const std::string& serviceName) | ||
| 291 | { | ||
| 292 | strncpy(m_cStructure->strServiceName, serviceName.c_str(), | ||
| 293 | sizeof(m_cStructure->strServiceName) - 1); | ||
| 294 | } | ||
| 295 | |||
| 296 | /// @brief To get with @ref SetServiceName changed values. | ||
| 297 | std::string GetServiceName() const { return m_cStructure->strServiceName; } | ||
| 298 | |||
| 299 | /// @brief **optional**\n | ||
| 300 | /// Name of the current service's provider. | ||
| 301 | void SetProviderName(const std::string& providerName) | ||
| 302 | { | ||
| 303 | strncpy(m_cStructure->strProviderName, providerName.c_str(), | ||
| 304 | sizeof(m_cStructure->strProviderName) - 1); | ||
| 305 | } | ||
| 306 | |||
| 307 | /// @brief To get with @ref SetProviderName changed values. | ||
| 308 | std::string GetProviderName() const { return m_cStructure->strProviderName; } | ||
| 309 | |||
| 310 | /// @brief **optional**\n | ||
| 311 | /// Name of the current mux. | ||
| 312 | void SetMuxName(const std::string& muxName) | ||
| 313 | { | ||
| 314 | strncpy(m_cStructure->strMuxName, muxName.c_str(), sizeof(m_cStructure->strMuxName) - 1); | ||
| 315 | } | ||
| 316 | |||
| 317 | /// @brief To get with @ref SetMuxName changed values. | ||
| 318 | std::string GetMuxName() const { return m_cStructure->strMuxName; } | ||
| 319 | |||
| 320 | /// @brief **optional**\n | ||
| 321 | /// Signal/noise ratio. | ||
| 322 | /// | ||
| 323 | /// @note 100% is 0xFFFF 65535 | ||
| 324 | void SetSNR(int snr) { m_cStructure->iSNR = snr; } | ||
| 325 | |||
| 326 | /// @brief To get with @ref SetSNR changed values. | ||
| 327 | int GetSNR() const { return m_cStructure->iSNR; } | ||
| 328 | |||
| 329 | /// @brief **optional**\n | ||
| 330 | /// Signal strength. | ||
| 331 | /// | ||
| 332 | /// @note 100% is 0xFFFF 65535 | ||
| 333 | void SetSignal(int signal) { m_cStructure->iSignal = signal; } | ||
| 334 | |||
| 335 | /// @brief To get with @ref SetSignal changed values. | ||
| 336 | int GetSignal() const { return m_cStructure->iSignal; } | ||
| 337 | |||
| 338 | /// @brief **optional**\n | ||
| 339 | /// Bit error rate. | ||
| 340 | void SetBER(long ber) { m_cStructure->iBER = ber; } | ||
| 341 | |||
| 342 | /// @brief To get with @ref SetBER changed values. | ||
| 343 | long GetBER() const { return m_cStructure->iBER; } | ||
| 344 | |||
| 345 | /// @brief **optional**\n | ||
| 346 | /// Uncorrected blocks: | ||
| 347 | void SetUNC(long unc) { m_cStructure->iUNC = unc; } | ||
| 348 | |||
| 349 | /// @brief To get with @ref SetBER changed values. | ||
| 350 | long GetUNC() const { return m_cStructure->iUNC; } | ||
| 351 | ///@} | ||
| 352 | |||
| 353 | private: | ||
| 354 | PVRSignalStatus(const PVR_SIGNAL_STATUS* type) : CStructHdl(type) {} | ||
| 355 | PVRSignalStatus(PVR_SIGNAL_STATUS* type) : CStructHdl(type) {} | ||
| 356 | }; | ||
| 357 | ///@} | ||
| 358 | //------------------------------------------------------------------------------ | ||
| 359 | |||
| 360 | //============================================================================== | ||
| 361 | /// @defgroup cpp_kodi_addon_pvr_Defs_Channel_PVRDescrambleInfo class PVRDescrambleInfo | ||
| 362 | /// @ingroup cpp_kodi_addon_pvr_Defs_Channel | ||
| 363 | /// @brief **Data structure for descrample info**\n | ||
| 364 | /// Information data to give via this to Kodi. | ||
| 365 | /// | ||
| 366 | /// As description see also here https://en.wikipedia.org/wiki/Conditional_access. | ||
| 367 | /// | ||
| 368 | /// Used on @ref kodi::addon::CInstancePVRClient::GetDescrambleInfo(). | ||
| 369 | /// | ||
| 370 | /// ---------------------------------------------------------------------------- | ||
| 371 | /// | ||
| 372 | /// @copydetails cpp_kodi_addon_pvr_Defs_Channel_PVRDescrambleInfo_Help | ||
| 373 | /// | ||
| 374 | ///@{ | ||
| 375 | class PVRDescrambleInfo : public CStructHdl<PVRDescrambleInfo, PVR_DESCRAMBLE_INFO> | ||
| 376 | { | ||
| 377 | friend class CInstancePVRClient; | ||
| 378 | |||
| 379 | public: | ||
| 380 | /*! \cond PRIVATE */ | ||
| 381 | PVRDescrambleInfo() | ||
| 382 | { | ||
| 383 | m_cStructure->iPid = PVR_DESCRAMBLE_INFO_NOT_AVAILABLE; | ||
| 384 | m_cStructure->iCaid = PVR_DESCRAMBLE_INFO_NOT_AVAILABLE; | ||
| 385 | m_cStructure->iProvid = PVR_DESCRAMBLE_INFO_NOT_AVAILABLE; | ||
| 386 | m_cStructure->iEcmTime = PVR_DESCRAMBLE_INFO_NOT_AVAILABLE; | ||
| 387 | m_cStructure->iHops = PVR_DESCRAMBLE_INFO_NOT_AVAILABLE; | ||
| 388 | } | ||
| 389 | PVRDescrambleInfo(const PVRDescrambleInfo& type) : CStructHdl(type) {} | ||
| 390 | /*! \endcond */ | ||
| 391 | |||
| 392 | /// @defgroup cpp_kodi_addon_pvr_Defs_Channel_PVRDescrambleInfo_Help Value Help | ||
| 393 | /// @ingroup cpp_kodi_addon_pvr_Defs_Channel_PVRDescrambleInfo | ||
| 394 | /// | ||
| 395 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_Channel_PVRDescrambleInfo :</b> | ||
| 396 | /// | Name | Type | Set call | Get call | Usage | ||
| 397 | /// |------|------|----------|----------|----------- | ||
| 398 | /// | **Packet identifier** | `int` | @ref PVRDescrambleInfo::SetPID "SetPID" | @ref PVRDescrambleInfo::GetPID "GetPID" | *optional* | ||
| 399 | /// | **Conditional access identifier** | `int` | @ref PVRDescrambleInfo::SetCAID "SetCAID" | @ref PVRDescrambleInfo::GetCAID "GetCAID" | *optional* | ||
| 400 | /// | **Provider-ID** | `int` | @ref PVRDescrambleInfo::SetProviderID "SetProviderID" | @ref PVRDescrambleInfo::GetProviderID "GetProviderID" | *optional* | ||
| 401 | /// | **ECM time** | `int` | @ref PVRDescrambleInfo::SetECMTime "SetECMTime" | @ref PVRDescrambleInfo::GetECMTime "GetECMTime" | *optional* | ||
| 402 | /// | **Hops** | `int` | @ref PVRDescrambleInfo::SetHops "SetHops" | @ref PVRDescrambleInfo::GetHops "GetHops" | *optional* | ||
| 403 | /// | **Descramble card system** | `std::string` | @ref PVRDescrambleInfo::SetHops "SetHops" | @ref PVRDescrambleInfo::GetHops "GetHops" | *optional* | ||
| 404 | /// | **Reader** | `std::string` | @ref PVRDescrambleInfo::SetReader "SetReader" | @ref PVRDescrambleInfo::GetReader "GetReader" | *optional* | ||
| 405 | /// | **From** | `std::string` | @ref PVRDescrambleInfo::SetFrom "SetFrom" | @ref PVRDescrambleInfo::GetFrom "GetFrom" | *optional* | ||
| 406 | /// | **Protocol** | `std::string` | @ref PVRDescrambleInfo::SetProtocol "SetProtocol" | @ref PVRDescrambleInfo::GetProtocol "GetProtocol" | *optional* | ||
| 407 | /// | ||
| 408 | |||
| 409 | /// @addtogroup cpp_kodi_addon_pvr_Defs_Channel_PVRDescrambleInfo | ||
| 410 | ///@{ | ||
| 411 | |||
| 412 | /// @brief **optional**\n | ||
| 413 | /// Packet identifier. | ||
| 414 | /// | ||
| 415 | /// Each table or elementary stream in a transport stream is identified by | ||
| 416 | /// a 13-bit packet identifier (PID). | ||
| 417 | /// | ||
| 418 | /// Is @ref PVR_DESCRAMBLE_INFO_NOT_AVAILABLE as default, if not available | ||
| 419 | void SetPID(int pid) { m_cStructure->iPid = pid; } | ||
| 420 | |||
| 421 | /// @brief To get with @ref SetPID changed values | ||
| 422 | int GetPID() const { return m_cStructure->iPid; } | ||
| 423 | |||
| 424 | /// @brief **optional**\n | ||
| 425 | /// Conditional access identifier. | ||
| 426 | /// | ||
| 427 | /// Conditional access (abbreviated CA) or conditional access system (abbreviated CAS) | ||
| 428 | /// is the protection of content by requiring certain criteria to be met before granting | ||
| 429 | /// access to the content. | ||
| 430 | /// | ||
| 431 | /// Available CA system ID's listed here https://www.dvbservices.com/identifiers/ca_system_id. | ||
| 432 | /// | ||
| 433 | /// @ref PVR_DESCRAMBLE_INFO_NOT_AVAILABLE if not available. | ||
| 434 | void SetCAID(int iCaid) { m_cStructure->iCaid = iCaid; } | ||
| 435 | |||
| 436 | /// @brief To get with @ref SetCAID changed values. | ||
| 437 | int GetCAID() const { return m_cStructure->iCaid; } | ||
| 438 | |||
| 439 | /// @brief **optional**\n | ||
| 440 | /// Provider-ID. | ||
| 441 | /// | ||
| 442 | /// Is @ref PVR_DESCRAMBLE_INFO_NOT_AVAILABLE as default, if not available. | ||
| 443 | void SetProviderID(int provid) { m_cStructure->iProvid = provid; } | ||
| 444 | |||
| 445 | /// @brief To get with @ref SetProviderID changed values | ||
| 446 | int GetProviderID() const { return m_cStructure->iProvid; } | ||
| 447 | |||
| 448 | /// @brief **optional**\n | ||
| 449 | /// ECM time. | ||
| 450 | /// | ||
| 451 | /// Is @ref PVR_DESCRAMBLE_INFO_NOT_AVAILABLE as default, if not available. | ||
| 452 | void SetECMTime(int ecmTime) { m_cStructure->iEcmTime = ecmTime; } | ||
| 453 | |||
| 454 | /// @brief To get with @ref SetECMTime changed values. | ||
| 455 | int GetECMTime() const { return m_cStructure->iEcmTime; } | ||
| 456 | |||
| 457 | /// @brief **optional**\n | ||
| 458 | /// Hops. | ||
| 459 | /// | ||
| 460 | /// Is @ref PVR_DESCRAMBLE_INFO_NOT_AVAILABLE as default, if not available. | ||
| 461 | void SetHops(int hops) { m_cStructure->iHops = hops; } | ||
| 462 | |||
| 463 | /// @brief To get with @ref SetHops changed values. | ||
| 464 | int GetHops() const { return m_cStructure->iHops; } | ||
| 465 | |||
| 466 | /// @brief **optional**\n | ||
| 467 | /// Empty string if not available. | ||
| 468 | void SetCardSystem(const std::string& cardSystem) | ||
| 469 | { | ||
| 470 | strncpy(m_cStructure->strCardSystem, cardSystem.c_str(), | ||
| 471 | sizeof(m_cStructure->strCardSystem) - 1); | ||
| 472 | } | ||
| 473 | |||
| 474 | /// @brief To get with @ref SetCardSystem changed values. | ||
| 475 | std::string GetCardSystem() const { return m_cStructure->strCardSystem; } | ||
| 476 | |||
| 477 | /// @brief **optional**\n | ||
| 478 | /// Empty string if not available. | ||
| 479 | void SetReader(const std::string& reader) | ||
| 480 | { | ||
| 481 | strncpy(m_cStructure->strReader, reader.c_str(), sizeof(m_cStructure->strReader) - 1); | ||
| 482 | } | ||
| 483 | |||
| 484 | /// @brief To get with @ref SetReader changed values. | ||
| 485 | std::string GetReader() const { return m_cStructure->strReader; } | ||
| 486 | |||
| 487 | /// @brief **optional**\n | ||
| 488 | /// Empty string if not available. | ||
| 489 | void SetFrom(const std::string& from) | ||
| 490 | { | ||
| 491 | strncpy(m_cStructure->strFrom, from.c_str(), sizeof(m_cStructure->strFrom) - 1); | ||
| 492 | } | ||
| 493 | |||
| 494 | /// @brief To get with @ref SetFrom changed values. | ||
| 495 | std::string GetFrom() const { return m_cStructure->strFrom; } | ||
| 496 | |||
| 497 | /// @brief **optional**\n | ||
| 498 | /// Empty string if not available. | ||
| 499 | void SetProtocol(const std::string& protocol) | ||
| 500 | { | ||
| 501 | strncpy(m_cStructure->strProtocol, protocol.c_str(), sizeof(m_cStructure->strProtocol) - 1); | ||
| 502 | } | ||
| 503 | |||
| 504 | /// @brief To get with @ref SetProtocol changed values. | ||
| 505 | std::string GetProtocol() const { return m_cStructure->strProtocol; } | ||
| 506 | ///@} | ||
| 507 | |||
| 508 | private: | ||
| 509 | PVRDescrambleInfo(const PVR_DESCRAMBLE_INFO* type) : CStructHdl(type) {} | ||
| 510 | PVRDescrambleInfo(PVR_DESCRAMBLE_INFO* type) : CStructHdl(type) {} | ||
| 511 | }; | ||
| 512 | ///@} | ||
| 513 | //------------------------------------------------------------------------------ | ||
| 514 | |||
| 515 | } /* namespace addon */ | ||
| 516 | } /* namespace kodi */ | ||
| 517 | |||
| 518 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/EDL.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/EDL.h deleted file mode 100644 index 34c7c41..0000000 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/EDL.h +++ /dev/null | |||
| @@ -1,90 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #include "../../AddonBase.h" | ||
| 12 | #include "../../c-api/addon-instance/pvr/pvr_edl.h" | ||
| 13 | |||
| 14 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 15 | // "C++" Definitions group 8 - PVR Edit definition list (EDL) | ||
| 16 | #ifdef __cplusplus | ||
| 17 | |||
| 18 | namespace kodi | ||
| 19 | { | ||
| 20 | namespace addon | ||
| 21 | { | ||
| 22 | |||
| 23 | //============================================================================== | ||
| 24 | /// @defgroup cpp_kodi_addon_pvr_Defs_EDLEntry_PVREDLEntry class PVREDLEntry | ||
| 25 | /// @ingroup cpp_kodi_addon_pvr_Defs_EDLEntry | ||
| 26 | /// @brief **Edit definition list (EDL) entry**\n | ||
| 27 | /// Time places and type of related fields. | ||
| 28 | /// | ||
| 29 | /// This used within @ref cpp_kodi_addon_pvr_EPGTag "EPG" and | ||
| 30 | /// @ref cpp_kodi_addon_pvr_Recordings "recordings". | ||
| 31 | /// | ||
| 32 | /// ---------------------------------------------------------------------------- | ||
| 33 | /// | ||
| 34 | /// @copydetails cpp_kodi_addon_pvr_Defs_EDLEntry_PVREDLEntry_Help | ||
| 35 | /// | ||
| 36 | ///@{ | ||
| 37 | class PVREDLEntry : public CStructHdl<PVREDLEntry, PVR_EDL_ENTRY> | ||
| 38 | { | ||
| 39 | friend class CInstancePVRClient; | ||
| 40 | |||
| 41 | public: | ||
| 42 | /*! \cond PRIVATE */ | ||
| 43 | PVREDLEntry() { memset(m_cStructure, 0, sizeof(PVR_EDL_ENTRY)); } | ||
| 44 | PVREDLEntry(const PVREDLEntry& type) : CStructHdl(type) {} | ||
| 45 | /*! \endcond */ | ||
| 46 | |||
| 47 | /// @defgroup cpp_kodi_addon_pvr_Defs_EDLEntry_PVREDLEntry_Help Value Help | ||
| 48 | /// @ingroup cpp_kodi_addon_pvr_Defs_EDLEntry_PVREDLEntry | ||
| 49 | /// | ||
| 50 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_EDLEntry_PVREDLEntry :</b> | ||
| 51 | /// | Name | Type | Set call | Get call | Usage | ||
| 52 | /// |------|------|----------|----------|----------- | ||
| 53 | /// | **Start time** | `int64_t` | @ref PVREDLEntry::SetStart "SetStart" | @ref PVREDLEntry::GetStart "GetStart" | *required to set* | ||
| 54 | /// | **End time** | `int64_t` | @ref PVREDLEntry::SetEnd "SetEnd" | @ref PVREDLEntry::GetEnd "GetEnd" | *required to set* | ||
| 55 | /// | **Type** | @ref PVR_EDL_TYPE | @ref PVREDLEntry::SetType "SetType" | @ref PVREDLEntry::GetType "GetType" | *required to set* | ||
| 56 | /// | ||
| 57 | |||
| 58 | /// @addtogroup cpp_kodi_addon_pvr_Defs_EDLEntry_PVREDLEntry | ||
| 59 | ///@{ | ||
| 60 | |||
| 61 | /// @brief Start time in milliseconds. | ||
| 62 | void SetStart(int64_t start) { m_cStructure->start = start; } | ||
| 63 | |||
| 64 | /// @brief To get with @ref SetStart() changed values. | ||
| 65 | int64_t GetStart() const { return m_cStructure->start; } | ||
| 66 | |||
| 67 | /// @brief End time in milliseconds. | ||
| 68 | void SetEnd(int64_t end) { m_cStructure->end = end; } | ||
| 69 | |||
| 70 | /// @brief To get with @ref SetEnd() changed values. | ||
| 71 | int64_t GetEnd() const { return m_cStructure->end; } | ||
| 72 | |||
| 73 | /// @brief The with @ref PVR_EDL_TYPE used definition list type. | ||
| 74 | void SetType(PVR_EDL_TYPE type) { m_cStructure->type = type; } | ||
| 75 | |||
| 76 | /// @brief To get with @ref SetType() changed values. | ||
| 77 | PVR_EDL_TYPE GetType() const { return m_cStructure->type; } | ||
| 78 | ///@} | ||
| 79 | |||
| 80 | private: | ||
| 81 | PVREDLEntry(const PVR_EDL_ENTRY* type) : CStructHdl(type) {} | ||
| 82 | PVREDLEntry(PVR_EDL_ENTRY* type) : CStructHdl(type) {} | ||
| 83 | }; | ||
| 84 | ///@} | ||
| 85 | //------------------------------------------------------------------------------ | ||
| 86 | |||
| 87 | } /* namespace addon */ | ||
| 88 | } /* namespace kodi */ | ||
| 89 | |||
| 90 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/EPG.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/EPG.h deleted file mode 100644 index e1fc04f..0000000 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/EPG.h +++ /dev/null | |||
| @@ -1,500 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #include "../../AddonBase.h" | ||
| 12 | #include "../../c-api/addon-instance/pvr.h" | ||
| 13 | |||
| 14 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 15 | // "C++" Definitions group 4 - PVR EPG | ||
| 16 | #ifdef __cplusplus | ||
| 17 | |||
| 18 | namespace kodi | ||
| 19 | { | ||
| 20 | namespace addon | ||
| 21 | { | ||
| 22 | |||
| 23 | //============================================================================== | ||
| 24 | /// @defgroup cpp_kodi_addon_pvr_Defs_epg_PVREPGTag class PVREPGTag | ||
| 25 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg | ||
| 26 | /// @brief **PVR add-on EPG data tag**\n | ||
| 27 | /// Representation of an EPG event. | ||
| 28 | /// | ||
| 29 | /// Herewith all EPG related data are saved in one class whereby the data can | ||
| 30 | /// be exchanged with Kodi, or can also be used on the addon to save there. | ||
| 31 | /// | ||
| 32 | /// See @ref cpp_kodi_addon_pvr_EPGTag "EPG methods" about usage. | ||
| 33 | /// | ||
| 34 | /// ---------------------------------------------------------------------------- | ||
| 35 | /// | ||
| 36 | /// @copydetails cpp_kodi_addon_pvr_Defs_epg_PVREPGTag_Help | ||
| 37 | /// | ||
| 38 | ///@{ | ||
| 39 | class PVREPGTag : public CStructHdl<PVREPGTag, EPG_TAG> | ||
| 40 | { | ||
| 41 | friend class CInstancePVRClient; | ||
| 42 | |||
| 43 | public: | ||
| 44 | /*! \cond PRIVATE */ | ||
| 45 | PVREPGTag() | ||
| 46 | { | ||
| 47 | memset(m_cStructure, 0, sizeof(EPG_TAG)); | ||
| 48 | m_cStructure->iSeriesNumber = EPG_TAG_INVALID_SERIES_EPISODE; | ||
| 49 | m_cStructure->iEpisodeNumber = EPG_TAG_INVALID_SERIES_EPISODE; | ||
| 50 | m_cStructure->iEpisodePartNumber = EPG_TAG_INVALID_SERIES_EPISODE; | ||
| 51 | } | ||
| 52 | PVREPGTag(const PVREPGTag& epg) : CStructHdl(epg) | ||
| 53 | { | ||
| 54 | m_title = epg.m_title; | ||
| 55 | m_plotOutline = epg.m_plotOutline; | ||
| 56 | m_plot = epg.m_plot; | ||
| 57 | m_originalTitle = epg.m_originalTitle; | ||
| 58 | m_cast = epg.m_cast; | ||
| 59 | m_director = epg.m_director; | ||
| 60 | m_writer = epg.m_writer; | ||
| 61 | m_IMDBNumber = epg.m_IMDBNumber; | ||
| 62 | m_iconPath = epg.m_iconPath; | ||
| 63 | m_genreDescription = epg.m_genreDescription; | ||
| 64 | m_episodeName = epg.m_episodeName; | ||
| 65 | m_seriesLink = epg.m_seriesLink; | ||
| 66 | m_firstAired = epg.m_firstAired; | ||
| 67 | } | ||
| 68 | /*! \endcond */ | ||
| 69 | |||
| 70 | |||
| 71 | /// @defgroup cpp_kodi_addon_pvr_Defs_epg_PVREPGTag_Help Value Help | ||
| 72 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_PVREPGTag | ||
| 73 | /// | ||
| 74 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_epg_PVREPGTag :</b> | ||
| 75 | /// | Name | Type | Set call | Get call | Usage | ||
| 76 | /// |------|------|----------|----------|--------- | ||
| 77 | /// | **Unique broadcast id** | `unsigned int` | @ref PVREPGTag::SetUniqueBroadcastId "SetUniqueBroadcastId" | @ref PVREPGTag::GetUniqueBroadcastId "GetUniqueBroadcastId" | *required to set* | ||
| 78 | /// | **Unique channel id** | `unsigned int` | @ref PVREPGTag::SetUniqueChannelId "SetUniqueChannelId" | @ref PVREPGTag::GetUniqueChannelId "GetUniqueChannelId" | *required to set* | ||
| 79 | /// | **Title** | `std::string` | @ref PVREPGTag::SetTitle "SetTitle" | @ref PVREPGTag::GetTitle "GetTitle" | *required to set* | ||
| 80 | /// | **Start time** | `time_t` | @ref PVREPGTag::SetStartTime "SetStartTime" | @ref PVREPGTag::GetStartTime "GetStartTime" | *required to set* | ||
| 81 | /// | **End time** | `time_t` | @ref PVREPGTag::SetEndTime "SetEndTime" | @ref PVREPGTag::GetEndTime "GetEndTime" | *required to set* | ||
| 82 | /// | **Plot outline** | `std::string` | @ref PVREPGTag::SetPlotOutline "SetPlotOutline" | @ref PVREPGTag::GetPlotOutline "GetPlotOutline" | *optional* | ||
| 83 | /// | **Plot** | `std::string` | @ref PVREPGTag::SetPlot "SetPlot" | @ref PVREPGTag::GetPlot "GetPlot" | *optional* | ||
| 84 | /// | **Original title** | `std::string` | @ref PVREPGTag::SetOriginalTitle "SetOriginalTitle" | @ref PVREPGTag::GetOriginalTitle "GetOriginalTitle" | *optional* | ||
| 85 | /// | **Cast** | `std::string` | @ref PVREPGTag::SetCast "SetCast" | @ref PVREPGTag::GetCast "GetCast" | *optional* | ||
| 86 | /// | **Director** | `std::string` | @ref PVREPGTag::SetDirector "SetDirector" | @ref PVREPGTag::GetDirector "GetDirector" | *optional* | ||
| 87 | /// | **Writer** | `std::string` | @ref PVREPGTag::SetWriter "SetWriter" | @ref PVREPGTag::GetWriter "GetWriter" | *optional* | ||
| 88 | /// | **Year** | `int` | @ref PVREPGTag::SetYear "SetYear" | @ref PVREPGTag::GetYear "GetYear" | *optional* | ||
| 89 | /// | **IMDB number** | `std::string` | @ref PVREPGTag::SetIMDBNumber "SetIMDBNumber" | @ref PVREPGTag::GetIMDBNumber "GetIMDBNumber" | *optional* | ||
| 90 | /// | **Icon path** | `std::string` | @ref PVREPGTag::SetIconPath "SetIconPath" | @ref PVREPGTag::GetIconPath "GetIconPath" | *optional* | ||
| 91 | /// | **Genre type** | `int` | @ref PVREPGTag::SetGenreType "SetGenreType" | @ref PVREPGTag::GetGenreType "GetGenreType" | *optional* | ||
| 92 | /// | **Genre sub type** | `int` | @ref PVREPGTag::SetGenreSubType "SetGenreSubType" | @ref PVREPGTag::GetGenreSubType "GetGenreSubType" | *optional* | ||
| 93 | /// | **Genre description** | `std::string` | @ref PVREPGTag::SetGenreDescription "SetGenreDescription" | @ref PVREPGTag::GetGenreDescription "GetGenreDescription" | *optional* | ||
| 94 | /// | **First aired** | `time_t` | @ref PVREPGTag::SetFirstAired "SetFirstAired" | @ref PVREPGTag::GetFirstAired "GetFirstAired" | *optional* | ||
| 95 | /// | **Parental rating** | `int` | @ref PVREPGTag::SetParentalRating "SetParentalRating" | @ref PVREPGTag::GetParentalRating "GetParentalRating" | *optional* | ||
| 96 | /// | **Star rating** | `int` | @ref PVREPGTag::SetStarRating "SetStarRating" | @ref PVREPGTag::GetStarRating "GetStarRating" | *optional* | ||
| 97 | /// | **Series number** | `int` | @ref PVREPGTag::SetSeriesNumber "SetSeriesNumber" | @ref PVREPGTag::GetSeriesNumber "GetSeriesNumber" | *optional* | ||
| 98 | /// | **Episode number** | `int` | @ref PVREPGTag::SetEpisodeNumber "SetEpisodeNumber" | @ref PVREPGTag::GetEpisodeNumber "GetEpisodeNumber" | *optional* | ||
| 99 | /// | **Episode part number** | `int` | @ref PVREPGTag::SetEpisodePartNumber "SetEpisodePartNumber" | @ref PVREPGTag::GetEpisodePartNumber "GetEpisodePartNumber" | *optional* | ||
| 100 | /// | **Episode name** | `std::string` | @ref PVREPGTag::SetEpisodeName "SetEpisodeName" | @ref PVREPGTag::GetEpisodeName "GetEpisodeName" | *optional* | ||
| 101 | /// | **Flags** | `unsigned int` | @ref PVREPGTag::SetFlags "SetFlags" | @ref PVREPGTag::GetFlags "GetFlags" | *optional* | ||
| 102 | /// | **Series link** | `std::string` | @ref PVREPGTag::SetSeriesLink "SetSeriesLink" | @ref PVREPGTag::GetSeriesLink "GetSeriesLink" | *optional* | ||
| 103 | /// | ||
| 104 | |||
| 105 | /// @addtogroup cpp_kodi_addon_pvr_Defs_epg_PVREPGTag | ||
| 106 | ///@{ | ||
| 107 | |||
| 108 | /// @brief **required**\n | ||
| 109 | /// Identifier for this event. Event uids must be unique for a channel. Valid uids must be greater than @ref EPG_TAG_INVALID_UID. | ||
| 110 | void SetUniqueBroadcastId(unsigned int uniqueBroadcastId) | ||
| 111 | { | ||
| 112 | m_cStructure->iUniqueBroadcastId = uniqueBroadcastId; | ||
| 113 | } | ||
| 114 | |||
| 115 | /// @brief To get with @ref SetUniqueBroadcastId changed values. | ||
| 116 | unsigned int GetUniqueBroadcastId() const { return m_cStructure->iUniqueBroadcastId; } | ||
| 117 | |||
| 118 | /// @brief **required**\n | ||
| 119 | /// Unique identifier of the channel this event belongs to. | ||
| 120 | void SetUniqueChannelId(unsigned int uniqueChannelId) | ||
| 121 | { | ||
| 122 | m_cStructure->iUniqueChannelId = uniqueChannelId; | ||
| 123 | } | ||
| 124 | |||
| 125 | /// @brief To get with @ref SetUniqueChannelId changed values | ||
| 126 | unsigned int GetUniqueChannelId() const { return m_cStructure->iUniqueChannelId; } | ||
| 127 | |||
| 128 | /// @brief **required**\n | ||
| 129 | /// This event's title. | ||
| 130 | void SetTitle(const std::string& title) { m_title = title; } | ||
| 131 | |||
| 132 | /// @brief To get with @ref SetTitle changed values. | ||
| 133 | std::string GetTitle() const { return m_title; } | ||
| 134 | |||
| 135 | /// @brief **required**\n | ||
| 136 | /// Start time in UTC. | ||
| 137 | /// | ||
| 138 | /// Seconds elapsed since 00:00 hours, Jan 1, 1970 UTC. | ||
| 139 | void SetStartTime(time_t startTime) { m_cStructure->startTime = startTime; } | ||
| 140 | |||
| 141 | /// @brief To get with @ref SetStartTime changed values. | ||
| 142 | time_t GetStartTime() const { return m_cStructure->startTime; } | ||
| 143 | |||
| 144 | /// @brief **required**\n | ||
| 145 | /// End time in UTC. | ||
| 146 | /// | ||
| 147 | /// Seconds elapsed since 00:00 hours, Jan 1, 1970 UTC. | ||
| 148 | void SetEndTime(time_t endTime) { m_cStructure->endTime = endTime; } | ||
| 149 | |||
| 150 | /// @brief To get with @ref SetEndTime changed values. | ||
| 151 | time_t GetEndTime() const { return m_cStructure->endTime; } | ||
| 152 | |||
| 153 | /// @brief **optional**\n | ||
| 154 | /// Plot outline name. | ||
| 155 | void SetPlotOutline(const std::string& plotOutline) { m_plotOutline = plotOutline; } | ||
| 156 | |||
| 157 | /// @brief To get with @ref SetPlotOutline changed values. | ||
| 158 | std::string GetPlotOutline() const { return m_plotOutline; } | ||
| 159 | |||
| 160 | /// @brief **optional**\n | ||
| 161 | /// Plot name. | ||
| 162 | void SetPlot(const std::string& plot) { m_plot = plot; } | ||
| 163 | |||
| 164 | /// @brief To get with @ref GetPlot changed values. | ||
| 165 | std::string GetPlot() const { return m_plot; } | ||
| 166 | |||
| 167 | /// @brief **optional**\n | ||
| 168 | /// Original title. | ||
| 169 | void SetOriginalTitle(const std::string& originalTitle) { m_originalTitle = originalTitle; } | ||
| 170 | |||
| 171 | /// @brief To get with @ref SetOriginalTitle changed values | ||
| 172 | std::string GetOriginalTitle() const { return m_originalTitle; } | ||
| 173 | |||
| 174 | /// @brief **optional**\n | ||
| 175 | /// Cast name(s). | ||
| 176 | /// | ||
| 177 | /// @note Use @ref EPG_STRING_TOKEN_SEPARATOR to separate different persons. | ||
| 178 | void SetCast(const std::string& cast) { m_cast = cast; } | ||
| 179 | |||
| 180 | /// @brief To get with @ref SetCast changed values | ||
| 181 | std::string GetCast() const { return m_cast; } | ||
| 182 | |||
| 183 | /// @brief **optional**\n | ||
| 184 | /// Director name(s). | ||
| 185 | /// | ||
| 186 | /// @note Use @ref EPG_STRING_TOKEN_SEPARATOR to separate different persons. | ||
| 187 | void SetDirector(const std::string& director) { m_director = director; } | ||
| 188 | |||
| 189 | /// @brief To get with @ref SetDirector changed values. | ||
| 190 | std::string GetDirector() const { return m_director; } | ||
| 191 | |||
| 192 | /// @brief **optional**\n | ||
| 193 | /// Writer name(s). | ||
| 194 | /// | ||
| 195 | /// @note Use @ref EPG_STRING_TOKEN_SEPARATOR to separate different persons. | ||
| 196 | void SetWriter(const std::string& writer) { m_writer = writer; } | ||
| 197 | |||
| 198 | /// @brief To get with @ref SetDirector changed values | ||
| 199 | std::string GetWriter() const { return m_writer; } | ||
| 200 | |||
| 201 | /// @brief **optional**\n | ||
| 202 | /// Year. | ||
| 203 | void SetYear(int year) { m_cStructure->iYear = year; } | ||
| 204 | |||
| 205 | /// @brief To get with @ref SetYear changed values. | ||
| 206 | int GetYear() const { return m_cStructure->iYear; } | ||
| 207 | |||
| 208 | /// @brief **optional**\n | ||
| 209 | /// [IMDB](https://en.wikipedia.org/wiki/IMDb) identification number. | ||
| 210 | void SetIMDBNumber(const std::string& IMDBNumber) { m_IMDBNumber = IMDBNumber; } | ||
| 211 | |||
| 212 | /// @brief To get with @ref SetIMDBNumber changed values. | ||
| 213 | std::string GetIMDBNumber() const { return m_IMDBNumber; } | ||
| 214 | |||
| 215 | /// @brief **optional**\n | ||
| 216 | /// Icon path. | ||
| 217 | void SetIconPath(const std::string& iconPath) { m_iconPath = iconPath; } | ||
| 218 | |||
| 219 | /// @brief To get with @ref SetIconPath changed values. | ||
| 220 | std::string GetIconPath() const { return m_iconPath; } | ||
| 221 | |||
| 222 | /// @brief **optional**\n | ||
| 223 | /// Genre type. | ||
| 224 | /// | ||
| 225 | /// -------------------------------------------------------------------------- | ||
| 226 | /// | ||
| 227 | /// @copydetails EPG_EVENT_CONTENTMASK | ||
| 228 | /// | ||
| 229 | /// Use @ref EPG_GENRE_USE_STRING if type becomes given by @ref SetGenreDescription. | ||
| 230 | /// | ||
| 231 | /// @note If confirmed that backend brings the types in [ETSI EN 300 468](https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.14.01_60/en_300468v011401p.pdf) | ||
| 232 | /// conform values, can be @ref EPG_EVENT_CONTENTMASK ignored and to set here | ||
| 233 | /// with backend value. | ||
| 234 | /// | ||
| 235 | /// | ||
| 236 | /// -------------------------------------------------------------------------- | ||
| 237 | /// | ||
| 238 | /// **Example 1:** | ||
| 239 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 240 | /// kodi::addon::PVREPGTag tag; | ||
| 241 | /// tag.SetGenreType(EPG_EVENT_CONTENTMASK_MOVIEDRAMA); | ||
| 242 | /// ~~~~~~~~~~~~~ | ||
| 243 | /// | ||
| 244 | /// -------------------------------------------------------------------------- | ||
| 245 | /// | ||
| 246 | /// **Example 2** (in case of other, not ETSI EN 300 468 conform genre types): | ||
| 247 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 248 | /// kodi::addon::PVREPGTag tag; | ||
| 249 | /// tag.SetGenreType(EPG_GENRE_USE_STRING); | ||
| 250 | /// tag.SetGenreDescription("My special genre name"); // Should use (if possible) kodi::GetLocalizedString(...) to have match user language. | ||
| 251 | /// ~~~~~~~~~~~~~ | ||
| 252 | /// | ||
| 253 | void SetGenreType(int genreType) { m_cStructure->iGenreType = genreType; } | ||
| 254 | |||
| 255 | /// @brief To get with @ref SetGenreType changed values | ||
| 256 | int GetGenreType() const { return m_cStructure->iGenreType; } | ||
| 257 | |||
| 258 | /// @brief **optional**\n | ||
| 259 | /// Genre sub type. | ||
| 260 | /// | ||
| 261 | /// @copydetails EPG_EVENT_CONTENTMASK | ||
| 262 | /// | ||
| 263 | /// Subtypes groups related to set by @ref SetGenreType: | ||
| 264 | /// | Main genre type | List with available sub genre types | ||
| 265 | /// |-----------------|----------------------------------------- | ||
| 266 | /// | @ref EPG_EVENT_CONTENTMASK_UNDEFINED | Nothing, should be 0 | ||
| 267 | /// | @ref EPG_EVENT_CONTENTMASK_MOVIEDRAMA | @ref EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA | ||
| 268 | /// | @ref EPG_EVENT_CONTENTMASK_NEWSCURRENTAFFAIRS | @ref EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS | ||
| 269 | /// | @ref EPG_EVENT_CONTENTMASK_SHOW | @ref EPG_EVENT_CONTENTSUBMASK_SHOW | ||
| 270 | /// | @ref EPG_EVENT_CONTENTMASK_SPORTS | @ref EPG_EVENT_CONTENTSUBMASK_SPORTS | ||
| 271 | /// | @ref EPG_EVENT_CONTENTMASK_CHILDRENYOUTH | @ref EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH | ||
| 272 | /// | @ref EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE | @ref EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE | ||
| 273 | /// | @ref EPG_EVENT_CONTENTMASK_ARTSCULTURE | @ref EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE | ||
| 274 | /// | @ref EPG_EVENT_CONTENTMASK_SOCIALPOLITICALECONOMICS | @ref EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS | ||
| 275 | /// | @ref EPG_EVENT_CONTENTMASK_EDUCATIONALSCIENCE | @ref EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE | ||
| 276 | /// | @ref EPG_EVENT_CONTENTMASK_LEISUREHOBBIES | @ref EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES | ||
| 277 | /// | @ref EPG_EVENT_CONTENTMASK_SPECIAL | @ref EPG_EVENT_CONTENTSUBMASK_SPECIAL | ||
| 278 | /// | @ref EPG_EVENT_CONTENTMASK_USERDEFINED | Can be defined by you | ||
| 279 | /// | @ref EPG_GENRE_USE_STRING | **Kodi's own value**, which declares that the type with @ref SetGenreDescription is given. | ||
| 280 | /// | ||
| 281 | /// -------------------------------------------------------------------------- | ||
| 282 | /// | ||
| 283 | /// **Example:** | ||
| 284 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 285 | /// kodi::addon::PVREPGTag tag; | ||
| 286 | /// tag.SetGenreType(EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE); | ||
| 287 | /// tag.SetGenreSubType(EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_JAZZ); | ||
| 288 | /// ~~~~~~~~~~~~~ | ||
| 289 | /// | ||
| 290 | void SetGenreSubType(int genreSubType) { m_cStructure->iGenreSubType = genreSubType; } | ||
| 291 | |||
| 292 | /// @brief To get with @ref SetGenreSubType changed values. | ||
| 293 | int GetGenreSubType() const { return m_cStructure->iGenreSubType; } | ||
| 294 | |||
| 295 | /// @brief **optional**\n genre. Will be used only when genreType == @ref EPG_GENRE_USE_STRING | ||
| 296 | /// or genreSubType == @ref EPG_GENRE_USE_STRING. | ||
| 297 | /// | ||
| 298 | /// Use @ref EPG_STRING_TOKEN_SEPARATOR to separate different genres. | ||
| 299 | /// | ||
| 300 | /// In case of other, not [ETSI EN 300 468](https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.14.01_60/en_300468v011401p.pdf) | ||
| 301 | /// conform genre types or something special. | ||
| 302 | /// | ||
| 303 | /// -------------------------------------------------------------------------- | ||
| 304 | /// | ||
| 305 | /// **Example:** | ||
| 306 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 307 | /// kodi::addon::PVREPGTag tag; | ||
| 308 | /// tag.SetGenreType(EPG_GENRE_USE_STRING); | ||
| 309 | /// tag.SetGenreDescription("Action" + EPG_STRING_TOKEN_SEPARATOR + "Thriller"); | ||
| 310 | /// ~~~~~~~~~~~~~ | ||
| 311 | /// | ||
| 312 | void SetGenreDescription(const std::string& genreDescription) | ||
| 313 | { | ||
| 314 | m_genreDescription = genreDescription; | ||
| 315 | } | ||
| 316 | |||
| 317 | /// @brief To get with @ref SetGenreDescription changed values. | ||
| 318 | std::string GetGenreDescription() const { return m_genreDescription; } | ||
| 319 | |||
| 320 | /// @brief **optional**\n | ||
| 321 | /// First aired in UTC. | ||
| 322 | void SetFirstAired(const std::string& firstAired) { m_firstAired = firstAired; } | ||
| 323 | |||
| 324 | /// @brief To get with @ref SetFirstAired changed values. | ||
| 325 | std::string GetFirstAired() const { return m_firstAired; } | ||
| 326 | |||
| 327 | /// @brief **optional**\n | ||
| 328 | /// Parental rating. | ||
| 329 | void SetParentalRating(int parentalRating) { m_cStructure->iParentalRating = parentalRating; } | ||
| 330 | |||
| 331 | /// @brief To get with @ref SetParentalRatinge changed values. | ||
| 332 | int GetParentalRating() const { return m_cStructure->iParentalRating; } | ||
| 333 | |||
| 334 | /// @brief **optional**\n | ||
| 335 | /// Star rating. | ||
| 336 | void SetStarRating(int starRating) { m_cStructure->iStarRating = starRating; } | ||
| 337 | |||
| 338 | /// @brief To get with @ref SetStarRating changed values. | ||
| 339 | int GetStarRating() const { return m_cStructure->iStarRating; } | ||
| 340 | |||
| 341 | /// @brief **optional**\n | ||
| 342 | /// Series number. | ||
| 343 | void SetSeriesNumber(int seriesNumber) { m_cStructure->iSeriesNumber = seriesNumber; } | ||
| 344 | |||
| 345 | /// @brief To get with @ref SetSeriesNumber changed values. | ||
| 346 | int GetSeriesNumber() const { return m_cStructure->iSeriesNumber; } | ||
| 347 | |||
| 348 | /// @brief **optional**\n | ||
| 349 | /// Episode number. | ||
| 350 | void SetEpisodeNumber(int episodeNumber) { m_cStructure->iEpisodeNumber = episodeNumber; } | ||
| 351 | |||
| 352 | /// @brief To get with @ref SetEpisodeNumber changed values. | ||
| 353 | int GetEpisodeNumber() const { return m_cStructure->iEpisodeNumber; } | ||
| 354 | |||
| 355 | /// @brief **optional**\n | ||
| 356 | /// Episode part number. | ||
| 357 | void SetEpisodePartNumber(int episodePartNumber) | ||
| 358 | { | ||
| 359 | m_cStructure->iEpisodePartNumber = episodePartNumber; | ||
| 360 | } | ||
| 361 | |||
| 362 | /// @brief To get with @ref SetEpisodePartNumber changed values. | ||
| 363 | int GetEpisodePartNumber() const { return m_cStructure->iEpisodePartNumber; } | ||
| 364 | |||
| 365 | /// @brief **optional**\n | ||
| 366 | /// Episode name. | ||
| 367 | void SetEpisodeName(const std::string& episodeName) { m_episodeName = episodeName; } | ||
| 368 | |||
| 369 | /// @brief To get with @ref SetEpisodeName changed values. | ||
| 370 | std::string GetEpisodeName() const { return m_episodeName; } | ||
| 371 | |||
| 372 | /// @brief **optional**\n | ||
| 373 | /// Bit field of independent flags associated with the EPG entry. | ||
| 374 | /// | ||
| 375 | /// See @ref cpp_kodi_addon_pvr_Defs_epg_EPG_TAG_FLAG for available bit flags. | ||
| 376 | /// | ||
| 377 | /// -------------------------------------------------------------------------- | ||
| 378 | /// | ||
| 379 | /// @copydetails cpp_kodi_addon_pvr_Defs_epg_EPG_TAG_FLAG | ||
| 380 | /// | ||
| 381 | void SetFlags(unsigned int flags) { m_cStructure->iFlags = flags; } | ||
| 382 | |||
| 383 | /// @brief To get with @ref SetFlags changed values. | ||
| 384 | unsigned int GetFlags() const { return m_cStructure->iFlags; } | ||
| 385 | |||
| 386 | /// @brief **optional**\n | ||
| 387 | /// Series link for this event. | ||
| 388 | void SetSeriesLink(const std::string& seriesLink) { m_seriesLink = seriesLink; } | ||
| 389 | |||
| 390 | /// @brief To get with @ref SetSeriesLink changed values. | ||
| 391 | std::string GetSeriesLink() const { return m_seriesLink; } | ||
| 392 | |||
| 393 | ///@} | ||
| 394 | |||
| 395 | // Internal used, as this have own memory for strings and to translate them to "C" | ||
| 396 | EPG_TAG* GetTag() const | ||
| 397 | { | ||
| 398 | m_cStructure->strTitle = m_title.c_str(); | ||
| 399 | m_cStructure->strPlotOutline = m_plotOutline.c_str(); | ||
| 400 | m_cStructure->strPlot = m_plot.c_str(); | ||
| 401 | m_cStructure->strOriginalTitle = m_originalTitle.c_str(); | ||
| 402 | m_cStructure->strCast = m_cast.c_str(); | ||
| 403 | m_cStructure->strDirector = m_director.c_str(); | ||
| 404 | m_cStructure->strWriter = m_writer.c_str(); | ||
| 405 | m_cStructure->strIMDBNumber = m_IMDBNumber.c_str(); | ||
| 406 | m_cStructure->strIconPath = m_iconPath.c_str(); | ||
| 407 | m_cStructure->strGenreDescription = m_genreDescription.c_str(); | ||
| 408 | m_cStructure->strEpisodeName = m_episodeName.c_str(); | ||
| 409 | m_cStructure->strSeriesLink = m_seriesLink.c_str(); | ||
| 410 | m_cStructure->strFirstAired = m_firstAired.c_str(); | ||
| 411 | |||
| 412 | return m_cStructure; | ||
| 413 | } | ||
| 414 | |||
| 415 | private: | ||
| 416 | PVREPGTag(const EPG_TAG* epg) : CStructHdl(epg) { SetData(epg); } | ||
| 417 | PVREPGTag(EPG_TAG* epg) : CStructHdl(epg) { SetData(epg); } | ||
| 418 | |||
| 419 | const PVREPGTag& operator=(const PVREPGTag& right); | ||
| 420 | const PVREPGTag& operator=(const EPG_TAG& right); | ||
| 421 | operator EPG_TAG*(); | ||
| 422 | |||
| 423 | std::string m_title; | ||
| 424 | std::string m_plotOutline; | ||
| 425 | std::string m_plot; | ||
| 426 | std::string m_originalTitle; | ||
| 427 | std::string m_cast; | ||
| 428 | std::string m_director; | ||
| 429 | std::string m_writer; | ||
| 430 | std::string m_IMDBNumber; | ||
| 431 | std::string m_episodeName; | ||
| 432 | std::string m_iconPath; | ||
| 433 | std::string m_seriesLink; | ||
| 434 | std::string m_genreDescription; | ||
| 435 | std::string m_firstAired; | ||
| 436 | |||
| 437 | void SetData(const EPG_TAG* tag) | ||
| 438 | { | ||
| 439 | m_title = tag->strTitle == nullptr ? "" : tag->strTitle; | ||
| 440 | m_plotOutline = tag->strPlotOutline == nullptr ? "" : tag->strPlotOutline; | ||
| 441 | m_plot = tag->strPlot == nullptr ? "" : tag->strPlot; | ||
| 442 | m_originalTitle = tag->strOriginalTitle == nullptr ? "" : tag->strOriginalTitle; | ||
| 443 | m_cast = tag->strCast == nullptr ? "" : tag->strCast; | ||
| 444 | m_director = tag->strDirector == nullptr ? "" : tag->strDirector; | ||
| 445 | m_writer = tag->strWriter == nullptr ? "" : tag->strWriter; | ||
| 446 | m_IMDBNumber = tag->strIMDBNumber == nullptr ? "" : tag->strIMDBNumber; | ||
| 447 | m_iconPath = tag->strIconPath == nullptr ? "" : tag->strIconPath; | ||
| 448 | m_genreDescription = tag->strGenreDescription == nullptr ? "" : tag->strGenreDescription; | ||
| 449 | m_episodeName = tag->strEpisodeName == nullptr ? "" : tag->strEpisodeName; | ||
| 450 | m_seriesLink = tag->strSeriesLink == nullptr ? "" : tag->strSeriesLink; | ||
| 451 | m_firstAired = tag->strFirstAired == nullptr ? "" : tag->strFirstAired; | ||
| 452 | } | ||
| 453 | }; | ||
| 454 | ///@} | ||
| 455 | //------------------------------------------------------------------------------ | ||
| 456 | |||
| 457 | //============================================================================== | ||
| 458 | /// @defgroup cpp_kodi_addon_pvr_Defs_epg_PVREPGTagsResultSet class PVREPGTagsResultSet | ||
| 459 | /// @ingroup cpp_kodi_addon_pvr_Defs_epg_PVREPGTag | ||
| 460 | /// @brief **PVR add-on EPG entry transfer class**\n | ||
| 461 | /// To transfer the content of @ref kodi::addon::CInstancePVRClient::GetEPGForChannel(). | ||
| 462 | /// | ||
| 463 | /// @note This becomes only be used on addon call above, not usable outside on | ||
| 464 | /// addon itself. | ||
| 465 | ///@{ | ||
| 466 | class PVREPGTagsResultSet | ||
| 467 | { | ||
| 468 | public: | ||
| 469 | /*! \cond PRIVATE */ | ||
| 470 | PVREPGTagsResultSet() = delete; | ||
| 471 | PVREPGTagsResultSet(const AddonInstance_PVR* instance, ADDON_HANDLE handle) | ||
| 472 | : m_instance(instance), m_handle(handle) | ||
| 473 | { | ||
| 474 | } | ||
| 475 | /*! \endcond */ | ||
| 476 | |||
| 477 | /// @addtogroup cpp_kodi_addon_pvr_Defs_epg_PVREPGTagsResultSet | ||
| 478 | ///@{ | ||
| 479 | |||
| 480 | /// @brief To add and give content from addon to Kodi on related call. | ||
| 481 | /// | ||
| 482 | /// @param[in] tag The to transferred data. | ||
| 483 | void Add(const kodi::addon::PVREPGTag& tag) | ||
| 484 | { | ||
| 485 | m_instance->toKodi->TransferEpgEntry(m_instance->toKodi->kodiInstance, m_handle, tag.GetTag()); | ||
| 486 | } | ||
| 487 | |||
| 488 | ///@} | ||
| 489 | |||
| 490 | private: | ||
| 491 | const AddonInstance_PVR* m_instance = nullptr; | ||
| 492 | const ADDON_HANDLE m_handle; | ||
| 493 | }; | ||
| 494 | ///@} | ||
| 495 | //------------------------------------------------------------------------------ | ||
| 496 | |||
| 497 | } /* namespace addon */ | ||
| 498 | } /* namespace kodi */ | ||
| 499 | |||
| 500 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/General.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/General.h deleted file mode 100644 index c7977c2..0000000 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/General.h +++ /dev/null | |||
| @@ -1,511 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #include "../../AddonBase.h" | ||
| 12 | #include "../../c-api/addon-instance/pvr/pvr_general.h" | ||
| 13 | |||
| 14 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 15 | // "C++" Definitions group 1 - General PVR | ||
| 16 | #ifdef __cplusplus | ||
| 17 | |||
| 18 | namespace kodi | ||
| 19 | { | ||
| 20 | namespace addon | ||
| 21 | { | ||
| 22 | |||
| 23 | //============================================================================== | ||
| 24 | /// @defgroup cpp_kodi_addon_pvr_Defs_PVRTypeIntValue class PVRTypeIntValue | ||
| 25 | /// @ingroup cpp_kodi_addon_pvr_Defs_General | ||
| 26 | /// @brief **PVR add-on type value**\n | ||
| 27 | /// Representation of a <b>`<int, std::string>`</b> event related value. | ||
| 28 | /// | ||
| 29 | /// ---------------------------------------------------------------------------- | ||
| 30 | /// | ||
| 31 | /// @copydetails cpp_kodi_addon_pvr_Defs_PVRTypeIntValue_Help | ||
| 32 | /// | ||
| 33 | ///@{ | ||
| 34 | class PVRTypeIntValue : public CStructHdl<PVRTypeIntValue, PVR_ATTRIBUTE_INT_VALUE> | ||
| 35 | { | ||
| 36 | friend class CInstancePVRClient; | ||
| 37 | |||
| 38 | public: | ||
| 39 | /*! \cond PRIVATE */ | ||
| 40 | PVRTypeIntValue(const PVRTypeIntValue& data) : CStructHdl(data) {} | ||
| 41 | /*! \endcond */ | ||
| 42 | |||
| 43 | /// @defgroup cpp_kodi_addon_pvr_Defs_PVRTypeIntValue_Help Value Help | ||
| 44 | /// @ingroup cpp_kodi_addon_pvr_Defs_PVRTypeIntValue | ||
| 45 | /// | ||
| 46 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_PVRTypeIntValue :</b> | ||
| 47 | /// | Name | Type | Set call | Get call | ||
| 48 | /// |------|------|----------|---------- | ||
| 49 | /// | **Value** | `int` | @ref PVRTypeIntValue::SetValue "SetValue" | @ref PVRTypeIntValue::GetValue "GetValue" | ||
| 50 | /// | **Description** | `std::string` | @ref PVRTypeIntValue::SetDescription "SetDescription" | @ref PVRTypeIntValue::GetDescription "GetDescription" | ||
| 51 | /// | ||
| 52 | /// @remark Further can there be used his class constructor to set values. | ||
| 53 | |||
| 54 | /// @addtogroup cpp_kodi_addon_pvr_Defs_PVRTypeIntValue | ||
| 55 | ///@{ | ||
| 56 | |||
| 57 | /// @brief Default class constructor. | ||
| 58 | /// | ||
| 59 | /// @note Values must be set afterwards. | ||
| 60 | PVRTypeIntValue() = default; | ||
| 61 | |||
| 62 | /// @brief Class constructor with integrated value set. | ||
| 63 | /// | ||
| 64 | /// @param[in] value Type identification value | ||
| 65 | /// @param[in] description Type description text | ||
| 66 | PVRTypeIntValue(int value, const std::string& description) | ||
| 67 | { | ||
| 68 | SetValue(value); | ||
| 69 | SetDescription(description); | ||
| 70 | } | ||
| 71 | |||
| 72 | /// @brief To set with the identification value. | ||
| 73 | void SetValue(int value) { m_cStructure->iValue = value; } | ||
| 74 | |||
| 75 | /// @brief To get with the identification value. | ||
| 76 | int GetValue() const { return m_cStructure->iValue; } | ||
| 77 | |||
| 78 | /// @brief To set with the description text of the value. | ||
| 79 | void SetDescription(const std::string& description) | ||
| 80 | { | ||
| 81 | strncpy(m_cStructure->strDescription, description.c_str(), | ||
| 82 | sizeof(m_cStructure->strDescription) - 1); | ||
| 83 | } | ||
| 84 | |||
| 85 | /// @brief To get with the description text of the value. | ||
| 86 | std::string GetDescription() const { return m_cStructure->strDescription; } | ||
| 87 | ///@} | ||
| 88 | |||
| 89 | private: | ||
| 90 | PVRTypeIntValue(const PVR_ATTRIBUTE_INT_VALUE* data) : CStructHdl(data) {} | ||
| 91 | PVRTypeIntValue(PVR_ATTRIBUTE_INT_VALUE* data) : CStructHdl(data) {} | ||
| 92 | }; | ||
| 93 | ///@} | ||
| 94 | //------------------------------------------------------------------------------ | ||
| 95 | |||
| 96 | //============================================================================== | ||
| 97 | /// @defgroup cpp_kodi_addon_pvr_Defs_PVRCapabilities class PVRCapabilities | ||
| 98 | /// @ingroup cpp_kodi_addon_pvr_Defs_General | ||
| 99 | /// @brief **PVR add-on capabilities**\n | ||
| 100 | /// This class is needed to tell Kodi which options are supported on the addon. | ||
| 101 | /// | ||
| 102 | /// If a capability is set to **true**, then the corresponding methods from | ||
| 103 | /// @ref cpp_kodi_addon_pvr "kodi::addon::CInstancePVRClient" need to be | ||
| 104 | /// implemented. | ||
| 105 | /// | ||
| 106 | /// As default them all set to **false**. | ||
| 107 | /// | ||
| 108 | /// Used on @ref kodi::addon::CInstancePVRClient::GetCapabilities(). | ||
| 109 | /// | ||
| 110 | /// ---------------------------------------------------------------------------- | ||
| 111 | /// | ||
| 112 | /// @copydetails cpp_kodi_addon_pvr_Defs_PVRCapabilities_Help | ||
| 113 | /// | ||
| 114 | ///@{ | ||
| 115 | class PVRCapabilities | ||
| 116 | { | ||
| 117 | friend class CInstancePVRClient; | ||
| 118 | |||
| 119 | public: | ||
| 120 | /*! \cond PRIVATE */ | ||
| 121 | explicit PVRCapabilities() = delete; | ||
| 122 | /*! \endcond */ | ||
| 123 | |||
| 124 | /// @defgroup cpp_kodi_addon_pvr_Defs_PVRCapabilities_Help Value Help | ||
| 125 | /// @ingroup cpp_kodi_addon_pvr_Defs_PVRCapabilities | ||
| 126 | /// ---------------------------------------------------------------------------- | ||
| 127 | /// | ||
| 128 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_PVRCapabilities :</b> | ||
| 129 | /// | Name | Type | Set call | Get call | ||
| 130 | /// |------|------|----------|---------- | ||
| 131 | /// | **Supports EPG** | `boolean` | @ref PVRCapabilities::SetSupportsEPG "SetSupportsEPG" | @ref PVRCapabilities::GetSupportsEPG "GetSupportsEPG" | ||
| 132 | /// | **Supports EPG EDL** | `boolean` | @ref PVRCapabilities::SetSupportsEPGEdl "SetSupportsEPGEdl" | @ref PVRCapabilities::GetSupportsEPGEdl "GetSupportsEPGEdl" | ||
| 133 | /// | **Supports TV** | `boolean` | @ref PVRCapabilities::SetSupportsTV "SetSupportsTV" | @ref PVRCapabilities::GetSupportsTV "GetSupportsTV" | ||
| 134 | /// | **Supports radio** | `boolean` | @ref PVRCapabilities::SetSupportsRadio "SetSupportsRadio" | @ref PVRCapabilities::GetSupportsRadio "GetSupportsRadio" | ||
| 135 | /// | **Supports recordings** | `boolean` | @ref PVRCapabilities::SetSupportsRecordings "SetSupportsRecordings" | @ref PVRCapabilities::GetSupportsRecordings "GetSupportsRecordings" | ||
| 136 | /// | **Supports recordings undelete** | `boolean` | @ref PVRCapabilities::SetSupportsRecordingsUndelete "SetSupportsRecordingsUndelete" | @ref PVRCapabilities::GetSupportsRecordingsUndelete "SetSupportsRecordingsUndelete" | ||
| 137 | /// | **Supports timers** | `boolean` | @ref PVRCapabilities::SetSupportsTimers "SetSupportsTimers" | @ref PVRCapabilities::GetSupportsTimers "GetSupportsTimers" | ||
| 138 | /// | **Supports channel groups** | `boolean` | @ref PVRCapabilities::SetSupportsChannelGroups "SetSupportsChannelGroups" | @ref PVRCapabilities::GetSupportsChannelGroups "GetSupportsChannelGroups" | ||
| 139 | /// | **Supports channel scan** | `boolean` | @ref PVRCapabilities::SetSupportsChannelScan "SetSupportsChannelScan" | @ref PVRCapabilities::GetSupportsChannelScan "GetSupportsChannelScan" | ||
| 140 | /// | **Supports channel settings** | `boolean` | @ref PVRCapabilities::SetSupportsChannelSettings "SetSupportsChannelSettings" | @ref PVRCapabilities::GetSupportsChannelSettings "GetSupportsChannelSettings" | ||
| 141 | /// | **Handles input stream** | `boolean` | @ref PVRCapabilities::SetHandlesInputStream "SetHandlesInputStream" | @ref PVRCapabilities::GetHandlesInputStream "GetHandlesInputStream" | ||
| 142 | /// | **Handles demuxing** | `boolean` | @ref PVRCapabilities::SetHandlesDemuxing "SetHandlesDemuxing" | @ref PVRCapabilities::GetHandlesDemuxing "GetHandlesDemuxing" | ||
| 143 | /// | **Supports recording play count** | `boolean` | @ref PVRCapabilities::SetSupportsRecordingPlayCount "SetSupportsRecordingPlayCount" | @ref PVRCapabilities::GetSupportsRecordingPlayCount "GetSupportsRecordingPlayCount" | ||
| 144 | /// | **Supports last played position** | `boolean` | @ref PVRCapabilities::SetSupportsLastPlayedPosition "SetSupportsLastPlayedPosition" | @ref PVRCapabilities::GetSupportsLastPlayedPosition "GetSupportsLastPlayedPosition" | ||
| 145 | /// | **Supports recording EDL** | `boolean` | @ref PVRCapabilities::SetSupportsRecordingEdl "SetSupportsRecordingEdl" | @ref PVRCapabilities::GetSupportsRecordingEdl "GetSupportsRecordingEdl" | ||
| 146 | /// | **Supports recordings rename** | `boolean` | @ref PVRCapabilities::SetSupportsRecordingsRename "SetSupportsRecordingsRename" | @ref PVRCapabilities::GetSupportsRecordingsRename "GetSupportsRecordingsRename" | ||
| 147 | /// | **Supports recordings lifetime change** | `boolean` | @ref PVRCapabilities::SetSupportsRecordingsLifetimeChange "SetSupportsRecordingsLifetimeChange" | @ref PVRCapabilities::GetSupportsRecordingsLifetimeChange "GetSupportsRecordingsLifetimeChange" | ||
| 148 | /// | **Supports descramble info** | `boolean` | @ref PVRCapabilities::SetSupportsDescrambleInfo "SetSupportsDescrambleInfo" | @ref PVRCapabilities::GetSupportsDescrambleInfo "GetSupportsDescrambleInfo" | ||
| 149 | /// | **Supports async EPG transfer** | `boolean` | @ref PVRCapabilities::SetSupportsAsyncEPGTransfer "SetSupportsAsyncEPGTransfer" | @ref PVRCapabilities::GetSupportsAsyncEPGTransfer "GetSupportsAsyncEPGTransfer" | ||
| 150 | /// | **Supports recording size** | `boolean` | @ref PVRCapabilities::SetSupportsRecordingSize "SetSupportsRecordingSize" | @ref PVRCapabilities::GetSupportsRecordingSize "GetSupportsRecordingSize" | ||
| 151 | /// | **Recordings lifetime values** | @ref cpp_kodi_addon_pvr_Defs_PVRTypeIntValue "PVRTypeIntValue" | @ref PVRCapabilities::SetRecordingsLifetimeValues "SetRecordingsLifetimeValues" | @ref PVRCapabilities::GetRecordingsLifetimeValues "GetRecordingsLifetimeValues" | ||
| 152 | /// | ||
| 153 | /// @warning This class can not be used outside of @ref kodi::addon::CInstancePVRClient::GetCapabilities() | ||
| 154 | /// | ||
| 155 | |||
| 156 | /// @addtogroup cpp_kodi_addon_pvr_Defs_PVRCapabilities | ||
| 157 | ///@{ | ||
| 158 | |||
| 159 | /// @brief Set **true** if the add-on provides EPG information. | ||
| 160 | void SetSupportsEPG(bool supportsEPG) { m_capabilities->bSupportsEPG = supportsEPG; } | ||
| 161 | |||
| 162 | /// @brief To get with @ref SetSupportsEPG changed values. | ||
| 163 | bool GetSupportsEPG() const { return m_capabilities->bSupportsEPG; } | ||
| 164 | |||
| 165 | /// @brief Set **true** if the backend supports retrieving an edit decision | ||
| 166 | /// list for an EPG tag. | ||
| 167 | void SetSupportsEPGEdl(bool supportsEPGEdl) { m_capabilities->bSupportsEPGEdl = supportsEPGEdl; } | ||
| 168 | |||
| 169 | /// @brief To get with @ref SetSupportsEPGEdl changed values. | ||
| 170 | bool GetSupportsEPGEdl() const { return m_capabilities->bSupportsEPGEdl; } | ||
| 171 | |||
| 172 | /// @brief Set **true** if this add-on provides TV channels. | ||
| 173 | void SetSupportsTV(bool supportsTV) { m_capabilities->bSupportsTV = supportsTV; } | ||
| 174 | |||
| 175 | /// @brief To get with @ref SetSupportsTV changed values. | ||
| 176 | bool GetSupportsTV() const { return m_capabilities->bSupportsTV; } | ||
| 177 | |||
| 178 | /// @brief Set **true** if this add-on provides TV channels. | ||
| 179 | void SetSupportsRadio(bool supportsRadio) { m_capabilities->bSupportsRadio = supportsRadio; } | ||
| 180 | |||
| 181 | /// @brief To get with @ref SetSupportsRadio changed values. | ||
| 182 | bool GetSupportsRadio() const { return m_capabilities->bSupportsRadio; } | ||
| 183 | |||
| 184 | /// @brief **true** if this add-on supports playback of recordings stored on | ||
| 185 | /// the backend. | ||
| 186 | void SetSupportsRecordings(bool supportsRecordings) | ||
| 187 | { | ||
| 188 | m_capabilities->bSupportsRecordings = supportsRecordings; | ||
| 189 | } | ||
| 190 | |||
| 191 | /// @brief To get with @ref SetSupportsRecordings changed values. | ||
| 192 | bool GetSupportsRecordings() const { return m_capabilities->bSupportsRecordings; } | ||
| 193 | |||
| 194 | /// @brief Set **true** if this add-on supports undelete of recordings stored | ||
| 195 | /// on the backend. | ||
| 196 | void SetSupportsRecordingsUndelete(bool supportsRecordingsUndelete) | ||
| 197 | { | ||
| 198 | m_capabilities->bSupportsRecordingsUndelete = supportsRecordingsUndelete; | ||
| 199 | } | ||
| 200 | |||
| 201 | /// @brief To get with @ref SetSupportsRecordings changed values. | ||
| 202 | bool GetSupportsRecordingsUndelete() const { return m_capabilities->bSupportsRecordingsUndelete; } | ||
| 203 | |||
| 204 | /// @brief Set **true** if this add-on supports the creation and editing of | ||
| 205 | /// timers. | ||
| 206 | void SetSupportsTimers(bool supportsTimers) { m_capabilities->bSupportsTimers = supportsTimers; } | ||
| 207 | |||
| 208 | /// @brief To get with @ref SetSupportsTimers changed values. | ||
| 209 | bool GetSupportsTimers() const { return m_capabilities->bSupportsTimers; } | ||
| 210 | |||
| 211 | /// @brief Set **true** if this add-on supports channel groups. | ||
| 212 | /// | ||
| 213 | /// It use the following functions: | ||
| 214 | /// - @ref kodi::addon::CInstancePVRClient::GetChannelGroupsAmount() | ||
| 215 | /// - @ref kodi::addon::CInstancePVRClient::GetChannelGroups() | ||
| 216 | /// - @ref kodi::addon::CInstancePVRClient::GetChannelGroupMembers() | ||
| 217 | void SetSupportsChannelGroups(bool supportsChannelGroups) | ||
| 218 | { | ||
| 219 | m_capabilities->bSupportsChannelGroups = supportsChannelGroups; | ||
| 220 | } | ||
| 221 | |||
| 222 | /// @brief To get with @ref SetSupportsChannelGroups changed values. | ||
| 223 | bool GetSupportsChannelGroups() const { return m_capabilities->bSupportsChannelGroups; } | ||
| 224 | |||
| 225 | /// @brief Set **true** if this add-on support scanning for new channels on | ||
| 226 | /// the backend. | ||
| 227 | /// | ||
| 228 | /// It use the following function: | ||
| 229 | /// - @ref kodi::addon::CInstancePVRClient::OpenDialogChannelScan() | ||
| 230 | void SetSupportsChannelScan(bool supportsChannelScan) | ||
| 231 | { | ||
| 232 | m_capabilities->bSupportsChannelScan = supportsChannelScan; | ||
| 233 | } | ||
| 234 | |||
| 235 | /// @brief To get with @ref SetSupportsChannelScan changed values. | ||
| 236 | bool GetSupportsChannelScan() const { return m_capabilities->bSupportsChannelScan; } | ||
| 237 | |||
| 238 | /// @brief Set **true** if this add-on supports channel edit. | ||
| 239 | /// | ||
| 240 | /// It use the following functions: | ||
| 241 | /// - @ref kodi::addon::CInstancePVRClient::DeleteChannel() | ||
| 242 | /// - @ref kodi::addon::CInstancePVRClient::RenameChannel() | ||
| 243 | /// - @ref kodi::addon::CInstancePVRClient::OpenDialogChannelSettings() | ||
| 244 | /// - @ref kodi::addon::CInstancePVRClient::OpenDialogChannelAdd() | ||
| 245 | void SetSupportsChannelSettings(bool supportsChannelSettings) | ||
| 246 | { | ||
| 247 | m_capabilities->bSupportsChannelSettings = supportsChannelSettings; | ||
| 248 | } | ||
| 249 | |||
| 250 | /// @brief To get with @ref SetSupportsChannelSettings changed values. | ||
| 251 | bool GetSupportsChannelSettings() const { return m_capabilities->bSupportsChannelSettings; } | ||
| 252 | |||
| 253 | /// @brief Set **true** if this add-on provides an input stream. false if Kodi | ||
| 254 | /// handles the stream. | ||
| 255 | void SetHandlesInputStream(bool handlesInputStream) | ||
| 256 | { | ||
| 257 | m_capabilities->bHandlesInputStream = handlesInputStream; | ||
| 258 | } | ||
| 259 | |||
| 260 | /// @brief To get with @ref SetHandlesInputStream changed values. | ||
| 261 | bool GetHandlesInputStream() const { return m_capabilities->bHandlesInputStream; } | ||
| 262 | |||
| 263 | /// @brief Set **true** if this add-on demultiplexes packets. | ||
| 264 | void SetHandlesDemuxing(bool handlesDemuxing) | ||
| 265 | { | ||
| 266 | m_capabilities->bHandlesDemuxing = handlesDemuxing; | ||
| 267 | } | ||
| 268 | |||
| 269 | /// @brief To get with @ref SetHandlesDemuxing changed values. | ||
| 270 | bool GetHandlesDemuxing() const { return m_capabilities->bHandlesDemuxing; } | ||
| 271 | |||
| 272 | /// @brief Set **true** if the backend supports play count for recordings. | ||
| 273 | void SetSupportsRecordingPlayCount(bool supportsRecordingPlayCount) | ||
| 274 | { | ||
| 275 | m_capabilities->bSupportsRecordingPlayCount = supportsRecordingPlayCount; | ||
| 276 | } | ||
| 277 | |||
| 278 | /// @brief To get with @ref SetSupportsRecordingPlayCount changed values. | ||
| 279 | bool GetSupportsRecordingPlayCount() const { return m_capabilities->bSupportsRecordingPlayCount; } | ||
| 280 | |||
| 281 | /// @brief Set **true** if the backend supports store/retrieve of last played | ||
| 282 | /// position for recordings. | ||
| 283 | void SetSupportsLastPlayedPosition(bool supportsLastPlayedPosition) | ||
| 284 | { | ||
| 285 | m_capabilities->bSupportsLastPlayedPosition = supportsLastPlayedPosition; | ||
| 286 | } | ||
| 287 | |||
| 288 | /// @brief To get with @ref SetSupportsLastPlayedPosition changed values. | ||
| 289 | bool GetSupportsLastPlayedPosition() const { return m_capabilities->bSupportsLastPlayedPosition; } | ||
| 290 | |||
| 291 | /// @brief Set **true** if the backend supports retrieving an edit decision | ||
| 292 | /// list for recordings. | ||
| 293 | void SetSupportsRecordingEdl(bool supportsRecordingEdl) | ||
| 294 | { | ||
| 295 | m_capabilities->bSupportsRecordingEdl = supportsRecordingEdl; | ||
| 296 | } | ||
| 297 | |||
| 298 | /// @brief To get with @ref SetSupportsRecordingEdl changed values. | ||
| 299 | bool GetSupportsRecordingEdl() const { return m_capabilities->bSupportsRecordingEdl; } | ||
| 300 | |||
| 301 | /// @brief Set **true** if the backend supports renaming recordings. | ||
| 302 | void SetSupportsRecordingsRename(bool supportsRecordingsRename) | ||
| 303 | { | ||
| 304 | m_capabilities->bSupportsRecordingsRename = supportsRecordingsRename; | ||
| 305 | } | ||
| 306 | |||
| 307 | /// @brief To get with @ref SetSupportsRecordingsRename changed values. | ||
| 308 | bool GetSupportsRecordingsRename() const { return m_capabilities->bSupportsRecordingsRename; } | ||
| 309 | |||
| 310 | /// @brief Set **true** if the backend supports changing lifetime for | ||
| 311 | /// recordings. | ||
| 312 | void SetSupportsRecordingsLifetimeChange(bool supportsRecordingsLifetimeChange) | ||
| 313 | { | ||
| 314 | m_capabilities->bSupportsRecordingsLifetimeChange = supportsRecordingsLifetimeChange; | ||
| 315 | } | ||
| 316 | |||
| 317 | /// @brief To get with @ref SetSupportsRecordingsLifetimeChange changed | ||
| 318 | /// values. | ||
| 319 | bool GetSupportsRecordingsLifetimeChange() const | ||
| 320 | { | ||
| 321 | return m_capabilities->bSupportsRecordingsLifetimeChange; | ||
| 322 | } | ||
| 323 | |||
| 324 | /// @brief Set **true** if the backend supports descramble information for | ||
| 325 | /// playing channels. | ||
| 326 | void SetSupportsDescrambleInfo(bool supportsDescrambleInfo) | ||
| 327 | { | ||
| 328 | m_capabilities->bSupportsDescrambleInfo = supportsDescrambleInfo; | ||
| 329 | } | ||
| 330 | |||
| 331 | /// @brief To get with @ref SetSupportsDescrambleInfo changed values. | ||
| 332 | bool GetSupportsDescrambleInfo() const { return m_capabilities->bSupportsDescrambleInfo; } | ||
| 333 | |||
| 334 | /// @brief Set **true** if this addon-on supports asynchronous transfer of epg | ||
| 335 | /// events to Kodi using the callback function | ||
| 336 | /// @ref kodi::addon::CInstancePVRClient::EpgEventStateChange(). | ||
| 337 | void SetSupportsAsyncEPGTransfer(bool supportsAsyncEPGTransfer) | ||
| 338 | { | ||
| 339 | m_capabilities->bSupportsAsyncEPGTransfer = supportsAsyncEPGTransfer; | ||
| 340 | } | ||
| 341 | |||
| 342 | /// @brief To get with @ref SetSupportsAsyncEPGTransfer changed values. | ||
| 343 | bool GetSupportsAsyncEPGTransfer() const { return m_capabilities->bSupportsAsyncEPGTransfer; } | ||
| 344 | |||
| 345 | /// @brief Set **true** if this addon-on supports retrieving size of recordings. | ||
| 346 | void SetSupportsRecordingSize(bool supportsRecordingSize) | ||
| 347 | { | ||
| 348 | m_capabilities->bSupportsRecordingSize = supportsRecordingSize; | ||
| 349 | } | ||
| 350 | |||
| 351 | /// @brief To get with @ref SetSupportsRecordingSize changed values. | ||
| 352 | bool GetSupportsRecordingSize() const { return m_capabilities->bSupportsRecordingSize; } | ||
| 353 | |||
| 354 | /// @brief **optional**\n | ||
| 355 | /// Set array containing the possible values for @ref PVRRecording::SetLifetime(). | ||
| 356 | /// | ||
| 357 | /// -------------------------------------------------------------------------- | ||
| 358 | /// | ||
| 359 | /// @copydetails cpp_kodi_addon_pvr_Defs_PVRTypeIntValue_Help | ||
| 360 | void SetRecordingsLifetimeValues( | ||
| 361 | const std::vector<PVRTypeIntValue>& recordingsLifetimeValues) | ||
| 362 | { | ||
| 363 | m_capabilities->iRecordingsLifetimesSize = 0; | ||
| 364 | for (unsigned int i = 0; i < recordingsLifetimeValues.size() && | ||
| 365 | i < sizeof(m_capabilities->recordingsLifetimeValues); | ||
| 366 | ++i) | ||
| 367 | { | ||
| 368 | m_capabilities->recordingsLifetimeValues[i].iValue = | ||
| 369 | recordingsLifetimeValues[i].GetCStructure()->iValue; | ||
| 370 | strncpy(m_capabilities->recordingsLifetimeValues[i].strDescription, | ||
| 371 | recordingsLifetimeValues[i].GetCStructure()->strDescription, | ||
| 372 | sizeof(m_capabilities->recordingsLifetimeValues[i].strDescription) - 1); | ||
| 373 | ++m_capabilities->iRecordingsLifetimesSize; | ||
| 374 | } | ||
| 375 | } | ||
| 376 | |||
| 377 | /// @brief To get with @ref SetRecordingsLifetimeValues changed values. | ||
| 378 | std::vector<PVRTypeIntValue> GetRecordingsLifetimeValues() const | ||
| 379 | { | ||
| 380 | std::vector<PVRTypeIntValue> recordingsLifetimeValues; | ||
| 381 | for (unsigned int i = 0; i < m_capabilities->iRecordingsLifetimesSize; ++i) | ||
| 382 | recordingsLifetimeValues.emplace_back( | ||
| 383 | m_capabilities->recordingsLifetimeValues[i].iValue, | ||
| 384 | m_capabilities->recordingsLifetimeValues[i].strDescription); | ||
| 385 | return recordingsLifetimeValues; | ||
| 386 | } | ||
| 387 | ///@} | ||
| 388 | |||
| 389 | private: | ||
| 390 | PVRCapabilities(PVR_ADDON_CAPABILITIES* capabilities) : m_capabilities(capabilities) {} | ||
| 391 | |||
| 392 | PVR_ADDON_CAPABILITIES* m_capabilities; | ||
| 393 | }; | ||
| 394 | ///@} | ||
| 395 | //------------------------------------------------------------------------------ | ||
| 396 | |||
| 397 | //============================================================================== | ||
| 398 | /// @defgroup cpp_kodi_addon_pvr_Defs_General_Inputstream_PVRStreamProperty class PVRStreamProperty | ||
| 399 | /// @ingroup cpp_kodi_addon_pvr_Defs_General_Inputstream | ||
| 400 | /// @brief **PVR stream property value handler**\n | ||
| 401 | /// To set for Kodi wanted stream properties. | ||
| 402 | /// | ||
| 403 | /// ---------------------------------------------------------------------------- | ||
| 404 | /// | ||
| 405 | /// @copydetails cpp_kodi_addon_pvr_Defs_General_Inputstream_PVRStreamProperty_Help | ||
| 406 | /// | ||
| 407 | ///--------------------------------------------------------------------------- | ||
| 408 | /// | ||
| 409 | /// **Example:** | ||
| 410 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 411 | /// ... | ||
| 412 | /// | ||
| 413 | /// PVR_ERROR CMyPVRInstance::GetChannelStreamProperties(const kodi::addon::PVRChannel& channel, | ||
| 414 | /// std::vector<kodi::addon::PVRStreamProperty>& properties) | ||
| 415 | /// { | ||
| 416 | /// ... | ||
| 417 | /// properties.emplace_back(PVR_STREAM_PROPERTY_INPUTSTREAM, "inputstream.adaptive"); | ||
| 418 | /// return PVR_ERROR_NO_ERROR; | ||
| 419 | /// } | ||
| 420 | /// | ||
| 421 | /// ... | ||
| 422 | /// ~~~~~~~~~~~~~ | ||
| 423 | /// | ||
| 424 | /// | ||
| 425 | /// **Example 2:** | ||
| 426 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 427 | /// ... | ||
| 428 | /// | ||
| 429 | /// PVR_ERROR CMyPVRInstance::GetChannelStreamProperties(const kodi::addon::PVRChannel& channel, | ||
| 430 | /// std::vector<kodi::addon::PVRStreamProperty>& properties) | ||
| 431 | /// { | ||
| 432 | /// ... | ||
| 433 | /// kodi::addon::PVRStreamProperty property; | ||
| 434 | /// property.SetName(PVR_STREAM_PROPERTY_INPUTSTREAM); | ||
| 435 | /// property.SetValue("inputstream.adaptive"); | ||
| 436 | /// properties.emplace_back(property); | ||
| 437 | /// return PVR_ERROR_NO_ERROR; | ||
| 438 | /// } | ||
| 439 | /// | ||
| 440 | /// ... | ||
| 441 | /// ~~~~~~~~~~~~~ | ||
| 442 | /// | ||
| 443 | ///@{ | ||
| 444 | class PVRStreamProperty : public CStructHdl<PVRStreamProperty, PVR_NAMED_VALUE> | ||
| 445 | { | ||
| 446 | friend class CInstancePVRClient; | ||
| 447 | |||
| 448 | public: | ||
| 449 | /*! \cond PRIVATE */ | ||
| 450 | PVRStreamProperty(const PVRStreamProperty& data) : CStructHdl(data) {} | ||
| 451 | /*! \endcond */ | ||
| 452 | |||
| 453 | /// @defgroup cpp_kodi_addon_pvr_Defs_General_Inputstream_PVRStreamProperty_Help Value Help | ||
| 454 | /// @ingroup cpp_kodi_addon_pvr_Defs_General_Inputstream_PVRStreamProperty | ||
| 455 | /// | ||
| 456 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_General_Inputstream_PVRStreamProperty :</b> | ||
| 457 | /// | Name | Type | Set call | Get call | ||
| 458 | /// |------|------|----------|---------- | ||
| 459 | /// | **Name** | `int` | @ref PVRStreamProperty::SetValue "SetName" | @ref PVRStreamProperty::GetName "GetName" | ||
| 460 | /// | **Value** | `std::string` | @ref PVRStreamProperty::SetValue "SetValue" | @ref PVRStreamProperty::GetValue "GetValue" | ||
| 461 | /// | ||
| 462 | /// @remark Further can there be used his class constructor to set values. | ||
| 463 | |||
| 464 | /// @addtogroup cpp_kodi_addon_pvr_Defs_General_Inputstream_PVRStreamProperty | ||
| 465 | ///@{ | ||
| 466 | |||
| 467 | /// @brief Default class constructor. | ||
| 468 | /// | ||
| 469 | /// @note Values must be set afterwards. | ||
| 470 | PVRStreamProperty() = default; | ||
| 471 | |||
| 472 | /// @brief Class constructor with integrated value set. | ||
| 473 | /// | ||
| 474 | /// @param[in] name Type identification | ||
| 475 | /// @param[in] value Type used property value | ||
| 476 | PVRStreamProperty(const std::string& name, const std::string& value) | ||
| 477 | { | ||
| 478 | SetName(name); | ||
| 479 | SetValue(value); | ||
| 480 | } | ||
| 481 | |||
| 482 | /// @brief To set with the identification name. | ||
| 483 | void SetName(const std::string& name) | ||
| 484 | { | ||
| 485 | strncpy(m_cStructure->strName, name.c_str(), sizeof(m_cStructure->strName) - 1); | ||
| 486 | } | ||
| 487 | |||
| 488 | /// @brief To get with the identification name. | ||
| 489 | std::string GetName() const { return m_cStructure->strName; } | ||
| 490 | |||
| 491 | /// @brief To set with the used property value. | ||
| 492 | void SetValue(const std::string& value) | ||
| 493 | { | ||
| 494 | strncpy(m_cStructure->strValue, value.c_str(), sizeof(m_cStructure->strValue) - 1); | ||
| 495 | } | ||
| 496 | |||
| 497 | /// @brief To get with the used property value. | ||
| 498 | std::string GetValue() const { return m_cStructure->strValue; } | ||
| 499 | ///@} | ||
| 500 | |||
| 501 | private: | ||
| 502 | PVRStreamProperty(const PVR_NAMED_VALUE* data) : CStructHdl(data) {} | ||
| 503 | PVRStreamProperty(PVR_NAMED_VALUE* data) : CStructHdl(data) {} | ||
| 504 | }; | ||
| 505 | ///@} | ||
| 506 | //------------------------------------------------------------------------------ | ||
| 507 | |||
| 508 | } /* namespace addon */ | ||
| 509 | } /* namespace kodi */ | ||
| 510 | |||
| 511 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/MenuHook.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/MenuHook.h deleted file mode 100644 index 053a4d5..0000000 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/MenuHook.h +++ /dev/null | |||
| @@ -1,130 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #include "../../AddonBase.h" | ||
| 12 | #include "../../c-api/addon-instance/pvr/pvr_menu_hook.h" | ||
| 13 | |||
| 14 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 15 | // "C++" Definitions group 7 - Menu hook | ||
| 16 | #ifdef __cplusplus | ||
| 17 | |||
| 18 | namespace kodi | ||
| 19 | { | ||
| 20 | namespace addon | ||
| 21 | { | ||
| 22 | |||
| 23 | //============================================================================== | ||
| 24 | /// @defgroup cpp_kodi_addon_pvr_Defs_Menuhook_PVRMenuhook class PVRMenuhook | ||
| 25 | /// @ingroup cpp_kodi_addon_pvr_Defs_Menuhook | ||
| 26 | /// @brief **Context menu hook**\n | ||
| 27 | /// Menu hooks that are available in the context menus while playing a stream via this add-on. | ||
| 28 | /// And in the Live TV settings dialog. | ||
| 29 | /// | ||
| 30 | /// Possible menu's given to Kodi. | ||
| 31 | /// | ||
| 32 | /// This can be becomes used on this, if @ref kodi::addon::CInstancePVRClient::AddMenuHook() | ||
| 33 | /// was set to related type: | ||
| 34 | /// - @ref kodi::addon::CInstancePVRClient::CallSettingsMenuHook() | ||
| 35 | /// - @ref kodi::addon::CInstancePVRClient::CallChannelMenuHook() | ||
| 36 | /// - @ref kodi::addon::CInstancePVRClient::CallEPGMenuHook() | ||
| 37 | /// - @ref kodi::addon::CInstancePVRClient::CallRecordingMenuHook() | ||
| 38 | /// - @ref kodi::addon::CInstancePVRClient::CallTimerMenuHook() | ||
| 39 | /// | ||
| 40 | /// ---------------------------------------------------------------------------- | ||
| 41 | /// | ||
| 42 | /// @copydetails cpp_kodi_addon_pvr_Defs_Menuhook_PVRMenuhook_Help | ||
| 43 | /// | ||
| 44 | ///@{ | ||
| 45 | class PVRMenuhook : public CStructHdl<PVRMenuhook, PVR_MENUHOOK> | ||
| 46 | { | ||
| 47 | friend class CInstancePVRClient; | ||
| 48 | |||
| 49 | public: | ||
| 50 | /// @addtogroup cpp_kodi_addon_pvr_Defs_Menuhook_PVRMenuhook | ||
| 51 | /// @brief Optional class constructor with value set. | ||
| 52 | /// | ||
| 53 | /// @param[in] hookId This hook's identifier | ||
| 54 | /// @param[in] localizedStringId Localized string identifier | ||
| 55 | /// @param[in] category Category of menu hook, defined with @ref PVR_MENUHOOK_CAT | ||
| 56 | /// | ||
| 57 | /// | ||
| 58 | /// -------------------------------------------------------------------------- | ||
| 59 | /// | ||
| 60 | /// Example: | ||
| 61 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 62 | /// AddMenuHook(kodi::addon::PVRMenuhook(1, 30001, PVR_MENUHOOK_CHANNEL)); | ||
| 63 | /// ~~~~~~~~~~~~~ | ||
| 64 | /// | ||
| 65 | PVRMenuhook(unsigned int hookId, unsigned int localizedStringId, PVR_MENUHOOK_CAT category) | ||
| 66 | { | ||
| 67 | m_cStructure->iHookId = hookId; | ||
| 68 | m_cStructure->iLocalizedStringId = localizedStringId; | ||
| 69 | m_cStructure->category = category; | ||
| 70 | } | ||
| 71 | |||
| 72 | /*! \cond PRIVATE */ | ||
| 73 | PVRMenuhook() | ||
| 74 | { | ||
| 75 | m_cStructure->iHookId = 0; | ||
| 76 | m_cStructure->iLocalizedStringId = 0; | ||
| 77 | m_cStructure->category = PVR_MENUHOOK_UNKNOWN; | ||
| 78 | } | ||
| 79 | PVRMenuhook(const PVRMenuhook& data) : CStructHdl(data) {} | ||
| 80 | /*! \endcond */ | ||
| 81 | |||
| 82 | /// @defgroup cpp_kodi_addon_pvr_Defs_Menuhook_PVRMenuhook_Help Value Help | ||
| 83 | /// @ingroup cpp_kodi_addon_pvr_Defs_Menuhook_PVRMenuhook | ||
| 84 | /// | ||
| 85 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_Menuhook_PVRMenuhook :</b> | ||
| 86 | /// | Name | Type | Set call | Get call | Usage | ||
| 87 | /// |------|------|----------|----------|----------- | ||
| 88 | /// | **This hook's identifier** | `unsigned int` | @ref PVRMenuhook::SetHookId "SetHookId" | @ref PVRMenuhook::GetHookId "GetHookId" | *required to set* | ||
| 89 | /// | **Localized string Identifier** | `unsigned int` | @ref PVRMenuhook::SetLocalizedStringId "SetLocalizedStringId" | @ref PVRMenuhook::GetLocalizedStringId "GetLocalizedStringId" | *required to set* | ||
| 90 | /// | **Category of menu hook** | @ref PVR_MENUHOOK_CAT | @ref PVRMenuhook::SetCategory "SetCategory" | @ref PVRMenuhook::GetCategory "GetCategory" | *required to set* | ||
| 91 | |||
| 92 | /// @addtogroup cpp_kodi_addon_pvr_Defs_Menuhook_PVRMenuhook | ||
| 93 | ///@{ | ||
| 94 | |||
| 95 | /// @brief **required**\n | ||
| 96 | /// This hook's identifier. | ||
| 97 | void SetHookId(unsigned int hookId) { m_cStructure->iHookId = hookId; } | ||
| 98 | |||
| 99 | /// @brief To get with @ref SetHookId() changed values. | ||
| 100 | unsigned int GetHookId() const { return m_cStructure->iHookId; } | ||
| 101 | |||
| 102 | /// @brief **required**\n | ||
| 103 | /// The id of the label for this hook in @ref kodi::GetLocalizedString(). | ||
| 104 | void SetLocalizedStringId(unsigned int localizedStringId) | ||
| 105 | { | ||
| 106 | m_cStructure->iLocalizedStringId = localizedStringId; | ||
| 107 | } | ||
| 108 | |||
| 109 | /// @brief To get with @ref SetLocalizedStringId() changed values. | ||
| 110 | unsigned int GetLocalizedStringId() const { return m_cStructure->iLocalizedStringId; } | ||
| 111 | |||
| 112 | /// @brief **required**\n | ||
| 113 | /// Category of menu hook. | ||
| 114 | void SetCategory(PVR_MENUHOOK_CAT category) { m_cStructure->category = category; } | ||
| 115 | |||
| 116 | /// @brief To get with @ref SetCategory() changed values. | ||
| 117 | PVR_MENUHOOK_CAT GetCategory() const { return m_cStructure->category; } | ||
| 118 | ///@} | ||
| 119 | |||
| 120 | private: | ||
| 121 | PVRMenuhook(const PVR_MENUHOOK* data) : CStructHdl(data) {} | ||
| 122 | PVRMenuhook(PVR_MENUHOOK* data) : CStructHdl(data) {} | ||
| 123 | }; | ||
| 124 | ///@} | ||
| 125 | //------------------------------------------------------------------------------ | ||
| 126 | |||
| 127 | } /* namespace addon */ | ||
| 128 | } /* namespace kodi */ | ||
| 129 | |||
| 130 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/Recordings.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/Recordings.h deleted file mode 100644 index 24ecf11..0000000 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/Recordings.h +++ /dev/null | |||
| @@ -1,520 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #include "../../AddonBase.h" | ||
| 12 | #include "../../c-api/addon-instance/pvr.h" | ||
| 13 | |||
| 14 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 15 | // "C++" Definitions group 5 - PVR recordings | ||
| 16 | #ifdef __cplusplus | ||
| 17 | |||
| 18 | namespace kodi | ||
| 19 | { | ||
| 20 | namespace addon | ||
| 21 | { | ||
| 22 | |||
| 23 | //============================================================================== | ||
| 24 | /// @defgroup cpp_kodi_addon_pvr_Defs_Recording_PVRRecording class PVRRecording | ||
| 25 | /// @ingroup cpp_kodi_addon_pvr_Defs_Recording | ||
| 26 | /// @brief **Data structure with available recordings data**\n | ||
| 27 | /// With this, recordings related data are transferred between addon and Kodi | ||
| 28 | /// and can also be used by the addon itself. | ||
| 29 | /// | ||
| 30 | /// The related values here are automatically initiated to defaults and need | ||
| 31 | /// only be set if supported and used. | ||
| 32 | /// | ||
| 33 | /// ---------------------------------------------------------------------------- | ||
| 34 | /// | ||
| 35 | /// @copydetails cpp_kodi_addon_pvr_Defs_Recording_PVRRecording_Help | ||
| 36 | /// | ||
| 37 | ///@{ | ||
| 38 | class PVRRecording : public CStructHdl<PVRRecording, PVR_RECORDING> | ||
| 39 | { | ||
| 40 | friend class CInstancePVRClient; | ||
| 41 | |||
| 42 | public: | ||
| 43 | /*! \cond PRIVATE */ | ||
| 44 | PVRRecording() | ||
| 45 | { | ||
| 46 | m_cStructure->iSeriesNumber = PVR_RECORDING_INVALID_SERIES_EPISODE; | ||
| 47 | m_cStructure->iEpisodeNumber = PVR_RECORDING_INVALID_SERIES_EPISODE; | ||
| 48 | m_cStructure->recordingTime = 0; | ||
| 49 | m_cStructure->iDuration = PVR_RECORDING_VALUE_NOT_AVAILABLE; | ||
| 50 | m_cStructure->iPriority = PVR_RECORDING_VALUE_NOT_AVAILABLE; | ||
| 51 | m_cStructure->iLifetime = PVR_RECORDING_VALUE_NOT_AVAILABLE; | ||
| 52 | m_cStructure->iGenreType = PVR_RECORDING_VALUE_NOT_AVAILABLE; | ||
| 53 | m_cStructure->iGenreSubType = PVR_RECORDING_VALUE_NOT_AVAILABLE; | ||
| 54 | m_cStructure->iPlayCount = PVR_RECORDING_VALUE_NOT_AVAILABLE; | ||
| 55 | m_cStructure->iLastPlayedPosition = PVR_RECORDING_VALUE_NOT_AVAILABLE; | ||
| 56 | m_cStructure->bIsDeleted = false; | ||
| 57 | m_cStructure->iEpgEventId = 0; | ||
| 58 | m_cStructure->iChannelUid = PVR_RECORDING_VALUE_NOT_AVAILABLE; | ||
| 59 | m_cStructure->channelType = PVR_RECORDING_CHANNEL_TYPE_UNKNOWN; | ||
| 60 | m_cStructure->iFlags = 0; | ||
| 61 | m_cStructure->sizeInBytes = PVR_RECORDING_VALUE_NOT_AVAILABLE; | ||
| 62 | } | ||
| 63 | PVRRecording(const PVRRecording& recording) : CStructHdl(recording) {} | ||
| 64 | /*! \endcond */ | ||
| 65 | |||
| 66 | /// @defgroup cpp_kodi_addon_pvr_Defs_Recording_PVRRecording_Help Value Help | ||
| 67 | /// @ingroup cpp_kodi_addon_pvr_Defs_Recording_PVRRecording | ||
| 68 | /// | ||
| 69 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_Recording_PVRRecording :</b> | ||
| 70 | /// | Name | Type | Set call | Get call | Usage | ||
| 71 | /// |------|------|----------|----------|----------- | ||
| 72 | /// | **Recording id** | `std::string` | @ref PVRRecording::SetRecordingId "SetRecordingId" | @ref PVRRecording::GetRecordingId "GetRecordingId" | *required to set* | ||
| 73 | /// | **Title** | `std::string` | @ref PVRRecording::SetTitle "SetTitle" | @ref PVRRecording::GetTitle "GetTitle" | *required to set* | ||
| 74 | /// | **Episode name** | `std::string` | @ref PVRRecording::SetEpisodeName "SetEpisodeName" | @ref PVRRecording::GetEpisodeName "GetEpisodeName" | *optional* | ||
| 75 | /// | **Series number** | `int` | @ref PVRRecording::SetSeriesNumber "SetSeriesNumber" | @ref PVRRecording::GetSeriesNumber "GetSeriesNumber" | *optional* | ||
| 76 | /// | **Episode number** | `int` | @ref PVRRecording::SetEpisodeNumber "SetEpisodeNumber" | @ref PVRRecording::GetEpisodeNumber "GetEpisodeNumber" | *optional* | ||
| 77 | /// | **Year** | `int` | @ref PVRRecording::SetYear "SetYear" | @ref PVRRecording::GetYear "GetYear" | *optional* | ||
| 78 | /// | **Directory** | `std::string` | @ref PVRRecording::SetDirectory "SetDirectory" | @ref PVRRecording::GetDirectory "GetDirectory" | *optional* | ||
| 79 | /// | **Plot outline** | `std::string` | @ref PVRRecording::SetPlotOutline "SetPlotOutline" | @ref PVRRecording::GetPlotOutline "GetPlotOutline" | *optional* | ||
| 80 | /// | **Plot** | `std::string` | @ref PVRRecording::SetPlot "SetPlot" | @ref PVRRecording::GetPlot "GetPlot" | *optional* | ||
| 81 | /// | **Genre description** | `std::string` | @ref PVRRecording::SetGenreDescription "SetGenreDescription" | @ref PVRRecording::GetGenreDescription "GetGenreDescription" | *optional* | ||
| 82 | /// | **Channel name** | `std::string` | @ref PVRRecording::SetChannelName "SetChannelName" | @ref PVRRecording::GetChannelName "GetChannelName" | *optional* | ||
| 83 | /// | **Icon path** | `std::string` | @ref PVRRecording::SetIconPath "SetIconPath" | @ref PVRRecording::GetIconPath "GetIconPath" | *optional* | ||
| 84 | /// | **Thumbnail path** | `std::string` | @ref PVRRecording::SetThumbnailPath "SetThumbnailPath" | @ref PVRRecording::GetThumbnailPath "GetThumbnailPath" | *optional* | ||
| 85 | /// | **Fanart path** | `std::string` | @ref PVRRecording::SetFanartPath "SetFanartPath" | @ref PVRRecording::GetFanartPath "GetFanartPath" | *optional* | ||
| 86 | /// | **Recording time** | `time_t` | @ref PVRRecording::SetRecordingTime "SetRecordingTime" | @ref PVRRecording::GetRecordingTime "GetRecordingTime" | *optional* | ||
| 87 | /// | **Duration** | `int` | @ref PVRRecording::SetDuration "SetDuration" | @ref PVRRecording::GetDuration "GetDuration" | *optional* | ||
| 88 | /// | **Priority** | `int` | @ref PVRRecording::SetPriority "SetPriority" | @ref PVRRecording::GetPriority "GetPriority" | *optional* | ||
| 89 | /// | **Lifetime** | `int` | @ref PVRRecording::SetLifetime "SetLifetime" | @ref PVRRecording::GetLifetime "GetLifetime" | *optional* | ||
| 90 | /// | **Genre type** | `int` | @ref PVRRecording::SetGenreType "SetGenreType" | @ref PVRRecording::GetGenreType "GetGenreType" | *optional* | ||
| 91 | /// | **Genre sub type** | `int` | @ref PVRRecording::SetGenreSubType "SetGenreSubType" | @ref PVRRecording::GetGenreSubType "GetGenreSubType" | *optional* | ||
| 92 | /// | **Play count** | `int` | @ref PVRRecording::SetPlayCount "SetPlayCount" | @ref PVRRecording::GetPlayCount "GetPlayCount" | *optional* | ||
| 93 | /// | **Last played position** | `int` | @ref PVRRecording::SetLastPlayedPosition "SetLastPlayedPosition" | @ref PVRRecording::GetLastPlayedPosition "GetLastPlayedPosition" | *optional* | ||
| 94 | /// | **Is deleted** | `bool` | @ref PVRRecording::SetIsDeleted "SetIsDeleted" | @ref PVRRecording::GetIsDeleted "GetIsDeleted" | *optional* | ||
| 95 | /// | **EPG event id** | `unsigned int` | @ref PVRRecording::SetEPGEventId "SetEPGEventId" | @ref PVRRecording::GetEPGEventId "GetEPGEventId" | *optional* | ||
| 96 | /// | **Channel unique id** | `int` | @ref PVRRecording::SetChannelUid "SetChannelUid" | @ref PVRRecording::GetChannelUid "GetChannelUid" | *optional* | ||
| 97 | /// | **Channel type** | @ref PVR_RECORDING_CHANNEL_TYPE | @ref PVRRecording::SetChannelType "SetChannelType" | @ref PVRRecording::GetChannelType "GetChannelType" | *optional* | ||
| 98 | /// | **First aired** | `std::string` | @ref PVRRecording::SetFirstAired "SetFirstAired" | @ref PVRRecording::GetFirstAired "GetFirstAired" | *optional* | ||
| 99 | /// | **Flags** | `std::string` | @ref PVRRecording::SetFlags "SetFlags" | @ref PVRRecording::GetFlags "GetFlags" | *optional* | ||
| 100 | /// | **Size in bytes** | `std::string` | @ref PVRRecording::SetSizeInBytes "SetSizeInBytes" | @ref PVRRecording::GetSizeInBytes "GetSizeInBytes" | *optional* | ||
| 101 | |||
| 102 | /// @addtogroup cpp_kodi_addon_pvr_Defs_Recording_PVRRecording | ||
| 103 | ///@{ | ||
| 104 | |||
| 105 | /// @brief **required**\n | ||
| 106 | /// Unique identifier of the recording on the client. | ||
| 107 | void SetRecordingId(const std::string& recordingId) | ||
| 108 | { | ||
| 109 | strncpy(m_cStructure->strRecordingId, recordingId.c_str(), | ||
| 110 | sizeof(m_cStructure->strRecordingId) - 1); | ||
| 111 | } | ||
| 112 | |||
| 113 | /// @brief To get with @ref SetRecordingId changed values. | ||
| 114 | std::string GetRecordingId() const { return m_cStructure->strRecordingId; } | ||
| 115 | |||
| 116 | /// @brief **required**\n | ||
| 117 | /// The title of this recording. | ||
| 118 | void SetTitle(const std::string& title) | ||
| 119 | { | ||
| 120 | strncpy(m_cStructure->strTitle, title.c_str(), sizeof(m_cStructure->strTitle) - 1); | ||
| 121 | } | ||
| 122 | |||
| 123 | /// @brief To get with @ref SetTitle changed values. | ||
| 124 | std::string GetTitle() const { return m_cStructure->strTitle; } | ||
| 125 | |||
| 126 | /// @brief **optional**\n | ||
| 127 | /// Episode name (also known as subtitle). | ||
| 128 | void SetEpisodeName(const std::string& episodeName) | ||
| 129 | { | ||
| 130 | strncpy(m_cStructure->strEpisodeName, episodeName.c_str(), | ||
| 131 | sizeof(m_cStructure->strEpisodeName) - 1); | ||
| 132 | } | ||
| 133 | |||
| 134 | /// @brief To get with @ref SetEpisodeName changed values. | ||
| 135 | std::string GetEpisodeName() const { return m_cStructure->strEpisodeName; } | ||
| 136 | |||
| 137 | /// @brief **optional**\n | ||
| 138 | /// Series number (usually called season). | ||
| 139 | /// | ||
| 140 | /// Set to "0" for specials/pilot. For 'invalid' see @ref SetEpisodeNumber or set to -1. | ||
| 141 | void SetSeriesNumber(int seriesNumber) { m_cStructure->iSeriesNumber = seriesNumber; } | ||
| 142 | |||
| 143 | /// @brief To get with @ref SetSeriesNumber changed values. | ||
| 144 | int GetSeriesNumber() const { return m_cStructure->iSeriesNumber; } | ||
| 145 | |||
| 146 | /// @brief **optional**\n | ||
| 147 | /// Eepisode number within the "iSeriesNumber" season. | ||
| 148 | /// | ||
| 149 | /// For 'invalid' set to -1 or seriesNumber=episodeNumber=0 to show both are invalid. | ||
| 150 | void SetEpisodeNumber(int episodeNumber) { m_cStructure->iEpisodeNumber = episodeNumber; } | ||
| 151 | |||
| 152 | /// @brief To get with @ref SetEpisodeNumber changed values. | ||
| 153 | int GetEpisodeNumber() const { return m_cStructure->iEpisodeNumber; } | ||
| 154 | |||
| 155 | /// @brief **optional**\n | ||
| 156 | /// Year of first release (use to identify a specific movie re-make) / first | ||
| 157 | /// airing for TV shows. | ||
| 158 | /// | ||
| 159 | /// Set to '0' for invalid. | ||
| 160 | void SetYear(int year) { m_cStructure->iYear = year; } | ||
| 161 | |||
| 162 | /// @brief To get with @ref SetYear changed values. | ||
| 163 | int GetYear() const { return m_cStructure->iYear; } | ||
| 164 | |||
| 165 | /// @brief **optional**\n | ||
| 166 | /// | ||
| 167 | /// Directory of this recording on the client. | ||
| 168 | void SetDirectory(const std::string& directory) | ||
| 169 | { | ||
| 170 | strncpy(m_cStructure->strDirectory, directory.c_str(), sizeof(m_cStructure->strDirectory) - 1); | ||
| 171 | } | ||
| 172 | |||
| 173 | /// @brief To get with @ref SetDirectory changed values. | ||
| 174 | std::string GetDirectory() const { return m_cStructure->strDirectory; } | ||
| 175 | |||
| 176 | /// @brief **optional**\n | ||
| 177 | /// Plot outline name. | ||
| 178 | void SetPlotOutline(const std::string& plotOutline) | ||
| 179 | { | ||
| 180 | strncpy(m_cStructure->strPlotOutline, plotOutline.c_str(), | ||
| 181 | sizeof(m_cStructure->strPlotOutline) - 1); | ||
| 182 | } | ||
| 183 | |||
| 184 | /// @brief To get with @ref SetPlotOutline changed values. | ||
| 185 | std::string GetPlotOutline() const { return m_cStructure->strPlotOutline; } | ||
| 186 | |||
| 187 | /// @brief **optional**\n | ||
| 188 | /// Plot name. | ||
| 189 | void SetPlot(const std::string& plot) | ||
| 190 | { | ||
| 191 | strncpy(m_cStructure->strPlot, plot.c_str(), sizeof(m_cStructure->strPlot) - 1); | ||
| 192 | } | ||
| 193 | |||
| 194 | /// @brief To get with @ref SetPlot changed values. | ||
| 195 | std::string GetPlot() const { return m_cStructure->strPlot; } | ||
| 196 | |||
| 197 | /// @brief **optional**\n | ||
| 198 | /// Channel name. | ||
| 199 | void SetChannelName(const std::string& channelName) | ||
| 200 | { | ||
| 201 | strncpy(m_cStructure->strChannelName, channelName.c_str(), | ||
| 202 | sizeof(m_cStructure->strChannelName) - 1); | ||
| 203 | } | ||
| 204 | |||
| 205 | /// @brief To get with @ref SetChannelName changed values. | ||
| 206 | std::string GetChannelName() const { return m_cStructure->strChannelName; } | ||
| 207 | |||
| 208 | /// @brief **optional**\n | ||
| 209 | /// Channel logo (icon) path. | ||
| 210 | void SetIconPath(const std::string& iconPath) | ||
| 211 | { | ||
| 212 | strncpy(m_cStructure->strIconPath, iconPath.c_str(), sizeof(m_cStructure->strIconPath) - 1); | ||
| 213 | } | ||
| 214 | |||
| 215 | /// @brief To get with @ref SetIconPath changed values. | ||
| 216 | std::string GetIconPath() const { return m_cStructure->strIconPath; } | ||
| 217 | |||
| 218 | /// @brief **optional**\n | ||
| 219 | /// Thumbnail path. | ||
| 220 | void SetThumbnailPath(const std::string& thumbnailPath) | ||
| 221 | { | ||
| 222 | strncpy(m_cStructure->strThumbnailPath, thumbnailPath.c_str(), | ||
| 223 | sizeof(m_cStructure->strThumbnailPath) - 1); | ||
| 224 | } | ||
| 225 | |||
| 226 | /// @brief To get with @ref SetThumbnailPath changed values. | ||
| 227 | std::string GetThumbnailPath() const { return m_cStructure->strThumbnailPath; } | ||
| 228 | |||
| 229 | /// @brief **optional**\n | ||
| 230 | /// Fanart path. | ||
| 231 | void SetFanartPath(const std::string& fanartPath) | ||
| 232 | { | ||
| 233 | strncpy(m_cStructure->strFanartPath, fanartPath.c_str(), | ||
| 234 | sizeof(m_cStructure->strFanartPath) - 1); | ||
| 235 | } | ||
| 236 | |||
| 237 | /// @brief To get with @ref SetFanartPath changed values. | ||
| 238 | std::string GetFanartPath() const { return m_cStructure->strFanartPath; } | ||
| 239 | |||
| 240 | /// @brief **optional**\n | ||
| 241 | /// Start time of the recording. | ||
| 242 | void SetRecordingTime(time_t recordingTime) { m_cStructure->recordingTime = recordingTime; } | ||
| 243 | |||
| 244 | /// @brief To get with @ref SetRecordingTime changed values. | ||
| 245 | time_t GetRecordingTime() const { return m_cStructure->recordingTime; } | ||
| 246 | |||
| 247 | /// @brief **optional**\n | ||
| 248 | /// Duration of the recording in seconds. | ||
| 249 | void SetDuration(int duration) { m_cStructure->iDuration = duration; } | ||
| 250 | |||
| 251 | /// @brief To get with @ref SetDuration changed values. | ||
| 252 | int GetDuration() const { return m_cStructure->iDuration; } | ||
| 253 | |||
| 254 | /// @brief **optional**\n | ||
| 255 | /// Priority of this recording (from 0 - 100). | ||
| 256 | void SetPriority(int priority) { m_cStructure->iPriority = priority; } | ||
| 257 | |||
| 258 | /// @brief To get with @ref SetPriority changed values. | ||
| 259 | int GetPriority() const { return m_cStructure->iPriority; } | ||
| 260 | |||
| 261 | /// @brief **optional**\n | ||
| 262 | /// Life time in days of this recording. | ||
| 263 | void SetLifetime(int lifetime) { m_cStructure->iLifetime = lifetime; } | ||
| 264 | |||
| 265 | /// @brief To get with @ref SetLifetime changed values. | ||
| 266 | int GetLifetime() const { return m_cStructure->iLifetime; } | ||
| 267 | |||
| 268 | /// @brief **optional**\n | ||
| 269 | /// Genre type. | ||
| 270 | /// | ||
| 271 | /// Use @ref EPG_GENRE_USE_STRING if type becomes given by @ref SetGenreDescription. | ||
| 272 | /// | ||
| 273 | /// @note If confirmed that backend brings the types in [ETSI EN 300 468](https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.14.01_60/en_300468v011401p.pdf) | ||
| 274 | /// conform values, can be @ref EPG_EVENT_CONTENTMASK ignored and to set here | ||
| 275 | /// with backend value. | ||
| 276 | /// | ||
| 277 | /// | ||
| 278 | /// -------------------------------------------------------------------------- | ||
| 279 | /// | ||
| 280 | /// **Example 1:** | ||
| 281 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 282 | /// kodi::addon::PVRRecording tag; | ||
| 283 | /// tag.SetGenreType(EPG_EVENT_CONTENTMASK_MOVIEDRAMA); | ||
| 284 | /// ~~~~~~~~~~~~~ | ||
| 285 | /// | ||
| 286 | /// -------------------------------------------------------------------------- | ||
| 287 | /// | ||
| 288 | /// **Example 2** (in case of other, not ETSI EN 300 468 conform genre types): | ||
| 289 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 290 | /// kodi::addon::PVRRecording tag; | ||
| 291 | /// tag.SetGenreType(EPG_GENRE_USE_STRING); | ||
| 292 | /// tag.SetGenreDescription("My special genre name"); // Should use (if possible) kodi::GetLocalizedString(...) to have match user language. | ||
| 293 | /// ~~~~~~~~~~~~~ | ||
| 294 | /// | ||
| 295 | void SetGenreType(int genreType) { m_cStructure->iGenreType = genreType; } | ||
| 296 | |||
| 297 | /// @brief To get with @ref SetGenreType changed values. | ||
| 298 | int GetGenreType() const { return m_cStructure->iGenreType; } | ||
| 299 | |||
| 300 | /// @brief **optional**\n | ||
| 301 | /// Genre sub type. | ||
| 302 | /// | ||
| 303 | /// Subtypes groups related to set by @ref SetGenreType: | ||
| 304 | /// | Main genre type | List with available sub genre types | ||
| 305 | /// |-----------------|----------------------------------------- | ||
| 306 | /// | @ref EPG_EVENT_CONTENTMASK_UNDEFINED | Nothing, should be 0 | ||
| 307 | /// | @ref EPG_EVENT_CONTENTMASK_MOVIEDRAMA | @ref EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA | ||
| 308 | /// | @ref EPG_EVENT_CONTENTMASK_NEWSCURRENTAFFAIRS | @ref EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS | ||
| 309 | /// | @ref EPG_EVENT_CONTENTMASK_SHOW | @ref EPG_EVENT_CONTENTSUBMASK_SHOW | ||
| 310 | /// | @ref EPG_EVENT_CONTENTMASK_SPORTS | @ref EPG_EVENT_CONTENTSUBMASK_SPORTS | ||
| 311 | /// | @ref EPG_EVENT_CONTENTMASK_CHILDRENYOUTH | @ref EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH | ||
| 312 | /// | @ref EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE | @ref EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE | ||
| 313 | /// | @ref EPG_EVENT_CONTENTMASK_ARTSCULTURE | @ref EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE | ||
| 314 | /// | @ref EPG_EVENT_CONTENTMASK_SOCIALPOLITICALECONOMICS | @ref EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS | ||
| 315 | /// | @ref EPG_EVENT_CONTENTMASK_EDUCATIONALSCIENCE | @ref EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE | ||
| 316 | /// | @ref EPG_EVENT_CONTENTMASK_LEISUREHOBBIES | @ref EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES | ||
| 317 | /// | @ref EPG_EVENT_CONTENTMASK_SPECIAL | @ref EPG_EVENT_CONTENTSUBMASK_SPECIAL | ||
| 318 | /// | @ref EPG_EVENT_CONTENTMASK_USERDEFINED | Can be defined by you | ||
| 319 | /// | @ref EPG_GENRE_USE_STRING | **Kodi's own value**, which declares that the type with @ref SetGenreDescription is given. | ||
| 320 | /// | ||
| 321 | /// -------------------------------------------------------------------------- | ||
| 322 | /// | ||
| 323 | /// **Example:** | ||
| 324 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 325 | /// kodi::addon::PVRRecording tag; | ||
| 326 | /// tag.SetGenreType(EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE); | ||
| 327 | /// tag.SetGenreSubType(EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_JAZZ); | ||
| 328 | /// ~~~~~~~~~~~~~ | ||
| 329 | /// | ||
| 330 | void SetGenreSubType(int genreSubType) { m_cStructure->iGenreSubType = genreSubType; } | ||
| 331 | |||
| 332 | /// @brief To get with @ref SetGenreSubType changed values. | ||
| 333 | int GetGenreSubType() const { return m_cStructure->iGenreSubType; } | ||
| 334 | |||
| 335 | /// @brief **optional**\n | ||
| 336 | /// To set own genre description name. | ||
| 337 | /// | ||
| 338 | /// Will be used only when genreType == @ref EPG_GENRE_USE_STRING or | ||
| 339 | /// genreSubType == @ref EPG_GENRE_USE_STRING. | ||
| 340 | /// | ||
| 341 | /// Use @ref EPG_STRING_TOKEN_SEPARATOR to separate different genres. | ||
| 342 | /// | ||
| 343 | /// In case of other, not [ETSI EN 300 468](https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.14.01_60/en_300468v011401p.pdf) | ||
| 344 | /// conform genre types or something special. | ||
| 345 | /// | ||
| 346 | /// -------------------------------------------------------------------------- | ||
| 347 | /// | ||
| 348 | /// **Example:** | ||
| 349 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 350 | /// kodi::addon::PVRRecording tag; | ||
| 351 | /// tag.SetGenreType(EPG_GENRE_USE_STRING); | ||
| 352 | /// tag.SetGenreDescription("Action" + EPG_STRING_TOKEN_SEPARATOR + "Thriller"); | ||
| 353 | /// ~~~~~~~~~~~~~ | ||
| 354 | /// | ||
| 355 | void SetGenreDescription(const std::string& genreDescription) | ||
| 356 | { | ||
| 357 | strncpy(m_cStructure->strGenreDescription, genreDescription.c_str(), | ||
| 358 | sizeof(m_cStructure->strGenreDescription) - 1); | ||
| 359 | } | ||
| 360 | |||
| 361 | /// @brief To get with @ref SetGenreDescription changed values. | ||
| 362 | std::string GetGenreDescription() const { return m_cStructure->strGenreDescription; } | ||
| 363 | |||
| 364 | /// @brief **optional**\n | ||
| 365 | /// Play count of this recording on the client. | ||
| 366 | void SetPlayCount(int playCount) { m_cStructure->iPlayCount = playCount; } | ||
| 367 | |||
| 368 | /// @brief To get with @ref SetPlayCount changed values. | ||
| 369 | int GetPlayCount() const { return m_cStructure->iPlayCount; } | ||
| 370 | |||
| 371 | /// @brief **optional**\n | ||
| 372 | /// Last played position of this recording on the client. | ||
| 373 | void SetLastPlayedPosition(int lastPlayedPosition) | ||
| 374 | { | ||
| 375 | m_cStructure->iLastPlayedPosition = lastPlayedPosition; | ||
| 376 | } | ||
| 377 | |||
| 378 | /// @brief To get with @ref SetLastPlayedPosition changed values. | ||
| 379 | int GetLastPlayedPosition() const { return m_cStructure->iLastPlayedPosition; } | ||
| 380 | |||
| 381 | /// @brief **optional**\n | ||
| 382 | /// Shows this recording is deleted and can be undelete. | ||
| 383 | void SetIsDeleted(int isDeleted) { m_cStructure->bIsDeleted = isDeleted; } | ||
| 384 | |||
| 385 | /// @brief To get with @ref SetIsDeleted changed values. | ||
| 386 | int GetIsDeleted() const { return m_cStructure->bIsDeleted; } | ||
| 387 | |||
| 388 | /// @brief **optional**\n | ||
| 389 | /// EPG event id associated with this recording. Valid ids must be greater than @ref EPG_TAG_INVALID_UID. | ||
| 390 | void SetEPGEventId(unsigned int epgEventId) { m_cStructure->iEpgEventId = epgEventId; } | ||
| 391 | |||
| 392 | /// @brief To get with @ref SetEPGEventId changed values. | ||
| 393 | unsigned int GetEPGEventId() const { return m_cStructure->iEpgEventId; } | ||
| 394 | |||
| 395 | /// @brief **optional**\n | ||
| 396 | /// Unique identifier of the channel for this recording. @ref PVR_CHANNEL_INVALID_UID | ||
| 397 | /// denotes that channel uid is not available. | ||
| 398 | void SetChannelUid(int channelUid) { m_cStructure->iChannelUid = channelUid; } | ||
| 399 | |||
| 400 | /// @brief To get with @ref SetChannelUid changed values | ||
| 401 | int GetChannelUid() const { return m_cStructure->iChannelUid; } | ||
| 402 | |||
| 403 | /// @brief **optional**\n | ||
| 404 | /// Channel type. | ||
| 405 | /// | ||
| 406 | /// Set to @ref PVR_RECORDING_CHANNEL_TYPE_UNKNOWN if the type cannot be | ||
| 407 | /// determined. | ||
| 408 | /// | ||
| 409 | /// -------------------------------------------------------------------------- | ||
| 410 | /// | ||
| 411 | /// Example: | ||
| 412 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 413 | /// kodi::addon::PVRRecording tag; | ||
| 414 | /// tag.SetChannelType(PVR_RECORDING_CHANNEL_TYPE_TV); | ||
| 415 | /// ~~~~~~~~~~~~~ | ||
| 416 | /// | ||
| 417 | void SetChannelType(PVR_RECORDING_CHANNEL_TYPE channelType) | ||
| 418 | { | ||
| 419 | m_cStructure->channelType = channelType; | ||
| 420 | } | ||
| 421 | |||
| 422 | /// @brief To get with @ref SetChannelType changed values | ||
| 423 | PVR_RECORDING_CHANNEL_TYPE GetChannelType() const { return m_cStructure->channelType; } | ||
| 424 | |||
| 425 | /// @brief **optional**\n | ||
| 426 | /// First aired date of this recording. | ||
| 427 | /// | ||
| 428 | /// Used only for display purposes. Specify in W3C date format "YYYY-MM-DD". | ||
| 429 | /// | ||
| 430 | /// -------------------------------------------------------------------------- | ||
| 431 | /// | ||
| 432 | /// Example: | ||
| 433 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 434 | /// kodi::addon::PVRRecording tag; | ||
| 435 | /// tag.SetFirstAired(1982-10-22); | ||
| 436 | /// ~~~~~~~~~~~~~ | ||
| 437 | /// | ||
| 438 | void SetFirstAired(const std::string& firstAired) | ||
| 439 | { | ||
| 440 | strncpy(m_cStructure->strFirstAired, firstAired.c_str(), | ||
| 441 | sizeof(m_cStructure->strFirstAired) - 1); | ||
| 442 | } | ||
| 443 | |||
| 444 | /// @brief To get with @ref SetFirstAired changed values | ||
| 445 | std::string GetFirstAired() const { return m_cStructure->strFirstAired; } | ||
| 446 | |||
| 447 | /// @brief **optional**\n | ||
| 448 | /// Bit field of independent flags associated with the recording. | ||
| 449 | /// | ||
| 450 | /// See @ref cpp_kodi_addon_pvr_Defs_Recording_PVR_RECORDING_FLAG for | ||
| 451 | /// available bit flags. | ||
| 452 | /// | ||
| 453 | /// -------------------------------------------------------------------------- | ||
| 454 | /// | ||
| 455 | /// @copydetails cpp_kodi_addon_pvr_Defs_Recording_PVR_RECORDING_FLAG | ||
| 456 | /// | ||
| 457 | void SetFlags(unsigned int flags) { m_cStructure->iFlags = flags; } | ||
| 458 | |||
| 459 | /// @brief To get with @ref SetFlags changed values. | ||
| 460 | unsigned int GetFlags() const { return m_cStructure->iFlags; } | ||
| 461 | |||
| 462 | /// @brief **optional**\n | ||
| 463 | /// Size of the recording in bytes. | ||
| 464 | void SetSizeInBytes(int64_t sizeInBytes) { m_cStructure->sizeInBytes = sizeInBytes; } | ||
| 465 | |||
| 466 | /// @brief To get with @ref SetSizeInBytes changed values. | ||
| 467 | int64_t GetSizeInBytes() const { return m_cStructure->sizeInBytes; } | ||
| 468 | ///@} | ||
| 469 | |||
| 470 | private: | ||
| 471 | PVRRecording(const PVR_RECORDING* recording) : CStructHdl(recording) {} | ||
| 472 | PVRRecording(PVR_RECORDING* recording) : CStructHdl(recording) {} | ||
| 473 | }; | ||
| 474 | ///@} | ||
| 475 | //------------------------------------------------------------------------------ | ||
| 476 | |||
| 477 | //============================================================================== | ||
| 478 | /// @defgroup cpp_kodi_addon_pvr_Defs_Recording_PVRRecordingsResultSet class PVRRecordingsResultSet | ||
| 479 | /// @ingroup cpp_kodi_addon_pvr_Defs_Recording_PVRRecording | ||
| 480 | /// @brief **PVR add-on recording transfer class**\n | ||
| 481 | /// To transfer the content of @ref kodi::addon::CInstancePVRClient::GetRecordings(). | ||
| 482 | /// | ||
| 483 | /// @note This becomes only be used on addon call above, not usable outside on | ||
| 484 | /// addon itself. | ||
| 485 | ///@{ | ||
| 486 | class PVRRecordingsResultSet | ||
| 487 | { | ||
| 488 | public: | ||
| 489 | /*! \cond PRIVATE */ | ||
| 490 | PVRRecordingsResultSet() = delete; | ||
| 491 | PVRRecordingsResultSet(const AddonInstance_PVR* instance, ADDON_HANDLE handle) | ||
| 492 | : m_instance(instance), m_handle(handle) | ||
| 493 | { | ||
| 494 | } | ||
| 495 | /*! \endcond */ | ||
| 496 | |||
| 497 | /// @addtogroup cpp_kodi_addon_pvr_Defs_Recording_PVRRecordingsResultSet | ||
| 498 | ///@{ | ||
| 499 | |||
| 500 | /// @brief To add and give content from addon to Kodi on related call. | ||
| 501 | /// | ||
| 502 | /// @param[in] tag The to transferred data. | ||
| 503 | void Add(const kodi::addon::PVRRecording& tag) | ||
| 504 | { | ||
| 505 | m_instance->toKodi->TransferRecordingEntry(m_instance->toKodi->kodiInstance, m_handle, tag); | ||
| 506 | } | ||
| 507 | |||
| 508 | ///@} | ||
| 509 | |||
| 510 | private: | ||
| 511 | const AddonInstance_PVR* m_instance = nullptr; | ||
| 512 | const ADDON_HANDLE m_handle; | ||
| 513 | }; | ||
| 514 | ///@} | ||
| 515 | //------------------------------------------------------------------------------ | ||
| 516 | |||
| 517 | } /* namespace addon */ | ||
| 518 | } /* namespace kodi */ | ||
| 519 | |||
| 520 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/Stream.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/Stream.h deleted file mode 100644 index 5613947..0000000 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/Stream.h +++ /dev/null | |||
| @@ -1,330 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #include "../../AddonBase.h" | ||
| 12 | #include "../../c-api/addon-instance/pvr/pvr_stream.h" | ||
| 13 | |||
| 14 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 15 | // "C++" Definitions group 9 - PVR stream definitions (NOTE: Becomes replaced | ||
| 16 | // in future by inputstream addon instance way) | ||
| 17 | |||
| 18 | #ifdef __cplusplus | ||
| 19 | |||
| 20 | namespace kodi | ||
| 21 | { | ||
| 22 | namespace addon | ||
| 23 | { | ||
| 24 | |||
| 25 | //============================================================================== | ||
| 26 | /// @defgroup cpp_kodi_addon_pvr_Defs_Stream_PVRCodec class PVRCodec | ||
| 27 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 28 | /// @brief **PVR codec identifier**\n | ||
| 29 | /// Used to exchange the desired codec type between Kodi and addon. | ||
| 30 | /// | ||
| 31 | /// @ref kodi::addon::CInstancePVRClient::GetCodecByName is used to get this data. | ||
| 32 | /// | ||
| 33 | /// ---------------------------------------------------------------------------- | ||
| 34 | /// | ||
| 35 | /// @copydetails cpp_kodi_addon_pvr_Defs_Stream_PVRCodec_Help | ||
| 36 | /// | ||
| 37 | ///@{ | ||
| 38 | class PVRCodec : public CStructHdl<PVRCodec, PVR_CODEC> | ||
| 39 | { | ||
| 40 | friend class CInstancePVRClient; | ||
| 41 | |||
| 42 | public: | ||
| 43 | /*! \cond PRIVATE */ | ||
| 44 | PVRCodec() | ||
| 45 | { | ||
| 46 | m_cStructure->codec_type = PVR_CODEC_TYPE_UNKNOWN; | ||
| 47 | m_cStructure->codec_id = PVR_INVALID_CODEC_ID; | ||
| 48 | } | ||
| 49 | PVRCodec(const PVRCodec& type) : CStructHdl(type) {} | ||
| 50 | /*! \endcond */ | ||
| 51 | |||
| 52 | /// @defgroup cpp_kodi_addon_pvr_Defs_Stream_PVRCodec_Help Value Help | ||
| 53 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream_PVRCodec | ||
| 54 | /// | ||
| 55 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_Stream_PVRCodec :</b> | ||
| 56 | /// | Name | Type | Set call | Get call | ||
| 57 | /// |------|------|----------|---------- | ||
| 58 | /// | **Codec type** | @ref PVR_CODEC_TYPE | @ref PVRCodec::SetCodecType "SetCodecType" | @ref PVRCodec::GetCodecType "GetCodecType" | ||
| 59 | /// | **Codec identifier** | `unsigned int` | @ref PVRCodec::SetCodecId "SetCodecId" | @ref PVRCodec::GetCodecId "GetCodecId" | ||
| 60 | /// | ||
| 61 | |||
| 62 | /// @addtogroup cpp_kodi_addon_pvr_Defs_Stream_PVRCodec | ||
| 63 | ///@{ | ||
| 64 | |||
| 65 | /// @brief Codec type. | ||
| 66 | void SetCodecType(PVR_CODEC_TYPE codecType) { m_cStructure->codec_type = codecType; } | ||
| 67 | |||
| 68 | /// @brief To get with @ref SetCodecType() changed values. | ||
| 69 | PVR_CODEC_TYPE GetCodecType() const { return m_cStructure->codec_type; } | ||
| 70 | |||
| 71 | /// @brief Codec id. | ||
| 72 | /// | ||
| 73 | /// Related codec identifier, normally match the ffmpeg id's. | ||
| 74 | void SetCodecId(unsigned int codecId) { m_cStructure->codec_id = codecId; } | ||
| 75 | |||
| 76 | /// @brief To get with @ref SetCodecId() changed values. | ||
| 77 | unsigned int GetCodecId() const { return m_cStructure->codec_id; } | ||
| 78 | ///@} | ||
| 79 | |||
| 80 | private: | ||
| 81 | PVRCodec(const PVR_CODEC& type) : CStructHdl(&type) {} | ||
| 82 | PVRCodec(const PVR_CODEC* type) : CStructHdl(type) {} | ||
| 83 | PVRCodec(PVR_CODEC* type) : CStructHdl(type) {} | ||
| 84 | }; | ||
| 85 | ///@} | ||
| 86 | //------------------------------------------------------------------------------ | ||
| 87 | |||
| 88 | //============================================================================== | ||
| 89 | /// @defgroup cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties class PVRStreamProperties | ||
| 90 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 91 | /// @brief **PVR stream properties**\n | ||
| 92 | /// All information about a respective stream is stored in this, so that Kodi | ||
| 93 | /// can process the data given by the addon after demux. | ||
| 94 | /// | ||
| 95 | /// ---------------------------------------------------------------------------- | ||
| 96 | /// | ||
| 97 | /// @copydetails cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties_Help | ||
| 98 | /// | ||
| 99 | ///@{ | ||
| 100 | class PVRStreamProperties | ||
| 101 | : public CStructHdl<PVRStreamProperties, PVR_STREAM_PROPERTIES::PVR_STREAM> | ||
| 102 | { | ||
| 103 | friend class CInstancePVRClient; | ||
| 104 | |||
| 105 | public: | ||
| 106 | /*! \cond PRIVATE */ | ||
| 107 | PVRStreamProperties() { memset(m_cStructure, 0, sizeof(PVR_STREAM_PROPERTIES::PVR_STREAM)); } | ||
| 108 | PVRStreamProperties(const PVRStreamProperties& type) : CStructHdl(type) {} | ||
| 109 | /*! \endcond */ | ||
| 110 | |||
| 111 | /// @defgroup cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties_Help Value Help | ||
| 112 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties | ||
| 113 | /// ---------------------------------------------------------------------------- | ||
| 114 | /// | ||
| 115 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties :</b> | ||
| 116 | /// | Name | Type | Set call | Get call | ||
| 117 | /// |------|------|----------|---------- | ||
| 118 | /// | **PID** | `unsigned int` | @ref PVRStreamProperties::SetPID "SetPID" | @ref PVRStreamProperties::GetPID "GetPID" | ||
| 119 | /// | **Codec type** | @ref PVR_CODEC_TYPE | @ref PVRStreamProperties::SetCodecType "SetCodecType" | @ref PVRStreamProperties::GetCodecType "GetCodecType" | ||
| 120 | /// | **Codec identifier** | `unsigned int` | @ref PVRStreamProperties::SetCodecId "SetCodecId" | @ref PVRStreamProperties::GetCodecId "GetCodecId" | ||
| 121 | /// | **Language** | `std::string` | @ref PVRStreamProperties::SetLanguage "SetLanguage" | @ref PVRStreamProperties::GetLanguage "GetLanguage" | ||
| 122 | /// | **Subtitle info** | `int` | @ref PVRStreamProperties::SetSubtitleInfo "SetSubtitleInfo" | @ref PVRStreamProperties::GetSubtitleInfo "GetSubtitleInfo" | ||
| 123 | /// | **FPS scale** | `int` | @ref PVRStreamProperties::SetFPSScale "SetFPSScale" | @ref PVRStreamProperties::GetFPSScale "GetFPSScale" | ||
| 124 | /// | **FPS rate** | `int` | @ref PVRStreamProperties::SetFPSRate "SetFPSRate" | @ref PVRStreamProperties::GetFPSRate "GetFPSRate" | ||
| 125 | /// | **Height** | `int` | @ref PVRStreamProperties::SetHeight "SetHeight" | @ref PVRStreamProperties::GetHeight "GetHeight" | ||
| 126 | /// | **Width** | `int` | @ref PVRStreamProperties::SetWidth "SetWidth" | @ref PVRStreamProperties::GetWidth "GetWidth" | ||
| 127 | /// | **Aspect ratio** | `float` | @ref PVRStreamProperties::SetAspect "SetAspect" | @ref PVRStreamProperties::GetAspect "GetAspect" | ||
| 128 | /// | **Channels** | `int` | @ref PVRStreamProperties::SetChannels "SetChannels" | @ref PVRStreamProperties::GetChannels "GetChannels" | ||
| 129 | /// | **Samplerate** | `int` | @ref PVRStreamProperties::SetSampleRate "SetSampleRate" | @ref PVRStreamProperties::GetSampleRate "GetSampleRate" | ||
| 130 | /// | **Block align** | `int` | @ref PVRStreamProperties::SetBlockAlign "SetBlockAlign" | @ref PVRStreamProperties::GetBlockAlign "GetBlockAlign" | ||
| 131 | /// | **Bit rate** | `int` | @ref PVRStreamProperties::SetBitRate "SetBitRate" | @ref PVRStreamProperties::GetBitRate "GetBitRate" | ||
| 132 | /// | **Bits per sample** | `int` | @ref PVRStreamProperties::SetBitsPerSample "SetBitsPerSample" | @ref PVRStreamProperties::GetBitsPerSample "GetBitsPerSample" | ||
| 133 | /// | ||
| 134 | |||
| 135 | /// @addtogroup cpp_kodi_addon_pvr_Defs_Stream_PVRStreamProperties | ||
| 136 | ///@{ | ||
| 137 | |||
| 138 | /// @brief PID. | ||
| 139 | void SetPID(unsigned int pid) { m_cStructure->iPID = pid; } | ||
| 140 | |||
| 141 | /// @brief To get with @ref SetPID() changed values. | ||
| 142 | unsigned int GetPID() const { return m_cStructure->iPID; } | ||
| 143 | |||
| 144 | /// @brief Codec type this stream. | ||
| 145 | void SetCodecType(PVR_CODEC_TYPE codecType) { m_cStructure->iCodecType = codecType; } | ||
| 146 | |||
| 147 | /// @brief To get with @ref SetCodecType() changed values. | ||
| 148 | PVR_CODEC_TYPE GetCodecType() const { return m_cStructure->iCodecType; } | ||
| 149 | |||
| 150 | /// @brief Codec id of this stream. | ||
| 151 | void SetCodecId(unsigned int codecId) { m_cStructure->iCodecId = codecId; } | ||
| 152 | |||
| 153 | /// @brief To get with @ref SetCodecId() changed values. | ||
| 154 | unsigned int GetCodecId() const { return m_cStructure->iCodecId; } | ||
| 155 | |||
| 156 | /// @brief 3 letter language id. | ||
| 157 | void SetLanguage(const std::string& language) | ||
| 158 | { | ||
| 159 | if (language.size() > 3) | ||
| 160 | { | ||
| 161 | kodi::Log(ADDON_LOG_ERROR, | ||
| 162 | "PVRStreamProperties::%s: Language string size '%li' higher as needed 3", __func__, | ||
| 163 | language.size()); | ||
| 164 | return; | ||
| 165 | } | ||
| 166 | m_cStructure->strLanguage[0] = language[0]; | ||
| 167 | m_cStructure->strLanguage[1] = language[1]; | ||
| 168 | m_cStructure->strLanguage[2] = language[2]; | ||
| 169 | m_cStructure->strLanguage[2] = 0; | ||
| 170 | } | ||
| 171 | |||
| 172 | /// @brief To get with @ref SetLanguage() changed values. | ||
| 173 | std::string GetLanguage() const { return m_cStructure->strLanguage; } | ||
| 174 | |||
| 175 | /// @brief Subtitle Info | ||
| 176 | void SetSubtitleInfo(int subtitleInfo) { m_cStructure->iSubtitleInfo = subtitleInfo; } | ||
| 177 | |||
| 178 | /// @brief To get with @ref SetSubtitleInfo() changed values. | ||
| 179 | int GetSubtitleInfo() const { return m_cStructure->iSubtitleInfo; } | ||
| 180 | |||
| 181 | /// @brief To set scale of 1000 and a rate of 29970 will result in 29.97 fps. | ||
| 182 | void SetFPSScale(int fpsScale) { m_cStructure->iFPSScale = fpsScale; } | ||
| 183 | |||
| 184 | /// @brief To get with @ref SetFPSScale() changed values. | ||
| 185 | int GetFPSScale() const { return m_cStructure->iFPSScale; } | ||
| 186 | |||
| 187 | /// @brief FPS rate | ||
| 188 | void SetFPSRate(int fpsRate) { m_cStructure->iFPSRate = fpsRate; } | ||
| 189 | |||
| 190 | /// @brief To get with @ref SetFPSRate() changed values. | ||
| 191 | int GetFPSRate() const { return m_cStructure->iFPSRate; } | ||
| 192 | |||
| 193 | /// @brief Height of the stream reported by the demuxer | ||
| 194 | void SetHeight(int height) { m_cStructure->iHeight = height; } | ||
| 195 | |||
| 196 | /// @brief To get with @ref SetHeight() changed values. | ||
| 197 | int GetHeight() const { return m_cStructure->iHeight; } | ||
| 198 | |||
| 199 | /// @brief Width of the stream reported by the demuxer. | ||
| 200 | void SetWidth(int width) { m_cStructure->iWidth = width; } | ||
| 201 | |||
| 202 | /// @brief To get with @ref SetWidth() changed values. | ||
| 203 | int GetWidth() const { return m_cStructure->iWidth; } | ||
| 204 | |||
| 205 | /// @brief Display aspect ratio of the stream. | ||
| 206 | void SetAspect(float aspect) { m_cStructure->fAspect = aspect; } | ||
| 207 | |||
| 208 | /// @brief To get with @ref SetAspect() changed values. | ||
| 209 | float GetAspect() const { return m_cStructure->fAspect; } | ||
| 210 | |||
| 211 | /// @brief Amount of channels. | ||
| 212 | void SetChannels(int channels) { m_cStructure->iChannels = channels; } | ||
| 213 | |||
| 214 | /// @brief To get with @ref SetChannels() changed values. | ||
| 215 | int GetChannels() const { return m_cStructure->iChannels; } | ||
| 216 | |||
| 217 | /// @brief Sample rate. | ||
| 218 | void SetSampleRate(int sampleRate) { m_cStructure->iSampleRate = sampleRate; } | ||
| 219 | |||
| 220 | /// @brief To get with @ref SetSampleRate() changed values. | ||
| 221 | int GetSampleRate() const { return m_cStructure->iSampleRate; } | ||
| 222 | |||
| 223 | /// @brief Block alignment | ||
| 224 | void SetBlockAlign(int blockAlign) { m_cStructure->iBlockAlign = blockAlign; } | ||
| 225 | |||
| 226 | /// @brief To get with @ref SetBlockAlign() changed values. | ||
| 227 | int GetBlockAlign() const { return m_cStructure->iBlockAlign; } | ||
| 228 | |||
| 229 | /// @brief Bit rate. | ||
| 230 | void SetBitRate(int bitRate) { m_cStructure->iBitRate = bitRate; } | ||
| 231 | |||
| 232 | /// @brief To get with @ref SetBitRate() changed values. | ||
| 233 | int GetBitRate() const { return m_cStructure->iBitRate; } | ||
| 234 | |||
| 235 | /// @brief Bits per sample. | ||
| 236 | void SetBitsPerSample(int bitsPerSample) { m_cStructure->iBitsPerSample = bitsPerSample; } | ||
| 237 | |||
| 238 | /// @brief To get with @ref SetBitsPerSample() changed values. | ||
| 239 | int GetBitsPerSample() const { return m_cStructure->iBitsPerSample; } | ||
| 240 | ///@} | ||
| 241 | |||
| 242 | private: | ||
| 243 | PVRStreamProperties(const PVR_STREAM_PROPERTIES::PVR_STREAM* type) : CStructHdl(type) {} | ||
| 244 | PVRStreamProperties(PVR_STREAM_PROPERTIES::PVR_STREAM* type) : CStructHdl(type) {} | ||
| 245 | }; | ||
| 246 | ///@} | ||
| 247 | //------------------------------------------------------------------------------ | ||
| 248 | |||
| 249 | //============================================================================== | ||
| 250 | /// @defgroup cpp_kodi_addon_pvr_Defs_Stream_PVRStreamTimes class PVRStreamTimes | ||
| 251 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream | ||
| 252 | /// @brief **Times of playing stream (Live TV and recordings)**\n | ||
| 253 | /// This class is used to transfer the necessary data when | ||
| 254 | /// @ref kodi::addon::PVRStreamProperties::GetStreamTimes is called. | ||
| 255 | /// | ||
| 256 | /// ---------------------------------------------------------------------------- | ||
| 257 | /// | ||
| 258 | /// @copydetails cpp_kodi_addon_pvr_Defs_Stream_PVRStreamTimes_Help | ||
| 259 | /// | ||
| 260 | ///@{ | ||
| 261 | class PVRStreamTimes : public CStructHdl<PVRStreamTimes, PVR_STREAM_TIMES> | ||
| 262 | { | ||
| 263 | friend class CInstancePVRClient; | ||
| 264 | |||
| 265 | public: | ||
| 266 | /*! \cond PRIVATE */ | ||
| 267 | PVRStreamTimes() { memset(m_cStructure, 0, sizeof(PVR_STREAM_TIMES)); } | ||
| 268 | PVRStreamTimes(const PVRStreamTimes& type) : CStructHdl(type) {} | ||
| 269 | /*! \endcond */ | ||
| 270 | |||
| 271 | /// @defgroup cpp_kodi_addon_pvr_Defs_Stream_PVRStreamTimes_Help Value Help | ||
| 272 | /// @ingroup cpp_kodi_addon_pvr_Defs_Stream_PVRStreamTimes | ||
| 273 | /// ---------------------------------------------------------------------------- | ||
| 274 | /// | ||
| 275 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_Stream_PVRStreamTimes :</b> | ||
| 276 | /// | Name | Type | Set call | Get call | ||
| 277 | /// |------|------|----------|---------- | ||
| 278 | /// | **Start time** | `time_t` | @ref PVRStreamTimes::SetStartTime "SetStartTime" | @ref PVRStreamTimes::GetStartTime "GetStartTime" | ||
| 279 | /// | **PTS start** | `int64_t` | @ref PVRStreamTimes::SetPTSStart "SetPTSStart" | @ref PVRStreamTimes::GetPTSStart "GetPTSStart" | ||
| 280 | /// | **PTS begin** | `int64_t` | @ref PVRStreamTimes::SetPTSBegin "SetPTSBegin" | @ref PVRStreamTimes::GetPTSBegin "GetPTSBegin" | ||
| 281 | /// | **PTS end** | `int64_t` | @ref PVRStreamTimes::SetPTSEnd "SetPTSEnd" | @ref PVRStreamTimes::GetPTSEnd "GetPTSEnd" | ||
| 282 | /// | ||
| 283 | |||
| 284 | /// @addtogroup cpp_kodi_addon_pvr_Defs_Stream_PVRStreamTimes | ||
| 285 | ///@{ | ||
| 286 | |||
| 287 | /// @brief For recordings, this must be zero. For Live TV, this is a reference | ||
| 288 | /// time in units of time_t (UTC) from which time elapsed starts. Ideally start | ||
| 289 | /// of tv show, but can be any other value. | ||
| 290 | void SetStartTime(time_t startTime) { m_cStructure->startTime = startTime; } | ||
| 291 | |||
| 292 | /// @brief To get with @ref SetStartTime() changed values. | ||
| 293 | time_t GetStartTime() const { return m_cStructure->startTime; } | ||
| 294 | |||
| 295 | /// @brief The pts of startTime. | ||
| 296 | void SetPTSStart(int64_t ptsStart) { m_cStructure->ptsStart = ptsStart; } | ||
| 297 | |||
| 298 | /// @brief To get with @ref SetPTSStart() changed values. | ||
| 299 | int64_t GetPTSStart() const { return m_cStructure->ptsStart; } | ||
| 300 | |||
| 301 | /// @brief Earliest pts player can seek back. Value is in micro seconds, | ||
| 302 | /// relative to PTS start. For recordings, this must be zero. For Live TV, this | ||
| 303 | /// must be zero if not timeshifting and must point to begin of the timeshift | ||
| 304 | /// buffer, otherwise. | ||
| 305 | void SetPTSBegin(int64_t ptsBegin) { m_cStructure->ptsBegin = ptsBegin; } | ||
| 306 | |||
| 307 | /// @brief To get with @ref SetPTSBegin() changed values. | ||
| 308 | int64_t GetPTSBegin() const { return m_cStructure->ptsBegin; } | ||
| 309 | |||
| 310 | /// @brief Latest pts player can seek forward. Value is in micro seconds, | ||
| 311 | /// relative to PTS start. For recordings, this must be the total length. For | ||
| 312 | /// Live TV, this must be zero if not timeshifting and must point to end of | ||
| 313 | /// the timeshift buffer, otherwise. | ||
| 314 | void SetPTSEnd(int64_t ptsEnd) { m_cStructure->ptsEnd = ptsEnd; } | ||
| 315 | |||
| 316 | /// @brief To get with @ref SetPTSEnd() changed values. | ||
| 317 | int64_t GetPTSEnd() const { return m_cStructure->ptsEnd; } | ||
| 318 | ///@} | ||
| 319 | |||
| 320 | private: | ||
| 321 | PVRStreamTimes(const PVR_STREAM_TIMES* type) : CStructHdl(type) {} | ||
| 322 | PVRStreamTimes(PVR_STREAM_TIMES* type) : CStructHdl(type) {} | ||
| 323 | }; | ||
| 324 | ///@} | ||
| 325 | //------------------------------------------------------------------------------ | ||
| 326 | |||
| 327 | } /* namespace addon */ | ||
| 328 | } /* namespace kodi */ | ||
| 329 | |||
| 330 | #endif /* __cplusplus */ | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/Timers.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/Timers.h deleted file mode 100644 index 6e05e55..0000000 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/pvr/Timers.h +++ /dev/null | |||
| @@ -1,896 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2018 Team Kodi | ||
| 3 | * This file is part of Kodi - https://kodi.tv | ||
| 4 | * | ||
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #pragma once | ||
| 10 | |||
| 11 | #include "General.h" | ||
| 12 | #include "../../AddonBase.h" | ||
| 13 | #include "../../c-api/addon-instance/pvr.h" | ||
| 14 | |||
| 15 | //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ | ||
| 16 | // "C++" Definitions group 6 - PVR timers | ||
| 17 | #ifdef __cplusplus | ||
| 18 | |||
| 19 | namespace kodi | ||
| 20 | { | ||
| 21 | namespace addon | ||
| 22 | { | ||
| 23 | |||
| 24 | //============================================================================== | ||
| 25 | /// @defgroup cpp_kodi_addon_pvr_Defs_Timer_PVRTimer class PVRTimer | ||
| 26 | /// @ingroup cpp_kodi_addon_pvr_Defs_Timer | ||
| 27 | /// @brief **PVR add-on timer type**\n | ||
| 28 | /// Representation of a timer event. | ||
| 29 | /// | ||
| 30 | /// The related values here are automatically initiated to defaults and need | ||
| 31 | /// only be set if supported and used. | ||
| 32 | /// | ||
| 33 | /// ---------------------------------------------------------------------------- | ||
| 34 | /// | ||
| 35 | /// @copydetails cpp_kodi_addon_pvr_Defs_Timer_PVRTimer_Help | ||
| 36 | /// | ||
| 37 | ///@{ | ||
| 38 | class PVRTimer : public CStructHdl<PVRTimer, PVR_TIMER> | ||
| 39 | { | ||
| 40 | friend class CInstancePVRClient; | ||
| 41 | |||
| 42 | public: | ||
| 43 | /*! \cond PRIVATE */ | ||
| 44 | PVRTimer() | ||
| 45 | { | ||
| 46 | m_cStructure->iClientIndex = 0; | ||
| 47 | m_cStructure->state = PVR_TIMER_STATE_NEW; | ||
| 48 | m_cStructure->iTimerType = PVR_TIMER_TYPE_NONE; | ||
| 49 | m_cStructure->iParentClientIndex = 0; | ||
| 50 | m_cStructure->iClientChannelUid = PVR_TIMER_VALUE_NOT_AVAILABLE; | ||
| 51 | m_cStructure->startTime = 0; | ||
| 52 | m_cStructure->endTime = 0; | ||
| 53 | m_cStructure->bStartAnyTime = false; | ||
| 54 | m_cStructure->bEndAnyTime = false; | ||
| 55 | m_cStructure->bFullTextEpgSearch = false; | ||
| 56 | m_cStructure->iPriority = PVR_TIMER_VALUE_NOT_AVAILABLE; | ||
| 57 | m_cStructure->iLifetime = PVR_TIMER_VALUE_NOT_AVAILABLE; | ||
| 58 | m_cStructure->iMaxRecordings = PVR_TIMER_VALUE_NOT_AVAILABLE; | ||
| 59 | m_cStructure->iRecordingGroup = 0; | ||
| 60 | m_cStructure->firstDay = 0; | ||
| 61 | m_cStructure->iWeekdays = PVR_WEEKDAY_NONE; | ||
| 62 | m_cStructure->iPreventDuplicateEpisodes = 0; | ||
| 63 | m_cStructure->iEpgUid = 0; | ||
| 64 | m_cStructure->iMarginStart = 0; | ||
| 65 | m_cStructure->iMarginEnd = 0; | ||
| 66 | m_cStructure->iGenreType = PVR_TIMER_VALUE_NOT_AVAILABLE; | ||
| 67 | m_cStructure->iGenreSubType = PVR_TIMER_VALUE_NOT_AVAILABLE; | ||
| 68 | } | ||
| 69 | PVRTimer(const PVRTimer& data) : CStructHdl(data) {} | ||
| 70 | /*! \endcond */ | ||
| 71 | |||
| 72 | /// @defgroup cpp_kodi_addon_pvr_Defs_Timer_PVRTimer_Help Value Help | ||
| 73 | /// @ingroup cpp_kodi_addon_pvr_Defs_Timer_PVRTimer | ||
| 74 | /// | ||
| 75 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_Timer_PVRTimer :</b> | ||
| 76 | /// | Name | Type | Set call | Get call | Usage | ||
| 77 | /// |------|------|----------|----------|----------- | ||
| 78 | /// | **Client index** | `unsigned int` | @ref PVRTimer::SetClientIndex "SetClientIndex" | @ref PVRTimer::GetClientIndex "GetClientIndex" | *required to set* | ||
| 79 | /// | **State** | @ref PVR_TIMER_STATE | @ref PVRTimer::SetState "SetState" | @ref PVRTimer::GetState "GetState" | *required to set* | ||
| 80 | /// | **Type** | `unsigned int` | @ref PVRTimer::SetTimerType "SetTimerType" | @ref PVRTimer::GetTimerType "GetTimerType" | *required to set* | ||
| 81 | /// | **Title** | `std::string` | @ref PVRTimer::SetTitle "SetTitle" | @ref PVRTimer::GetTitle "GetTitle" | *required to set* | ||
| 82 | /// | **Parent client index** | `unsigned int` | @ref PVRTimer::SetParentClientIndex "SetParentClientIndex" | @ref PVRTimer::GetParentClientIndex "GetParentClientIndex" | *optional* | ||
| 83 | /// | **Client channel unique identifier** | `int` | @ref PVRTimer::SetClientChannelUid "SetClientChannelUid" | @ref PVRTimer::GetClientChannelUid "GetClientChannelUid" | *optional* | ||
| 84 | /// | **Start time** | `time_t` | @ref PVRTimer::SetStartTime "SetStartTime" | @ref PVRTimer::GetStartTime "GetStartTime" | *optional* | ||
| 85 | /// | **End time** | `time_t` | @ref PVRTimer::SetEndTime "SetEndTime" | @ref PVRTimer::GetEndTime "GetEndTime" | *optional* | ||
| 86 | /// | **Start any time** | `bool` | @ref PVRTimer::SetStartAnyTime "SetStartAnyTime" | @ref PVRTimer::GetStartAnyTime "GetStartAnyTime" | *optional* | ||
| 87 | /// | **End any time** | `bool` | @ref PVRTimer::SetEndAnyTime "SetEndAnyTime" | @ref PVRTimer::GetEndAnyTime "GetEndAnyTime" | *optional* | ||
| 88 | /// | **EPG search string** | `std::string` | @ref PVRTimer::SetEPGSearchString "SetEPGSearchString" | @ref PVRTimer::GetEPGSearchString "GetEPGSearchString" | *optional* | ||
| 89 | /// | **Full text EPG search** | `bool` | @ref PVRTimer::SetFullTextEpgSearch "SetFullTextEpgSearch" | @ref PVRTimer::GetFullTextEpgSearch "GetFullTextEpgSearch" | *optional* | ||
| 90 | /// | **Recording store directory** | `std::string` | @ref PVRTimer::SetDirectory "SetDirectory" | @ref PVRTimer::GetDirectory "GetDirectory" | *optional* | ||
| 91 | /// | **Timer priority** | `int` | @ref PVRTimer::SetPriority "SetPriority" | @ref PVRTimer::GetPriority "GetPriority" | *optional* | ||
| 92 | /// | **Timer lifetime** | `int` | @ref PVRTimer::SetLifetime "SetLifetime" | @ref PVRTimer::GetLifetime "GetLifetime" | *optional* | ||
| 93 | /// | **Max recordings** | `int` | @ref PVRTimer::SetMaxRecordings "SetMaxRecordings" | @ref PVRTimer::GetMaxRecordings "GetMaxRecordings" | *optional* | ||
| 94 | /// | **Recording group** | `unsigned int` | @ref PVRTimer::SetRecordingGroup "SetRecordingGroup" | @ref PVRTimer::GetRecordingGroup "GetRecordingGroup" | *optional* | ||
| 95 | /// | **First start day** | `time_t` | @ref PVRTimer::SetFirstDay "SetFirstDay" | @ref PVRTimer::GetFirstDay "GetFirstDay" | *optional* | ||
| 96 | /// | **Used timer weekdays** | `unsigned int` | @ref PVRTimer::SetWeekdays "SetWeekdays" | @ref PVRTimer::GetWeekdays "GetWeekdays" | *optional* | ||
| 97 | /// | **Prevent duplicate episodes** | `unsigned int` | @ref PVRTimer::SetPreventDuplicateEpisodes "SetPreventDuplicateEpisodes" | @ref PVRTimer::GetPreventDuplicateEpisodes "GetPreventDuplicateEpisodes" | *optional* | ||
| 98 | /// | **EPG unique identifier** | `unsigned int` | @ref PVRTimer::SetEPGUid "SetEPGUid" | @ref PVRTimer::GetEPGUid "GetEPGUid" | *optional* | ||
| 99 | /// | **Margin start** | `unsigned int` | @ref PVRTimer::SetMarginStart "SetMarginStart" | @ref PVRTimer::GetMarginStart "GetMarginStart" | *optional* | ||
| 100 | /// | **Margin end** | `unsigned int` | @ref PVRTimer::SetMarginEnd "SetMarginEnd" | @ref PVRTimer::GetMarginEnd "GetMarginEnd" | *optional* | ||
| 101 | /// | **Genre type** | `int` | @ref PVRTimer::SetGenreType "SetGenreType" | @ref PVRTimer::GetGenreType "GetGenreType" | *optional* | ||
| 102 | /// | **Genre sub type** | `int` | @ref PVRTimer::SetGenreSubType "SetGenreSubType" | @ref PVRTimer::GetGenreSubType "GetGenreSubType" | *optional* | ||
| 103 | /// | **Series link** | `std::string` | @ref PVRTimer::SetSeriesLink "SetSeriesLink" | @ref PVRTimer::GetSeriesLink "GetSeriesLink" | *optional* | ||
| 104 | |||
| 105 | /// @addtogroup cpp_kodi_addon_pvr_Defs_Timer_PVRTimer | ||
| 106 | ///@{ | ||
| 107 | |||
| 108 | /// @brief **required**\n | ||
| 109 | /// The index of this timer given by the client. | ||
| 110 | /// | ||
| 111 | /// @ref PVR_TIMER_NO_CLIENT_INDEX indicates that the index was not yet set | ||
| 112 | /// by the client, for example for new timers created by Kodi and passed the | ||
| 113 | /// first time to the client. A valid index must be greater than | ||
| 114 | /// @ref PVR_TIMER_NO_CLIENT_INDEX. | ||
| 115 | /// | ||
| 116 | void SetClientIndex(unsigned int clientIndex) { m_cStructure->iClientIndex = clientIndex; } | ||
| 117 | |||
| 118 | /// @brief To get with @ref SetClientIndex changed values. | ||
| 119 | unsigned int GetClientIndex() const { return m_cStructure->iClientIndex; } | ||
| 120 | |||
| 121 | /// @brief **required**\n | ||
| 122 | /// The state of this timer. | ||
| 123 | /// | ||
| 124 | /// @note @ref PVR_TIMER_STATE_NEW is default. | ||
| 125 | /// | ||
| 126 | /// | ||
| 127 | /// -------------------------------------------------------------------------- | ||
| 128 | /// | ||
| 129 | /// **Example:** | ||
| 130 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 131 | /// kodi::addon::PVRTimer tag; | ||
| 132 | /// tag.SetState(PVR_TIMER_STATE_RECORDING); | ||
| 133 | /// ~~~~~~~~~~~~~ | ||
| 134 | /// | ||
| 135 | void SetState(PVR_TIMER_STATE state) { m_cStructure->state = state; } | ||
| 136 | |||
| 137 | /// @brief To get with @ref SetState changed values. | ||
| 138 | PVR_TIMER_STATE GetState() const { return m_cStructure->state; } | ||
| 139 | |||
| 140 | /// @brief **required**\n | ||
| 141 | /// The type of this timer. | ||
| 142 | /// | ||
| 143 | /// It is private to the addon and can be freely defined by the addon. | ||
| 144 | /// The value must be greater than @ref PVR_TIMER_TYPE_NONE. | ||
| 145 | /// | ||
| 146 | /// Kodi does not interpret this value (except for checking for @ref PVR_TIMER_TYPE_NONE), | ||
| 147 | /// but will pass the right id to the addon with every @ref PVRTimer instance, | ||
| 148 | /// thus the addon easily can determine the timer type. | ||
| 149 | /// | ||
| 150 | /// @note @ref PVR_TIMER_TYPE_NONE is default. | ||
| 151 | /// | ||
| 152 | /// | ||
| 153 | /// -------------------------------------------------------------------------- | ||
| 154 | /// | ||
| 155 | /// **Example:** | ||
| 156 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 157 | /// kodi::addon::PVRTimer tag; | ||
| 158 | /// tag.SetTimerType(123); | ||
| 159 | /// ~~~~~~~~~~~~~ | ||
| 160 | /// | ||
| 161 | void SetTimerType(unsigned int timerType) { m_cStructure->iTimerType = timerType; } | ||
| 162 | |||
| 163 | /// @brief To get with @ref SetTimerType changed values. | ||
| 164 | unsigned int GetTimerType() const { return m_cStructure->iTimerType; } | ||
| 165 | |||
| 166 | /// @brief **required**\n | ||
| 167 | /// A title for this timer. | ||
| 168 | void SetTitle(const std::string& title) | ||
| 169 | { | ||
| 170 | strncpy(m_cStructure->strTitle, title.c_str(), sizeof(m_cStructure->strTitle) - 1); | ||
| 171 | } | ||
| 172 | |||
| 173 | /// @brief To get with @ref SetTitle changed values. | ||
| 174 | std::string GetTitle() const { return m_cStructure->strTitle; } | ||
| 175 | |||
| 176 | /// @brief **optional**\n | ||
| 177 | /// For timers scheduled by a repeating timer. | ||
| 178 | /// | ||
| 179 | /// The index of the repeating timer that scheduled this timer (it's | ||
| 180 | /// @ref clientIndex value). Use @ref PVR_TIMER_NO_PARENT to indicate that | ||
| 181 | /// this timer was no scheduled by a repeating timer. | ||
| 182 | void SetParentClientIndex(unsigned int parentClientIndex) | ||
| 183 | { | ||
| 184 | m_cStructure->iParentClientIndex = parentClientIndex; | ||
| 185 | } | ||
| 186 | |||
| 187 | /// @brief To get with @ref SetParentClientIndex changed values. | ||
| 188 | unsigned int GetParentClientIndex() const { return m_cStructure->iParentClientIndex; } | ||
| 189 | |||
| 190 | /// @brief **optional**\n | ||
| 191 | /// Unique identifier of the channel to record on. | ||
| 192 | /// | ||
| 193 | /// @ref PVR_TIMER_ANY_CHANNEL will denote "any channel", not a specific one. | ||
| 194 | /// @ref PVR_CHANNEL_INVALID_UID denotes that channel uid is not available. | ||
| 195 | void SetClientChannelUid(int clientChannelUid) | ||
| 196 | { | ||
| 197 | m_cStructure->iClientChannelUid = clientChannelUid; | ||
| 198 | } | ||
| 199 | |||
| 200 | /// @brief To get with @ref SetClientChannelUid changed values | ||
| 201 | int GetClientChannelUid() const { return m_cStructure->iClientChannelUid; } | ||
| 202 | |||
| 203 | /// @brief **optional**\n | ||
| 204 | /// Start time of the recording in UTC. | ||
| 205 | /// | ||
| 206 | /// Instant timers that are sent to the add-on by Kodi will have this value | ||
| 207 | /// set to 0. | ||
| 208 | void SetStartTime(time_t startTime) { m_cStructure->startTime = startTime; } | ||
| 209 | |||
| 210 | /// @brief To get with @ref SetStartTime changed values. | ||
| 211 | time_t GetStartTime() const { return m_cStructure->startTime; } | ||
| 212 | |||
| 213 | /// @brief **optional**\n | ||
| 214 | /// End time of the recording in UTC. | ||
| 215 | void SetEndTime(time_t endTime) { m_cStructure->endTime = endTime; } | ||
| 216 | |||
| 217 | /// @brief To get with @ref SetEndTime changed values. | ||
| 218 | time_t GetEndTime() const { return m_cStructure->endTime; } | ||
| 219 | |||
| 220 | /// @brief **optional**\n | ||
| 221 | /// For EPG based (not Manual) timers indicates startTime does not apply. | ||
| 222 | /// | ||
| 223 | /// Default = false. | ||
| 224 | void SetStartAnyTime(bool startAnyTime) { m_cStructure->bStartAnyTime = startAnyTime; } | ||
| 225 | |||
| 226 | /// @brief To get with @ref SetStartAnyTime changed values. | ||
| 227 | bool GetStartAnyTime() const { return m_cStructure->bStartAnyTime; } | ||
| 228 | |||
| 229 | /// @brief **optional**\n | ||
| 230 | /// For EPG based (not Manual) timers indicates endTime does not apply. | ||
| 231 | /// | ||
| 232 | /// Default = false | ||
| 233 | void SetEndAnyTime(bool endAnyTime) { m_cStructure->bEndAnyTime = endAnyTime; } | ||
| 234 | |||
| 235 | /// @brief To get with @ref SetEndAnyTime changed values. | ||
| 236 | bool GetEndAnyTime() const { return m_cStructure->bEndAnyTime; } | ||
| 237 | |||
| 238 | /// @brief **optional**\n | ||
| 239 | /// A string used to search epg data for repeating epg-based timers. | ||
| 240 | /// | ||
| 241 | /// Format is backend-dependent, for example regexp. | ||
| 242 | void SetEPGSearchString(const std::string& epgSearchString) | ||
| 243 | { | ||
| 244 | strncpy(m_cStructure->strEpgSearchString, epgSearchString.c_str(), | ||
| 245 | sizeof(m_cStructure->strEpgSearchString) - 1); | ||
| 246 | } | ||
| 247 | |||
| 248 | /// @brief To get with @ref SetEPGSearchString changed values | ||
| 249 | std::string GetEPGSearchString() const { return m_cStructure->strEpgSearchString; } | ||
| 250 | |||
| 251 | /// @brief **optional**\n | ||
| 252 | /// Indicates, whether @ref SetEPGSearchString() is to match against the epg | ||
| 253 | /// episode title only or also against "other" epg data (backend-dependent). | ||
| 254 | void SetFullTextEpgSearch(bool fullTextEpgSearch) | ||
| 255 | { | ||
| 256 | m_cStructure->bFullTextEpgSearch = fullTextEpgSearch; | ||
| 257 | } | ||
| 258 | |||
| 259 | /// @brief To get with @ref SetFullTextEpgSearch changed values. | ||
| 260 | bool GetFullTextEpgSearch() const { return m_cStructure->bFullTextEpgSearch; } | ||
| 261 | |||
| 262 | /// @brief **optional**\n | ||
| 263 | /// The (relative) directory where the recording will be stored in. | ||
| 264 | void SetDirectory(const std::string& directory) | ||
| 265 | { | ||
| 266 | strncpy(m_cStructure->strDirectory, directory.c_str(), sizeof(m_cStructure->strDirectory) - 1); | ||
| 267 | } | ||
| 268 | |||
| 269 | /// @brief To get with @ref SetDirectory changed values. | ||
| 270 | std::string GetDirectory() const { return m_cStructure->strDirectory; } | ||
| 271 | |||
| 272 | /// @brief **optional**\n | ||
| 273 | /// The summary for this timer. | ||
| 274 | void SetSummary(const std::string& summary) | ||
| 275 | { | ||
| 276 | strncpy(m_cStructure->strSummary, summary.c_str(), sizeof(m_cStructure->strSummary) - 1); | ||
| 277 | } | ||
| 278 | |||
| 279 | /// @brief To get with @ref SetDirectory changed values. | ||
| 280 | std::string GetSummary() const { return m_cStructure->strSummary; } | ||
| 281 | |||
| 282 | /// @brief **optional**\n | ||
| 283 | /// The priority of this timer. | ||
| 284 | void SetPriority(int priority) { m_cStructure->iPriority = priority; } | ||
| 285 | |||
| 286 | /// @brief To get with @ref SetPriority changed values. | ||
| 287 | int GetPriority() const { return m_cStructure->iPriority; } | ||
| 288 | |||
| 289 | /// @brief **optional**\n | ||
| 290 | /// Lifetime of recordings created by this timer. | ||
| 291 | /// | ||
| 292 | /// Value > 0 days after which recordings will be deleted by the backend, < 0 | ||
| 293 | /// addon defined integer list reference, == 0 disabled. | ||
| 294 | void SetLifetime(int priority) { m_cStructure->iLifetime = priority; } | ||
| 295 | |||
| 296 | /// @brief To get with @ref SetLifetime changed values. | ||
| 297 | int GetLifetime() const { return m_cStructure->iLifetime; } | ||
| 298 | |||
| 299 | /// @brief **optional**\n | ||
| 300 | /// Maximum number of recordings this timer shall create. | ||
| 301 | /// | ||
| 302 | /// Value > 0 number of recordings, < 0 addon defined integer list reference, == 0 disabled. | ||
| 303 | void SetMaxRecordings(int maxRecordings) { m_cStructure->iMaxRecordings = maxRecordings; } | ||
| 304 | |||
| 305 | /// @brief To get with @ref SetMaxRecordings changed values. | ||
| 306 | int GetMaxRecordings() const { return m_cStructure->iMaxRecordings; } | ||
| 307 | |||
| 308 | /// @brief **optional**\n | ||
| 309 | /// Integer ref to addon/backend defined list of recording groups. | ||
| 310 | void SetRecordingGroup(unsigned int recordingGroup) | ||
| 311 | { | ||
| 312 | m_cStructure->iRecordingGroup = recordingGroup; | ||
| 313 | } | ||
| 314 | |||
| 315 | /// @brief To get with @ref SetRecordingGroup changed values. | ||
| 316 | unsigned int GetRecordingGroup() const { return m_cStructure->iRecordingGroup; } | ||
| 317 | |||
| 318 | /// @brief **optional**\n | ||
| 319 | /// The first day this timer is active, for repeating timers. | ||
| 320 | void SetFirstDay(time_t firstDay) { m_cStructure->firstDay = firstDay; } | ||
| 321 | |||
| 322 | /// @brief To get with @ref SetFirstDay changed values. | ||
| 323 | time_t GetFirstDay() const { return m_cStructure->firstDay; } | ||
| 324 | |||
| 325 | /// @brief **optional**\n | ||
| 326 | /// Week days, for repeating timers (see | ||
| 327 | /// @ref cpp_kodi_addon_pvr_Defs_Timer_PVR_WEEKDAY "PVR_WEEKDAY_*" constant values) | ||
| 328 | /// | ||
| 329 | /// @note @ref PVR_WEEKDAY_NONE is default. | ||
| 330 | /// | ||
| 331 | /// | ||
| 332 | /// -------------------------------------------------------------------------- | ||
| 333 | /// | ||
| 334 | /// **Example:** | ||
| 335 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 336 | /// ... | ||
| 337 | /// kodi::addon::PVRTimer tag; | ||
| 338 | /// tag.SetWeekdays(PVR_WEEKDAY_MONDAY | PVR_WEEKDAY_SATURDAY); | ||
| 339 | /// ... | ||
| 340 | /// ~~~~~~~~~~~~~ | ||
| 341 | void SetWeekdays(unsigned int weekdays) { m_cStructure->iWeekdays = weekdays; } | ||
| 342 | |||
| 343 | /// @brief To get with @ref SetFirstDay changed values. | ||
| 344 | unsigned int GetWeekdays() const { return m_cStructure->iWeekdays; } | ||
| 345 | |||
| 346 | /// @brief **optional**\n | ||
| 347 | /// Prevent duplicate episodes. | ||
| 348 | /// | ||
| 349 | /// Should 1 if backend should only record new episodes in case of a repeating | ||
| 350 | /// epg-based timer, 0 if all episodes shall be recorded (no duplicate detection). | ||
| 351 | /// | ||
| 352 | /// Actual algorithm for duplicate detection is defined by the backend. | ||
| 353 | /// Addons may define own values for different duplicate detection | ||
| 354 | /// algorithms, thus this is not just a bool. | ||
| 355 | void SetPreventDuplicateEpisodes(unsigned int preventDuplicateEpisodes) | ||
| 356 | { | ||
| 357 | m_cStructure->iPreventDuplicateEpisodes = preventDuplicateEpisodes; | ||
| 358 | } | ||
| 359 | |||
| 360 | /// @brief To get with @ref SetPreventDuplicateEpisodes changed values. | ||
| 361 | unsigned int GetPreventDuplicateEpisodes() const | ||
| 362 | { | ||
| 363 | return m_cStructure->iPreventDuplicateEpisodes; | ||
| 364 | } | ||
| 365 | |||
| 366 | /// @brief **optional**\n | ||
| 367 | /// EPG event id associated with this timer. Event ids must be unique for a | ||
| 368 | /// channel. | ||
| 369 | /// | ||
| 370 | /// Valid ids must be greater than @ref EPG_TAG_INVALID_UID. | ||
| 371 | void SetEPGUid(unsigned int epgUid) { m_cStructure->iEpgUid = epgUid; } | ||
| 372 | |||
| 373 | /// @brief To get with @ref SetEPGUid changed values. | ||
| 374 | unsigned int GetEPGUid() const { return m_cStructure->iEpgUid; } | ||
| 375 | |||
| 376 | /// @brief **optional**\n | ||
| 377 | /// If set, the backend starts the recording selected minutes before | ||
| 378 | /// @ref SetStartTime. | ||
| 379 | void SetMarginStart(unsigned int marginStart) { m_cStructure->iMarginStart = marginStart; } | ||
| 380 | |||
| 381 | /// @brief To get with @ref SetMarginStart changed values. | ||
| 382 | unsigned int GetMarginStart() const { return m_cStructure->iMarginStart; } | ||
| 383 | |||
| 384 | /// @brief **optional**\n | ||
| 385 | /// If set, the backend ends the recording selected minutes after | ||
| 386 | /// @ref SetEndTime. | ||
| 387 | void SetMarginEnd(unsigned int marginEnd) { m_cStructure->iMarginEnd = marginEnd; } | ||
| 388 | |||
| 389 | /// @brief To get with @ref SetMarginEnd changed values. | ||
| 390 | unsigned int GetMarginEnd() const { return m_cStructure->iMarginEnd; } | ||
| 391 | |||
| 392 | /// @brief **optional**\n | ||
| 393 | /// Genre type. | ||
| 394 | /// | ||
| 395 | /// @copydetails EPG_EVENT_CONTENTMASK | ||
| 396 | /// | ||
| 397 | /// -------------------------------------------------------------------------- | ||
| 398 | /// | ||
| 399 | /// **Example:** | ||
| 400 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 401 | /// ... | ||
| 402 | /// kodi::addon::PVRTimer tag; | ||
| 403 | /// tag.SetGenreType(EPG_EVENT_CONTENTMASK_MOVIEDRAMA); | ||
| 404 | /// ... | ||
| 405 | /// ~~~~~~~~~~~~~ | ||
| 406 | /// | ||
| 407 | /// @note If confirmed that backend brings the types in [ETSI EN 300 468](https://www.etsi.org/deliver/etsi_en/300400_300499/300468/01.14.01_60/en_300468v011401p.pdf) | ||
| 408 | /// conform values, can be @ref EPG_EVENT_CONTENTMASK ignored and to set here | ||
| 409 | /// with backend value. | ||
| 410 | /// | ||
| 411 | void SetGenreType(int genreType) { m_cStructure->iGenreType = genreType; } | ||
| 412 | |||
| 413 | /// @brief To get with @ref SetGenreType changed values. | ||
| 414 | int GetGenreType() const { return m_cStructure->iGenreType; } | ||
| 415 | |||
| 416 | /// @brief **optional**\n | ||
| 417 | /// Genre sub type. | ||
| 418 | /// | ||
| 419 | /// @copydetails EPG_EVENT_CONTENTMASK | ||
| 420 | /// | ||
| 421 | /// Subtypes groups related to set by @ref SetGenreType: | ||
| 422 | /// | Main genre type | List with available sub genre types | ||
| 423 | /// |-----------------|----------------------------------------- | ||
| 424 | /// | @ref EPG_EVENT_CONTENTMASK_UNDEFINED | Nothing, should be 0 | ||
| 425 | /// | @ref EPG_EVENT_CONTENTMASK_MOVIEDRAMA | @ref EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA | ||
| 426 | /// | @ref EPG_EVENT_CONTENTMASK_NEWSCURRENTAFFAIRS | @ref EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS | ||
| 427 | /// | @ref EPG_EVENT_CONTENTMASK_SHOW | @ref EPG_EVENT_CONTENTSUBMASK_SHOW | ||
| 428 | /// | @ref EPG_EVENT_CONTENTMASK_SPORTS | @ref EPG_EVENT_CONTENTSUBMASK_SPORTS | ||
| 429 | /// | @ref EPG_EVENT_CONTENTMASK_CHILDRENYOUTH | @ref EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH | ||
| 430 | /// | @ref EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE | @ref EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE | ||
| 431 | /// | @ref EPG_EVENT_CONTENTMASK_ARTSCULTURE | @ref EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE | ||
| 432 | /// | @ref EPG_EVENT_CONTENTMASK_SOCIALPOLITICALECONOMICS | @ref EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS | ||
| 433 | /// | @ref EPG_EVENT_CONTENTMASK_EDUCATIONALSCIENCE | @ref EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE | ||
| 434 | /// | @ref EPG_EVENT_CONTENTMASK_LEISUREHOBBIES | @ref EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES | ||
| 435 | /// | @ref EPG_EVENT_CONTENTMASK_SPECIAL | @ref EPG_EVENT_CONTENTSUBMASK_SPECIAL | ||
| 436 | /// | @ref EPG_EVENT_CONTENTMASK_USERDEFINED | Can be defined by you | ||
| 437 | /// | ||
| 438 | /// -------------------------------------------------------------------------- | ||
| 439 | /// | ||
| 440 | /// **Example:** | ||
| 441 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 442 | /// ... | ||
| 443 | /// kodi::addon::PVRTimer tag; | ||
| 444 | /// tag.SetGenreType(EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE); | ||
| 445 | /// tag.SetGenreSubType(EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_JAZZ); | ||
| 446 | /// ... | ||
| 447 | /// ~~~~~~~~~~~~~ | ||
| 448 | /// | ||
| 449 | void SetGenreSubType(int genreSubType) { m_cStructure->iGenreSubType = genreSubType; } | ||
| 450 | |||
| 451 | /// @brief To get with @ref SetGenreType changed values. | ||
| 452 | int GetGenreSubType() const { return m_cStructure->iGenreSubType; } | ||
| 453 | |||
| 454 | /// @brief **optional**\n | ||
| 455 | /// Series link for this timer. | ||
| 456 | /// | ||
| 457 | /// If set for an epg-based timer rule, matching events will be found by | ||
| 458 | /// checking with here, instead of @ref SetTitle() (and @ref SetFullTextEpgSearch()). | ||
| 459 | void SetSeriesLink(const std::string& seriesLink) | ||
| 460 | { | ||
| 461 | strncpy(m_cStructure->strSeriesLink, seriesLink.c_str(), | ||
| 462 | sizeof(m_cStructure->strSeriesLink) - 1); | ||
| 463 | } | ||
| 464 | |||
| 465 | /// @brief To get with @ref SetSeriesLink changed values. | ||
| 466 | std::string GetSeriesLink() const { return m_cStructure->strSeriesLink; } | ||
| 467 | ///@} | ||
| 468 | |||
| 469 | private: | ||
| 470 | PVRTimer(const PVR_TIMER* data) : CStructHdl(data) {} | ||
| 471 | PVRTimer(PVR_TIMER* data) : CStructHdl(data) {} | ||
| 472 | }; | ||
| 473 | |||
| 474 | ///@} | ||
| 475 | //------------------------------------------------------------------------------ | ||
| 476 | |||
| 477 | //============================================================================== | ||
| 478 | /// @defgroup cpp_kodi_addon_pvr_Defs_Timer_PVRTimersResultSet class PVRTimersResultSet | ||
| 479 | /// @ingroup cpp_kodi_addon_pvr_Defs_Timer_PVRTimer | ||
| 480 | /// @brief **PVR add-on timer transfer class**\n | ||
| 481 | /// To transfer the content of @ref kodi::addon::CInstancePVRClient::GetTimers(). | ||
| 482 | /// | ||
| 483 | /// @note This becomes only be used on addon call above, not usable outside on | ||
| 484 | /// addon itself. | ||
| 485 | ///@{ | ||
| 486 | class PVRTimersResultSet | ||
| 487 | { | ||
| 488 | public: | ||
| 489 | /*! \cond PRIVATE */ | ||
| 490 | PVRTimersResultSet() = delete; | ||
| 491 | PVRTimersResultSet(const AddonInstance_PVR* instance, ADDON_HANDLE handle) | ||
| 492 | : m_instance(instance), m_handle(handle) | ||
| 493 | { | ||
| 494 | } | ||
| 495 | /*! \endcond */ | ||
| 496 | |||
| 497 | /// @addtogroup cpp_kodi_addon_pvr_Defs_Timer_PVRTimersResultSet | ||
| 498 | ///@{ | ||
| 499 | |||
| 500 | /// @brief To add and give content from addon to Kodi on related call. | ||
| 501 | /// | ||
| 502 | /// @param[in] tag The to transferred data. | ||
| 503 | void Add(const kodi::addon::PVRTimer& tag) | ||
| 504 | { | ||
| 505 | m_instance->toKodi->TransferTimerEntry(m_instance->toKodi->kodiInstance, m_handle, tag); | ||
| 506 | } | ||
| 507 | |||
| 508 | ///@} | ||
| 509 | |||
| 510 | private: | ||
| 511 | const AddonInstance_PVR* m_instance = nullptr; | ||
| 512 | const ADDON_HANDLE m_handle; | ||
| 513 | }; | ||
| 514 | ///@} | ||
| 515 | //------------------------------------------------------------------------------ | ||
| 516 | |||
| 517 | //============================================================================== | ||
| 518 | /// @defgroup cpp_kodi_addon_pvr_Defs_Timer_PVRTimerType class PVRTimerType | ||
| 519 | /// @ingroup cpp_kodi_addon_pvr_Defs_Timer | ||
| 520 | /// @brief **PVR add-on timer type**\n | ||
| 521 | /// To define the content of @ref kodi::addon::CInstancePVRClient::GetTimerTypes() | ||
| 522 | /// given groups. | ||
| 523 | /// | ||
| 524 | /// ---------------------------------------------------------------------------- | ||
| 525 | /// | ||
| 526 | /// @copydetails cpp_kodi_addon_pvr_Defs_Timer_PVRTimerType_Help | ||
| 527 | /// | ||
| 528 | ///@{ | ||
| 529 | class PVRTimerType : public CStructHdl<PVRTimerType, PVR_TIMER_TYPE> | ||
| 530 | { | ||
| 531 | friend class CInstancePVRClient; | ||
| 532 | |||
| 533 | public: | ||
| 534 | /*! \cond PRIVATE */ | ||
| 535 | PVRTimerType() | ||
| 536 | { | ||
| 537 | memset(m_cStructure, 0, sizeof(PVR_TIMER_TYPE)); | ||
| 538 | m_cStructure->iPrioritiesDefault = -1; | ||
| 539 | m_cStructure->iLifetimesDefault = -1; | ||
| 540 | m_cStructure->iPreventDuplicateEpisodesDefault = -1; | ||
| 541 | m_cStructure->iRecordingGroupDefault = -1; | ||
| 542 | m_cStructure->iMaxRecordingsDefault = -1; | ||
| 543 | } | ||
| 544 | PVRTimerType(const PVRTimerType& type) : CStructHdl(type) {} | ||
| 545 | /*! \endcond */ | ||
| 546 | |||
| 547 | /// @defgroup cpp_kodi_addon_pvr_Defs_Timer_PVRTimerType_Help Value Help | ||
| 548 | /// @ingroup cpp_kodi_addon_pvr_Defs_Timer_PVRTimerType | ||
| 549 | /// ---------------------------------------------------------------------------- | ||
| 550 | /// | ||
| 551 | /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_Timer_PVRTimerType :</b> | ||
| 552 | /// | Name | Type | Set call | Get call | Usage | ||
| 553 | /// |------|------|----------|----------|----------- | ||
| 554 | /// | **Identifier** | `unsigned int` | @ref PVRTimerType::SetId "SetId" | @ref PVRTimerType::GetId "GetId" | *required to set* | ||
| 555 | /// | **Attributes** | `unsigned int` | @ref PVRTimerType::SetAttributes "SetAttributes" | @ref PVRTimerType::GetAttributes "GetAttributes" | *required to set* | ||
| 556 | /// | **Description** | `std::string` | @ref PVRTimerType::SetDescription "SetDescription" | @ref PVRTimerType::GetDescription "GetDescription" | *optional* | ||
| 557 | /// | | | | | | | ||
| 558 | /// | **Priority selection** | @ref cpp_kodi_addon_pvr_Defs_PVRTypeIntValue "PVRTypeIntValue" | @ref PVRTimerType::SetPriorities "SetPriorities" | @ref PVRTimerType::GetPriorities "GetPriorities" | *optional* | ||
| 559 | /// | **Priority default selection** | `int`| @ref PVRTimerType::SetPrioritiesDefault "SetPrioritiesDefault" | @ref PVRTimerType::GetPrioritiesDefault "GetPrioritiesDefault" | *optional* | ||
| 560 | /// | | | | | | | ||
| 561 | /// | **Lifetime selection** | @ref cpp_kodi_addon_pvr_Defs_PVRTypeIntValue "PVRTypeIntValue" | @ref PVRTimerType::SetLifetimes "SetLifetimes" | @ref PVRTimerType::GetLifetimes "GetLifetimes" | *optional* | ||
| 562 | /// | **Lifetime default selection** | `int`| @ref PVRTimerType::SetLifetimesDefault "SetLifetimesDefault" | @ref PVRTimerType::GetLifetimesDefault "GetLifetimesDefault" | *optional* | ||
| 563 | /// | | | | | | | ||
| 564 | /// | **Prevent duplicate episodes selection** | @ref cpp_kodi_addon_pvr_Defs_PVRTypeIntValue "PVRTypeIntValue" | @ref PVRTimerType::SetPreventDuplicateEpisodes "SetPreventDuplicateEpisodes" | @ref PVRTimerType::GetPreventDuplicateEpisodes "GetPreventDuplicateEpisodes" | *optional* | ||
| 565 | /// | **Prevent duplicate episodes default** | `int`| @ref PVRTimerType::SetPreventDuplicateEpisodesDefault "SetPreventDuplicateEpisodesDefault" | @ref PVRTimerType::GetPreventDuplicateEpisodesDefault "GetPreventDuplicateEpisodesDefault" | *optional* | ||
| 566 | /// | | | | | | | ||
| 567 | /// | **Recording group selection**| @ref cpp_kodi_addon_pvr_Defs_PVRTypeIntValue "PVRTypeIntValue" | @ref PVRTimerType::SetRecordingGroups "SetRecordingGroups" | @ref PVRTimerType::GetRecordingGroups "GetRecordingGroups" | *optional* | ||
| 568 | /// | **Recording group default** | `int`| @ref PVRTimerType::SetRecordingGroupDefault "SetRecordingGroupDefault" | @ref PVRTimerType::GetRecordingGroupDefault "GetRecordingGroupDefault" | *optional* | ||
| 569 | /// | | | | | | | ||
| 570 | /// | **Max recordings selection** | @ref cpp_kodi_addon_pvr_Defs_PVRTypeIntValue "PVRTypeIntValue" | @ref PVRTimerType::SetMaxRecordings "SetMaxRecordings" | @ref PVRTimerType::GetMaxRecordings "GetMaxRecordings" | *optional* | ||
| 571 | /// | **Max recordings default** | `int`| @ref PVRTimerType::SetMaxRecordingsDefault "SetMaxRecordingsDefault" | @ref PVRTimerType::GetMaxRecordingsDefault "GetMaxRecordingsDefault" | *optional* | ||
| 572 | /// | ||
| 573 | |||
| 574 | /// @addtogroup cpp_kodi_addon_pvr_Defs_Timer_PVRTimerType | ||
| 575 | ///@{ | ||
| 576 | |||
| 577 | /// @brief **required**\n | ||
| 578 | /// This type's identifier. Ids must be > @ref PVR_TIMER_TYPE_NONE. | ||
| 579 | void SetId(unsigned int id) { m_cStructure->iId = id; } | ||
| 580 | |||
| 581 | /// @brief To get with @ref SetAttributes changed values. | ||
| 582 | unsigned int GetId() const { return m_cStructure->iId; } | ||
| 583 | |||
| 584 | /// @brief **required**\n | ||
| 585 | /// Defines the attributes for this type (@ref cpp_kodi_addon_pvr_Defs_Timer_PVR_TIMER_TYPE "PVR_TIMER_TYPE_*" constants). | ||
| 586 | /// | ||
| 587 | /// To defines the attributes for a type. These values are bit fields that can be | ||
| 588 | /// used together. | ||
| 589 | /// | ||
| 590 | ///-------------------------------------------------------------------------- | ||
| 591 | /// | ||
| 592 | /// **Example:** | ||
| 593 | /// ~~~~~~~~~~~~~{.cpp} | ||
| 594 | /// kodi::addon::PVRTimerType tag; | ||
| 595 | /// tag.SetAttributes(PVR_TIMER_TYPE_IS_MANUAL | PVR_TIMER_TYPE_IS_REPEATING); | ||
| 596 | /// ~~~~~~~~~~~~~ | ||
| 597 | /// | ||
| 598 | void SetAttributes(uint64_t attributes) { m_cStructure->iAttributes = attributes; } | ||
| 599 | |||
| 600 | /// @brief To get with @ref SetAttributes changed values. | ||
| 601 | uint64_t GetAttributes() const { return m_cStructure->iAttributes; } | ||
| 602 | |||
| 603 | /// @brief **optional**\n | ||
| 604 | /// A short localized string describing the purpose of the type. (e.g. | ||
| 605 | /// "Any time at this channel if title matches"). | ||
| 606 | /// | ||
| 607 | /// If left blank, Kodi will generate a description based on the attributes | ||
| 608 | /// REPEATING and MANUAL. (e.g. "Repeating EPG-based.") | ||
| 609 | void SetDescription(const std::string& description) | ||
| 610 | { | ||
| 611 | strncpy(m_cStructure->strDescription, description.c_str(), | ||
| 612 | sizeof(m_cStructure->strDescription) - 1); | ||
| 613 | } | ||
| 614 | |||
| 615 | /// @brief To get with @ref SetDescription changed values. | ||
| 616 | std::string GetDescription() const { return m_cStructure->strDescription; } | ||
| 617 | |||
| 618 | //---------------------------------------------------------------------------- | ||
| 619 | |||
| 620 | /// @brief **optional**\n | ||
| 621 | /// Priority value definitions. | ||
| 622 | /// | ||
| 623 | /// Array containing the possible values for @ref PVRTimer::SetPriority(). | ||
| 624 | /// | ||
| 625 | /// @param[in] priorities List of priority values | ||
| 626 | /// @param[in] prioritiesDefault [opt] The default value in list, can also be | ||
| 627 | /// set by @ref SetPrioritiesDefault() | ||
| 628 | /// | ||
| 629 | /// -------------------------------------------------------------------------- | ||
| 630 | /// | ||
| 631 | /// @copydetails cpp_kodi_addon_pvr_Defs_PVRTypeIntValue_Help | ||
| 632 | void SetPriorities(const std::vector<PVRTypeIntValue>& priorities, int prioritiesDefault = -1) | ||
| 633 | { | ||
| 634 | m_cStructure->iPrioritiesSize = static_cast<unsigned int>(priorities.size()); | ||
| 635 | for (unsigned int i = 0; | ||
| 636 | i < m_cStructure->iPrioritiesSize && i < sizeof(m_cStructure->priorities); ++i) | ||
| 637 | { | ||
| 638 | m_cStructure->priorities[i].iValue = priorities[i].GetCStructure()->iValue; | ||
| 639 | strncpy(m_cStructure->priorities[i].strDescription, | ||
| 640 | priorities[i].GetCStructure()->strDescription, | ||
| 641 | sizeof(m_cStructure->priorities[i].strDescription) - 1); | ||
| 642 | } | ||
| 643 | if (prioritiesDefault != -1) | ||
| 644 | m_cStructure->iPrioritiesDefault = prioritiesDefault; | ||
| 645 | } | ||
| 646 | |||
| 647 | /// @brief To get with @ref SetPriorities changed values. | ||
| 648 | std::vector<PVRTypeIntValue> GetPriorities() const | ||
| 649 | { | ||
| 650 | std::vector<PVRTypeIntValue> ret; | ||
| 651 | for (unsigned int i = 0; i < m_cStructure->iPrioritiesSize; ++i) | ||
| 652 | ret.emplace_back(m_cStructure->priorities[i].iValue, | ||
| 653 | m_cStructure->priorities[i].strDescription); | ||
| 654 | return ret; | ||
| 655 | } | ||
| 656 | |||
| 657 | /// @brief **optional**\n | ||
| 658 | /// The default value for @ref PVRTimer::SetPriority(). | ||
| 659 | /// | ||
| 660 | /// @note Must be filled if @ref SetPriorities contain values and not | ||
| 661 | /// defined there on second function value. | ||
| 662 | void SetPrioritiesDefault(int prioritiesDefault) | ||
| 663 | { | ||
| 664 | m_cStructure->iPrioritiesDefault = prioritiesDefault; | ||
| 665 | } | ||
| 666 | |||
| 667 | /// @brief To get with @ref SetPrioritiesDefault changed values. | ||
| 668 | int GetPrioritiesDefault() const { return m_cStructure->iPrioritiesDefault; } | ||
| 669 | |||
| 670 | //---------------------------------------------------------------------------- | ||
| 671 | |||
| 672 | /// @brief **optional**\n | ||
| 673 | /// Lifetime value definitions. | ||
| 674 | /// | ||
| 675 | /// Array containing the possible values for @ref PVRTimer::SetLifetime(). | ||
| 676 | /// | ||
| 677 | /// @param[in] lifetimes List of lifetimes values | ||
| 678 | /// @param[in] lifetimesDefault [opt] The default value in list, can also be | ||
| 679 | /// set by @ref SetLifetimesDefault() | ||
| 680 | /// | ||
| 681 | /// -------------------------------------------------------------------------- | ||
| 682 | /// | ||
| 683 | /// @copydetails cpp_kodi_addon_pvr_Defs_PVRTypeIntValue_Help | ||
| 684 | void SetLifetimes(const std::vector<PVRTypeIntValue>& lifetimes, int lifetimesDefault = -1) | ||
| 685 | { | ||
| 686 | m_cStructure->iLifetimesSize = static_cast<unsigned int>(lifetimes.size()); | ||
| 687 | for (unsigned int i = 0; | ||
| 688 | i < m_cStructure->iLifetimesSize && i < sizeof(m_cStructure->lifetimes); ++i) | ||
| 689 | { | ||
| 690 | m_cStructure->lifetimes[i].iValue = lifetimes[i].GetCStructure()->iValue; | ||
| 691 | strncpy(m_cStructure->lifetimes[i].strDescription, | ||
| 692 | lifetimes[i].GetCStructure()->strDescription, | ||
| 693 | sizeof(m_cStructure->lifetimes[i].strDescription) - 1); | ||
| 694 | } | ||
| 695 | if (lifetimesDefault != -1) | ||
| 696 | m_cStructure->iLifetimesDefault = lifetimesDefault; | ||
| 697 | } | ||
| 698 | |||
| 699 | /// @brief To get with @ref SetLifetimes changed values. | ||
| 700 | std::vector<PVRTypeIntValue> GetLifetimes() const | ||
| 701 | { | ||
| 702 | std::vector<PVRTypeIntValue> ret; | ||
| 703 | for (unsigned int i = 0; i < m_cStructure->iLifetimesSize; ++i) | ||
| 704 | ret.emplace_back(m_cStructure->lifetimes[i].iValue, | ||
| 705 | m_cStructure->lifetimes[i].strDescription); | ||
| 706 | return ret; | ||
| 707 | } | ||
| 708 | |||
| 709 | /// @brief **optional**\n | ||
| 710 | /// The default value for @ref SetLifetimes(). | ||
| 711 | /// | ||
| 712 | /// @note Must be filled if @ref SetLifetimes contain values and not | ||
| 713 | /// defined there on second function value. | ||
| 714 | void SetLifetimesDefault(int lifetimesDefault) | ||
| 715 | { | ||
| 716 | m_cStructure->iLifetimesDefault = lifetimesDefault; | ||
| 717 | } | ||
| 718 | |||
| 719 | /// @brief To get with @ref SetLifetimesDefault changed values. | ||
| 720 | int GetLifetimesDefault() const { return m_cStructure->iLifetimesDefault; } | ||
| 721 | |||
| 722 | //---------------------------------------------------------------------------- | ||
| 723 | |||
| 724 | /// @brief **optional**\n | ||
| 725 | /// Prevent duplicate episodes value definitions. | ||
| 726 | /// | ||
| 727 | /// Array containing the possible values for @ref PVRTimer::SetPreventDuplicateEpisodes(). | ||
| 728 | /// | ||
| 729 | /// @note Must be filled if @ref PVRTimer::SetPreventDuplicateEpisodes() is not empty. | ||
| 730 | /// | ||
| 731 | /// @param[in] preventDuplicateEpisodes List of duplicate episodes values | ||
| 732 | /// @param[in] preventDuplicateEpisodesDefault [opt] The default value in list, can also be | ||
| 733 | /// set by @ref SetPreventDuplicateEpisodesDefault() | ||
| 734 | /// | ||
| 735 | /// -------------------------------------------------------------------------- | ||
| 736 | /// | ||
| 737 | /// @copydetails cpp_kodi_addon_pvr_Defs_PVRTypeIntValue_Help | ||
| 738 | void SetPreventDuplicateEpisodes( | ||
| 739 | const std::vector<PVRTypeIntValue>& preventDuplicateEpisodes, | ||
| 740 | int preventDuplicateEpisodesDefault = -1) | ||
| 741 | { | ||
| 742 | m_cStructure->iPreventDuplicateEpisodesSize = | ||
| 743 | static_cast<unsigned int>(preventDuplicateEpisodes.size()); | ||
| 744 | for (unsigned int i = 0; i < m_cStructure->iPreventDuplicateEpisodesSize && | ||
| 745 | i < sizeof(m_cStructure->preventDuplicateEpisodes); | ||
| 746 | ++i) | ||
| 747 | { | ||
| 748 | m_cStructure->preventDuplicateEpisodes[i].iValue = | ||
| 749 | preventDuplicateEpisodes[i].GetCStructure()->iValue; | ||
| 750 | strncpy(m_cStructure->preventDuplicateEpisodes[i].strDescription, | ||
| 751 | preventDuplicateEpisodes[i].GetCStructure()->strDescription, | ||
| 752 | sizeof(m_cStructure->preventDuplicateEpisodes[i].strDescription) - 1); | ||
| 753 | } | ||
| 754 | if (preventDuplicateEpisodesDefault != -1) | ||
| 755 | m_cStructure->iPreventDuplicateEpisodesDefault = preventDuplicateEpisodesDefault; | ||
| 756 | } | ||
| 757 | |||
| 758 | /// @brief To get with @ref SetPreventDuplicateEpisodes changed values. | ||
| 759 | std::vector<PVRTypeIntValue> GetPreventDuplicateEpisodes() const | ||
| 760 | { | ||
| 761 | std::vector<PVRTypeIntValue> ret; | ||
| 762 | for (unsigned int i = 0; i < m_cStructure->iPreventDuplicateEpisodesSize; ++i) | ||
| 763 | ret.emplace_back(m_cStructure->preventDuplicateEpisodes[i].iValue, | ||
| 764 | m_cStructure->preventDuplicateEpisodes[i].strDescription); | ||
| 765 | return ret; | ||
| 766 | } | ||
| 767 | |||
| 768 | /// @brief **optional**\n | ||
| 769 | /// The default value for @ref PVRTimer::SetPreventDuplicateEpisodes(). | ||
| 770 | /// | ||
| 771 | /// @note Must be filled if @ref SetPreventDuplicateEpisodes contain values and not | ||
| 772 | /// defined there on second function value. | ||
| 773 | void SetPreventDuplicateEpisodesDefault(int preventDuplicateEpisodesDefault) | ||
| 774 | { | ||
| 775 | m_cStructure->iPreventDuplicateEpisodesDefault = preventDuplicateEpisodesDefault; | ||
| 776 | } | ||
| 777 | |||
| 778 | /// @brief To get with @ref SetPreventDuplicateEpisodesDefault changed values. | ||
| 779 | int GetPreventDuplicateEpisodesDefault() const | ||
| 780 | { | ||
| 781 | return m_cStructure->iPreventDuplicateEpisodesDefault; | ||
| 782 | } | ||
| 783 | |||
| 784 | //---------------------------------------------------------------------------- | ||
| 785 | |||
| 786 | /// @brief **optional**\n | ||
| 787 | /// Array containing the possible values of @ref PVRTimer::SetRecordingGroup() | ||
| 788 | /// | ||
| 789 | /// @param[in] recordingGroup List of recording group values | ||
| 790 | /// @param[in] recordingGroupDefault [opt] The default value in list, can also be | ||
| 791 | /// set by @ref SetRecordingGroupDefault() | ||
| 792 | /// | ||
| 793 | /// -------------------------------------------------------------------------- | ||
| 794 | /// | ||
| 795 | /// @copydetails cpp_kodi_addon_pvr_Defs_PVRTypeIntValue_Help | ||
| 796 | void SetRecordingGroups(const std::vector<PVRTypeIntValue>& recordingGroup, | ||
| 797 | int recordingGroupDefault = -1) | ||
| 798 | { | ||
| 799 | m_cStructure->iRecordingGroupSize = static_cast<unsigned int>(recordingGroup.size()); | ||
| 800 | for (unsigned int i = 0; | ||
| 801 | i < m_cStructure->iRecordingGroupSize && i < sizeof(m_cStructure->recordingGroup); ++i) | ||
| 802 | { | ||
| 803 | m_cStructure->recordingGroup[i].iValue = recordingGroup[i].GetCStructure()->iValue; | ||
| 804 | strncpy(m_cStructure->recordingGroup[i].strDescription, | ||
| 805 | recordingGroup[i].GetCStructure()->strDescription, | ||
| 806 | sizeof(m_cStructure->recordingGroup[i].strDescription) - 1); | ||
| 807 | } | ||
| 808 | if (recordingGroupDefault != -1) | ||
| 809 | m_cStructure->iRecordingGroupDefault = recordingGroupDefault; | ||
| 810 | } | ||
| 811 | |||
| 812 | /// @brief To get with @ref SetRecordingGroups changed values | ||
| 813 | std::vector<PVRTypeIntValue> GetRecordingGroups() const | ||
| 814 | { | ||
| 815 | std::vector<PVRTypeIntValue> ret; | ||
| 816 | for (unsigned int i = 0; i < m_cStructure->iRecordingGroupSize; ++i) | ||
| 817 | ret.emplace_back(m_cStructure->recordingGroup[i].iValue, | ||
| 818 | m_cStructure->recordingGroup[i].strDescription); | ||
| 819 | return ret; | ||
| 820 | } | ||
| 821 | |||
| 822 | /// @brief **optional**\n | ||
| 823 | /// The default value for @ref PVRTimer::SetRecordingGroup(). | ||
| 824 | /// | ||
| 825 | /// @note Must be filled if @ref SetRecordingGroups contain values and not | ||
| 826 | /// defined there on second function value. | ||
| 827 | void SetRecordingGroupDefault(int recordingGroupDefault) | ||
| 828 | { | ||
| 829 | m_cStructure->iRecordingGroupDefault = recordingGroupDefault; | ||
| 830 | } | ||
| 831 | |||
| 832 | /// @brief To get with @ref SetRecordingGroupDefault changed values | ||
| 833 | int GetRecordingGroupDefault() const { return m_cStructure->iRecordingGroupDefault; } | ||
| 834 | |||
| 835 | //---------------------------------------------------------------------------- | ||
| 836 | |||
| 837 | /// @brief **optional**\n | ||
| 838 | /// Array containing the possible values of @ref PVRTimer::SetMaxRecordings(). | ||
| 839 | /// | ||
| 840 | /// @param[in] maxRecordings List of lifetimes values | ||
| 841 | /// @param[in] maxRecordingsDefault [opt] The default value in list, can also be | ||
| 842 | /// set by @ref SetMaxRecordingsDefault() | ||
| 843 | /// | ||
| 844 | /// -------------------------------------------------------------------------- | ||
| 845 | /// | ||
| 846 | /// @copydetails cpp_kodi_addon_pvr_Defs_PVRTypeIntValue_Help | ||
| 847 | void SetMaxRecordings(const std::vector<PVRTypeIntValue>& maxRecordings, | ||
| 848 | int maxRecordingsDefault = -1) | ||
| 849 | { | ||
| 850 | m_cStructure->iMaxRecordingsSize = static_cast<unsigned int>(maxRecordings.size()); | ||
| 851 | for (unsigned int i = 0; | ||
| 852 | i < m_cStructure->iMaxRecordingsSize && i < sizeof(m_cStructure->maxRecordings); ++i) | ||
| 853 | { | ||
| 854 | m_cStructure->maxRecordings[i].iValue = maxRecordings[i].GetCStructure()->iValue; | ||
| 855 | strncpy(m_cStructure->maxRecordings[i].strDescription, | ||
| 856 | maxRecordings[i].GetCStructure()->strDescription, | ||
| 857 | sizeof(m_cStructure->maxRecordings[i].strDescription) - 1); | ||
| 858 | } | ||
| 859 | if (maxRecordingsDefault != -1) | ||
| 860 | m_cStructure->iMaxRecordingsDefault = maxRecordingsDefault; | ||
| 861 | } | ||
| 862 | |||
| 863 | /// @brief To get with @ref SetMaxRecordings changed values | ||
| 864 | std::vector<PVRTypeIntValue> GetMaxRecordings() const | ||
| 865 | { | ||
| 866 | std::vector<PVRTypeIntValue> ret; | ||
| 867 | for (unsigned int i = 0; i < m_cStructure->iMaxRecordingsSize; ++i) | ||
| 868 | ret.emplace_back(m_cStructure->maxRecordings[i].iValue, | ||
| 869 | m_cStructure->maxRecordings[i].strDescription); | ||
| 870 | return ret; | ||
| 871 | } | ||
| 872 | |||
| 873 | /// @brief **optional**\n | ||
| 874 | /// The default value for @ref SetMaxRecordings(). | ||
| 875 | /// | ||
| 876 | /// Can be set with here if on @ref SetMaxRecordings not given as second value. | ||
| 877 | void SetMaxRecordingsDefault(int maxRecordingsDefault) | ||
| 878 | { | ||
| 879 | m_cStructure->iMaxRecordingsDefault = maxRecordingsDefault; | ||
| 880 | } | ||
| 881 | |||
| 882 | /// @brief To get with @ref SetMaxRecordingsDefault changed values | ||
| 883 | int GetMaxRecordingsDefault() const { return m_cStructure->iMaxRecordingsDefault; } | ||
| 884 | ///@} | ||
| 885 | |||
| 886 | private: | ||
| 887 | PVRTimerType(const PVR_TIMER_TYPE* type) : CStructHdl(type) {} | ||
| 888 | PVRTimerType(PVR_TIMER_TYPE* type) : CStructHdl(type) {} | ||
| 889 | }; | ||
| 890 | ///@} | ||
| 891 | //------------------------------------------------------------------------------ | ||
| 892 | |||
| 893 | } /* namespace addon */ | ||
| 894 | } /* namespace kodi */ | ||
| 895 | |||
| 896 | #endif /* __cplusplus */ | ||
