From 2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 30 Aug 2018 00:42:04 +0200 Subject: sync with upstream --- .../kodi-addon-dev-kit/include/kodi/AddonBase.h | 33 +- .../kodi-addon-dev-kit/include/kodi/Filesystem.h | 31 +- .../kodi-addon-dev-kit/include/kodi/General.h | 27 +- .../kodi-addon-dev-kit/include/kodi/Network.h | 23 +- .../kodi-addon-dev-kit/include/kodi/StreamCodec.h | 23 +- .../kodi-addon-dev-kit/include/kodi/StreamCrypto.h | 23 +- .../include/kodi/addon-instance/AudioDecoder.h | 23 +- .../include/kodi/addon-instance/AudioEncoder.h | 29 +- .../include/kodi/addon-instance/ImageDecoder.h | 23 +- .../include/kodi/addon-instance/Inputstream.h | 25 +- .../include/kodi/addon-instance/Peripheral.h | 25 +- .../include/kodi/addon-instance/PeripheralUtils.h | 112 ++---- .../include/kodi/addon-instance/Screensaver.h | 23 +- .../include/kodi/addon-instance/VFS.h | 23 +- .../include/kodi/addon-instance/VideoCodec.h | 24 +- .../include/kodi/addon-instance/Visualization.h | 35 +- .../kodi-addon-dev-kit/include/kodi/gui/General.h | 23 +- .../kodi-addon-dev-kit/include/kodi/gui/ListItem.h | 23 +- .../kodi-addon-dev-kit/include/kodi/gui/Window.h | 27 +- .../include/kodi/gui/controls/Button.h | 23 +- .../include/kodi/gui/controls/Edit.h | 23 +- .../include/kodi/gui/controls/FadeLabel.h | 23 +- .../include/kodi/gui/controls/Image.h | 23 +- .../include/kodi/gui/controls/Label.h | 23 +- .../include/kodi/gui/controls/Progress.h | 23 +- .../include/kodi/gui/controls/RadioButton.h | 23 +- .../include/kodi/gui/controls/Rendering.h | 23 +- .../include/kodi/gui/controls/SettingsSlider.h | 23 +- .../include/kodi/gui/controls/Slider.h | 23 +- .../include/kodi/gui/controls/Spin.h | 23 +- .../include/kodi/gui/controls/TextBox.h | 23 +- .../include/kodi/gui/definitions.h | 25 +- .../include/kodi/gui/dialogs/ContextMenu.h | 23 +- .../include/kodi/gui/dialogs/ExtendedProgress.h | 23 +- .../include/kodi/gui/dialogs/FileBrowser.h | 27 +- .../include/kodi/gui/dialogs/Keyboard.h | 23 +- .../include/kodi/gui/dialogs/Numeric.h | 23 +- .../include/kodi/gui/dialogs/OK.h | 23 +- .../include/kodi/gui/dialogs/Progress.h | 23 +- .../include/kodi/gui/dialogs/Select.h | 27 +- .../include/kodi/gui/dialogs/TextViewer.h | 23 +- .../include/kodi/gui/dialogs/YesNo.h | 23 +- .../include/kodi/kodi_game_dll.h | 35 +- .../include/kodi/kodi_game_types.h | 407 ++++++++++++++------- .../include/kodi/kodi_vfs_types.h | 19 +- .../kodi-addon-dev-kit/include/kodi/libKODI_game.h | 117 ++---- .../include/kodi/libKODI_guilib.h | 31 +- .../include/kodi/libXBMC_addon.h | 33 +- .../kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h | 25 +- .../include/kodi/platform/android/System.h | 44 ++- .../include/kodi/tools/DllHelper.h | 23 +- .../kodi-addon-dev-kit/include/kodi/versions.h | 35 +- .../include/kodi/xbmc_addon_dll.h | 24 +- .../include/kodi/xbmc_addon_types.h | 24 +- .../include/kodi/xbmc_epg_types.h | 25 +- .../kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h | 266 ++++++++------ .../include/kodi/xbmc_pvr_types.h | 36 +- xbmc/cores/AudioEngine/Utils/AEChannelData.h | 23 +- .../VideoPlayer/Interface/Addon/DemuxCrypto.h | 31 +- .../VideoPlayer/Interface/Addon/DemuxPacket.h | 24 +- .../VideoPlayer/Interface/Addon/TimingConstants.h | 34 +- xbmc/filesystem/IFileTypes.h | 20 +- xbmc/input/ActionIDs.h | 24 +- xbmc/input/XBMC_vkeys.h | 33 +- xbmc/interfaces/json-rpc/schema/version.txt | 2 +- 65 files changed, 936 insertions(+), 1513 deletions(-) (limited to 'xbmc') diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h index 7abd8e1..42ce2e7 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include /* va_list, va_start, va_arg, va_end */ #include #include @@ -263,11 +252,11 @@ public: explicit CSettingValue(const void *settingValue) : m_settingValue(settingValue) {} bool empty() const { return (m_settingValue == nullptr) ? true : false; } - std::string GetString() const { return (char*)m_settingValue; } - int GetInt() const { return *(int*)m_settingValue; } - unsigned int GetUInt() const { return *(unsigned int*)m_settingValue; } - bool GetBoolean() const { return *(bool*)m_settingValue; } - float GetFloat() const { return *(float*)m_settingValue; } + std::string GetString() const { return (const char*)m_settingValue; } + int GetInt() const { return *(const int*)m_settingValue; } + unsigned int GetUInt() const { return *(const unsigned int*)m_settingValue; } + bool GetBoolean() const { return *(const bool*)m_settingValue; } + float GetFloat() const { return *(const float*)m_settingValue; } private: const void *m_settingValue; diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h index b089da3..3df6cec 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "AddonBase.h" #include @@ -40,7 +29,7 @@ #define _SSIZE_T_DEFINED #endif // !_SSIZE_T_DEFINED #endif - + #ifndef S_ISDIR #define S_ISDIR(mode) ((((mode)) & 0170000) == (0040000)) #endif @@ -895,7 +884,7 @@ namespace vfs return strReturn; } //---------------------------------------------------------------------------- - + //============================================================================ /// /// @ingroup cpp_kodi_vfs @@ -1231,7 +1220,7 @@ namespace vfs /// @ingroup cpp_kodi_vfs_CFile /// @brief Construct a new, unopened file /// - CFile() : m_file(nullptr) { } + CFile() = default; //-------------------------------------------------------------------------- //========================================================================== @@ -1637,7 +1626,7 @@ namespace vfs //-------------------------------------------------------------------------- private: - void* m_file; + void* m_file = nullptr; }; //@} //---------------------------------------------------------------------------- diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/General.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/General.h index 22d31f1..999ff6a 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/General.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/General.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "AddonBase.h" /* @@ -188,8 +177,8 @@ namespace kodi { /// @return The localized message, or default if the add-on /// helper fails to return a message /// -/// @note Label id's \b 30000 to \b 30999 and \b 32000 to \b 32999 are related -/// to the add-on's own included strings from +/// @note Label id's \b 30000 to \b 30999 and \b 32000 to \b 32999 are related +/// to the add-on's own included strings from /// ./resources/language/resource.language.??_??/strings.po /// All other strings are from Kodi core language files. /// diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/Network.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/Network.h index f27b710..73390c4 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/Network.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/Network.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "AddonBase.h" /* diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/StreamCodec.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/StreamCodec.h index 85de3ec..729cdc0 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/StreamCodec.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/StreamCodec.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2017-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + enum STREAMCODEC_PROFILE { CodecProfileUnknown = 0, diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/StreamCrypto.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/StreamCrypto.h index f802f3b..dcb7896 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/StreamCrypto.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/StreamCrypto.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2017-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + typedef struct CRYPTO_INFO { enum CRYPTO_KEY_SYSTEM : uint8_t 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 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../AddonBase.h" #ifdef BUILD_KODI_ADDON #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 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../AddonBase.h" namespace kodi { namespace addon { class CInstanceAudioEncoder; }} @@ -136,10 +125,10 @@ namespace addon //========================================================================== /// \brief Write block of data /// - /// \param[in] data Pointer to the array of elements to be + /// \param[in] data Pointer to the array of elements to be /// written /// \param[in] length Size in bytes to be written. - /// \return The total number of bytes + /// \return The total number of bytes /// successfully written is returned. int Write(const uint8_t* data, int length) { @@ -154,7 +143,7 @@ namespace addon /// /// \param[in] position the position that you want to seek to /// \param[in] whence [optional] offset relative to - /// You can set the value of whence to one + /// You can set the value of whence to one /// of three things: /// | Value | int | Description | /// |:--------:|:---:|:---------------------------------------------------| 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 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../AddonBase.h" 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 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + /* * Parts with a comment named "internal" are only used inside header and not * used or accessed direct during add-on development! @@ -142,7 +131,7 @@ extern "C" { const uint8_t *m_ExtraData; unsigned int m_ExtraSize; - char m_language[4]; /*!< @brief ISO 639 3-letter language code (empty string if undefined) */ + char m_language[64]; /*!< @brief RFC 5646 language code (empty string if undefined) */ unsigned int m_FpsScale; /*!< @brief Scale of 1000 and a rate of 29970 will result in 29.97 fps */ 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 @@ -#pragma once /* - * Copyright (C) 2014-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this Program; see the file COPYING. If not, see - * . + * Copyright (C) 2014-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../AddonBase.h" namespace kodi { namespace addon { class CInstancePeripheral; }} @@ -780,7 +769,7 @@ namespace addon return addonInstance->toAddon.addonInstance->SendEvent(event); } - + inline static PERIPHERAL_ERROR ADDON_GetJoystickInfo(const AddonInstance_Peripheral* addonInstance, unsigned int index, JOYSTICK_INFO* info) { 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 @@ /* - * Copyright (C) 2014-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this Program; see the file COPYING. If not, see - * . + * Copyright (C) 2014-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ + #pragma once #include "Peripheral.h" @@ -97,10 +86,7 @@ namespace addon public: Peripheral(PERIPHERAL_TYPE type = PERIPHERAL_TYPE_UNKNOWN, const std::string& strName = "") : m_type(type), - m_strName(strName), - m_vendorId(0), - m_productId(0), - m_index(0) + m_strName(strName) { } @@ -149,9 +135,9 @@ namespace addon private: PERIPHERAL_TYPE m_type; std::string m_strName; - uint16_t m_vendorId; - uint16_t m_productId; - unsigned int m_index; + uint16_t m_vendorId = 0; + uint16_t m_productId = 0; + unsigned int m_index = 0; }; typedef PeripheralVector Peripherals; @@ -259,12 +245,7 @@ namespace addon Joystick(const std::string& provider = "", const std::string& strName = "") : Peripheral(PERIPHERAL_TYPE_JOYSTICK, strName), m_provider(provider), - m_requestedPort(NO_PORT_REQUESTED), - m_buttonCount(0), - m_hatCount(0), - m_axisCount(0), - m_motorCount(0), - m_supportsPowerOff(false) + m_requestedPort(NO_PORT_REQUESTED) { } @@ -345,11 +326,11 @@ namespace addon private: std::string m_provider; int m_requestedPort; - unsigned int m_buttonCount; - unsigned int m_hatCount; - unsigned int m_axisCount; - unsigned int m_motorCount; - bool m_supportsPowerOff; + unsigned int m_buttonCount = 0; + unsigned int m_hatCount = 0; + unsigned int m_axisCount = 0; + unsigned int m_motorCount = 0; + bool m_supportsPowerOff = false; }; typedef PeripheralVector Joysticks; @@ -402,12 +383,7 @@ namespace addon */ DriverPrimitive(JOYSTICK_DRIVER_PRIMITIVE_TYPE type, unsigned int driverIndex) : m_type(type), - m_driverIndex(driverIndex), - m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), - m_center(0), - m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), - m_range(1), - m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) + m_driverIndex(driverIndex) { } @@ -415,16 +391,7 @@ namespace addon /*! * \brief Construct an invalid driver primitive */ - DriverPrimitive(void) : - m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_UNKNOWN), - m_driverIndex(0), - m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), - m_center(0), - m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), - m_range(1), - m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) - { - } + DriverPrimitive(void) = default; /*! * \brief Construct a driver primitive representing a joystick button @@ -441,11 +408,7 @@ namespace addon DriverPrimitive(unsigned int hatIndex, JOYSTICK_DRIVER_HAT_DIRECTION direction) : m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_HAT_DIRECTION), m_driverIndex(hatIndex), - m_hatDirection(direction), - m_center(0), - m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), - m_range(1), - m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) + m_hatDirection(direction) { } @@ -456,11 +419,9 @@ namespace addon DriverPrimitive(unsigned int axisIndex, int center, JOYSTICK_DRIVER_SEMIAXIS_DIRECTION direction, unsigned int range) : m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_SEMIAXIS), m_driverIndex(axisIndex), - m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), m_center(center), m_semiAxisDirection(direction), - m_range(range), - m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) + m_range(range) { } @@ -477,13 +438,7 @@ namespace addon */ DriverPrimitive(std::string keycode) : m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_KEY), - m_driverIndex(0), - m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), - m_center(0), - m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), - m_range(1), - m_keycode(std::move(keycode)), - m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) + m_keycode(std::move(keycode)) { } @@ -501,23 +456,12 @@ namespace addon */ DriverPrimitive(JOYSTICK_DRIVER_RELPOINTER_DIRECTION direction) : m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_RELPOINTER_DIRECTION), - m_driverIndex(0), - m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), - m_center(0), - m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), - m_range(1), m_relPointerDirection(direction) { } explicit DriverPrimitive(const JOYSTICK_DRIVER_PRIMITIVE& primitive) : - m_type(primitive.type), - m_driverIndex(0), - m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN), - m_center(0), - m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN), - m_range(1), - m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN) + m_type(primitive.type) { switch (m_type) { @@ -677,14 +621,14 @@ namespace addon } private: - JOYSTICK_DRIVER_PRIMITIVE_TYPE m_type; - unsigned int m_driverIndex; - JOYSTICK_DRIVER_HAT_DIRECTION m_hatDirection; - int m_center; - JOYSTICK_DRIVER_SEMIAXIS_DIRECTION m_semiAxisDirection; - unsigned int m_range; + JOYSTICK_DRIVER_PRIMITIVE_TYPE m_type = JOYSTICK_DRIVER_PRIMITIVE_TYPE_UNKNOWN; + unsigned int m_driverIndex = 0; + JOYSTICK_DRIVER_HAT_DIRECTION m_hatDirection = JOYSTICK_DRIVER_HAT_UNKNOWN; + int m_center = 0; + JOYSTICK_DRIVER_SEMIAXIS_DIRECTION m_semiAxisDirection = JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN; + unsigned int m_range = 1; std::string m_keycode; - JOYSTICK_DRIVER_RELPOINTER_DIRECTION m_relPointerDirection; + JOYSTICK_DRIVER_RELPOINTER_DIRECTION m_relPointerDirection = JOYSTICK_DRIVER_RELPOINTER_UNKNOWN; }; typedef PeripheralVector 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 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../AddonBase.h" 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 @@ -#pragma once /* - * Copyright (C) 2015 Team Kodi - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2015-2018 Team Kodi * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../AddonBase.h" #include "../Filesystem.h" @@ -578,7 +567,7 @@ namespace addon int* num_entries, char* rootpath) { - std::string cppRootPath; + std::string cppRootPath; std::vector addonEntries; bool ret = instance->toAddon.addonInstance->ContainsFiles(*url, addonEntries, cppRootPath); 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 @@ /* - * Copyright (C) 2017 Team XBMC - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, see - * . + * Copyright (C) 2017-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ #pragma once @@ -53,12 +41,12 @@ extern "C" } codec; STREAMCODEC_PROFILE codecProfile; - + //UnknownVideoFormat is terminator VIDEOCODEC_FORMAT *videoFormats; uint32_t width, height; - + const uint8_t *extraData; unsigned int extraDataSize; 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 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + /* * Parts with a comment named "internal" are only used inside header and not * used or accessed direct during add-on development! @@ -34,7 +23,7 @@ extern "C" struct AddonInstance_Visualization; typedef enum VIS_ACTION : unsigned int /* internal */ -{ +{ VIS_ACTION_NONE = 0, VIS_ACTION_NEXT_PRESET, VIS_ACTION_PREV_PRESET, @@ -318,8 +307,7 @@ namespace addon /// Used by an add-on that only supports visualizations. /// CInstanceVisualization() - : IAddonInstance(ADDON_INSTANCE_VISUALIZATION), - m_presetLockedByUser(false) + : IAddonInstance(ADDON_INSTANCE_VISUALIZATION) { if (CAddonBase::m_interface->globalSingleInstance != nullptr) throw std::logic_error("kodi::addon::CInstanceVisualization: Cannot create multiple instances of add-on."); @@ -341,8 +329,7 @@ namespace addon /// @warning Only use `instance` from the CreateInstance call /// explicit CInstanceVisualization(KODI_HANDLE instance) - : IAddonInstance(ADDON_INSTANCE_VISUALIZATION), - m_presetLockedByUser(false) + : IAddonInstance(ADDON_INSTANCE_VISUALIZATION) { if (CAddonBase::m_interface->globalSingleInstance != nullptr) throw std::logic_error("kodi::addon::CInstanceVisualization: Creation of multiple together with single instance way is not allowed!"); @@ -690,7 +677,7 @@ namespace addon { addon->toAddon.addonInstance->AudioData(audioData, audioDataLength, freqData, freqDataLength); } - + inline static bool ADDON_IsDirty(const AddonInstance_Visualization* addon) { return addon->toAddon.addonInstance->IsDirty(); @@ -758,7 +745,7 @@ namespace addon return addon->toAddon.addonInstance->IsLocked(); } - bool m_presetLockedByUser; + bool m_presetLockedByUser = false; AddonInstance_Visualization* m_instanceData; }; diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h index f1df60d..30b6d89 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../AddonBase.h" #include "definitions.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/ListItem.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/ListItem.h index 13cf2d1..f13b96e 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/ListItem.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/ListItem.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../AddonBase.h" #include "definitions.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h index c369c62..f188f34 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../AddonBase.h" #include "ListItem.h" @@ -98,7 +87,7 @@ namespace gui if (!m_controlHandle) kodi::Log(ADDON_LOG_FATAL, "kodi::gui::CWindow can't create window class from Kodi !!!"); m_interface->kodi_gui->window->set_callbacks(m_interface->kodiBase, m_controlHandle, this, - CBOnInit, CBOnFocus, CBOnClick, CBOnAction, + CBOnInit, CBOnFocus, CBOnClick, CBOnAction, CBGetContextButtons, CBOnContextButton); } //-------------------------------------------------------------------------- @@ -867,7 +856,7 @@ namespace gui static_cast(cbhdl)->GetContextButtons(itemNumber, buttonList); if (!buttonList.empty()) { - unsigned int presentSize = buttonList.size(); + unsigned int presentSize = static_cast(buttonList.size()); if (presentSize > *size) kodi::Log(ADDON_LOG_WARNING, "GetContextButtons: More as allowed '%i' entries present!", *size); else diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Button.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Button.h index 5892d24..a38de1a 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Button.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Button.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../../AddonBase.h" #include "../Window.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Edit.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Edit.h index 83eeede..5d30160 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Edit.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Edit.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../../AddonBase.h" #include "../Window.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/FadeLabel.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/FadeLabel.h index 82d17ff..aab8929 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/FadeLabel.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/FadeLabel.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../../AddonBase.h" #include "../Window.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Image.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Image.h index 1179fab..a872ab0 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Image.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Image.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../../AddonBase.h" #include "../Window.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Label.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Label.h index f74ac03..eecfd8b 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Label.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Label.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../../AddonBase.h" #include "../Window.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Progress.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Progress.h index 44310ed..78880c4 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Progress.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Progress.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../../AddonBase.h" #include "../Window.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/RadioButton.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/RadioButton.h index b87920d..1721759 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/RadioButton.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/RadioButton.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../../AddonBase.h" #include "../Window.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Rendering.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Rendering.h index f80fcfa..b3dadcd 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Rendering.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Rendering.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../../AddonBase.h" #include "../Window.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/SettingsSlider.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/SettingsSlider.h index e51433a..4f97ba5 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/SettingsSlider.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/SettingsSlider.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../../AddonBase.h" #include "../Window.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Slider.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Slider.h index cbb9b8f..6eae70a 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Slider.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Slider.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../../AddonBase.h" #include "../Window.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Spin.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Spin.h index b39cd06..f3017b5 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Spin.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Spin.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../../AddonBase.h" #include "../Window.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/TextBox.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/TextBox.h index 9d8976e..13ce1da 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/TextBox.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/TextBox.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../../AddonBase.h" #include "../Window.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h index 1dd03cc..770a416 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include #include @@ -223,7 +212,7 @@ typedef struct AddonToKodiFuncTable_kodi_gui_dialogKeyboard bool (*send_text_to_active_keyboard)(void* kodiBase, const char* text, bool close_keyboard); bool (*is_keyboard_activated)(void* kodiBase); } AddonToKodiFuncTable_kodi_gui_dialogKeyboard; - + typedef struct AddonToKodiFuncTable_kodi_gui_dialogNumeric { bool (*show_and_verify_new_password)(void* kodiBase, char** password); diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ContextMenu.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ContextMenu.h index 39b21b4..26d6386 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ContextMenu.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ContextMenu.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../definitions.h" #include "../../AddonBase.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ExtendedProgress.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ExtendedProgress.h index 5878958..417d5db 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ExtendedProgress.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ExtendedProgress.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../definitions.h" #include "../../AddonBase.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/FileBrowser.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/FileBrowser.h index 401a78d..bb1065d 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/FileBrowser.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/FileBrowser.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../definitions.h" #include "../../AddonBase.h" @@ -159,7 +148,7 @@ namespace dialogs char* retString = nullptr; bool ret = CAddonBase::m_interface->toKodi->kodi_gui->dialogFileBrowser->show_and_get_file_from_dir(CAddonBase::m_interface->toKodi->kodiBase, directory.c_str(), mask.c_str(), heading.c_str(), - path.c_str(), &retString, useThumbs, + path.c_str(), &retString, useThumbs, useFileDirectories, singleList); if (retString != nullptr) { @@ -223,7 +212,7 @@ namespace dialogs { using namespace ::kodi::addon; char* retString = nullptr; - bool ret = CAddonBase::m_interface->toKodi->kodi_gui->dialogFileBrowser->show_and_get_source(CAddonBase::m_interface->toKodi->kodiBase, path.c_str(), &retString, + bool ret = CAddonBase::m_interface->toKodi->kodi_gui->dialogFileBrowser->show_and_get_source(CAddonBase::m_interface->toKodi->kodiBase, path.c_str(), &retString, allowNetworkShares, additionalShare.c_str(), type.c_str()); if (retString != nullptr) { diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Keyboard.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Keyboard.h index 6d2b32b..76284d8 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Keyboard.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Keyboard.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../definitions.h" #include "../../AddonBase.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Numeric.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Numeric.h index 70e9e7b..4a8eccb 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Numeric.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Numeric.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../definitions.h" #include "../../AddonBase.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/OK.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/OK.h index 12799b7..a47880f 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/OK.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/OK.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../../AddonBase.h" #include "../definitions.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Progress.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Progress.h index 3f18499..bbaa98d 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Progress.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Progress.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../definitions.h" #include "../../AddonBase.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Select.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Select.h index 8276832..ba0db1d 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Select.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Select.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../definitions.h" #include "../../AddonBase.h" @@ -39,7 +28,7 @@ typedef struct SSelectionEntry /// /// There becomes selected always set to false. /// - SSelectionEntry() : selected(false) { } + SSelectionEntry() = default; //---------------------------------------------------------------------------- /// Entry identfication string @@ -50,7 +39,7 @@ typedef struct SSelectionEntry /// Place where entry can be preselected and after return the from user /// selected is set. - bool selected; + bool selected = false; } SSelectionEntry; //------------------------------------------------------------------------------ diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/TextViewer.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/TextViewer.h index c64bc1e..da38f7c 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/TextViewer.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/TextViewer.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2015-2016 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2015-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../definitions.h" #include "../../AddonBase.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/YesNo.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/YesNo.h index d9c34ff..c694bf5 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/YesNo.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/YesNo.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../definitions.h" #include "../../AddonBase.h" diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h index 79ca778..40979e5 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h @@ -1,24 +1,12 @@ /* - * Copyright (C) 2014-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this Program; see the file COPYING. If not, see - * . + * Copyright (C) 2014-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ -#ifndef KODI_GAME_DLL_H_ -#define KODI_GAME_DLL_H_ + +#pragma once #include "kodi_game_types.h" @@ -40,7 +28,7 @@ GAME_ERROR LoadGame(const char* url); /*! * \brief Load a game that requires multiple files * - * \param type The game stype + * \param type The game type * \param urls An array of urls * \param urlCount The number of urls in the array * @@ -69,13 +57,13 @@ GAME_ERROR LoadStandalone(void); GAME_ERROR UnloadGame(void); /*! - * \brief Get information about the loaded game + * \brief Get timing information about the loaded game * * \param info The info structure to fill * * \return the error, or GAME_ERROR_NO_ERROR if info was filled */ -GAME_ERROR GetGameInfo(game_system_av_info* info); +GAME_ERROR GetGameTiming(game_system_timing* timing_info); /*! * \brief Get region of the loaded game @@ -145,7 +133,7 @@ GAME_ERROR HwContextDestroy(void); bool HasFeature(const char* controller_id, const char* feature_name); /*! - * \brief Get the input topolgy that specifies which controllers can be connected + * \brief Get the input topology that specifies which controllers can be connected * * \return The input topology, or null to use the default * @@ -311,7 +299,7 @@ void __declspec(dllexport) get_addon(void* ptr) pClient->toAddon.LoadGameSpecial = LoadGameSpecial; pClient->toAddon.LoadStandalone = LoadStandalone; pClient->toAddon.UnloadGame = UnloadGame; - pClient->toAddon.GetGameInfo = GetGameInfo; + pClient->toAddon.GetGameTiming = GetGameTiming; pClient->toAddon.GetRegion = GetRegion; pClient->toAddon.RequiresGameLoop = RequiresGameLoop; pClient->toAddon.RunFrame = RunFrame; @@ -337,4 +325,3 @@ void __declspec(dllexport) get_addon(void* ptr) } #endif -#endif // KODI_GAME_DLL_H_ diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h index 758b0fa..e3187d2 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h @@ -1,24 +1,12 @@ /* - * Copyright (C) 2014-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this Program; see the file COPYING. If not, see - * . + * Copyright (C) 2014-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ -#ifndef KODI_GAME_TYPES_H_ -#define KODI_GAME_TYPES_H_ + +#pragma once #include "versions.h" #include "xbmc_addon_types.h" @@ -62,6 +50,8 @@ extern "C" { #endif +/// @name Add-on types +///{ /*! Game add-on error codes */ typedef enum GAME_ERROR { @@ -74,50 +64,16 @@ typedef enum GAME_ERROR GAME_ERROR_NOT_LOADED, // no game is loaded GAME_ERROR_RESTRICTED, // game requires restricted resources } GAME_ERROR; +///} -typedef enum GAME_STREAM_TYPE -{ - GAME_STREAM_UNKNOWN, - GAME_STREAM_AUDIO, - GAME_STREAM_VIDEO, -} GAME_STREAM_TYPE; - -typedef enum GAME_PIXEL_FORMAT -{ - GAME_PIXEL_FORMAT_UNKNOWN, - GAME_PIXEL_FORMAT_YUV420P, - GAME_PIXEL_FORMAT_0RGB8888, - GAME_PIXEL_FORMAT_RGB565, - GAME_PIXEL_FORMAT_0RGB1555, -} GAME_PIXEL_FORMAT; - -typedef enum GAME_VIDEO_CODEC -{ - GAME_VIDEO_CODEC_UNKNOWN, - GAME_VIDEO_CODEC_H264, - GAME_VIDEO_CODEC_THEORA, -} GAME_VIDEO_CODEC; - -typedef enum GAME_VIDEO_ROTATION // Counter-clockwise -{ - GAME_VIDEO_ROTATION_0, - GAME_VIDEO_ROTATION_90, - GAME_VIDEO_ROTATION_180, - GAME_VIDEO_ROTATION_270, -} GAME_VIDEO_ROTATION; - +/// @name Audio stream +///{ typedef enum GAME_PCM_FORMAT { GAME_PCM_FORMAT_UNKNOWN, GAME_PCM_FORMAT_S16NE, } GAME_PCM_FORMAT; -typedef enum GAME_AUDIO_CODEC -{ - GAME_AUDIO_CODEC_UNKNOWN, - GAME_AUDIO_CODEC_OPUS, -} GAME_AUDIO_CODEC; - typedef enum GAME_AUDIO_CHANNEL { GAME_CH_NULL, // Channel list terminator @@ -143,50 +99,234 @@ typedef enum GAME_AUDIO_CHANNEL GAME_CH_BROC, } GAME_AUDIO_CHANNEL; -// TODO -typedef enum GAME_HW_FRAME_BUFFER +typedef struct game_stream_audio_properties +{ + GAME_PCM_FORMAT format; + const GAME_AUDIO_CHANNEL* channel_map; +} ATTRIBUTE_PACKED game_stream_audio_properties; + +typedef struct game_stream_audio_packet +{ + const uint8_t *data; + size_t size; +} ATTRIBUTE_PACKED game_stream_audio_packet; +///} + +/// @name Video stream +///{ +typedef enum GAME_PIXEL_FORMAT +{ + GAME_PIXEL_FORMAT_UNKNOWN, + GAME_PIXEL_FORMAT_0RGB8888, + GAME_PIXEL_FORMAT_RGB565, + GAME_PIXEL_FORMAT_0RGB1555, +} GAME_PIXEL_FORMAT; + +typedef enum GAME_VIDEO_ROTATION +{ + GAME_VIDEO_ROTATION_0, + GAME_VIDEO_ROTATION_90_CCW, + GAME_VIDEO_ROTATION_180_CCW, + GAME_VIDEO_ROTATION_270_CCW, +} GAME_VIDEO_ROTATION; + +typedef struct game_stream_video_properties { - GAME_HW_FRAME_BUFFER_VALID, // Pass this to game_video_refresh if rendering to hardware - GAME_HW_FRAME_BUFFER_DUPLICATE, // Passing NULL to game_video_refresh is still a frame dupe as normal - GAME_HW_FRAME_BUFFER_RENDER, -} GAME_HW_FRAME_BUFFER; + GAME_PIXEL_FORMAT format; + unsigned int nominal_width; + unsigned int nominal_height; + unsigned int max_width; + unsigned int max_height; + float aspect_ratio; // If aspect_ratio is <= 0.0, an aspect ratio of nominal_width / nominal_height is assumed +} ATTRIBUTE_PACKED game_stream_video_properties; +typedef struct game_stream_video_packet +{ + unsigned int width; + unsigned int height; + GAME_VIDEO_ROTATION rotation; + const uint8_t *data; + size_t size; +} ATTRIBUTE_PACKED game_stream_video_packet; +///} + +/// @name Hardware framebuffer stream +///{ typedef enum GAME_HW_CONTEXT_TYPE { GAME_HW_CONTEXT_NONE, - GAME_HW_CONTEXT_OPENGL, // OpenGL 2.x. Latest version available before 3.x+. Driver can choose to use latest compatibility context - GAME_HW_CONTEXT_OPENGLES2, // GLES 2.0 - GAME_HW_CONTEXT_OPENGL_CORE, // Modern desktop core GL context. Use major/minor fields to set GL version - GAME_HW_CONTEXT_OPENGLES3, // GLES 3.0 + + // OpenGL 2.x. Driver can choose to use latest compatibility context + GAME_HW_CONTEXT_OPENGL, + + // OpenGL ES 2.0 + GAME_HW_CONTEXT_OPENGLES2, + + // Modern desktop core GL context. Use major/minor fields to set GL version + GAME_HW_CONTEXT_OPENGL_CORE, + + // OpenGL ES 3.0 + GAME_HW_CONTEXT_OPENGLES3, + + // OpenGL ES 3.1+. Set major/minor fields. + GAME_HW_CONTEXT_OPENGLES_VERSION, + + // Vulkan + GAME_HW_CONTEXT_VULKAN } GAME_HW_CONTEXT_TYPE; -typedef enum GAME_INPUT_EVENT_SOURCE +typedef struct game_stream_hw_framebuffer_properties { - GAME_INPUT_EVENT_DIGITAL_BUTTON, - GAME_INPUT_EVENT_ANALOG_BUTTON, - GAME_INPUT_EVENT_AXIS, - GAME_INPUT_EVENT_ANALOG_STICK, - GAME_INPUT_EVENT_ACCELEROMETER, - GAME_INPUT_EVENT_KEY, - GAME_INPUT_EVENT_RELATIVE_POINTER, - GAME_INPUT_EVENT_ABSOLUTE_POINTER, - GAME_INPUT_EVENT_MOTOR, -} GAME_INPUT_EVENT_SOURCE; + /*! + * The API to use. + */ + GAME_HW_CONTEXT_TYPE context_type; -typedef enum GAME_KEY_MOD + /*! + * Set if render buffers should have depth component attached. + * + * TODO: Obsolete + */ + bool depth; + + /*! + * Set if stencil buffers should be attached. If depth and stencil are true, + * a packed 24/8 buffer will be added. Only attaching stencil is invalid and + * will be ignored. + * + * TODO: Obsolete. + */ + bool stencil; + + /*! + * Use conventional bottom-left origin convention. If false, standard top-left + * origin semantics are used. + * + * TODO: Move to GL specific interface + */ + bool bottom_left_origin; + + /*! + * Major version number for core GL context or GLES 3.1+. + */ + unsigned int version_major; + + /*! + * Minor version number for core GL context or GLES 3.1+. + */ + unsigned int version_minor; + + /*! + * If this is true, the frontend will go very far to avoid resetting context + * in scenarios like toggling fullscreen, etc. + * + * TODO: Obsolete? Maybe frontend should just always assume this... + * + * The reset callback might still be called in extreme situations such as if + * the context is lost beyond recovery. + * + * For optimal stability, set this to false, and allow context to be reset at + * any time. + */ + bool cache_context; + + /*! + * Creates a debug context. + */ + bool debug_context; +} ATTRIBUTE_PACKED game_stream_hw_framebuffer_properties; + +typedef struct game_stream_hw_framebuffer_buffer { - GAME_KEY_MOD_NONE = 0x0000, + uintptr_t framebuffer; +} ATTRIBUTE_PACKED game_stream_hw_framebuffer_buffer; - GAME_KEY_MOD_SHIFT = 0x0001, - GAME_KEY_MOD_CTRL = 0x0002, - GAME_KEY_MOD_ALT = 0x0004, - GAME_KEY_MOD_META = 0x0008, - GAME_KEY_MOD_SUPER = 0x0010, +typedef struct game_stream_hw_framebuffer_packet +{ + uintptr_t framebuffer; +} ATTRIBUTE_PACKED game_stream_hw_framebuffer_packet; - GAME_KEY_MOD_NUMLOCK = 0x0100, - GAME_KEY_MOD_CAPSLOCK = 0x0200, - GAME_KEY_MOD_SCROLLOCK = 0x0400, -} GAME_KEY_MOD; +typedef void (*game_proc_address_t)(void); +///} + +/// @name Software framebuffer stream +///{ +typedef game_stream_video_properties game_stream_sw_framebuffer_properties; + +typedef struct game_stream_sw_framebuffer_buffer +{ + GAME_PIXEL_FORMAT format; + uint8_t *data; + size_t size; +} ATTRIBUTE_PACKED game_stream_sw_framebuffer_buffer; + +typedef game_stream_video_packet game_stream_sw_framebuffer_packet; +///} + +/// @name Stream types +///{ +typedef enum GAME_STREAM_TYPE +{ + GAME_STREAM_UNKNOWN, + GAME_STREAM_AUDIO, + GAME_STREAM_VIDEO, + GAME_STREAM_HW_FRAMEBUFFER, + GAME_STREAM_SW_FRAMEBUFFER, +} GAME_STREAM_TYPE; + +/*! + * \brief Immutable stream metadata + * + * This metadata is provided when the stream is opened. If any stream + * properties change, a new stream must be opened. + */ +typedef struct game_stream_properties +{ + GAME_STREAM_TYPE type; + union + { + game_stream_audio_properties audio; + game_stream_video_properties video; + game_stream_hw_framebuffer_properties hw_framebuffer; + game_stream_sw_framebuffer_properties sw_framebuffer; + }; +} ATTRIBUTE_PACKED game_stream_properties; + +/*! + * \brief Stream buffers for hardware rendering and zero-copy support + */ +typedef struct game_stream_buffer +{ + GAME_STREAM_TYPE type; + union + { + game_stream_hw_framebuffer_buffer hw_framebuffer; + game_stream_sw_framebuffer_buffer sw_framebuffer; + }; +} ATTRIBUTE_PACKED game_stream_buffer; + +/*! + * \brief Stream packet and ephemeral metadata + * + * This packet contains stream data and accompanying metadata. The metadata + * is ephemeral, meaning it only applies to the current packet and can change + * from packet to packet in the same stream. + */ +typedef struct game_stream_packet +{ + GAME_STREAM_TYPE type; + union + { + game_stream_audio_packet audio; + game_stream_video_packet video; + game_stream_hw_framebuffer_packet hw_framebuffer; + game_stream_sw_framebuffer_packet sw_framebuffer; + }; +} ATTRIBUTE_PACKED game_stream_packet; +///} + +/// @name Game types +///{ /*! Returned from game_get_region() */ typedef enum GAME_REGION @@ -262,14 +402,38 @@ typedef enum GAME_SIMD GAME_SIMD_AVX2 = (1 << 12), GAME_SIMD_VFPU = (1 << 13), } GAME_SIMD; +///} + +/// @name Input types +///{ -typedef enum GAME_ROTATION +typedef enum GAME_INPUT_EVENT_SOURCE { - GAME_ROTATION_0_CW, - GAME_ROTATION_90_CW, - GAME_ROTATION_180_CW, - GAME_ROTATION_270_CW, -} GAME_ROTATION; + GAME_INPUT_EVENT_DIGITAL_BUTTON, + GAME_INPUT_EVENT_ANALOG_BUTTON, + GAME_INPUT_EVENT_AXIS, + GAME_INPUT_EVENT_ANALOG_STICK, + GAME_INPUT_EVENT_ACCELEROMETER, + GAME_INPUT_EVENT_KEY, + GAME_INPUT_EVENT_RELATIVE_POINTER, + GAME_INPUT_EVENT_ABSOLUTE_POINTER, + GAME_INPUT_EVENT_MOTOR, +} GAME_INPUT_EVENT_SOURCE; + +typedef enum GAME_KEY_MOD +{ + GAME_KEY_MOD_NONE = 0x0000, + + GAME_KEY_MOD_SHIFT = 0x0001, + GAME_KEY_MOD_CTRL = 0x0002, + GAME_KEY_MOD_ALT = 0x0004, + GAME_KEY_MOD_META = 0x0008, + GAME_KEY_MOD_SUPER = 0x0010, + + GAME_KEY_MOD_NUMLOCK = 0x0100, + GAME_KEY_MOD_CAPSLOCK = 0x0200, + GAME_KEY_MOD_SCROLLOCK = 0x0400, +} GAME_KEY_MOD; /*! * \brief Type of port on the virtual game console @@ -418,46 +582,16 @@ typedef struct game_input_event struct game_motor_event motor; }; } ATTRIBUTE_PACKED game_input_event; +///} -struct game_geometry -{ - unsigned base_width; // Nominal video width of game - unsigned base_height; // Nominal video height of game - unsigned max_width; // Maximum possible width of game - unsigned max_height; // Maximum possible height of game - float aspect_ratio; // Nominal aspect ratio of game. If aspect_ratio is <= 0.0, - // an aspect ratio of base_width / base_height is assumed. - // A frontend could override this setting if desired. -}; - +/// @name Environment types +///{ struct game_system_timing { double fps; // FPS of video content. double sample_rate; // Sampling rate of audio. }; - -struct game_system_av_info -{ - struct game_geometry geometry; - struct game_system_timing timing; -}; - -typedef void (*game_proc_address_t)(void); - -struct game_hw_info -{ - GAME_HW_CONTEXT_TYPE context_type; // Which API to use. Set by game client - bool depth; // Set if render buffers should have depth component attached - bool stencil; // Set if stencil buffers should be attached - // If depth and stencil are true, a packed 24/8 buffer will be added. Only attaching stencil is invalid and will be ignored - bool bottom_left_origin; // Use conventional bottom-left origin convention. Is false, standard top-left origin semantics are used - unsigned version_major; // Major version number for core GL context - unsigned version_minor; // Minor version number for core GL context - bool cache_context; // If this is true, the frontend will go very far to avoid resetting context in scenarios like toggling fullscreen, etc. - // The reset callback might still be called in extreme situations such as if the context is lost beyond recovery - // For optimal stability, set this to false, and allow context to be reset at any time - bool debug_context; // Creates a debug context -}; +///} /*! Properties passed to the ADDON_Create() method of a game client */ typedef struct AddonProps_Game @@ -512,7 +646,7 @@ typedef struct AddonProps_Game } AddonProps_Game; typedef AddonProps_Game game_client_properties; - + /*! Structure to transfer the methods from kodi_game_dll.h to Kodi */ typedef struct AddonToKodiFuncTable_Game @@ -520,16 +654,12 @@ typedef struct AddonToKodiFuncTable_Game KODI_HANDLE kodiInstance; void (*CloseGame)(void* kodiInstance); - int (*OpenPixelStream)(void* kodiInstance, GAME_PIXEL_FORMAT format, unsigned int width, unsigned int height, GAME_VIDEO_ROTATION rotation); - int (*OpenVideoStream)(void* kodiInstance, GAME_VIDEO_CODEC codec); - int (*OpenPCMStream)(void* kodiInstance, GAME_PCM_FORMAT format, const GAME_AUDIO_CHANNEL* channel_map); - int(*OpenAudioStream)(void* kodiInstance, GAME_AUDIO_CODEC codec, const GAME_AUDIO_CHANNEL* channel_map); - void (*AddStreamData)(void* kodiInstance, GAME_STREAM_TYPE stream, const uint8_t* data, unsigned int size); - void (*CloseStream)(void* kodiInstance, GAME_STREAM_TYPE stream); - void (*EnableHardwareRendering)(void* kodiInstance, const game_hw_info* hw_info); - uintptr_t (*HwGetCurrentFramebuffer)(void* kodiInstance); + void* (*OpenStream)(void*, const game_stream_properties*); + bool (*GetStreamBuffer)(void*, void*, unsigned int, unsigned int, game_stream_buffer*); + void (*AddStreamData)(void*, void*, const game_stream_packet*); + void (*ReleaseStreamBuffer)(void*, void*, game_stream_buffer*); + void (*CloseStream)(void*, void*); game_proc_address_t (*HwGetProcAddress)(void* kodiInstance, const char* symbol); - void (*RenderFrame)(void* kodiInstance); bool (*InputEvent)(void* kodiInstance, const game_input_event* event); } AddonToKodiFuncTable_Game; @@ -540,7 +670,7 @@ typedef struct KodiToAddonFuncTable_Game GAME_ERROR (__cdecl* LoadGameSpecial)(SPECIAL_GAME_TYPE, const char**, size_t); GAME_ERROR (__cdecl* LoadStandalone)(void); GAME_ERROR (__cdecl* UnloadGame)(void); - GAME_ERROR (__cdecl* GetGameInfo)(game_system_av_info*); + GAME_ERROR (__cdecl* GetGameTiming)(game_system_timing*); GAME_REGION (__cdecl* GetRegion)(void); bool (__cdecl* RequiresGameLoop)(void); GAME_ERROR (__cdecl* RunFrame)(void); @@ -573,4 +703,3 @@ typedef struct AddonInstance_Game } #endif -#endif // KODI_GAME_TYPES_H_ diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_types.h index 8c02b99..233f682 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_types.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_types.h @@ -1,21 +1,10 @@ /* - * Copyright (C) 2015 Team Kodi - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2015-2018 Team Kodi * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ + #pragma once #ifndef TARGET_WINDOWS diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h index 2774afd..ca8cba9 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h @@ -1,22 +1,11 @@ /* - * Copyright (C) 2014-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this Program; see the file COPYING. If not, see - * . + * Copyright (C) 2014-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ + #pragma once #include "libXBMC_addon.h" @@ -65,72 +54,58 @@ public: */ void CloseGame(void) { - return m_callbacks->toKodi.CloseGame(m_callbacks->toKodi.kodiInstance); + m_callbacks->toKodi.CloseGame(m_callbacks->toKodi.kodiInstance); } /*! - * \brief Create a video stream for pixel data + * \brief Create a stream for gameplay data * - * \param format The type of pixel data accepted by this stream - * \param width The frame width - * \param height The frame height - * \param rotation The rotation (counter-clockwise) of the video frames + * \param properties The stream properties * - * \return 0 on success or -1 if a video stream is already created + * \return A stream handle, or NULL on failure */ - bool OpenPixelStream(GAME_PIXEL_FORMAT format, unsigned int width, unsigned int height, GAME_VIDEO_ROTATION rotation) + void* OpenStream(const game_stream_properties &properties) { - return m_callbacks->toKodi.OpenPixelStream(m_callbacks->toKodi.kodiInstance, format, width, height, rotation) == 0; + return m_callbacks->toKodi.OpenStream(m_callbacks->toKodi.kodiInstance, &properties); } /*! - * \brief Create a video stream for encoded video data + * \brief Get a buffer for zero-copy stream data * - * \param codec The video format accepted by this stream + * \param stream The stream handle + * \param width The framebuffer width, or 0 for no width specified + * \param height The framebuffer height, or 0 for no height specified + * \param[out] buffer The buffer, or unmodified if false is returned * - * \return 0 on success or -1 if a video stream is already created + * If this returns true, buffer must be freed using ReleaseStreamBuffer(). + * + * \return True if buffer was set, false otherwise */ - bool OpenVideoStream(GAME_VIDEO_CODEC codec) + bool GetStreamBuffer(void *stream, unsigned int width, unsigned int height, game_stream_buffer &buffer) { - return m_callbacks->toKodi.OpenVideoStream(m_callbacks->toKodi.kodiInstance, codec) == 0; + return m_callbacks->toKodi.GetStreamBuffer(m_callbacks->toKodi.kodiInstance, stream, width, height, &buffer); } /*! - * \brief Create an audio stream for PCM audio data - * - * \param format The type of audio data accepted by this stream - * \param channel_map The channel layout terminated by GAME_CH_NULL + * \brief Add a data packet to a stream * - * \return 0 on success or -1 if an audio stream is already created + * \param stream The target stream + * \param packet The data packet */ - bool OpenPCMStream(GAME_PCM_FORMAT format, const GAME_AUDIO_CHANNEL* channel_map) - { - return m_callbacks->toKodi.OpenPCMStream(m_callbacks->toKodi.kodiInstance, format, channel_map) == 0; - } - - /*! - * \brief Create an audio stream for encoded audio data - * - * \param codec The audio format accepted by this stream - * \param channel_map The channel layout terminated by GAME_CH_NULL - * - * \return 0 on success or -1 if an audio stream is already created - */ - bool OpenAudioStream(GAME_AUDIO_CODEC codec, const GAME_AUDIO_CHANNEL* channel_map) + void AddStreamData(void *stream, const game_stream_packet &packet) { - return m_callbacks->toKodi.OpenAudioStream(m_callbacks->toKodi.kodiInstance, codec, channel_map) == 0; + m_callbacks->toKodi.AddStreamData(m_callbacks->toKodi.kodiInstance, stream, &packet); } /*! - * \brief Add a data packet to an audio or video stream + * \brief Free an allocated buffer * - * \param stream The target stream - * \param data The data packet - * \param size The size of the data + * \param stream The stream handle + * \param buffer The buffer returned from GetStreamBuffer() */ - void AddStreamData(GAME_STREAM_TYPE stream, const uint8_t* data, unsigned int size) + void ReleaseStreamBuffer(void *stream, game_stream_buffer &buffer) { - m_callbacks->toKodi.AddStreamData(m_callbacks->toKodi.kodiInstance, stream, data, size); + m_callbacks->toKodi.ReleaseStreamBuffer(m_callbacks->toKodi.kodiInstance, stream, &buffer); } /*! @@ -138,33 +113,13 @@ public: * * \param stream The stream to close */ - void CloseStream(GAME_STREAM_TYPE stream) + void CloseStream(void *stream) { m_callbacks->toKodi.CloseStream(m_callbacks->toKodi.kodiInstance, stream); } // -- Hardware rendering callbacks ------------------------------------------- - /*! - * \brief Enable hardware rendering - * - * \param hw_info A struct of properties for the hardware rendering system - */ - void EnableHardwareRendering(const struct game_hw_info* hw_info) - { - return m_callbacks->toKodi.EnableHardwareRendering(m_callbacks->toKodi.kodiInstance, hw_info); - } - - /*! - * \brief Get the framebuffer for rendering - * - * \return The framebuffer - */ - uintptr_t HwGetCurrentFramebuffer(void) - { - return m_callbacks->toKodi.HwGetCurrentFramebuffer(m_callbacks->toKodi.kodiInstance); - } - /*! * \brief Get a symbol from the hardware context * @@ -177,14 +132,6 @@ public: return m_callbacks->toKodi.HwGetProcAddress(m_callbacks->toKodi.kodiInstance, sym); } - /*! - * \brief Called when a frame is being rendered - */ - void RenderFrame() - { - return m_callbacks->toKodi.RenderFrame(m_callbacks->toKodi.kodiInstance); - } - // --- Input callbacks ------------------------------------------------------- /*! diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h index 045d5fe..ff51c98 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2013 Team XBMC - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include #include #include @@ -539,7 +528,7 @@ public: return m_cb->Control_Spin_GetValue(m_Handle->addonData, m_controlHandle); } - + void SetValue(int iValue) { if (m_controlHandle) @@ -730,7 +719,7 @@ public: { m_controlHandle = m_cb->Window_GetControl_SettingsSlider(m_Handle->addonData, m_Window->GetControlHandle(), controlId); } - + ~CAddonGUISettingsSliderControl(void) override = default; void SetVisible(bool yesNo) @@ -906,7 +895,7 @@ inline bool CAddonGUIRenderingControl::OnDirtyCB(GUIHANDLE cbhdl) { return static_cast(cbhdl)->Dirty(); } - + class CHelper_libKODI_guilib { public: @@ -931,7 +920,7 @@ public: m_Callbacks = (KodiAPI::GUI::CB_GUILib*)m_Handle->GUILib_RegisterMe(m_Handle->addonData); if (!m_Callbacks) fprintf(stderr, "libKODI_guilib-ERROR: GUILib_RegisterMe can't get callback table from Kodi !!!\n"); - + return m_Callbacks != nullptr; } diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h index 271df98..43e3022 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2013 Team XBMC - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include #include #include @@ -195,7 +184,7 @@ namespace ADDON m_Callbacks = (KodiAPI::AddOn::CB_AddOnLib*)m_Handle->AddOnLib_RegisterMe(m_Handle->addonData); if (!m_Callbacks) fprintf(stderr, "libXBMC_addon-ERROR: AddOnLib_RegisterMe can't get callback table from Kodi !!!\n"); - + return m_Callbacks != nullptr; } @@ -203,14 +192,18 @@ namespace ADDON * @brief Add a message to XBMC's log. * @param loglevel The log level of the message. * @param format The format of the message to pass to XBMC. + * @note This method uses limited buffer (16k) for the formatted output. + * So data, which will not fit into it, will be silently discarded. */ void Log(const addon_log_t loglevel, const char *format, ... ) { char buffer[16384]; + static constexpr size_t len = sizeof (buffer) - 1; va_list args; va_start (args, format); - vsprintf (buffer, format, args); + vsnprintf (buffer, len, format, args); va_end (args); + buffer[len] = '\0'; // to be sure it's null-terminated m_Callbacks->Log(m_Handle->addonData, loglevel, buffer); } @@ -297,7 +290,7 @@ namespace ADDON { m_Callbacks->FreeString(m_Handle->addonData, str); } - + /*! * @brief Free the memory used by arr including its elements * @param arr The string array to free diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h index 11ea50c..2a94f75 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2013 Team XBMC - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include #include #include @@ -61,7 +50,7 @@ public: m_Callbacks = (AddonInstance_PVR*)m_Handle->PVRLib_RegisterMe(m_Handle->addonData); if (!m_Callbacks) fprintf(stderr, "libXBMC_pvr-ERROR: PVRLib_register_me can't get callback table from Kodi !!!\n"); - + return m_Callbacks != NULL; } diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/platform/android/System.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/platform/android/System.h index bee00ef..aad3a28 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/platform/android/System.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/platform/android/System.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2018 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../../AddonBase.h" /* @@ -34,13 +23,14 @@ */ static const char* INTERFACE_ANDROID_SYSTEM_NAME = "ANDROID_SYSTEM"; -static const char* INTERFACE_ANDROID_SYSTEM_VERSION = "1.0.0"; -static const char* INTERFACE_ANDROID_SYSTEM_VERSION_MIN = "1.0.0"; +static const char* INTERFACE_ANDROID_SYSTEM_VERSION = "1.0.1"; +static const char* INTERFACE_ANDROID_SYSTEM_VERSION_MIN = "1.0.1"; struct AddonToKodiFuncTable_android_system { void* (*get_jni_env)(); int (*get_sdk_version)(); + const char *(*get_class_name)(); }; //============================================================================== @@ -99,6 +89,22 @@ namespace platform return 0; } + //============================================================================ + /// + /// \ingroup cpp_kodi_platform + /// @brief request the android main class name e.g. org.xbmc.kodi. + /// + /// @param[in]: + /// @return package class name + /// + inline std::string GetClassName() + { + if (m_interface) + return m_interface->get_class_name(); + + return std::string(); + } + private: AddonToKodiFuncTable_android_system *m_interface; }; diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/DllHelper.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/DllHelper.h index 232f67d..1ae1a0e 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/DllHelper.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/DllHelper.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include #include diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h index b61cb35..227717c 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2016-2017 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2016-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include #define STR_HELPER(x) #x @@ -86,8 +75,8 @@ #define ADDON_INSTANCE_VERSION_AUDIOENCODER_XML_ID "kodi.binary.instance.audioencoder" #define ADDON_INSTANCE_VERSION_AUDIOENCODER_DEPENDS "addon-instance/AudioEncoder.h" -#define ADDON_INSTANCE_VERSION_GAME "1.0.36" -#define ADDON_INSTANCE_VERSION_GAME_MIN "1.0.36" +#define ADDON_INSTANCE_VERSION_GAME "1.0.38" +#define ADDON_INSTANCE_VERSION_GAME_MIN "1.0.38" #define ADDON_INSTANCE_VERSION_GAME_XML_ID "kodi.binary.instance.game" #define ADDON_INSTANCE_VERSION_GAME_DEPENDS "kodi_game_dll.h" \ "kodi_game_types.h" \ @@ -98,8 +87,8 @@ #define ADDON_INSTANCE_VERSION_IMAGEDECODER_XML_ID "kodi.binary.instance.imagedecoder" #define ADDON_INSTANCE_VERSION_IMAGEDECODER_DEPENDS "addon-instance/ImageDecoder.h" -#define ADDON_INSTANCE_VERSION_INPUTSTREAM "2.0.6" -#define ADDON_INSTANCE_VERSION_INPUTSTREAM_MIN "2.0.6" +#define ADDON_INSTANCE_VERSION_INPUTSTREAM "2.0.7" +#define ADDON_INSTANCE_VERSION_INPUTSTREAM_MIN "2.0.7" #define ADDON_INSTANCE_VERSION_INPUTSTREAM_XML_ID "kodi.binary.instance.inputstream" #define ADDON_INSTANCE_VERSION_INPUTSTREAM_DEPENDS "addon-instance/Inputstream.h" @@ -109,8 +98,8 @@ #define ADDON_INSTANCE_VERSION_PERIPHERAL_DEPENDS "addon-instance/Peripheral.h" \ "addon-instance/PeripheralUtils.h" -#define ADDON_INSTANCE_VERSION_PVR "5.9.0" -#define ADDON_INSTANCE_VERSION_PVR_MIN "5.9.0" +#define ADDON_INSTANCE_VERSION_PVR "5.10.1" +#define ADDON_INSTANCE_VERSION_PVR_MIN "5.10.0" #define ADDON_INSTANCE_VERSION_PVR_XML_ID "kodi.binary.instance.pvr" #define ADDON_INSTANCE_VERSION_PVR_DEPENDS "xbmc_pvr_dll.h" \ "xbmc_pvr_types.h" \ diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h index f8247d9..e9e7d9a 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h @@ -1,25 +1,13 @@ -#pragma once - /* - * Copyright (C) 2005-2015 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "AddonBase.h" #ifdef __cplusplus diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_types.h index d1e7a50..bfd85c2 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_types.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_types.h @@ -1,23 +1,11 @@ -#pragma once - /* - * Copyright (C) 2005-2015 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "AddonBase.h" // compatibility fallback diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h index c0a900b..7b11ed8 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2013 Team XBMC - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include #include @@ -56,7 +45,7 @@ #define EPG_EVENT_CONTENTMASK_USERDEFINED 0xF0 //@} -/* Set EPGTAG.iGenreType to EPG_GENRE_USE_STRING to transfer genre strings to XBMC */ +/* Set EPGTAG.iGenreType to EPG_GENRE_USE_STRING to transfer genre strings to Kodi */ #define EPG_GENRE_USE_STRING 0x100 /* Separator to use in strings containing different tokens, for example writers, directors, actors of an event. */ diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h index d36effa..8c509ac 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h @@ -1,25 +1,13 @@ -#pragma once - /* - * Copyright (C) 2005-2015 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "xbmc_addon_dll.h" #include "xbmc_pvr_types.h" @@ -35,7 +23,7 @@ extern "C" //@{ /*! * Get the list of features that this add-on provides. - * Called by XBMC to query the add-on's capabilities. + * Called by Kodi to query the add-on's capabilities. * Used to check which options should be presented in the UI, which methods to call, etc. * All capabilities that the add-on supports should be set to true. * @param pCapabilities The add-on's capabilities. @@ -83,18 +71,19 @@ extern "C" //@} /*! @name PVR EPG methods - * @remarks Only used by XBMC if bSupportsEPG is set to true. + * @remarks Only used by Kodi if bSupportsEPG is set to true. */ //@{ /*! * Request the EPG for a channel from the backend. - * EPG entries are added to XBMC by calling TransferEpgEntry() on the callback. + * EPG entries are added to Kodi by calling TransferEpgEntry() on the callback. * @param handle Handle to pass to the callback method. * @param channel The channel to get the EPG table for. * @param iStart Get events after this time (UTC). * @param iEnd Get events before this time (UTC). * @return PVR_ERROR_NO_ERROR if the table has been fetched successfully. - * @remarks Required if bSupportsEPG is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if bSupportsEPG is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR GetEPGForChannel(ADDON_HANDLE handle, const PVR_CHANNEL& channel, time_t iStart, time_t iEnd); @@ -112,18 +101,20 @@ extern "C" * @param tag the epg tag to check. * @param [out] bIsPlayable Set to true if the tag can be played. * @return PVR_ERROR_NO_ERROR if bIsPlayable has been set successfully. - * @remarks Required if add-on supports playing epg tags. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if add-on supports playing epg tags. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR IsEPGTagPlayable(const EPG_TAG* tag, bool* bIsPlayable); - - /*! - * Retrieve the edit decision list (EDL) of an EPG tag on the backend. - * @param epgTag The EPG tag. - * @param edl out: The function has to write the EDL list into this array. - * @param size in: The maximum size of the EDL, out: the actual size of the EDL. - * @return PVR_ERROR_NO_ERROR if the EDL was successfully read. - * @remarks Required if bSupportsEpgEdl is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. - */ + + /*! + * Retrieve the edit decision list (EDL) of an EPG tag on the backend. + * @param epgTag The EPG tag. + * @param edl out: The function has to write the EDL into this array. + * @param size in: The maximum size of the EDL, out: the actual size of the EDL. + * @return PVR_ERROR_NO_ERROR if the EDL was successfully read or no EDL exists. + * @remarks Required if bSupportsEpgEdl is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + */ PVR_ERROR GetEPGTagEdl(const EPG_TAG* epgTag, PVR_EDL_ENTRY edl[], int *size); /*! @@ -132,14 +123,16 @@ extern "C" * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned. * @return PVR_ERROR_NO_ERROR if the stream is available. - * @remarks Required if add-on supports playing epg tags. In this case your implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the epg tag. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if add-on supports playing epg tags. + * In this case your implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the epg tag. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR GetEPGTagStreamProperties(const EPG_TAG* tag, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount); //@} /*! @name PVR channel group methods - * @remarks Only used by XBMC is bSupportsChannelGroups is set to true. + * @remarks Only used by Kodi if bSupportsChannelGroups is set to true. * If a group or one of the group members changes after the initial import, or if a new one was added, then the add-on * should call TriggerChannelGroupsUpdate() */ @@ -147,27 +140,30 @@ extern "C" /*! * Get the total amount of channel groups on the backend if it supports channel groups. * @return The amount of channels, or -1 on error. - * @remarks Required if bSupportsChannelGroups is set to true. Return -1 if this add-on won't provide this function. + * @remarks Required if bSupportsChannelGroups is set to true. + * Return -1 if this add-on won't provide this function. */ int GetChannelGroupsAmount(void); /*! * Request the list of all channel groups from the backend if it supports channel groups. - * Channel group entries are added to XBMC by calling TransferChannelGroup() on the callback. + * Channel group entries are added to Kodi by calling TransferChannelGroup() on the callback. * @param handle Handle to pass to the callback method. * @param bRadio True to get the radio channel groups, false to get the TV channel groups. * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. - * @remarks Required if bSupportsChannelGroups is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if bSupportsChannelGroups is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR GetChannelGroups(ADDON_HANDLE handle, bool bRadio); /*! * Request the list of all group members of a group from the backend if it supports channel groups. - * Member entries are added to XBMC by calling TransferChannelGroupMember() on the callback. + * Member entries are added to Kodi by calling TransferChannelGroupMember() on the callback. * @param handle Handle to pass to the callback method. * @param group The group to get the members for. * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. - * @remarks Required if bSupportsChannelGroups is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if bSupportsChannelGroups is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR GetChannelGroupMembers(ADDON_HANDLE handle, const PVR_CHANNEL_GROUP& group); //@} @@ -181,20 +177,21 @@ extern "C" /*! * Show the channel scan dialog if this backend supports it. * @return PVR_ERROR_NO_ERROR if the dialog was displayed successfully. - * @remarks Required if bSupportsChannelScan is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if bSupportsChannelScan is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. * @note see libKODI_guilib.h about related parts */ PVR_ERROR OpenDialogChannelScan(void); /*! - * @return The total amount of channels on the backend, or -1 on error. - * @remarks Valid implementation required. - */ + * @return The total amount of channels on the backend, or -1 on error. + * @remarks Valid implementation required. + */ int GetChannelsAmount(void); /*! * Request the list of all channels from the backend. - * Channel entries are added to XBMC by calling TransferChannelEntry() on the callback. + * Channel entries are added to Kodi by calling TransferChannelEntry() on the callback. * @param handle Handle to pass to the callback method. * @param bRadio True to get the radio channels, false to get the TV channels. * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. @@ -216,7 +213,8 @@ extern "C" * Rename a channel on the backend. * @param channel The channel to rename, containing the new channel name. * @return PVR_ERROR_NO_ERROR if the channel has been renamed successfully. - * @remarks Optional, and only used if bSupportsChannelSettings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Optional, and only used if bSupportsChannelSettings is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR RenameChannel(const PVR_CHANNEL& channel); @@ -240,7 +238,7 @@ extern "C" //@} /** @name PVR recording methods - * @remarks Only used by XBMC is bSupportsRecordings is set to true. + * @remarks Only used by Kodi if bSupportsRecordings is set to true. * If a recording changes after the initial import, or if a new one was added, * then the add-on should call TriggerRecordingUpdate() */ @@ -254,11 +252,12 @@ extern "C" /*! * Request the list of all recordings from the backend, if supported. - * Recording entries are added to XBMC by calling TransferRecordingEntry() on the callback. + * Recording entries are added to Kodi by calling TransferRecordingEntry() on the callback. * @param handle Handle to pass to the callback method. * @param deleted if set return deleted recording (called if bSupportsRecordingsUndelete set to true) * @return PVR_ERROR_NO_ERROR if the recordings have been fetched successfully. - * @remarks Required if bSupportsRecordings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if bSupportsRecordings is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR GetRecordings(ADDON_HANDLE handle, bool deleted); @@ -266,7 +265,8 @@ extern "C" * Delete a recording on the backend. * @param recording The recording to delete. * @return PVR_ERROR_NO_ERROR if the recording has been deleted successfully. - * @remarks Optional, and only used if bSupportsRecordings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Optional, and only used if bSupportsRecordings is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR DeleteRecording(const PVR_RECORDING& recording); @@ -274,7 +274,8 @@ extern "C" * Undelete a recording on the backend. * @param recording The recording to undelete. * @return PVR_ERROR_NO_ERROR if the recording has been undeleted successfully. - * @remarks Optional, and only used if bSupportsRecordingsUndelete is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Optional, and only used if bSupportsRecordingsUndelete is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR UndeleteRecording(const PVR_RECORDING& recording); @@ -288,7 +289,8 @@ extern "C" * Rename a recording on the backend. * @param recording The recording to rename, containing the new name. * @return PVR_ERROR_NO_ERROR if the recording has been renamed successfully. - * @remarks Optional, and only used if bSupportsRecordings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Optional, and only used if bSupportsRecordings is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR RenameRecording(const PVR_RECORDING& recording); @@ -296,7 +298,8 @@ extern "C" * Set the lifetime of a recording on the backend. * @param recording The recording to change the lifetime for. recording.iLifetime contains the new lieftime value. * @return PVR_ERROR_NO_ERROR if the recording's lifetime has been set successfully. - * @remarks Required if bSupportsRecordingsLifetimeChange is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if bSupportsRecordingsLifetimeChange is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR SetRecordingLifetime(const PVR_RECORDING* recording); @@ -305,49 +308,54 @@ extern "C" * @param recording The recording to change the play count. * @param count Play count. * @return PVR_ERROR_NO_ERROR if the recording's play count has been set successfully. - * @remarks Required if bSupportsRecordingPlayCount is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if bSupportsRecordingPlayCount is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR SetRecordingPlayCount(const PVR_RECORDING& recording, int count); /*! - * Set the last watched position of a recording on the backend. - * @param recording The recording. - * @param position The last watched position in seconds - * @return PVR_ERROR_NO_ERROR if the position has been stored successfully. - * @remarks Required if bSupportsLastPlayedPosition is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. - */ + * Set the last watched position of a recording on the backend. + * @param recording The recording. + * @param position The last watched position in seconds + * @return PVR_ERROR_NO_ERROR if the position has been stored successfully. + * @remarks Required if bSupportsLastPlayedPosition is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + */ PVR_ERROR SetRecordingLastPlayedPosition(const PVR_RECORDING& recording, int lastplayedposition); /*! - * Retrieve the last watched position of a recording on the backend. - * @param recording The recording. - * @return The last watched position in seconds or -1 on error - * @remarks Required if bSupportsRecordingPlayCount is set to true. Return -1 if this add-on won't provide this function. - */ + * Retrieve the last watched position of a recording on the backend. + * @param recording The recording. + * @return The last watched position in seconds or -1 on error + * @remarks Required if bSupportsRecordingPlayCount is set to true. + * Return -1 if this add-on won't provide this function. + */ int GetRecordingLastPlayedPosition(const PVR_RECORDING& recording); /*! - * Retrieve the edit decision list (EDL) of a recording on the backend. - * @param recording The recording. - * @param edl out: The function has to write the EDL list into this array. - * @param size in: The maximum size of the EDL, out: the actual size of the EDL. - * @return PVR_ERROR_NO_ERROR if the EDL was successfully read. - * @remarks Required if bSupportsRecordingEdl is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. - */ + * Retrieve the edit decision list (EDL) of a recording on the backend. + * @param recording The recording. + * @param edl out: The function has to write the EDL into this array. + * @param size in: The maximum size of the EDL, out: the actual size of the EDL. + * @return PVR_ERROR_NO_ERROR if the EDL was successfully read or no EDL exists. + * @remarks Required if bSupportsRecordingEdl is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + */ PVR_ERROR GetRecordingEdl(const PVR_RECORDING& recording, PVR_EDL_ENTRY edl[], int *size); /*! - * Retrieve the timer types supported by the backend. - * @param types out: The function has to write the definition of the supported timer types into this array. - * @param typesCount in: The maximum size of the list, out: the actual size of the list. default: PVR_ADDON_TIMERTYPE_ARRAY_SIZE - * @return PVR_ERROR_NO_ERROR if the types were successfully written to the array. - * @remarks Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. - */ + * Retrieve the timer types supported by the backend. + * @param types out: The function has to write the definition of the supported timer types into this array. + * @param typesCount in: The maximum size of the list, out: the actual size of the list. default: PVR_ADDON_TIMERTYPE_ARRAY_SIZE + * @return PVR_ERROR_NO_ERROR if the types were successfully written to the array. + * @remarks Required if bSupportsTimers is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + */ PVR_ERROR GetTimerTypes(PVR_TIMER_TYPE types[], int *typesCount); //@} /** @name PVR timer methods - * @remarks Only used by XBMC is bSupportsTimers is set to true. + * @remarks Only used by Kodi if bSupportsTimers is set to true. * If a timer changes after the initial import, or if a new one was added, * then the add-on should call TriggerTimerUpdate() */ @@ -360,10 +368,11 @@ extern "C" /*! * Request the list of all timers from the backend if supported. - * Timer entries are added to XBMC by calling TransferTimerEntry() on the callback. + * Timer entries are added to Kodi by calling TransferTimerEntry() on the callback. * @param handle Handle to pass to the callback method. * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. - * @remarks Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if bSupportsTimers is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR GetTimers(ADDON_HANDLE handle); @@ -371,7 +380,8 @@ extern "C" * Add a timer on the backend. * @param timer The timer to add. * @return PVR_ERROR_NO_ERROR if the timer has been added successfully. - * @remarks Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if bSupportsTimers is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR AddTimer(const PVR_TIMER& timer); @@ -380,7 +390,8 @@ extern "C" * @param timer The timer to delete. * @param bForceDelete Set to true to delete a timer that is currently recording a program. * @return PVR_ERROR_NO_ERROR if the timer has been deleted successfully. - * @remarks Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if bSupportsTimers is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR DeleteTimer(const PVR_TIMER& timer, bool bForceDelete); @@ -388,7 +399,8 @@ extern "C" * Update the timer information on the backend. * @param timer The timer to update. * @return PVR_ERROR_NO_ERROR if the timer has been updated successfully. - * @remarks Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if bSupportsTimers is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR UpdateTimer(const PVR_TIMER& timer); @@ -400,7 +412,8 @@ extern "C" * Open a live stream on the backend. * @param channel The channel to stream. * @return True if the stream has been opened successfully, false otherwise. - * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true. Return false if this add-on won't provide this function. + * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true. + * Return false if this add-on won't provide this function. */ bool OpenLiveStream(const PVR_CHANNEL& channel); @@ -415,7 +428,8 @@ extern "C" * @param pBuffer The buffer to store the data in. * @param iBufferSize The amount of bytes to read. * @return The amount of bytes that were actually read from the stream. - * @remarks Required if bHandlesInputStream is set to true. Return -1 if this add-on won't provide this function. + * @remarks Required if bHandlesInputStream is set to true. + * Return -1 if this add-on won't provide this function. */ int ReadLiveStream(unsigned char* pBuffer, unsigned int iBufferSize); @@ -424,29 +438,34 @@ extern "C" * @param iPosition The position to seek to. * @param iWhence ? * @return The new position. - * @remarks Optional, and only used if bHandlesInputStream is set to true. Return -1 if this add-on won't provide this function. + * @remarks Optional, and only used if bHandlesInputStream is set to true. + * Return -1 if this add-on won't provide this function. */ long long SeekLiveStream(long long iPosition, int iWhence = SEEK_SET); /*! + * Obtain the length of a live stream. * @return The total length of the stream that's currently being read. - * @remarks Optional, and only used if bHandlesInputStream is set to true. Return -1 if this add-on won't provide this function. + * @remarks Optional, and only used if bHandlesInputStream is set to true. + * Return -1 if this add-on won't provide this function. */ long long LengthLiveStream(void); /*! * Get the signal status of the stream that's currently open. * @param signalStatus The signal status. - * @return True if the signal status has been read successfully, false otherwise. - * @remarks Optional, and only used if PVR_ADDON_CAPABILITIES::bHandlesInputStream or PVR_ADDON_CAPABILITIES::bHandlesDemuxing is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @return PVR_ERROR_NO_ERROR if the signal status has been read successfully, false otherwise. + * @remarks Optional, and only used if PVR_ADDON_CAPABILITIES::bHandlesInputStream or PVR_ADDON_CAPABILITIES::bHandlesDemuxing is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR SignalStatus(PVR_SIGNAL_STATUS& signalStatus); /*! * Get the descramble information of the stream that's currently open. - * @param[out] descrambleInfo The descramble information. - * @return True if the decramble information has been read successfully, false otherwise. - * @remarks Optional, and only used if PVR_ADDON_CAPABILITIES::bSupportsDescrambleInfo is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @param [out] descrambleInfo The descramble information. + * @return PVR_ERROR_NO_ERROR if the descramble information has been read successfully, false otherwise. + * @remarks Optional, and only used if PVR_ADDON_CAPABILITIES::bSupportsDescrambleInfo is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR GetDescrambleInfo(PVR_DESCRAMBLE_INFO* descrambleInfo); @@ -456,7 +475,9 @@ extern "C" * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned. * @return PVR_ERROR_NO_ERROR if the stream is available. - * @remarks Required if PVR_ADDON_CAPABILITIES::bSupportsTV or PVR_ADDON_CAPABILITIES::bSupportsRadio are set to true and PVR_ADDON_CAPABILITIES::bHandlesInputStream is set to false. In this case the implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the channel. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if PVR_ADDON_CAPABILITIES::bSupportsTV or PVR_ADDON_CAPABILITIES::bSupportsRadio are set to true and PVR_ADDON_CAPABILITIES::bHandlesInputStream is set to false. + * In this case the implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the channel. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR GetChannelStreamProperties(const PVR_CHANNEL* channel, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount); @@ -466,7 +487,9 @@ extern "C" * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned. * @return PVR_ERROR_NO_ERROR if the stream is available. - * @remarks Required if PVR_ADDON_CAPABILITIES::bSupportsRecordings is set to true and the add-on does not implement recording stream functions (OpenRecordedStream, ...). In this case your implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the recording. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if PVR_ADDON_CAPABILITIES::bSupportsRecordings is set to true and the add-on does not implement recording stream functions (OpenRecordedStream, ...). + * In this case your implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the recording. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR GetRecordingStreamProperties(const PVR_RECORDING* recording, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount); @@ -474,7 +497,8 @@ extern "C" * Get the stream properties of the stream that's currently being read. * @param pProperties The properties of the currently playing stream. * @return PVR_ERROR_NO_ERROR if the properties have been fetched successfully. - * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. + * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true. + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. */ PVR_ERROR GetStreamProperties(PVR_STREAM_PROPERTIES* pProperties); //@} @@ -483,11 +507,23 @@ extern "C" * @remarks This will only be used if the backend doesn't provide a direct URL in the recording tag. */ //@{ + /*! + * Obtain the chunk size to use when reading streams. + * @param chunksize must be filled with the chunk size in bytes. + * @return PVR_ERROR_NO_ERROR if the chunk size has been fetched successfully. + * @remarks Optional, and only used if not reading from demuxer (=> DemuxRead) and + * PVR_ADDON_CAPABILITIES::bSupportsRecordings is true (=> ReadRecordedStream) or + * PVR_ADDON_CAPABILITIES::bHandlesInputStream is true (=> ReadLiveStream). + * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. In this case Kodi will decide on the chunk size to use. + */ + PVR_ERROR GetStreamReadChunkSize(int* chunksize); + /*! * Open a stream to a recording on the backend. * @param recording The recording to open. * @return True if the stream has been opened successfully, false otherwise. - * @remarks Optional, and only used if bSupportsRecordings is set to true. Return false if this add-on won't provide this function. + * @remarks Optional, and only used if bSupportsRecordings is set to true. + * Return false if this add-on won't provide this function. */ bool OpenRecordedStream(const PVR_RECORDING& recording); @@ -502,7 +538,8 @@ extern "C" * @param pBuffer The buffer to store the data in. * @param iBufferSize The amount of bytes to read. * @return The amount of bytes that were actually read from the stream. - * @remarks Optional, and only used if bSupportsRecordings is set to true, but required if OpenRecordedStream() is implemented. Return -1 if this add-on won't provide this function. + * @remarks Optional, and only used if bSupportsRecordings is set to true, but required if OpenRecordedStream() is implemented. + * Return -1 if this add-on won't provide this function. */ int ReadRecordedStream(unsigned char* pBuffer, unsigned int iBufferSize); @@ -511,19 +548,23 @@ extern "C" * @param iPosition The position to seek to. * @param iWhence ? * @return The new position. - * @remarks Optional, and only used if bSupportsRecordings is set to true. Return -1 if this add-on won't provide this function. + * @remarks Optional, and only used if bSupportsRecordings is set to true. + * Return -1 if this add-on won't provide this function. */ long long SeekRecordedStream(long long iPosition, int iWhence = SEEK_SET); /*! + * Obtain the length of a recorded stream. * @return The total length of the stream that's currently being read. - * @remarks Optional, and only used if bSupportsRecordings is set to true. Return -1 if this add-on won't provide this function. + * @remarks Optional, and only used if bSupportsRecordings is set to true. + * Return -1 if this add-on won't provide this function. */ long long LengthRecordedStream(void); + //@} /** @name PVR demultiplexer methods - * @remarks Only used by XBMC is bHandlesDemuxing is set to true. + * @remarks Only used by Kodi if bHandlesDemuxing is set to true. */ //@{ /*! @@ -549,47 +590,49 @@ extern "C" * @return The next packet. * If there is no next packet, then the add-on should return the * packet created by calling AllocateDemuxPacket(0) on the callback. - * If the stream changed and XBMC's player needs to be reinitialised, + * If the stream changed and Kodi's player needs to be reinitialised, * then, the add-on should call AllocateDemuxPacket(0) on the * callback, and set the streamid to DMX_SPECIALID_STREAMCHANGE and * return the value. * The add-on should return NULL if an error occured. - * @remarks Required if bHandlesDemuxing is set to true. Return NULL if this add-on won't provide this function. + * @remarks Required if bHandlesDemuxing is set to true. + * Return NULL if this add-on won't provide this function. */ DemuxPacket* DemuxRead(void); //@} /*! * Check if the backend support pausing the currently playing stream - * This will enable/disable the pause button in XBMC based on the return value + * This will enable/disable the pause button in Kodi based on the return value * @return false if the PVR addon/backend does not support pausing, true if possible */ bool CanPauseStream(); /*! * Check if the backend supports seeking for the currently playing stream - * This will enable/disable the rewind/forward buttons in XBMC based on the return value + * This will enable/disable the rewind/forward buttons in Kodi based on the return value * @return false if the PVR addon/backend does not support seeking, true if possible */ bool CanSeekStream(); /*! - * @brief Notify the pvr addon that XBMC (un)paused the currently playing stream + * @brief Notify the pvr addon that Kodi (un)paused the currently playing stream */ void PauseStream(bool bPaused); /*! - * Notify the pvr addon/demuxer that XBMC wishes to seek the stream by time + * Notify the pvr addon/demuxer that Kodi wishes to seek the stream by time * @param time The absolute time since stream start * @param backwards True to seek to keyframe BEFORE time, else AFTER * @param startpts can be updated to point to where display should start * @return True if the seek operation was possible - * @remarks Optional, and only used if addon has its own demuxer. Return False if this add-on won't provide this function. + * @remarks Optional, and only used if addon has its own demuxer. + * Return False if this add-on won't provide this function. */ bool SeekTime(double time, bool backwards, double *startpts); /*! - * Notify the pvr addon/demuxer that XBMC wishes to change playback speed + * Notify the pvr addon/demuxer that Kodi wishes to change playback speed * @param speed The requested playback speed * @remarks Optional, and only used if addon has its own demuxer. */ @@ -597,8 +640,7 @@ extern "C" /*! * Get the hostname of the pvr backend server - * @return hostname as ip address or alias. If backend does not - * utilize a server, return empty string. + * @return hostname as ip address or alias. If backend does not utilize a server, return empty string. */ const char* GetBackendHostname(); @@ -639,7 +681,7 @@ extern "C" PVR_ERROR GetStreamTimes(PVR_STREAM_TIMES *times); /*! - * Called by XBMC to assign the function pointers of this add-on to pClient. + * Called by Kodi to assign the function pointers of this add-on to pClient. * @param ptr The struct to assign the function pointers to. */ void __declspec(dllexport) get_addon(void* ptr) @@ -731,5 +773,7 @@ extern "C" pClient->toAddon.OnPowerSavingActivated = OnPowerSavingActivated; pClient->toAddon.OnPowerSavingDeactivated = OnPowerSavingDeactivated; pClient->toAddon.GetStreamTimes = GetStreamTimes; + + pClient->toAddon.GetStreamReadChunkSize = GetStreamReadChunkSize; }; }; diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h index 32303d4..2a89fef 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h @@ -1,25 +1,13 @@ -#pragma once - /* - * Copyright (C) 2005-2015 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kodi; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #ifndef TARGET_WINDOWS #ifndef __cdecl #define __cdecl @@ -36,7 +24,7 @@ #include "xbmc_epg_types.h" /*! @note Define "USE_DEMUX" at compile time if demuxing in the PVR add-on is used. - * Also XBMC's "DVDDemuxPacket.h" file must be in the include path of the add-on, + * Also, "DVDDemuxPacket.h" file must be in the include path of the add-on, * and the add-on should set bHandlesDemuxing to true. */ #ifdef USE_DEMUX @@ -79,7 +67,8 @@ struct DemuxPacket; #define PVR_STREAM_MAX_PROPERTIES 20 #define PVR_STREAM_PROPERTY_STREAMURL "streamurl" /*!< @brief the URL of the stream that should be played. */ #define PVR_STREAM_PROPERTY_INPUTSTREAMADDON "inputstreamaddon" /*!< @brief the name of the inputstream add-on that should be used by Kodi to play the stream denoted by PVR_STREAM_PROPERTY_STREAMURL. Leave blank to use Kodi's built-in playing capabilities. */ -#define PVR_STREAM_PROPERTY_MIMETYPE "mimetype" /*!< @brief the Mime-Type of the stream that should be played. */ +#define PVR_STREAM_PROPERTY_MIMETYPE "mimetype" /*!< @brief the MIME type of the stream that should be played. */ +#define PVR_STREAM_PROPERTY_ISREALTIMESTREAM "isrealtimestream" /*!< @brief "true" to denote that the stream that should be played is a realtime stream. Any other value indicates that this is no realtime stream.*/ /* using the default avformat's MAX_STREAMS value to be safe */ #define PVR_STREAM_MAX_STREAMS 20 @@ -202,7 +191,7 @@ extern "C" { { PVR_ERROR_NO_ERROR = 0, /*!< @brief no error occurred */ PVR_ERROR_UNKNOWN = -1, /*!< @brief an unknown error occurred */ - PVR_ERROR_NOT_IMPLEMENTED = -2, /*!< @brief the method that XBMC called is not implemented by the add-on */ + PVR_ERROR_NOT_IMPLEMENTED = -2, /*!< @brief the method that Kodi called is not implemented by the add-on */ PVR_ERROR_SERVER_ERROR = -3, /*!< @brief the backend reported an error, or the add-on isn't connected */ PVR_ERROR_SERVER_TIMEOUT = -4, /*!< @brief the command was sent to the backend, but the response timed out */ PVR_ERROR_REJECTED = -5, /*!< @brief the command was rejected by the backend */ @@ -312,7 +301,7 @@ extern "C" { bool bSupportsChannelGroups; /*!< @brief true if this add-on supports channel groups */ bool bSupportsChannelScan; /*!< @brief true if this add-on support scanning for new channels on the backend */ bool bSupportsChannelSettings; /*!< @brief true if this add-on supports the following functions: DeleteChannel, RenameChannel, DialogChannelSettings and DialogAddChannel */ - bool bHandlesInputStream; /*!< @brief true if this add-on provides an input stream. false if XBMC handles the stream. */ + bool bHandlesInputStream; /*!< @brief true if this add-on provides an input stream. false if Kodi handles the stream. */ bool bHandlesDemuxing; /*!< @brief true if this add-on demultiplexes packets. */ bool bSupportsRecordingPlayCount; /*!< @brief true if the backend supports play count for recordings. */ bool bSupportsLastPlayedPosition; /*!< @brief true if the backend supports store/retrieve of last played position for recordings. */ @@ -628,7 +617,7 @@ extern "C" { } AddonToKodiFuncTable_PVR; /*! - * @brief Structure to transfer the methods from xbmc_pvr_dll.h to XBMC + * @brief Structure to transfer the methods from xbmc_pvr_dll.h to Kodi */ typedef struct KodiToAddonFuncTable_PVR { @@ -706,6 +695,7 @@ extern "C" { void (__cdecl* OnPowerSavingActivated)(void); void (__cdecl* OnPowerSavingDeactivated)(void); PVR_ERROR (__cdecl* GetStreamTimes)(PVR_STREAM_TIMES*); + PVR_ERROR (__cdecl* GetStreamReadChunkSize)(int*); } KodiToAddonFuncTable_PVR; typedef struct AddonInstance_PVR diff --git a/xbmc/cores/AudioEngine/Utils/AEChannelData.h b/xbmc/cores/AudioEngine/Utils/AEChannelData.h index 6b64f0d..71010bb 100644 --- a/xbmc/cores/AudioEngine/Utils/AEChannelData.h +++ b/xbmc/cores/AudioEngine/Utils/AEChannelData.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2010-2013 Team XBMC - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, see - * . + * Copyright (C) 2010-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + /** * The possible channels */ diff --git a/xbmc/cores/VideoPlayer/Interface/Addon/DemuxCrypto.h b/xbmc/cores/VideoPlayer/Interface/Addon/DemuxCrypto.h index e38e247..b48ef34 100644 --- a/xbmc/cores/VideoPlayer/Interface/Addon/DemuxCrypto.h +++ b/xbmc/cores/VideoPlayer/Interface/Addon/DemuxCrypto.h @@ -1,22 +1,10 @@ /* -* Copyright (C) 2005-2016 Team XBMC -* http://kodi.tv -* -* This Program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2, or (at your option) -* any later version. -* -* This Program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with XBMC; see the file COPYING. If not, see -* . -* -*/ + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ #pragma once @@ -48,6 +36,13 @@ struct DemuxCryptoSession delete[] sessionId; } + bool operator == (const DemuxCryptoSession &other) const + { + return sessionIdSize == other.sessionIdSize && + keySystem == other.keySystem && + memcmp(sessionId, other.sessionId, sessionIdSize) == 0; + }; + // encryped stream infos char * sessionId; uint16_t sessionIdSize; diff --git a/xbmc/cores/VideoPlayer/Interface/Addon/DemuxPacket.h b/xbmc/cores/VideoPlayer/Interface/Addon/DemuxPacket.h index b7404a3..5aed400 100644 --- a/xbmc/cores/VideoPlayer/Interface/Addon/DemuxPacket.h +++ b/xbmc/cores/VideoPlayer/Interface/Addon/DemuxPacket.h @@ -1,25 +1,13 @@ -#pragma once - /* - * Copyright (C) 2012-2013 Team XBMC - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, see - * . + * Copyright (C) 2012-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "TimingConstants.h" #include #include diff --git a/xbmc/cores/VideoPlayer/Interface/Addon/TimingConstants.h b/xbmc/cores/VideoPlayer/Interface/Addon/TimingConstants.h index 209897e..0672002 100644 --- a/xbmc/cores/VideoPlayer/Interface/Addon/TimingConstants.h +++ b/xbmc/cores/VideoPlayer/Interface/Addon/TimingConstants.h @@ -1,31 +1,19 @@ -#pragma once - /* -* Copyright (C) 2017 Team XBMC -* http://kodi.tv -* -* This Program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2, or (at your option) -* any later version. -* -* This Program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with XBMC; see the file COPYING. If not, see -* . -* -*/ + * Copyright (C) 2017-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#pragma once #define DVD_TIME_BASE 1000000 #define DVD_NOPTS_VALUE 0xFFF0000000000000 -#define DVD_TIME_TO_MSEC(x) ((int)((double)(x) * 1000 / DVD_TIME_BASE)) -#define DVD_SEC_TO_TIME(x) ((double)(x) * DVD_TIME_BASE) -#define DVD_MSEC_TO_TIME(x) ((double)(x) * DVD_TIME_BASE / 1000) +constexpr int DVD_TIME_TO_MSEC(double x) { return static_cast(x * 1000 / DVD_TIME_BASE); } +constexpr double DVD_SEC_TO_TIME(double x) { return x * DVD_TIME_BASE; } +constexpr double DVD_MSEC_TO_TIME(double x) { return x * DVD_TIME_BASE / 1000; } #define DVD_PLAYSPEED_PAUSE 0 // frame stepping #define DVD_PLAYSPEED_NORMAL 1000 diff --git a/xbmc/filesystem/IFileTypes.h b/xbmc/filesystem/IFileTypes.h index 3962c0c..7470b15 100644 --- a/xbmc/filesystem/IFileTypes.h +++ b/xbmc/filesystem/IFileTypes.h @@ -1,21 +1,9 @@ /* - * Copyright (C) 2005-2013 Team XBMC - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ #pragma once diff --git a/xbmc/input/ActionIDs.h b/xbmc/input/ActionIDs.h index 5db1ffc..12a5334 100644 --- a/xbmc/input/ActionIDs.h +++ b/xbmc/input/ActionIDs.h @@ -1,22 +1,11 @@ /* - * Copyright (C) 2005-2017 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this Program; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ + #pragma once /** @@ -104,6 +93,7 @@ #define ACTION_PLAYER_PROCESS_INFO 69 //!< show player process info (video decoder, pixel format, pvr signal strength and the like #define ACTION_PLAYER_PROGRAM_SELECT 70 +#define ACTION_PLAYER_RESOLUTION_SELECT 71 #define ACTION_SMALL_STEP_BACK 76 //!< jumps a few seconds back during playback of movie. Can b used in videoFullScreen.xml window id=2005 #define ACTION_PLAYER_FORWARD 77 //!< FF in current file played. global action, can be used anywhere @@ -277,6 +267,8 @@ #define ACTION_TOGGLE_FONT 249 //!< Toggle font. Used in TextViewer dialog +#define ACTION_VIDEO_NEXT_STREAM 250 //!< Cycle video streams. Used in videofullscreen. + // Voice actions #define ACTION_VOICE_RECOGNIZE 300 diff --git a/xbmc/input/XBMC_vkeys.h b/xbmc/input/XBMC_vkeys.h index 4e3787c..496f336 100644 --- a/xbmc/input/XBMC_vkeys.h +++ b/xbmc/input/XBMC_vkeys.h @@ -1,27 +1,15 @@ /* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2009 Sam Lantinga + * SDL - Simple DirectMedia Layer + * Copyright (C) 1997-2009 Sam Lantinga + * + * SPDX-License-Identifier: LGPL-2.1-or-later + * See LICENSES/README.md for more information. + * + * Sam Lantinga + * slouken@libsdl.org + */ - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU General Public License - along with XBMC; see the file COPYING. If not, see - . - - Sam Lantinga - slouken@libsdl.org -*/ - -#ifndef XBMC_vkeys_h -#define XBMC_vkeys_h +#pragma once // The XBMC_vkey identifies a key that is mapped to an action or function. // The keysym.sym generated by SDL_KEYDOWN is mapped to a vkey and the vkey @@ -283,4 +271,3 @@ typedef enum { #define VK_OEM_102 0xE2 #endif -#endif // XBMC_vkeys_h diff --git a/xbmc/interfaces/json-rpc/schema/version.txt b/xbmc/interfaces/json-rpc/schema/version.txt index 35bc503..94db005 100644 --- a/xbmc/interfaces/json-rpc/schema/version.txt +++ b/xbmc/interfaces/json-rpc/schema/version.txt @@ -1 +1 @@ -JSONRPC_VERSION 9.2.0 +JSONRPC_VERSION 9.6.0 -- cgit v1.2.3