diff options
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance')
10 files changed, 92 insertions, 250 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDecoder.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDecoder.h index ca253ff..7407830 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDecoder.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDecoder.h | |||
| @@ -1,24 +1,13 @@ | |||
| 1 | #pragma once | ||
| 2 | /* | 1 | /* |
| 3 | * Copyright (C) 2005-2017 Team Kodi | 2 | * Copyright (C) 2005-2018 Team Kodi |
| 4 | * http://kodi.tv | 3 | * This file is part of Kodi - https://kodi.tv |
| 5 | * | ||
| 6 | * This Program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | * This Program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with Kodi; see the file COPYING. If not, see | ||
| 18 | * <http://www.gnu.org/licenses/>. | ||
| 19 | * | 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 20 | */ | 7 | */ |
| 21 | 8 | ||
| 9 | #pragma once | ||
| 10 | |||
| 22 | #include "../AddonBase.h" | 11 | #include "../AddonBase.h" |
| 23 | #ifdef BUILD_KODI_ADDON | 12 | #ifdef BUILD_KODI_ADDON |
| 24 | #include "../AEChannelData.h" | 13 | #include "../AEChannelData.h" |
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h index 7d2464d..b98884e 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h | |||
| @@ -1,24 +1,13 @@ | |||
| 1 | #pragma once | ||
| 2 | /* | 1 | /* |
| 3 | * Copyright (C) 2005-2017 Team Kodi | 2 | * Copyright (C) 2005-2018 Team Kodi |
| 4 | * http://kodi.tv | 3 | * This file is part of Kodi - https://kodi.tv |
| 5 | * | ||
| 6 | * This Program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | * This Program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with Kodi; see the file COPYING. If not, see | ||
| 18 | * <http://www.gnu.org/licenses/>. | ||
| 19 | * | 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 20 | */ | 7 | */ |
| 21 | 8 | ||
| 9 | #pragma once | ||
| 10 | |||
| 22 | #include "../AddonBase.h" | 11 | #include "../AddonBase.h" |
| 23 | 12 | ||
| 24 | namespace kodi { namespace addon { class CInstanceAudioEncoder; }} | 13 | namespace kodi { namespace addon { class CInstanceAudioEncoder; }} |
| @@ -136,10 +125,10 @@ namespace addon | |||
| 136 | //========================================================================== | 125 | //========================================================================== |
| 137 | /// \brief Write block of data | 126 | /// \brief Write block of data |
| 138 | /// | 127 | /// |
| 139 | /// \param[in] data Pointer to the array of elements to be | 128 | /// \param[in] data Pointer to the array of elements to be |
| 140 | /// written | 129 | /// written |
| 141 | /// \param[in] length Size in bytes to be written. | 130 | /// \param[in] length Size in bytes to be written. |
| 142 | /// \return The total number of bytes | 131 | /// \return The total number of bytes |
| 143 | /// successfully written is returned. | 132 | /// successfully written is returned. |
| 144 | int Write(const uint8_t* data, int length) | 133 | int Write(const uint8_t* data, int length) |
| 145 | { | 134 | { |
| @@ -154,7 +143,7 @@ namespace addon | |||
| 154 | /// | 143 | /// |
| 155 | /// \param[in] position the position that you want to seek to | 144 | /// \param[in] position the position that you want to seek to |
| 156 | /// \param[in] whence [optional] offset relative to | 145 | /// \param[in] whence [optional] offset relative to |
| 157 | /// You can set the value of whence to one | 146 | /// You can set the value of whence to one |
| 158 | /// of three things: | 147 | /// of three things: |
| 159 | /// | Value | int | Description | | 148 | /// | Value | int | Description | |
| 160 | /// |:--------:|:---:|:---------------------------------------------------| | 149 | /// |:--------:|:---:|:---------------------------------------------------| |
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h index 5ccb859..09ac6c9 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h | |||
| @@ -1,24 +1,13 @@ | |||
| 1 | #pragma once | ||
| 2 | /* | 1 | /* |
| 3 | * Copyright (C) 2005-2017 Team Kodi | 2 | * Copyright (C) 2005-2018 Team Kodi |
| 4 | * http://kodi.tv | 3 | * This file is part of Kodi - https://kodi.tv |
| 5 | * | ||
| 6 | * This Program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | * This Program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with Kodi; see the file COPYING. If not, see | ||
| 18 | * <http://www.gnu.org/licenses/>. | ||
| 19 | * | 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 20 | */ | 7 | */ |
| 21 | 8 | ||
| 9 | #pragma once | ||
| 10 | |||
| 22 | #include "../AddonBase.h" | 11 | #include "../AddonBase.h" |
| 23 | 12 | ||
| 24 | namespace kodi { namespace addon { class CInstanceImageDecoder; }} | 13 | namespace kodi { namespace addon { class CInstanceImageDecoder; }} |
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h index 08d01ad..23a91e7 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h | |||
| @@ -1,24 +1,13 @@ | |||
| 1 | #pragma once | ||
| 2 | /* | 1 | /* |
| 3 | * Copyright (C) 2005-2017 Team Kodi | 2 | * Copyright (C) 2005-2018 Team Kodi |
| 4 | * http://kodi.tv | 3 | * This file is part of Kodi - https://kodi.tv |
| 5 | * | ||
| 6 | * This Program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | * This Program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with Kodi; see the file COPYING. If not, see | ||
| 18 | * <http://www.gnu.org/licenses/>. | ||
| 19 | * | 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 20 | */ | 7 | */ |
| 21 | 8 | ||
| 9 | #pragma once | ||
| 10 | |||
| 22 | /* | 11 | /* |
| 23 | * Parts with a comment named "internal" are only used inside header and not | 12 | * Parts with a comment named "internal" are only used inside header and not |
| 24 | * used or accessed direct during add-on development! | 13 | * used or accessed direct during add-on development! |
| @@ -142,7 +131,7 @@ extern "C" { | |||
| 142 | const uint8_t *m_ExtraData; | 131 | const uint8_t *m_ExtraData; |
| 143 | unsigned int m_ExtraSize; | 132 | unsigned int m_ExtraSize; |
| 144 | 133 | ||
| 145 | char m_language[4]; /*!< @brief ISO 639 3-letter language code (empty string if undefined) */ | 134 | char m_language[64]; /*!< @brief RFC 5646 language code (empty string if undefined) */ |
| 146 | 135 | ||
| 147 | unsigned int m_FpsScale; /*!< @brief Scale of 1000 and a rate of 29970 will result in 29.97 fps */ | 136 | unsigned int m_FpsScale; /*!< @brief Scale of 1000 and a rate of 29970 will result in 29.97 fps */ |
| 148 | unsigned int m_FpsRate; | 137 | unsigned int m_FpsRate; |
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h index 75be27e..78e572b 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h | |||
| @@ -1,24 +1,13 @@ | |||
| 1 | #pragma once | ||
| 2 | /* | 1 | /* |
| 3 | * Copyright (C) 2014-2017 Team Kodi | 2 | * Copyright (C) 2014-2018 Team Kodi |
| 4 | * http://kodi.tv | 3 | * This file is part of Kodi - https://kodi.tv |
| 5 | * | ||
| 6 | * This Program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | * This Program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this Program; see the file COPYING. If not, see | ||
| 18 | * <http://www.gnu.org/licenses/>. | ||
| 19 | * | 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 20 | */ | 7 | */ |
| 21 | 8 | ||
| 9 | #pragma once | ||
| 10 | |||
| 22 | #include "../AddonBase.h" | 11 | #include "../AddonBase.h" |
| 23 | 12 | ||
| 24 | namespace kodi { namespace addon { class CInstancePeripheral; }} | 13 | namespace kodi { namespace addon { class CInstancePeripheral; }} |
| @@ -780,7 +769,7 @@ namespace addon | |||
| 780 | return addonInstance->toAddon.addonInstance->SendEvent(event); | 769 | return addonInstance->toAddon.addonInstance->SendEvent(event); |
| 781 | } | 770 | } |
| 782 | 771 | ||
| 783 | 772 | ||
| 784 | inline static PERIPHERAL_ERROR ADDON_GetJoystickInfo(const AddonInstance_Peripheral* addonInstance, unsigned int index, JOYSTICK_INFO* info) | 773 | inline static PERIPHERAL_ERROR ADDON_GetJoystickInfo(const AddonInstance_Peripheral* addonInstance, unsigned int index, JOYSTICK_INFO* info) |
| 785 | { | 774 | { |
| 786 | return addonInstance->toAddon.addonInstance->GetJoystickInfo(index, info); | 775 | return addonInstance->toAddon.addonInstance->GetJoystickInfo(index, info); |
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h index c2efc05..9b2a43f 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h | |||
| @@ -1,22 +1,11 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2014-2017 Team Kodi | 2 | * Copyright (C) 2014-2018 Team Kodi |
| 3 | * http://kodi.tv | 3 | * This file is part of Kodi - https://kodi.tv |
| 4 | * | ||
| 5 | * This Program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 8 | * any later version. | ||
| 9 | * | ||
| 10 | * This Program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this Program; see the file COPYING. If not, see | ||
| 17 | * <http://www.gnu.org/licenses/>. | ||
| 18 | * | 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 19 | */ | 7 | */ |
| 8 | |||
| 20 | #pragma once | 9 | #pragma once |
| 21 | 10 | ||
| 22 | #include "Peripheral.h" | 11 | #include "Peripheral.h" |
| @@ -97,10 +86,7 @@ namespace addon | |||
| 97 | public: | 86 | public: |
| 98 | Peripheral(PERIPHERAL_TYPE type = PERIPHERAL_TYPE_UNKNOWN, const std::string& strName = "") : | 87 | Peripheral(PERIPHERAL_TYPE type = PERIPHERAL_TYPE_UNKNOWN, const std::string& strName = "") : |
| 99 | m_type(type), | 88 | m_type(type), |
| 100 | m_strName(strName), | 89 | m_strName(strName) |
| 101 | m_vendorId(0), | ||
| 102 | m_productId(0), | ||
| 103 | m_index(0) | ||
| 104 | { | 90 | { |
| 105 | } | 91 | } |
| 106 | 92 | ||
| @@ -149,9 +135,9 @@ namespace addon | |||
| 149 | private: | 135 | private: |
| 150 | PERIPHERAL_TYPE m_type; | 136 | PERIPHERAL_TYPE m_type; |
| 151 | std::string m_strName; | 137 | std::string m_strName; |
| 152 | uint16_t m_vendorId; | 138 | uint16_t m_vendorId = 0; |
| 153 | uint16_t m_productId; | 139 | uint16_t m_productId = 0; |
| 154 | unsigned int m_index; | 140 | unsigned int m_index = 0; |
| 155 | }; | 141 | }; |
| 156 | 142 | ||
| 157 | typedef PeripheralVector<Peripheral, PERIPHERAL_INFO> Peripherals; | 143 | typedef PeripheralVector<Peripheral, PERIPHERAL_INFO> Peripherals; |
| @@ -259,12 +245,7 @@ namespace addon | |||
| 259 | Joystick(const std::string& provider = "", const std::string& strName = "") : | 245 | Joystick(const std::string& provider = "", const std::string& strName = "") : |
| 260 | Peripheral(PERIPHERAL_TYPE_JOYSTICK, strName), | 246 | Peripheral(PERIPHERAL_TYPE_JOYSTICK, strName), |
| 261 | m_provider(provider), | 247 | m_provider(provider), |
| 262 | m_requestedPort(NO_PORT_REQUESTED), | 248 | m_requestedPort(NO_PORT_REQUESTED) |
| 263 | m_buttonCount(0), | ||
| 264 | m_hatCount(0), | ||
| 265 | m_axisCount(0), | ||
| 266 | m_motorCount(0), | ||
| 267 | m_supportsPowerOff(false) | ||
| 268 | { | 249 | { |
| 269 | } | 250 | } |
| 270 | 251 | ||
| @@ -345,11 +326,11 @@ namespace addon | |||
| 345 | private: | 326 | private: |
| 346 | std::string m_provider; | 327 | std::string m_provider; |
| 347 | int m_requestedPort; | 328 | int m_requestedPort; |
| 348 | unsigned int m_buttonCount; | 329 | unsigned int m_buttonCount = 0; |
| 349 | unsigned int m_hatCount; | 330 | unsigned int m_hatCount = 0; |
| 350 | unsigned int m_axisCount; | 331 | unsigned int m_axisCount = 0; |
| 351 | unsigned int m_motorCount; | 332 | unsigned int m_motorCount = 0; |
| 352 | bool m_supportsPowerOff; | 333 | bool m_supportsPowerOff = false; |
| 353 | }; | 334 | }; |
| 354 | 335 | ||
| 355 | typedef PeripheralVector<Joystick, JOYSTICK_INFO> Joysticks; | 336 | typedef PeripheralVector<Joystick, JOYSTICK_INFO> Joysticks; |
| @@ -402,12 +383,7 @@ namespace addon | |||
| 402 | */ | 383 | */ |
| 403 | DriverPrimitive(JOYSTICK_DRIVER_PRIMITIVE_TYPE type, unsigned int driverIndex) : | 384 | DriverPrimitive(JOYSTICK_DRIVER_PRIMITIVE_TYPE type, unsigned int driverIndex) : |
| 404 | m_type(type), | 385 | m_type(type), |
| 405 | m_driverIndex(driverIndex), | 386 | m_driverIndex(driverIndex) |
| 406 | m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), | ||
| 407 | m_center(0), | ||
| 408 | m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), | ||
| 409 | m_range(1), | ||
| 410 | m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) | ||
| 411 | { | 387 | { |
| 412 | } | 388 | } |
| 413 | 389 | ||
| @@ -415,16 +391,7 @@ namespace addon | |||
| 415 | /*! | 391 | /*! |
| 416 | * \brief Construct an invalid driver primitive | 392 | * \brief Construct an invalid driver primitive |
| 417 | */ | 393 | */ |
| 418 | DriverPrimitive(void) : | 394 | DriverPrimitive(void) = default; |
| 419 | m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_UNKNOWN), | ||
| 420 | m_driverIndex(0), | ||
| 421 | m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), | ||
| 422 | m_center(0), | ||
| 423 | m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), | ||
| 424 | m_range(1), | ||
| 425 | m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) | ||
| 426 | { | ||
| 427 | } | ||
| 428 | 395 | ||
| 429 | /*! | 396 | /*! |
| 430 | * \brief Construct a driver primitive representing a joystick button | 397 | * \brief Construct a driver primitive representing a joystick button |
| @@ -441,11 +408,7 @@ namespace addon | |||
| 441 | DriverPrimitive(unsigned int hatIndex, JOYSTICK_DRIVER_HAT_DIRECTION direction) : | 408 | DriverPrimitive(unsigned int hatIndex, JOYSTICK_DRIVER_HAT_DIRECTION direction) : |
| 442 | m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_HAT_DIRECTION), | 409 | m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_HAT_DIRECTION), |
| 443 | m_driverIndex(hatIndex), | 410 | m_driverIndex(hatIndex), |
| 444 | m_hatDirection(direction), | 411 | m_hatDirection(direction) |
| 445 | m_center(0), | ||
| 446 | m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), | ||
| 447 | m_range(1), | ||
| 448 | m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) | ||
| 449 | { | 412 | { |
| 450 | } | 413 | } |
| 451 | 414 | ||
| @@ -456,11 +419,9 @@ namespace addon | |||
| 456 | DriverPrimitive(unsigned int axisIndex, int center, JOYSTICK_DRIVER_SEMIAXIS_DIRECTION direction, unsigned int range) : | 419 | DriverPrimitive(unsigned int axisIndex, int center, JOYSTICK_DRIVER_SEMIAXIS_DIRECTION direction, unsigned int range) : |
| 457 | m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_SEMIAXIS), | 420 | m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_SEMIAXIS), |
| 458 | m_driverIndex(axisIndex), | 421 | m_driverIndex(axisIndex), |
| 459 | m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), | ||
| 460 | m_center(center), | 422 | m_center(center), |
| 461 | m_semiAxisDirection(direction), | 423 | m_semiAxisDirection(direction), |
| 462 | m_range(range), | 424 | m_range(range) |
| 463 | m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) | ||
| 464 | { | 425 | { |
| 465 | } | 426 | } |
| 466 | 427 | ||
| @@ -477,13 +438,7 @@ namespace addon | |||
| 477 | */ | 438 | */ |
| 478 | DriverPrimitive(std::string keycode) : | 439 | DriverPrimitive(std::string keycode) : |
| 479 | m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_KEY), | 440 | m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_KEY), |
| 480 | m_driverIndex(0), | 441 | m_keycode(std::move(keycode)) |
| 481 | m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), | ||
| 482 | m_center(0), | ||
| 483 | m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), | ||
| 484 | m_range(1), | ||
| 485 | m_keycode(std::move(keycode)), | ||
| 486 | m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) | ||
| 487 | { | 442 | { |
| 488 | } | 443 | } |
| 489 | 444 | ||
| @@ -501,23 +456,12 @@ namespace addon | |||
| 501 | */ | 456 | */ |
| 502 | DriverPrimitive(JOYSTICK_DRIVER_RELPOINTER_DIRECTION direction) : | 457 | DriverPrimitive(JOYSTICK_DRIVER_RELPOINTER_DIRECTION direction) : |
| 503 | m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_RELPOINTER_DIRECTION), | 458 | m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_RELPOINTER_DIRECTION), |
| 504 | m_driverIndex(0), | ||
| 505 | m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), | ||
| 506 | m_center(0), | ||
| 507 | m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), | ||
| 508 | m_range(1), | ||
| 509 | m_relPointerDirection(direction) | 459 | m_relPointerDirection(direction) |
| 510 | { | 460 | { |
| 511 | } | 461 | } |
| 512 | 462 | ||
| 513 | explicit DriverPrimitive(const JOYSTICK_DRIVER_PRIMITIVE& primitive) : | 463 | explicit DriverPrimitive(const JOYSTICK_DRIVER_PRIMITIVE& primitive) : |
| 514 | m_type(primitive.type), | 464 | m_type(primitive.type) |
| 515 | m_driverIndex(0), | ||
| 516 | m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), | ||
| 517 | m_center(0), | ||
| 518 | m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), | ||
| 519 | m_range(1), | ||
| 520 | m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) | ||
| 521 | { | 465 | { |
| 522 | switch (m_type) | 466 | switch (m_type) |
| 523 | { | 467 | { |
| @@ -677,14 +621,14 @@ namespace addon | |||
| 677 | } | 621 | } |
| 678 | 622 | ||
| 679 | private: | 623 | private: |
| 680 | JOYSTICK_DRIVER_PRIMITIVE_TYPE m_type; | 624 | JOYSTICK_DRIVER_PRIMITIVE_TYPE m_type = JOYSTICK_DRIVER_PRIMITIVE_TYPE_UNKNOWN; |
| 681 | unsigned int m_driverIndex; | 625 | unsigned int m_driverIndex = 0; |
| 682 | JOYSTICK_DRIVER_HAT_DIRECTION m_hatDirection; | 626 | JOYSTICK_DRIVER_HAT_DIRECTION m_hatDirection = JOYSTICK_DRIVER_HAT_UNKNOWN; |
| 683 | int m_center; | 627 | int m_center = 0; |
| 684 | JOYSTICK_DRIVER_SEMIAXIS_DIRECTION m_semiAxisDirection; | 628 | JOYSTICK_DRIVER_SEMIAXIS_DIRECTION m_semiAxisDirection = JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN; |
| 685 | unsigned int m_range; | 629 | unsigned int m_range = 1; |
| 686 | std::string m_keycode; | 630 | std::string m_keycode; |
| 687 | JOYSTICK_DRIVER_RELPOINTER_DIRECTION m_relPointerDirection; | 631 | JOYSTICK_DRIVER_RELPOINTER_DIRECTION m_relPointerDirection = JOYSTICK_DRIVER_RELPOINTER_UNKNOWN; |
| 688 | }; | 632 | }; |
| 689 | 633 | ||
| 690 | typedef PeripheralVector<DriverPrimitive, JOYSTICK_DRIVER_PRIMITIVE> DriverPrimitives; | 634 | typedef PeripheralVector<DriverPrimitive, JOYSTICK_DRIVER_PRIMITIVE> DriverPrimitives; |
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h index 04821b2..c4f8005 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h | |||
| @@ -1,24 +1,13 @@ | |||
| 1 | #pragma once | ||
| 2 | /* | 1 | /* |
| 3 | * Copyright (C) 2005-2017 Team Kodi | 2 | * Copyright (C) 2005-2018 Team Kodi |
| 4 | * http://kodi.tv | 3 | * This file is part of Kodi - https://kodi.tv |
| 5 | * | ||
| 6 | * This Program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | * This Program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with Kodi; see the file COPYING. If not, see | ||
| 18 | * <http://www.gnu.org/licenses/>. | ||
| 19 | * | 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 20 | */ | 7 | */ |
| 21 | 8 | ||
| 9 | #pragma once | ||
| 10 | |||
| 22 | #include "../AddonBase.h" | 11 | #include "../AddonBase.h" |
| 23 | 12 | ||
| 24 | namespace kodi { namespace addon { class CInstanceScreensaver; }} | 13 | namespace kodi { namespace addon { class CInstanceScreensaver; }} |
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h index 637a991..3bdc059 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h | |||
| @@ -1,23 +1,12 @@ | |||
| 1 | #pragma once | ||
| 2 | /* | 1 | /* |
| 3 | * Copyright (C) 2015 Team Kodi | 2 | * Copyright (C) 2015-2018 Team Kodi |
| 4 | * | ||
| 5 | * This Program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 8 | * any later version. | ||
| 9 | * | ||
| 10 | * This Program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with Kodi; see the file COPYING. If not, see | ||
| 17 | * <http://www.gnu.org/licenses/>. | ||
| 18 | * | 3 | * |
| 4 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 5 | * See LICENSES/README.md for more information. | ||
| 19 | */ | 6 | */ |
| 20 | 7 | ||
| 8 | #pragma once | ||
| 9 | |||
| 21 | #include "../AddonBase.h" | 10 | #include "../AddonBase.h" |
| 22 | #include "../Filesystem.h" | 11 | #include "../Filesystem.h" |
| 23 | 12 | ||
| @@ -578,7 +567,7 @@ namespace addon | |||
| 578 | int* num_entries, | 567 | int* num_entries, |
| 579 | char* rootpath) | 568 | char* rootpath) |
| 580 | { | 569 | { |
| 581 | std::string cppRootPath; | 570 | std::string cppRootPath; |
| 582 | std::vector<kodi::vfs::CDirEntry> addonEntries; | 571 | std::vector<kodi::vfs::CDirEntry> addonEntries; |
| 583 | bool ret = instance->toAddon.addonInstance->ContainsFiles(*url, addonEntries, cppRootPath); | 572 | bool ret = instance->toAddon.addonInstance->ContainsFiles(*url, addonEntries, cppRootPath); |
| 584 | if (ret) | 573 | if (ret) |
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h index 8a8779a..9c33fbf 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h | |||
| @@ -1,21 +1,9 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2017 Team XBMC | 2 | * Copyright (C) 2017-2018 Team Kodi |
| 3 | * http://kodi.tv | 3 | * This file is part of Kodi - https://kodi.tv |
| 4 | * | ||
| 5 | * This Program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 8 | * any later version. | ||
| 9 | * | ||
| 10 | * This Program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with XBMC; see the file COPYING. If not, see | ||
| 17 | * <http://www.gnu.org/licenses/>. | ||
| 18 | * | 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 19 | */ | 7 | */ |
| 20 | 8 | ||
| 21 | #pragma once | 9 | #pragma once |
| @@ -53,12 +41,12 @@ extern "C" | |||
| 53 | } codec; | 41 | } codec; |
| 54 | 42 | ||
| 55 | STREAMCODEC_PROFILE codecProfile; | 43 | STREAMCODEC_PROFILE codecProfile; |
| 56 | 44 | ||
| 57 | //UnknownVideoFormat is terminator | 45 | //UnknownVideoFormat is terminator |
| 58 | VIDEOCODEC_FORMAT *videoFormats; | 46 | VIDEOCODEC_FORMAT *videoFormats; |
| 59 | 47 | ||
| 60 | uint32_t width, height; | 48 | uint32_t width, height; |
| 61 | 49 | ||
| 62 | const uint8_t *extraData; | 50 | const uint8_t *extraData; |
| 63 | unsigned int extraDataSize; | 51 | unsigned int extraDataSize; |
| 64 | 52 | ||
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h index a2bef15..6c29693 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h | |||
| @@ -1,24 +1,13 @@ | |||
| 1 | #pragma once | ||
| 2 | /* | 1 | /* |
| 3 | * Copyright (C) 2005-2017 Team Kodi | 2 | * Copyright (C) 2005-2018 Team Kodi |
| 4 | * http://kodi.tv | 3 | * This file is part of Kodi - https://kodi.tv |
| 5 | * | ||
| 6 | * This Program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | * This Program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with Kodi; see the file COPYING. If not, see | ||
| 18 | * <http://www.gnu.org/licenses/>. | ||
| 19 | * | 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0-or-later | ||
| 6 | * See LICENSES/README.md for more information. | ||
| 20 | */ | 7 | */ |
| 21 | 8 | ||
| 9 | #pragma once | ||
| 10 | |||
| 22 | /* | 11 | /* |
| 23 | * Parts with a comment named "internal" are only used inside header and not | 12 | * Parts with a comment named "internal" are only used inside header and not |
| 24 | * used or accessed direct during add-on development! | 13 | * used or accessed direct during add-on development! |
| @@ -34,7 +23,7 @@ extern "C" | |||
| 34 | struct AddonInstance_Visualization; | 23 | struct AddonInstance_Visualization; |
| 35 | 24 | ||
| 36 | typedef enum VIS_ACTION : unsigned int /* internal */ | 25 | typedef enum VIS_ACTION : unsigned int /* internal */ |
| 37 | { | 26 | { |
| 38 | VIS_ACTION_NONE = 0, | 27 | VIS_ACTION_NONE = 0, |
| 39 | VIS_ACTION_NEXT_PRESET, | 28 | VIS_ACTION_NEXT_PRESET, |
| 40 | VIS_ACTION_PREV_PRESET, | 29 | VIS_ACTION_PREV_PRESET, |
| @@ -318,8 +307,7 @@ namespace addon | |||
| 318 | /// Used by an add-on that only supports visualizations. | 307 | /// Used by an add-on that only supports visualizations. |
| 319 | /// | 308 | /// |
| 320 | CInstanceVisualization() | 309 | CInstanceVisualization() |
| 321 | : IAddonInstance(ADDON_INSTANCE_VISUALIZATION), | 310 | : IAddonInstance(ADDON_INSTANCE_VISUALIZATION) |
| 322 | m_presetLockedByUser(false) | ||
| 323 | { | 311 | { |
| 324 | if (CAddonBase::m_interface->globalSingleInstance != nullptr) | 312 | if (CAddonBase::m_interface->globalSingleInstance != nullptr) |
| 325 | throw std::logic_error("kodi::addon::CInstanceVisualization: Cannot create multiple instances of add-on."); | 313 | throw std::logic_error("kodi::addon::CInstanceVisualization: Cannot create multiple instances of add-on."); |
| @@ -341,8 +329,7 @@ namespace addon | |||
| 341 | /// @warning Only use `instance` from the CreateInstance call | 329 | /// @warning Only use `instance` from the CreateInstance call |
| 342 | /// | 330 | /// |
| 343 | explicit CInstanceVisualization(KODI_HANDLE instance) | 331 | explicit CInstanceVisualization(KODI_HANDLE instance) |
| 344 | : IAddonInstance(ADDON_INSTANCE_VISUALIZATION), | 332 | : IAddonInstance(ADDON_INSTANCE_VISUALIZATION) |
| 345 | m_presetLockedByUser(false) | ||
| 346 | { | 333 | { |
| 347 | if (CAddonBase::m_interface->globalSingleInstance != nullptr) | 334 | if (CAddonBase::m_interface->globalSingleInstance != nullptr) |
| 348 | throw std::logic_error("kodi::addon::CInstanceVisualization: Creation of multiple together with single instance way is not allowed!"); | 335 | throw std::logic_error("kodi::addon::CInstanceVisualization: Creation of multiple together with single instance way is not allowed!"); |
| @@ -690,7 +677,7 @@ namespace addon | |||
| 690 | { | 677 | { |
| 691 | addon->toAddon.addonInstance->AudioData(audioData, audioDataLength, freqData, freqDataLength); | 678 | addon->toAddon.addonInstance->AudioData(audioData, audioDataLength, freqData, freqDataLength); |
| 692 | } | 679 | } |
| 693 | 680 | ||
| 694 | inline static bool ADDON_IsDirty(const AddonInstance_Visualization* addon) | 681 | inline static bool ADDON_IsDirty(const AddonInstance_Visualization* addon) |
| 695 | { | 682 | { |
| 696 | return addon->toAddon.addonInstance->IsDirty(); | 683 | return addon->toAddon.addonInstance->IsDirty(); |
| @@ -758,7 +745,7 @@ namespace addon | |||
| 758 | return addon->toAddon.addonInstance->IsLocked(); | 745 | return addon->toAddon.addonInstance->IsLocked(); |
| 759 | } | 746 | } |
| 760 | 747 | ||
| 761 | bool m_presetLockedByUser; | 748 | bool m_presetLockedByUser = false; |
| 762 | AddonInstance_Visualization* m_instanceData; | 749 | AddonInstance_Visualization* m_instanceData; |
| 763 | }; | 750 | }; |
| 764 | 751 | ||
