summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/kodi-addon-dev-kit/include
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include')
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h33
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h31
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/General.h27
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/Network.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/StreamCodec.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/StreamCrypto.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioDecoder.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h29
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h25
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h25
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h112
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h24
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h35
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/ListItem.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h27
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Button.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Edit.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/FadeLabel.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Image.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Label.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Progress.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/RadioButton.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Rendering.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/SettingsSlider.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Slider.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/Spin.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/controls/TextBox.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h25
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ContextMenu.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/ExtendedProgress.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/FileBrowser.h27
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Keyboard.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Numeric.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/OK.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Progress.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/Select.h27
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/TextViewer.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/dialogs/YesNo.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h35
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h407
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_types.h19
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h117
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_guilib.h31
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h33
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h25
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/platform/android/System.h44
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/tools/DllHelper.h23
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h35
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_dll.h24
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_types.h24
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_epg_types.h25
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h266
-rw-r--r--xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_pvr_types.h36
57 files changed, 877 insertions, 1381 deletions
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Kodi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include <stdarg.h> /* va_list, va_start, va_arg, va_end */ 11#include <stdarg.h> /* va_list, va_start, va_arg, va_end */
23#include <cstdlib> 12#include <cstdlib>
24#include <cstring> 13#include <cstring>
@@ -263,11 +252,11 @@ public:
263 explicit CSettingValue(const void *settingValue) : m_settingValue(settingValue) {} 252 explicit CSettingValue(const void *settingValue) : m_settingValue(settingValue) {}
264 253
265 bool empty() const { return (m_settingValue == nullptr) ? true : false; } 254 bool empty() const { return (m_settingValue == nullptr) ? true : false; }
266 std::string GetString() const { return (char*)m_settingValue; } 255 std::string GetString() const { return (const char*)m_settingValue; }
267 int GetInt() const { return *(int*)m_settingValue; } 256 int GetInt() const { return *(const int*)m_settingValue; }
268 unsigned int GetUInt() const { return *(unsigned int*)m_settingValue; } 257 unsigned int GetUInt() const { return *(const unsigned int*)m_settingValue; }
269 bool GetBoolean() const { return *(bool*)m_settingValue; } 258 bool GetBoolean() const { return *(const bool*)m_settingValue; }
270 float GetFloat() const { return *(float*)m_settingValue; } 259 float GetFloat() const { return *(const float*)m_settingValue; }
271 260
272private: 261private:
273 const void *m_settingValue; 262 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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Kodi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "AddonBase.h" 11#include "AddonBase.h"
23 12
24#include <map> 13#include <map>
@@ -40,7 +29,7 @@
40 #define _SSIZE_T_DEFINED 29 #define _SSIZE_T_DEFINED
41#endif // !_SSIZE_T_DEFINED 30#endif // !_SSIZE_T_DEFINED
42#endif 31#endif
43 32
44#ifndef S_ISDIR 33#ifndef S_ISDIR
45 #define S_ISDIR(mode) ((((mode)) & 0170000) == (0040000)) 34 #define S_ISDIR(mode) ((((mode)) & 0170000) == (0040000))
46#endif 35#endif
@@ -895,7 +884,7 @@ namespace vfs
895 return strReturn; 884 return strReturn;
896 } 885 }
897 //---------------------------------------------------------------------------- 886 //----------------------------------------------------------------------------
898 887
899 //============================================================================ 888 //============================================================================
900 /// 889 ///
901 /// @ingroup cpp_kodi_vfs 890 /// @ingroup cpp_kodi_vfs
@@ -1231,7 +1220,7 @@ namespace vfs
1231 /// @ingroup cpp_kodi_vfs_CFile 1220 /// @ingroup cpp_kodi_vfs_CFile
1232 /// @brief Construct a new, unopened file 1221 /// @brief Construct a new, unopened file
1233 /// 1222 ///
1234 CFile() : m_file(nullptr) { } 1223 CFile() = default;
1235 //-------------------------------------------------------------------------- 1224 //--------------------------------------------------------------------------
1236 1225
1237 //========================================================================== 1226 //==========================================================================
@@ -1637,7 +1626,7 @@ namespace vfs
1637 //-------------------------------------------------------------------------- 1626 //--------------------------------------------------------------------------
1638 1627
1639 private: 1628 private:
1640 void* m_file; 1629 void* m_file = nullptr;
1641 }; 1630 };
1642 //@} 1631 //@}
1643 //---------------------------------------------------------------------------- 1632 //----------------------------------------------------------------------------
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Kodi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "AddonBase.h" 11#include "AddonBase.h"
23 12
24/* 13/*
@@ -188,8 +177,8 @@ namespace kodi {
188/// @return The localized message, or default if the add-on 177/// @return The localized message, or default if the add-on
189/// helper fails to return a message 178/// helper fails to return a message
190/// 179///
191/// @note Label id's \b 30000 to \b 30999 and \b 32000 to \b 32999 are related 180/// @note Label id's \b 30000 to \b 30999 and \b 32000 to \b 32999 are related
192/// to the add-on's own included strings from 181/// to the add-on's own included strings from
193/// <b>./resources/language/resource.language.??_??/strings.po</b> 182/// <b>./resources/language/resource.language.??_??/strings.po</b>
194/// All other strings are from Kodi core language files. 183/// All other strings are from Kodi core language files.
195/// 184///
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "AddonBase.h" 11#include "AddonBase.h"
23 12
24/* 13/*
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2017 Team Kodi 2 * Copyright (C) 2017-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Kodi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22enum STREAMCODEC_PROFILE 11enum STREAMCODEC_PROFILE
23{ 12{
24 CodecProfileUnknown = 0, 13 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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2017 Team Kodi 2 * Copyright (C) 2017-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Kodi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22typedef struct CRYPTO_INFO 11typedef struct CRYPTO_INFO
23{ 12{
24 enum CRYPTO_KEY_SYSTEM : uint8_t 13 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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Kodi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../AddonBase.h" 11#include "../AddonBase.h"
23#ifdef BUILD_KODI_ADDON 12#ifdef BUILD_KODI_ADDON
24#include "../AEChannelData.h" 13#include "../AEChannelData.h"
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h
index 7d2464d..b98884e 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/AudioEncoder.h
@@ -1,24 +1,13 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Kodi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../AddonBase.h" 11#include "../AddonBase.h"
23 12
24namespace kodi { namespace addon { class CInstanceAudioEncoder; }} 13namespace kodi { namespace addon { class CInstanceAudioEncoder; }}
@@ -136,10 +125,10 @@ namespace addon
136 //========================================================================== 125 //==========================================================================
137 /// \brief Write block of data 126 /// \brief Write block of data
138 /// 127 ///
139 /// \param[in] data Pointer to the array of elements to be 128 /// \param[in] data Pointer to the array of elements to be
140 /// written 129 /// written
141 /// \param[in] length Size in bytes to be written. 130 /// \param[in] length Size in bytes to be written.
142 /// \return The total number of bytes 131 /// \return The total number of bytes
143 /// successfully written is returned. 132 /// successfully written is returned.
144 int Write(const uint8_t* data, int length) 133 int Write(const uint8_t* data, int length)
145 { 134 {
@@ -154,7 +143,7 @@ namespace addon
154 /// 143 ///
155 /// \param[in] position the position that you want to seek to 144 /// \param[in] position the position that you want to seek to
156 /// \param[in] whence [optional] offset relative to 145 /// \param[in] whence [optional] offset relative to
157 /// You can set the value of whence to one 146 /// You can set the value of whence to one
158 /// of three things: 147 /// of three things:
159 /// | Value | int | Description | 148 /// | Value | int | Description |
160 /// |:--------:|:---:|:---------------------------------------------------| 149 /// |:--------:|:---:|:---------------------------------------------------|
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h
index 5ccb859..09ac6c9 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/ImageDecoder.h
@@ -1,24 +1,13 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Kodi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../AddonBase.h" 11#include "../AddonBase.h"
23 12
24namespace kodi { namespace addon { class CInstanceImageDecoder; }} 13namespace kodi { namespace addon { class CInstanceImageDecoder; }}
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h
index 08d01ad..23a91e7 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Inputstream.h
@@ -1,24 +1,13 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Kodi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22/* 11/*
23 * Parts with a comment named "internal" are only used inside header and not 12 * Parts with a comment named "internal" are only used inside header and not
24 * used or accessed direct during add-on development! 13 * used or accessed direct during add-on development!
@@ -142,7 +131,7 @@ extern "C" {
142 const uint8_t *m_ExtraData; 131 const uint8_t *m_ExtraData;
143 unsigned int m_ExtraSize; 132 unsigned int m_ExtraSize;
144 133
145 char m_language[4]; /*!< @brief ISO 639 3-letter language code (empty string if undefined) */ 134 char m_language[64]; /*!< @brief RFC 5646 language code (empty string if undefined) */
146 135
147 unsigned int m_FpsScale; /*!< @brief Scale of 1000 and a rate of 29970 will result in 29.97 fps */ 136 unsigned int m_FpsScale; /*!< @brief Scale of 1000 and a rate of 29970 will result in 29.97 fps */
148 unsigned int m_FpsRate; 137 unsigned int m_FpsRate;
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h
index 75be27e..78e572b 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Peripheral.h
@@ -1,24 +1,13 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2014-2017 Team Kodi 2 * Copyright (C) 2014-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this Program; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../AddonBase.h" 11#include "../AddonBase.h"
23 12
24namespace kodi { namespace addon { class CInstancePeripheral; }} 13namespace kodi { namespace addon { class CInstancePeripheral; }}
@@ -780,7 +769,7 @@ namespace addon
780 return addonInstance->toAddon.addonInstance->SendEvent(event); 769 return addonInstance->toAddon.addonInstance->SendEvent(event);
781 } 770 }
782 771
783 772
784 inline static PERIPHERAL_ERROR ADDON_GetJoystickInfo(const AddonInstance_Peripheral* addonInstance, unsigned int index, JOYSTICK_INFO* info) 773 inline static PERIPHERAL_ERROR ADDON_GetJoystickInfo(const AddonInstance_Peripheral* addonInstance, unsigned int index, JOYSTICK_INFO* info)
785 { 774 {
786 return addonInstance->toAddon.addonInstance->GetJoystickInfo(index, info); 775 return addonInstance->toAddon.addonInstance->GetJoystickInfo(index, info);
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h
index c2efc05..9b2a43f 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/PeripheralUtils.h
@@ -1,22 +1,11 @@
1/* 1/*
2 * Copyright (C) 2014-2017 Team Kodi 2 * Copyright (C) 2014-2018 Team Kodi
3 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
4 *
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this Program; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
18 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
19 */ 7 */
8
20#pragma once 9#pragma once
21 10
22#include "Peripheral.h" 11#include "Peripheral.h"
@@ -97,10 +86,7 @@ namespace addon
97 public: 86 public:
98 Peripheral(PERIPHERAL_TYPE type = PERIPHERAL_TYPE_UNKNOWN, const std::string& strName = "") : 87 Peripheral(PERIPHERAL_TYPE type = PERIPHERAL_TYPE_UNKNOWN, const std::string& strName = "") :
99 m_type(type), 88 m_type(type),
100 m_strName(strName), 89 m_strName(strName)
101 m_vendorId(0),
102 m_productId(0),
103 m_index(0)
104 { 90 {
105 } 91 }
106 92
@@ -149,9 +135,9 @@ namespace addon
149 private: 135 private:
150 PERIPHERAL_TYPE m_type; 136 PERIPHERAL_TYPE m_type;
151 std::string m_strName; 137 std::string m_strName;
152 uint16_t m_vendorId; 138 uint16_t m_vendorId = 0;
153 uint16_t m_productId; 139 uint16_t m_productId = 0;
154 unsigned int m_index; 140 unsigned int m_index = 0;
155 }; 141 };
156 142
157 typedef PeripheralVector<Peripheral, PERIPHERAL_INFO> Peripherals; 143 typedef PeripheralVector<Peripheral, PERIPHERAL_INFO> Peripherals;
@@ -259,12 +245,7 @@ namespace addon
259 Joystick(const std::string& provider = "", const std::string& strName = "") : 245 Joystick(const std::string& provider = "", const std::string& strName = "") :
260 Peripheral(PERIPHERAL_TYPE_JOYSTICK, strName), 246 Peripheral(PERIPHERAL_TYPE_JOYSTICK, strName),
261 m_provider(provider), 247 m_provider(provider),
262 m_requestedPort(NO_PORT_REQUESTED), 248 m_requestedPort(NO_PORT_REQUESTED)
263 m_buttonCount(0),
264 m_hatCount(0),
265 m_axisCount(0),
266 m_motorCount(0),
267 m_supportsPowerOff(false)
268 { 249 {
269 } 250 }
270 251
@@ -345,11 +326,11 @@ namespace addon
345 private: 326 private:
346 std::string m_provider; 327 std::string m_provider;
347 int m_requestedPort; 328 int m_requestedPort;
348 unsigned int m_buttonCount; 329 unsigned int m_buttonCount = 0;
349 unsigned int m_hatCount; 330 unsigned int m_hatCount = 0;
350 unsigned int m_axisCount; 331 unsigned int m_axisCount = 0;
351 unsigned int m_motorCount; 332 unsigned int m_motorCount = 0;
352 bool m_supportsPowerOff; 333 bool m_supportsPowerOff = false;
353 }; 334 };
354 335
355 typedef PeripheralVector<Joystick, JOYSTICK_INFO> Joysticks; 336 typedef PeripheralVector<Joystick, JOYSTICK_INFO> Joysticks;
@@ -402,12 +383,7 @@ namespace addon
402 */ 383 */
403 DriverPrimitive(JOYSTICK_DRIVER_PRIMITIVE_TYPE type, unsigned int driverIndex) : 384 DriverPrimitive(JOYSTICK_DRIVER_PRIMITIVE_TYPE type, unsigned int driverIndex) :
404 m_type(type), 385 m_type(type),
405 m_driverIndex(driverIndex), 386 m_driverIndex(driverIndex)
406 m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN),
407 m_center(0),
408 m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN),
409 m_range(1),
410 m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN)
411 { 387 {
412 } 388 }
413 389
@@ -415,16 +391,7 @@ namespace addon
415 /*! 391 /*!
416 * \brief Construct an invalid driver primitive 392 * \brief Construct an invalid driver primitive
417 */ 393 */
418 DriverPrimitive(void) : 394 DriverPrimitive(void) = default;
419 m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_UNKNOWN),
420 m_driverIndex(0),
421 m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN),
422 m_center(0),
423 m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN),
424 m_range(1),
425 m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN)
426 {
427 }
428 395
429 /*! 396 /*!
430 * \brief Construct a driver primitive representing a joystick button 397 * \brief Construct a driver primitive representing a joystick button
@@ -441,11 +408,7 @@ namespace addon
441 DriverPrimitive(unsigned int hatIndex, JOYSTICK_DRIVER_HAT_DIRECTION direction) : 408 DriverPrimitive(unsigned int hatIndex, JOYSTICK_DRIVER_HAT_DIRECTION direction) :
442 m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_HAT_DIRECTION), 409 m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_HAT_DIRECTION),
443 m_driverIndex(hatIndex), 410 m_driverIndex(hatIndex),
444 m_hatDirection(direction), 411 m_hatDirection(direction)
445 m_center(0),
446 m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN),
447 m_range(1),
448 m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN)
449 { 412 {
450 } 413 }
451 414
@@ -456,11 +419,9 @@ namespace addon
456 DriverPrimitive(unsigned int axisIndex, int center, JOYSTICK_DRIVER_SEMIAXIS_DIRECTION direction, unsigned int range) : 419 DriverPrimitive(unsigned int axisIndex, int center, JOYSTICK_DRIVER_SEMIAXIS_DIRECTION direction, unsigned int range) :
457 m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_SEMIAXIS), 420 m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_SEMIAXIS),
458 m_driverIndex(axisIndex), 421 m_driverIndex(axisIndex),
459 m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN),
460 m_center(center), 422 m_center(center),
461 m_semiAxisDirection(direction), 423 m_semiAxisDirection(direction),
462 m_range(range), 424 m_range(range)
463 m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN)
464 { 425 {
465 } 426 }
466 427
@@ -477,13 +438,7 @@ namespace addon
477 */ 438 */
478 DriverPrimitive(std::string keycode) : 439 DriverPrimitive(std::string keycode) :
479 m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_KEY), 440 m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_KEY),
480 m_driverIndex(0), 441 m_keycode(std::move(keycode))
481 m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN),
482 m_center(0),
483 m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN),
484 m_range(1),
485 m_keycode(std::move(keycode)),
486 m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN)
487 { 442 {
488 } 443 }
489 444
@@ -501,23 +456,12 @@ namespace addon
501 */ 456 */
502 DriverPrimitive(JOYSTICK_DRIVER_RELPOINTER_DIRECTION direction) : 457 DriverPrimitive(JOYSTICK_DRIVER_RELPOINTER_DIRECTION direction) :
503 m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_RELPOINTER_DIRECTION), 458 m_type(JOYSTICK_DRIVER_PRIMITIVE_TYPE_RELPOINTER_DIRECTION),
504 m_driverIndex(0),
505 m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN),
506 m_center(0),
507 m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN),
508 m_range(1),
509 m_relPointerDirection(direction) 459 m_relPointerDirection(direction)
510 { 460 {
511 } 461 }
512 462
513 explicit DriverPrimitive(const JOYSTICK_DRIVER_PRIMITIVE& primitive) : 463 explicit DriverPrimitive(const JOYSTICK_DRIVER_PRIMITIVE& primitive) :
514 m_type(primitive.type), 464 m_type(primitive.type)
515 m_driverIndex(0),
516 m_hatDirection(JOYSTICK_DRIVER_HAT_UNKNOWN),
517 m_center(0),
518 m_semiAxisDirection(JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN),
519 m_range(1),
520 m_relPointerDirection(JOYSTICK_DRIVER_RELPOINTER_UNKNOWN)
521 { 465 {
522 switch (m_type) 466 switch (m_type)
523 { 467 {
@@ -677,14 +621,14 @@ namespace addon
677 } 621 }
678 622
679 private: 623 private:
680 JOYSTICK_DRIVER_PRIMITIVE_TYPE m_type; 624 JOYSTICK_DRIVER_PRIMITIVE_TYPE m_type = JOYSTICK_DRIVER_PRIMITIVE_TYPE_UNKNOWN;
681 unsigned int m_driverIndex; 625 unsigned int m_driverIndex = 0;
682 JOYSTICK_DRIVER_HAT_DIRECTION m_hatDirection; 626 JOYSTICK_DRIVER_HAT_DIRECTION m_hatDirection = JOYSTICK_DRIVER_HAT_UNKNOWN;
683 int m_center; 627 int m_center = 0;
684 JOYSTICK_DRIVER_SEMIAXIS_DIRECTION m_semiAxisDirection; 628 JOYSTICK_DRIVER_SEMIAXIS_DIRECTION m_semiAxisDirection = JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN;
685 unsigned int m_range; 629 unsigned int m_range = 1;
686 std::string m_keycode; 630 std::string m_keycode;
687 JOYSTICK_DRIVER_RELPOINTER_DIRECTION m_relPointerDirection; 631 JOYSTICK_DRIVER_RELPOINTER_DIRECTION m_relPointerDirection = JOYSTICK_DRIVER_RELPOINTER_UNKNOWN;
688 }; 632 };
689 633
690 typedef PeripheralVector<DriverPrimitive, JOYSTICK_DRIVER_PRIMITIVE> DriverPrimitives; 634 typedef PeripheralVector<DriverPrimitive, JOYSTICK_DRIVER_PRIMITIVE> DriverPrimitives;
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h
index 04821b2..c4f8005 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h
@@ -1,24 +1,13 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Kodi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../AddonBase.h" 11#include "../AddonBase.h"
23 12
24namespace kodi { namespace addon { class CInstanceScreensaver; }} 13namespace kodi { namespace addon { class CInstanceScreensaver; }}
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h
index 637a991..3bdc059 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VFS.h
@@ -1,23 +1,12 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2015 Team Kodi 2 * Copyright (C) 2015-2018 Team Kodi
4 *
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with Kodi; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
18 * 3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 * See LICENSES/README.md for more information.
19 */ 6 */
20 7
8#pragma once
9
21#include "../AddonBase.h" 10#include "../AddonBase.h"
22#include "../Filesystem.h" 11#include "../Filesystem.h"
23 12
@@ -578,7 +567,7 @@ namespace addon
578 int* num_entries, 567 int* num_entries,
579 char* rootpath) 568 char* rootpath)
580 { 569 {
581 std::string cppRootPath; 570 std::string cppRootPath;
582 std::vector<kodi::vfs::CDirEntry> addonEntries; 571 std::vector<kodi::vfs::CDirEntry> addonEntries;
583 bool ret = instance->toAddon.addonInstance->ContainsFiles(*url, addonEntries, cppRootPath); 572 bool ret = instance->toAddon.addonInstance->ContainsFiles(*url, addonEntries, cppRootPath);
584 if (ret) 573 if (ret)
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h
index 8a8779a..9c33fbf 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/VideoCodec.h
@@ -1,21 +1,9 @@
1/* 1/*
2 * Copyright (C) 2017 Team XBMC 2 * Copyright (C) 2017-2018 Team Kodi
3 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
4 *
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with XBMC; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
18 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
19 */ 7 */
20 8
21#pragma once 9#pragma once
@@ -53,12 +41,12 @@ extern "C"
53 } codec; 41 } codec;
54 42
55 STREAMCODEC_PROFILE codecProfile; 43 STREAMCODEC_PROFILE codecProfile;
56 44
57 //UnknownVideoFormat is terminator 45 //UnknownVideoFormat is terminator
58 VIDEOCODEC_FORMAT *videoFormats; 46 VIDEOCODEC_FORMAT *videoFormats;
59 47
60 uint32_t width, height; 48 uint32_t width, height;
61 49
62 const uint8_t *extraData; 50 const uint8_t *extraData;
63 unsigned int extraDataSize; 51 unsigned int extraDataSize;
64 52
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h
index a2bef15..6c29693 100644
--- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h
+++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Visualization.h
@@ -1,24 +1,13 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Kodi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22/* 11/*
23 * Parts with a comment named "internal" are only used inside header and not 12 * Parts with a comment named "internal" are only used inside header and not
24 * used or accessed direct during add-on development! 13 * used or accessed direct during add-on development!
@@ -34,7 +23,7 @@ extern "C"
34struct AddonInstance_Visualization; 23struct AddonInstance_Visualization;
35 24
36typedef enum VIS_ACTION : unsigned int /* internal */ 25typedef enum VIS_ACTION : unsigned int /* internal */
37{ 26{
38 VIS_ACTION_NONE = 0, 27 VIS_ACTION_NONE = 0,
39 VIS_ACTION_NEXT_PRESET, 28 VIS_ACTION_NEXT_PRESET,
40 VIS_ACTION_PREV_PRESET, 29 VIS_ACTION_PREV_PRESET,
@@ -318,8 +307,7 @@ namespace addon
318 /// Used by an add-on that only supports visualizations. 307 /// Used by an add-on that only supports visualizations.
319 /// 308 ///
320 CInstanceVisualization() 309 CInstanceVisualization()
321 : IAddonInstance(ADDON_INSTANCE_VISUALIZATION), 310 : IAddonInstance(ADDON_INSTANCE_VISUALIZATION)
322 m_presetLockedByUser(false)
323 { 311 {
324 if (CAddonBase::m_interface->globalSingleInstance != nullptr) 312 if (CAddonBase::m_interface->globalSingleInstance != nullptr)
325 throw std::logic_error("kodi::addon::CInstanceVisualization: Cannot create multiple instances of add-on."); 313 throw std::logic_error("kodi::addon::CInstanceVisualization: Cannot create multiple instances of add-on.");
@@ -341,8 +329,7 @@ namespace addon
341 /// @warning Only use `instance` from the CreateInstance call 329 /// @warning Only use `instance` from the CreateInstance call
342 /// 330 ///
343 explicit CInstanceVisualization(KODI_HANDLE instance) 331 explicit CInstanceVisualization(KODI_HANDLE instance)
344 : IAddonInstance(ADDON_INSTANCE_VISUALIZATION), 332 : IAddonInstance(ADDON_INSTANCE_VISUALIZATION)
345 m_presetLockedByUser(false)
346 { 333 {
347 if (CAddonBase::m_interface->globalSingleInstance != nullptr) 334 if (CAddonBase::m_interface->globalSingleInstance != nullptr)
348 throw std::logic_error("kodi::addon::CInstanceVisualization: Creation of multiple together with single instance way is not allowed!"); 335 throw std::logic_error("kodi::addon::CInstanceVisualization: Creation of multiple together with single instance way is not allowed!");
@@ -690,7 +677,7 @@ namespace addon
690 { 677 {
691 addon->toAddon.addonInstance->AudioData(audioData, audioDataLength, freqData, freqDataLength); 678 addon->toAddon.addonInstance->AudioData(audioData, audioDataLength, freqData, freqDataLength);
692 } 679 }
693 680
694 inline static bool ADDON_IsDirty(const AddonInstance_Visualization* addon) 681 inline static bool ADDON_IsDirty(const AddonInstance_Visualization* addon)
695 { 682 {
696 return addon->toAddon.addonInstance->IsDirty(); 683 return addon->toAddon.addonInstance->IsDirty();
@@ -758,7 +745,7 @@ namespace addon
758 return addon->toAddon.addonInstance->IsLocked(); 745 return addon->toAddon.addonInstance->IsLocked();
759 } 746 }
760 747
761 bool m_presetLockedByUser; 748 bool m_presetLockedByUser = false;
762 AddonInstance_Visualization* m_instanceData; 749 AddonInstance_Visualization* m_instanceData;
763 }; 750 };
764 751
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../AddonBase.h" 11#include "../AddonBase.h"
23#include "definitions.h" 12#include "definitions.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../AddonBase.h" 11#include "../AddonBase.h"
23#include "definitions.h" 12#include "definitions.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../AddonBase.h" 11#include "../AddonBase.h"
23#include "ListItem.h" 12#include "ListItem.h"
24 13
@@ -98,7 +87,7 @@ namespace gui
98 if (!m_controlHandle) 87 if (!m_controlHandle)
99 kodi::Log(ADDON_LOG_FATAL, "kodi::gui::CWindow can't create window class from Kodi !!!"); 88 kodi::Log(ADDON_LOG_FATAL, "kodi::gui::CWindow can't create window class from Kodi !!!");
100 m_interface->kodi_gui->window->set_callbacks(m_interface->kodiBase, m_controlHandle, this, 89 m_interface->kodi_gui->window->set_callbacks(m_interface->kodiBase, m_controlHandle, this,
101 CBOnInit, CBOnFocus, CBOnClick, CBOnAction, 90 CBOnInit, CBOnFocus, CBOnClick, CBOnAction,
102 CBGetContextButtons, CBOnContextButton); 91 CBGetContextButtons, CBOnContextButton);
103 } 92 }
104 //-------------------------------------------------------------------------- 93 //--------------------------------------------------------------------------
@@ -867,7 +856,7 @@ namespace gui
867 static_cast<CWindow*>(cbhdl)->GetContextButtons(itemNumber, buttonList); 856 static_cast<CWindow*>(cbhdl)->GetContextButtons(itemNumber, buttonList);
868 if (!buttonList.empty()) 857 if (!buttonList.empty())
869 { 858 {
870 unsigned int presentSize = buttonList.size(); 859 unsigned int presentSize = static_cast<unsigned int>(buttonList.size());
871 if (presentSize > *size) 860 if (presentSize > *size)
872 kodi::Log(ADDON_LOG_WARNING, "GetContextButtons: More as allowed '%i' entries present!", *size); 861 kodi::Log(ADDON_LOG_WARNING, "GetContextButtons: More as allowed '%i' entries present!", *size);
873 else 862 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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../../AddonBase.h" 11#include "../../AddonBase.h"
23#include "../Window.h" 12#include "../Window.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../../AddonBase.h" 11#include "../../AddonBase.h"
23#include "../Window.h" 12#include "../Window.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../../AddonBase.h" 11#include "../../AddonBase.h"
23#include "../Window.h" 12#include "../Window.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../../AddonBase.h" 11#include "../../AddonBase.h"
23#include "../Window.h" 12#include "../Window.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../../AddonBase.h" 11#include "../../AddonBase.h"
23#include "../Window.h" 12#include "../Window.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../../AddonBase.h" 11#include "../../AddonBase.h"
23#include "../Window.h" 12#include "../Window.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../../AddonBase.h" 11#include "../../AddonBase.h"
23#include "../Window.h" 12#include "../Window.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../../AddonBase.h" 11#include "../../AddonBase.h"
23#include "../Window.h" 12#include "../Window.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../../AddonBase.h" 11#include "../../AddonBase.h"
23#include "../Window.h" 12#include "../Window.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../../AddonBase.h" 11#include "../../AddonBase.h"
23#include "../Window.h" 12#include "../Window.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../../AddonBase.h" 11#include "../../AddonBase.h"
23#include "../Window.h" 12#include "../Window.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../../AddonBase.h" 11#include "../../AddonBase.h"
23#include "../Window.h" 12#include "../Window.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include <string> 11#include <string>
23#include <time.h> 12#include <time.h>
24 13
@@ -223,7 +212,7 @@ typedef struct AddonToKodiFuncTable_kodi_gui_dialogKeyboard
223 bool (*send_text_to_active_keyboard)(void* kodiBase, const char* text, bool close_keyboard); 212 bool (*send_text_to_active_keyboard)(void* kodiBase, const char* text, bool close_keyboard);
224 bool (*is_keyboard_activated)(void* kodiBase); 213 bool (*is_keyboard_activated)(void* kodiBase);
225} AddonToKodiFuncTable_kodi_gui_dialogKeyboard; 214} AddonToKodiFuncTable_kodi_gui_dialogKeyboard;
226 215
227typedef struct AddonToKodiFuncTable_kodi_gui_dialogNumeric 216typedef struct AddonToKodiFuncTable_kodi_gui_dialogNumeric
228{ 217{
229 bool (*show_and_verify_new_password)(void* kodiBase, char** password); 218 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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../definitions.h" 11#include "../definitions.h"
23#include "../../AddonBase.h" 12#include "../../AddonBase.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../definitions.h" 11#include "../definitions.h"
23#include "../../AddonBase.h" 12#include "../../AddonBase.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../definitions.h" 11#include "../definitions.h"
23#include "../../AddonBase.h" 12#include "../../AddonBase.h"
24 13
@@ -159,7 +148,7 @@ namespace dialogs
159 char* retString = nullptr; 148 char* retString = nullptr;
160 bool ret = CAddonBase::m_interface->toKodi->kodi_gui->dialogFileBrowser->show_and_get_file_from_dir(CAddonBase::m_interface->toKodi->kodiBase, 149 bool ret = CAddonBase::m_interface->toKodi->kodi_gui->dialogFileBrowser->show_and_get_file_from_dir(CAddonBase::m_interface->toKodi->kodiBase,
161 directory.c_str(), mask.c_str(), heading.c_str(), 150 directory.c_str(), mask.c_str(), heading.c_str(),
162 path.c_str(), &retString, useThumbs, 151 path.c_str(), &retString, useThumbs,
163 useFileDirectories, singleList); 152 useFileDirectories, singleList);
164 if (retString != nullptr) 153 if (retString != nullptr)
165 { 154 {
@@ -223,7 +212,7 @@ namespace dialogs
223 { 212 {
224 using namespace ::kodi::addon; 213 using namespace ::kodi::addon;
225 char* retString = nullptr; 214 char* retString = nullptr;
226 bool ret = CAddonBase::m_interface->toKodi->kodi_gui->dialogFileBrowser->show_and_get_source(CAddonBase::m_interface->toKodi->kodiBase, path.c_str(), &retString, 215 bool ret = CAddonBase::m_interface->toKodi->kodi_gui->dialogFileBrowser->show_and_get_source(CAddonBase::m_interface->toKodi->kodiBase, path.c_str(), &retString,
227 allowNetworkShares, additionalShare.c_str(), type.c_str()); 216 allowNetworkShares, additionalShare.c_str(), type.c_str());
228 if (retString != nullptr) 217 if (retString != nullptr)
229 { 218 {
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../definitions.h" 11#include "../definitions.h"
23#include "../../AddonBase.h" 12#include "../../AddonBase.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../definitions.h" 11#include "../definitions.h"
23#include "../../AddonBase.h" 12#include "../../AddonBase.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../../AddonBase.h" 11#include "../../AddonBase.h"
23#include "../definitions.h" 12#include "../definitions.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../definitions.h" 11#include "../definitions.h"
23#include "../../AddonBase.h" 12#include "../../AddonBase.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../definitions.h" 11#include "../definitions.h"
23#include "../../AddonBase.h" 12#include "../../AddonBase.h"
24 13
@@ -39,7 +28,7 @@ typedef struct SSelectionEntry
39 /// 28 ///
40 /// There becomes selected always set to false. 29 /// There becomes selected always set to false.
41 /// 30 ///
42 SSelectionEntry() : selected(false) { } 31 SSelectionEntry() = default;
43 //---------------------------------------------------------------------------- 32 //----------------------------------------------------------------------------
44 33
45 /// Entry identfication string 34 /// Entry identfication string
@@ -50,7 +39,7 @@ typedef struct SSelectionEntry
50 39
51 /// Place where entry can be preselected and after return the from user 40 /// Place where entry can be preselected and after return the from user
52 /// selected is set. 41 /// selected is set.
53 bool selected; 42 bool selected = false;
54} SSelectionEntry; 43} SSelectionEntry;
55//------------------------------------------------------------------------------ 44//------------------------------------------------------------------------------
56 45
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2015-2016 Team KODI 2 * Copyright (C) 2015-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../definitions.h" 11#include "../definitions.h"
23#include "../../AddonBase.h" 12#include "../../AddonBase.h"
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team KODI 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../definitions.h" 11#include "../definitions.h"
23#include "../../AddonBase.h" 12#include "../../AddonBase.h"
24 13
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 @@
1/* 1/*
2 * Copyright (C) 2014-2017 Team Kodi 2 * Copyright (C) 2014-2018 Team Kodi
3 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
4 *
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this Program; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
18 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
19 */ 7 */
20#ifndef KODI_GAME_DLL_H_ 8
21#define KODI_GAME_DLL_H_ 9#pragma once
22 10
23#include "kodi_game_types.h" 11#include "kodi_game_types.h"
24 12
@@ -40,7 +28,7 @@ GAME_ERROR LoadGame(const char* url);
40/*! 28/*!
41 * \brief Load a game that requires multiple files 29 * \brief Load a game that requires multiple files
42 * 30 *
43 * \param type The game stype 31 * \param type The game type
44 * \param urls An array of urls 32 * \param urls An array of urls
45 * \param urlCount The number of urls in the array 33 * \param urlCount The number of urls in the array
46 * 34 *
@@ -69,13 +57,13 @@ GAME_ERROR LoadStandalone(void);
69GAME_ERROR UnloadGame(void); 57GAME_ERROR UnloadGame(void);
70 58
71/*! 59/*!
72 * \brief Get information about the loaded game 60 * \brief Get timing information about the loaded game
73 * 61 *
74 * \param info The info structure to fill 62 * \param info The info structure to fill
75 * 63 *
76 * \return the error, or GAME_ERROR_NO_ERROR if info was filled 64 * \return the error, or GAME_ERROR_NO_ERROR if info was filled
77 */ 65 */
78GAME_ERROR GetGameInfo(game_system_av_info* info); 66GAME_ERROR GetGameTiming(game_system_timing* timing_info);
79 67
80/*! 68/*!
81 * \brief Get region of the loaded game 69 * \brief Get region of the loaded game
@@ -145,7 +133,7 @@ GAME_ERROR HwContextDestroy(void);
145bool HasFeature(const char* controller_id, const char* feature_name); 133bool HasFeature(const char* controller_id, const char* feature_name);
146 134
147/*! 135/*!
148 * \brief Get the input topolgy that specifies which controllers can be connected 136 * \brief Get the input topology that specifies which controllers can be connected
149 * 137 *
150 * \return The input topology, or null to use the default 138 * \return The input topology, or null to use the default
151 * 139 *
@@ -311,7 +299,7 @@ void __declspec(dllexport) get_addon(void* ptr)
311 pClient->toAddon.LoadGameSpecial = LoadGameSpecial; 299 pClient->toAddon.LoadGameSpecial = LoadGameSpecial;
312 pClient->toAddon.LoadStandalone = LoadStandalone; 300 pClient->toAddon.LoadStandalone = LoadStandalone;
313 pClient->toAddon.UnloadGame = UnloadGame; 301 pClient->toAddon.UnloadGame = UnloadGame;
314 pClient->toAddon.GetGameInfo = GetGameInfo; 302 pClient->toAddon.GetGameTiming = GetGameTiming;
315 pClient->toAddon.GetRegion = GetRegion; 303 pClient->toAddon.GetRegion = GetRegion;
316 pClient->toAddon.RequiresGameLoop = RequiresGameLoop; 304 pClient->toAddon.RequiresGameLoop = RequiresGameLoop;
317 pClient->toAddon.RunFrame = RunFrame; 305 pClient->toAddon.RunFrame = RunFrame;
@@ -337,4 +325,3 @@ void __declspec(dllexport) get_addon(void* ptr)
337} 325}
338#endif 326#endif
339 327
340#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 @@
1/* 1/*
2 * Copyright (C) 2014-2017 Team Kodi 2 * Copyright (C) 2014-2018 Team Kodi
3 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
4 *
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this Program; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
18 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
19 */ 7 */
20#ifndef KODI_GAME_TYPES_H_ 8
21#define KODI_GAME_TYPES_H_ 9#pragma once
22 10
23#include "versions.h" 11#include "versions.h"
24#include "xbmc_addon_types.h" 12#include "xbmc_addon_types.h"
@@ -62,6 +50,8 @@
62extern "C" { 50extern "C" {
63#endif 51#endif
64 52
53/// @name Add-on types
54///{
65/*! Game add-on error codes */ 55/*! Game add-on error codes */
66typedef enum GAME_ERROR 56typedef enum GAME_ERROR
67{ 57{
@@ -74,50 +64,16 @@ typedef enum GAME_ERROR
74 GAME_ERROR_NOT_LOADED, // no game is loaded 64 GAME_ERROR_NOT_LOADED, // no game is loaded
75 GAME_ERROR_RESTRICTED, // game requires restricted resources 65 GAME_ERROR_RESTRICTED, // game requires restricted resources
76} GAME_ERROR; 66} GAME_ERROR;
67///}
77 68
78typedef enum GAME_STREAM_TYPE 69/// @name Audio stream
79{ 70///{
80 GAME_STREAM_UNKNOWN,
81 GAME_STREAM_AUDIO,
82 GAME_STREAM_VIDEO,
83} GAME_STREAM_TYPE;
84
85typedef enum GAME_PIXEL_FORMAT
86{
87 GAME_PIXEL_FORMAT_UNKNOWN,
88 GAME_PIXEL_FORMAT_YUV420P,
89 GAME_PIXEL_FORMAT_0RGB8888,
90 GAME_PIXEL_FORMAT_RGB565,
91 GAME_PIXEL_FORMAT_0RGB1555,
92} GAME_PIXEL_FORMAT;
93
94typedef enum GAME_VIDEO_CODEC
95{
96 GAME_VIDEO_CODEC_UNKNOWN,
97 GAME_VIDEO_CODEC_H264,
98 GAME_VIDEO_CODEC_THEORA,
99} GAME_VIDEO_CODEC;
100
101typedef enum GAME_VIDEO_ROTATION // Counter-clockwise
102{
103 GAME_VIDEO_ROTATION_0,
104 GAME_VIDEO_ROTATION_90,
105 GAME_VIDEO_ROTATION_180,
106 GAME_VIDEO_ROTATION_270,
107} GAME_VIDEO_ROTATION;
108
109typedef enum GAME_PCM_FORMAT 71typedef enum GAME_PCM_FORMAT
110{ 72{
111 GAME_PCM_FORMAT_UNKNOWN, 73 GAME_PCM_FORMAT_UNKNOWN,
112 GAME_PCM_FORMAT_S16NE, 74 GAME_PCM_FORMAT_S16NE,
113} GAME_PCM_FORMAT; 75} GAME_PCM_FORMAT;
114 76
115typedef enum GAME_AUDIO_CODEC
116{
117 GAME_AUDIO_CODEC_UNKNOWN,
118 GAME_AUDIO_CODEC_OPUS,
119} GAME_AUDIO_CODEC;
120
121typedef enum GAME_AUDIO_CHANNEL 77typedef enum GAME_AUDIO_CHANNEL
122{ 78{
123 GAME_CH_NULL, // Channel list terminator 79 GAME_CH_NULL, // Channel list terminator
@@ -143,50 +99,234 @@ typedef enum GAME_AUDIO_CHANNEL
143 GAME_CH_BROC, 99 GAME_CH_BROC,
144} GAME_AUDIO_CHANNEL; 100} GAME_AUDIO_CHANNEL;
145 101
146// TODO 102typedef struct game_stream_audio_properties
147typedef enum GAME_HW_FRAME_BUFFER 103{
104 GAME_PCM_FORMAT format;
105 const GAME_AUDIO_CHANNEL* channel_map;
106} ATTRIBUTE_PACKED game_stream_audio_properties;
107
108typedef struct game_stream_audio_packet
109{
110 const uint8_t *data;
111 size_t size;
112} ATTRIBUTE_PACKED game_stream_audio_packet;
113///}
114
115/// @name Video stream
116///{
117typedef enum GAME_PIXEL_FORMAT
118{
119 GAME_PIXEL_FORMAT_UNKNOWN,
120 GAME_PIXEL_FORMAT_0RGB8888,
121 GAME_PIXEL_FORMAT_RGB565,
122 GAME_PIXEL_FORMAT_0RGB1555,
123} GAME_PIXEL_FORMAT;
124
125typedef enum GAME_VIDEO_ROTATION
126{
127 GAME_VIDEO_ROTATION_0,
128 GAME_VIDEO_ROTATION_90_CCW,
129 GAME_VIDEO_ROTATION_180_CCW,
130 GAME_VIDEO_ROTATION_270_CCW,
131} GAME_VIDEO_ROTATION;
132
133typedef struct game_stream_video_properties
148{ 134{
149 GAME_HW_FRAME_BUFFER_VALID, // Pass this to game_video_refresh if rendering to hardware 135 GAME_PIXEL_FORMAT format;
150 GAME_HW_FRAME_BUFFER_DUPLICATE, // Passing NULL to game_video_refresh is still a frame dupe as normal 136 unsigned int nominal_width;
151 GAME_HW_FRAME_BUFFER_RENDER, 137 unsigned int nominal_height;
152} GAME_HW_FRAME_BUFFER; 138 unsigned int max_width;
139 unsigned int max_height;
140 float aspect_ratio; // If aspect_ratio is <= 0.0, an aspect ratio of nominal_width / nominal_height is assumed
141} ATTRIBUTE_PACKED game_stream_video_properties;
153 142
143typedef struct game_stream_video_packet
144{
145 unsigned int width;
146 unsigned int height;
147 GAME_VIDEO_ROTATION rotation;
148 const uint8_t *data;
149 size_t size;
150} ATTRIBUTE_PACKED game_stream_video_packet;
151///}
152
153/// @name Hardware framebuffer stream
154///{
154typedef enum GAME_HW_CONTEXT_TYPE 155typedef enum GAME_HW_CONTEXT_TYPE
155{ 156{
156 GAME_HW_CONTEXT_NONE, 157 GAME_HW_CONTEXT_NONE,
157 GAME_HW_CONTEXT_OPENGL, // OpenGL 2.x. Latest version available before 3.x+. Driver can choose to use latest compatibility context 158
158 GAME_HW_CONTEXT_OPENGLES2, // GLES 2.0 159 // OpenGL 2.x. Driver can choose to use latest compatibility context
159 GAME_HW_CONTEXT_OPENGL_CORE, // Modern desktop core GL context. Use major/minor fields to set GL version 160 GAME_HW_CONTEXT_OPENGL,
160 GAME_HW_CONTEXT_OPENGLES3, // GLES 3.0 161
162 // OpenGL ES 2.0
163 GAME_HW_CONTEXT_OPENGLES2,
164
165 // Modern desktop core GL context. Use major/minor fields to set GL version
166 GAME_HW_CONTEXT_OPENGL_CORE,
167
168 // OpenGL ES 3.0
169 GAME_HW_CONTEXT_OPENGLES3,
170
171 // OpenGL ES 3.1+. Set major/minor fields.
172 GAME_HW_CONTEXT_OPENGLES_VERSION,
173
174 // Vulkan
175 GAME_HW_CONTEXT_VULKAN
161} GAME_HW_CONTEXT_TYPE; 176} GAME_HW_CONTEXT_TYPE;
162 177
163typedef enum GAME_INPUT_EVENT_SOURCE 178typedef struct game_stream_hw_framebuffer_properties
164{ 179{
165 GAME_INPUT_EVENT_DIGITAL_BUTTON, 180 /*!
166 GAME_INPUT_EVENT_ANALOG_BUTTON, 181 * The API to use.
167 GAME_INPUT_EVENT_AXIS, 182 */
168 GAME_INPUT_EVENT_ANALOG_STICK, 183 GAME_HW_CONTEXT_TYPE context_type;
169 GAME_INPUT_EVENT_ACCELEROMETER,
170 GAME_INPUT_EVENT_KEY,
171 GAME_INPUT_EVENT_RELATIVE_POINTER,
172 GAME_INPUT_EVENT_ABSOLUTE_POINTER,
173 GAME_INPUT_EVENT_MOTOR,
174} GAME_INPUT_EVENT_SOURCE;
175 184
176typedef enum GAME_KEY_MOD 185 /*!
186 * Set if render buffers should have depth component attached.
187 *
188 * TODO: Obsolete
189 */
190 bool depth;
191
192 /*!
193 * Set if stencil buffers should be attached. If depth and stencil are true,
194 * a packed 24/8 buffer will be added. Only attaching stencil is invalid and
195 * will be ignored.
196 *
197 * TODO: Obsolete.
198 */
199 bool stencil;
200
201 /*!
202 * Use conventional bottom-left origin convention. If false, standard top-left
203 * origin semantics are used.
204 *
205 * TODO: Move to GL specific interface
206 */
207 bool bottom_left_origin;
208
209 /*!
210 * Major version number for core GL context or GLES 3.1+.
211 */
212 unsigned int version_major;
213
214 /*!
215 * Minor version number for core GL context or GLES 3.1+.
216 */
217 unsigned int version_minor;
218
219 /*!
220 * If this is true, the frontend will go very far to avoid resetting context
221 * in scenarios like toggling fullscreen, etc.
222 *
223 * TODO: Obsolete? Maybe frontend should just always assume this...
224 *
225 * The reset callback might still be called in extreme situations such as if
226 * the context is lost beyond recovery.
227 *
228 * For optimal stability, set this to false, and allow context to be reset at
229 * any time.
230 */
231 bool cache_context;
232
233 /*!
234 * Creates a debug context.
235 */
236 bool debug_context;
237} ATTRIBUTE_PACKED game_stream_hw_framebuffer_properties;
238
239typedef struct game_stream_hw_framebuffer_buffer
177{ 240{
178 GAME_KEY_MOD_NONE = 0x0000, 241 uintptr_t framebuffer;
242} ATTRIBUTE_PACKED game_stream_hw_framebuffer_buffer;
179 243
180 GAME_KEY_MOD_SHIFT = 0x0001, 244typedef struct game_stream_hw_framebuffer_packet
181 GAME_KEY_MOD_CTRL = 0x0002, 245{
182 GAME_KEY_MOD_ALT = 0x0004, 246 uintptr_t framebuffer;
183 GAME_KEY_MOD_META = 0x0008, 247} ATTRIBUTE_PACKED game_stream_hw_framebuffer_packet;
184 GAME_KEY_MOD_SUPER = 0x0010,
185 248
186 GAME_KEY_MOD_NUMLOCK = 0x0100, 249typedef void (*game_proc_address_t)(void);
187 GAME_KEY_MOD_CAPSLOCK = 0x0200, 250///}
188 GAME_KEY_MOD_SCROLLOCK = 0x0400, 251
189} GAME_KEY_MOD; 252/// @name Software framebuffer stream
253///{
254typedef game_stream_video_properties game_stream_sw_framebuffer_properties;
255
256typedef struct game_stream_sw_framebuffer_buffer
257{
258 GAME_PIXEL_FORMAT format;
259 uint8_t *data;
260 size_t size;
261} ATTRIBUTE_PACKED game_stream_sw_framebuffer_buffer;
262
263typedef game_stream_video_packet game_stream_sw_framebuffer_packet;
264///}
265
266/// @name Stream types
267///{
268typedef enum GAME_STREAM_TYPE
269{
270 GAME_STREAM_UNKNOWN,
271 GAME_STREAM_AUDIO,
272 GAME_STREAM_VIDEO,
273 GAME_STREAM_HW_FRAMEBUFFER,
274 GAME_STREAM_SW_FRAMEBUFFER,
275} GAME_STREAM_TYPE;
276
277/*!
278 * \brief Immutable stream metadata
279 *
280 * This metadata is provided when the stream is opened. If any stream
281 * properties change, a new stream must be opened.
282 */
283typedef struct game_stream_properties
284{
285 GAME_STREAM_TYPE type;
286 union
287 {
288 game_stream_audio_properties audio;
289 game_stream_video_properties video;
290 game_stream_hw_framebuffer_properties hw_framebuffer;
291 game_stream_sw_framebuffer_properties sw_framebuffer;
292 };
293} ATTRIBUTE_PACKED game_stream_properties;
294
295/*!
296 * \brief Stream buffers for hardware rendering and zero-copy support
297 */
298typedef struct game_stream_buffer
299{
300 GAME_STREAM_TYPE type;
301 union
302 {
303 game_stream_hw_framebuffer_buffer hw_framebuffer;
304 game_stream_sw_framebuffer_buffer sw_framebuffer;
305 };
306} ATTRIBUTE_PACKED game_stream_buffer;
307
308/*!
309 * \brief Stream packet and ephemeral metadata
310 *
311 * This packet contains stream data and accompanying metadata. The metadata
312 * is ephemeral, meaning it only applies to the current packet and can change
313 * from packet to packet in the same stream.
314 */
315typedef struct game_stream_packet
316{
317 GAME_STREAM_TYPE type;
318 union
319 {
320 game_stream_audio_packet audio;
321 game_stream_video_packet video;
322 game_stream_hw_framebuffer_packet hw_framebuffer;
323 game_stream_sw_framebuffer_packet sw_framebuffer;
324 };
325} ATTRIBUTE_PACKED game_stream_packet;
326///}
327
328/// @name Game types
329///{
190 330
191/*! Returned from game_get_region() */ 331/*! Returned from game_get_region() */
192typedef enum GAME_REGION 332typedef enum GAME_REGION
@@ -262,14 +402,38 @@ typedef enum GAME_SIMD
262 GAME_SIMD_AVX2 = (1 << 12), 402 GAME_SIMD_AVX2 = (1 << 12),
263 GAME_SIMD_VFPU = (1 << 13), 403 GAME_SIMD_VFPU = (1 << 13),
264} GAME_SIMD; 404} GAME_SIMD;
405///}
406
407/// @name Input types
408///{
265 409
266typedef enum GAME_ROTATION 410typedef enum GAME_INPUT_EVENT_SOURCE
267{ 411{
268 GAME_ROTATION_0_CW, 412 GAME_INPUT_EVENT_DIGITAL_BUTTON,
269 GAME_ROTATION_90_CW, 413 GAME_INPUT_EVENT_ANALOG_BUTTON,
270 GAME_ROTATION_180_CW, 414 GAME_INPUT_EVENT_AXIS,
271 GAME_ROTATION_270_CW, 415 GAME_INPUT_EVENT_ANALOG_STICK,
272} GAME_ROTATION; 416 GAME_INPUT_EVENT_ACCELEROMETER,
417 GAME_INPUT_EVENT_KEY,
418 GAME_INPUT_EVENT_RELATIVE_POINTER,
419 GAME_INPUT_EVENT_ABSOLUTE_POINTER,
420 GAME_INPUT_EVENT_MOTOR,
421} GAME_INPUT_EVENT_SOURCE;
422
423typedef enum GAME_KEY_MOD
424{
425 GAME_KEY_MOD_NONE = 0x0000,
426
427 GAME_KEY_MOD_SHIFT = 0x0001,
428 GAME_KEY_MOD_CTRL = 0x0002,
429 GAME_KEY_MOD_ALT = 0x0004,
430 GAME_KEY_MOD_META = 0x0008,
431 GAME_KEY_MOD_SUPER = 0x0010,
432
433 GAME_KEY_MOD_NUMLOCK = 0x0100,
434 GAME_KEY_MOD_CAPSLOCK = 0x0200,
435 GAME_KEY_MOD_SCROLLOCK = 0x0400,
436} GAME_KEY_MOD;
273 437
274/*! 438/*!
275 * \brief Type of port on the virtual game console 439 * \brief Type of port on the virtual game console
@@ -418,46 +582,16 @@ typedef struct game_input_event
418 struct game_motor_event motor; 582 struct game_motor_event motor;
419 }; 583 };
420} ATTRIBUTE_PACKED game_input_event; 584} ATTRIBUTE_PACKED game_input_event;
585///}
421 586
422struct game_geometry 587/// @name Environment types
423{ 588///{
424 unsigned base_width; // Nominal video width of game
425 unsigned base_height; // Nominal video height of game
426 unsigned max_width; // Maximum possible width of game
427 unsigned max_height; // Maximum possible height of game
428 float aspect_ratio; // Nominal aspect ratio of game. If aspect_ratio is <= 0.0,
429 // an aspect ratio of base_width / base_height is assumed.
430 // A frontend could override this setting if desired.
431};
432
433struct game_system_timing 589struct game_system_timing
434{ 590{
435 double fps; // FPS of video content. 591 double fps; // FPS of video content.
436 double sample_rate; // Sampling rate of audio. 592 double sample_rate; // Sampling rate of audio.
437}; 593};
438 594///}
439struct game_system_av_info
440{
441 struct game_geometry geometry;
442 struct game_system_timing timing;
443};
444
445typedef void (*game_proc_address_t)(void);
446
447struct game_hw_info
448{
449 GAME_HW_CONTEXT_TYPE context_type; // Which API to use. Set by game client
450 bool depth; // Set if render buffers should have depth component attached
451 bool stencil; // Set if stencil buffers should be attached
452 // If depth and stencil are true, a packed 24/8 buffer will be added. Only attaching stencil is invalid and will be ignored
453 bool bottom_left_origin; // Use conventional bottom-left origin convention. Is false, standard top-left origin semantics are used
454 unsigned version_major; // Major version number for core GL context
455 unsigned version_minor; // Minor version number for core GL context
456 bool cache_context; // If this is true, the frontend will go very far to avoid resetting context in scenarios like toggling fullscreen, etc.
457 // The reset callback might still be called in extreme situations such as if the context is lost beyond recovery
458 // For optimal stability, set this to false, and allow context to be reset at any time
459 bool debug_context; // Creates a debug context
460};
461 595
462/*! Properties passed to the ADDON_Create() method of a game client */ 596/*! Properties passed to the ADDON_Create() method of a game client */
463typedef struct AddonProps_Game 597typedef struct AddonProps_Game
@@ -512,7 +646,7 @@ typedef struct AddonProps_Game
512} AddonProps_Game; 646} AddonProps_Game;
513 647
514typedef AddonProps_Game game_client_properties; 648typedef AddonProps_Game game_client_properties;
515 649
516/*! Structure to transfer the methods from kodi_game_dll.h to Kodi */ 650/*! Structure to transfer the methods from kodi_game_dll.h to Kodi */
517 651
518typedef struct AddonToKodiFuncTable_Game 652typedef struct AddonToKodiFuncTable_Game
@@ -520,16 +654,12 @@ typedef struct AddonToKodiFuncTable_Game
520 KODI_HANDLE kodiInstance; 654 KODI_HANDLE kodiInstance;
521 655
522 void (*CloseGame)(void* kodiInstance); 656 void (*CloseGame)(void* kodiInstance);
523 int (*OpenPixelStream)(void* kodiInstance, GAME_PIXEL_FORMAT format, unsigned int width, unsigned int height, GAME_VIDEO_ROTATION rotation); 657 void* (*OpenStream)(void*, const game_stream_properties*);
524 int (*OpenVideoStream)(void* kodiInstance, GAME_VIDEO_CODEC codec); 658 bool (*GetStreamBuffer)(void*, void*, unsigned int, unsigned int, game_stream_buffer*);
525 int (*OpenPCMStream)(void* kodiInstance, GAME_PCM_FORMAT format, const GAME_AUDIO_CHANNEL* channel_map); 659 void (*AddStreamData)(void*, void*, const game_stream_packet*);
526 int(*OpenAudioStream)(void* kodiInstance, GAME_AUDIO_CODEC codec, const GAME_AUDIO_CHANNEL* channel_map); 660 void (*ReleaseStreamBuffer)(void*, void*, game_stream_buffer*);
527 void (*AddStreamData)(void* kodiInstance, GAME_STREAM_TYPE stream, const uint8_t* data, unsigned int size); 661 void (*CloseStream)(void*, void*);
528 void (*CloseStream)(void* kodiInstance, GAME_STREAM_TYPE stream);
529 void (*EnableHardwareRendering)(void* kodiInstance, const game_hw_info* hw_info);
530 uintptr_t (*HwGetCurrentFramebuffer)(void* kodiInstance);
531 game_proc_address_t (*HwGetProcAddress)(void* kodiInstance, const char* symbol); 662 game_proc_address_t (*HwGetProcAddress)(void* kodiInstance, const char* symbol);
532 void (*RenderFrame)(void* kodiInstance);
533 bool (*InputEvent)(void* kodiInstance, const game_input_event* event); 663 bool (*InputEvent)(void* kodiInstance, const game_input_event* event);
534 664
535} AddonToKodiFuncTable_Game; 665} AddonToKodiFuncTable_Game;
@@ -540,7 +670,7 @@ typedef struct KodiToAddonFuncTable_Game
540 GAME_ERROR (__cdecl* LoadGameSpecial)(SPECIAL_GAME_TYPE, const char**, size_t); 670 GAME_ERROR (__cdecl* LoadGameSpecial)(SPECIAL_GAME_TYPE, const char**, size_t);
541 GAME_ERROR (__cdecl* LoadStandalone)(void); 671 GAME_ERROR (__cdecl* LoadStandalone)(void);
542 GAME_ERROR (__cdecl* UnloadGame)(void); 672 GAME_ERROR (__cdecl* UnloadGame)(void);
543 GAME_ERROR (__cdecl* GetGameInfo)(game_system_av_info*); 673 GAME_ERROR (__cdecl* GetGameTiming)(game_system_timing*);
544 GAME_REGION (__cdecl* GetRegion)(void); 674 GAME_REGION (__cdecl* GetRegion)(void);
545 bool (__cdecl* RequiresGameLoop)(void); 675 bool (__cdecl* RequiresGameLoop)(void);
546 GAME_ERROR (__cdecl* RunFrame)(void); 676 GAME_ERROR (__cdecl* RunFrame)(void);
@@ -573,4 +703,3 @@ typedef struct AddonInstance_Game
573} 703}
574#endif 704#endif
575 705
576#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 @@
1/* 1/*
2 * Copyright (C) 2015 Team Kodi 2 * Copyright (C) 2015-2018 Team Kodi
3 *
4 * This Program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2, or (at your option)
7 * any later version.
8 *
9 * This Program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with Kodi; see the file COPYING. If not, see
16 * <http://www.gnu.org/licenses/>.
17 * 3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 * See LICENSES/README.md for more information.
18 */ 6 */
7
19#pragma once 8#pragma once
20 9
21#ifndef TARGET_WINDOWS 10#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 @@
1/* 1/*
2 * Copyright (C) 2014-2017 Team Kodi 2 * Copyright (C) 2014-2018 Team Kodi
3 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
4 *
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this Program; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
18 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
19 */ 7 */
8
20#pragma once 9#pragma once
21 10
22#include "libXBMC_addon.h" 11#include "libXBMC_addon.h"
@@ -65,72 +54,58 @@ public:
65 */ 54 */
66 void CloseGame(void) 55 void CloseGame(void)
67 { 56 {
68 return m_callbacks->toKodi.CloseGame(m_callbacks->toKodi.kodiInstance); 57 m_callbacks->toKodi.CloseGame(m_callbacks->toKodi.kodiInstance);
69 } 58 }
70 59
71 /*! 60 /*!
72 * \brief Create a video stream for pixel data 61 * \brief Create a stream for gameplay data
73 * 62 *
74 * \param format The type of pixel data accepted by this stream 63 * \param properties The stream properties
75 * \param width The frame width
76 * \param height The frame height
77 * \param rotation The rotation (counter-clockwise) of the video frames
78 * 64 *
79 * \return 0 on success or -1 if a video stream is already created 65 * \return A stream handle, or NULL on failure
80 */ 66 */
81 bool OpenPixelStream(GAME_PIXEL_FORMAT format, unsigned int width, unsigned int height, GAME_VIDEO_ROTATION rotation) 67 void* OpenStream(const game_stream_properties &properties)
82 { 68 {
83 return m_callbacks->toKodi.OpenPixelStream(m_callbacks->toKodi.kodiInstance, format, width, height, rotation) == 0; 69 return m_callbacks->toKodi.OpenStream(m_callbacks->toKodi.kodiInstance, &properties);
84 } 70 }
85 71
86 /*! 72 /*!
87 * \brief Create a video stream for encoded video data 73 * \brief Get a buffer for zero-copy stream data
88 * 74 *
89 * \param codec The video format accepted by this stream 75 * \param stream The stream handle
76 * \param width The framebuffer width, or 0 for no width specified
77 * \param height The framebuffer height, or 0 for no height specified
78 * \param[out] buffer The buffer, or unmodified if false is returned
90 * 79 *
91 * \return 0 on success or -1 if a video stream is already created 80 * If this returns true, buffer must be freed using ReleaseStreamBuffer().
81 *
82 * \return True if buffer was set, false otherwise
92 */ 83 */
93 bool OpenVideoStream(GAME_VIDEO_CODEC codec) 84 bool GetStreamBuffer(void *stream, unsigned int width, unsigned int height, game_stream_buffer &buffer)
94 { 85 {
95 return m_callbacks->toKodi.OpenVideoStream(m_callbacks->toKodi.kodiInstance, codec) == 0; 86 return m_callbacks->toKodi.GetStreamBuffer(m_callbacks->toKodi.kodiInstance, stream, width, height, &buffer);
96 } 87 }
97 88
98 /*! 89 /*!
99 * \brief Create an audio stream for PCM audio data 90 * \brief Add a data packet to a stream
100 *
101 * \param format The type of audio data accepted by this stream
102 * \param channel_map The channel layout terminated by GAME_CH_NULL
103 * 91 *
104 * \return 0 on success or -1 if an audio stream is already created 92 * \param stream The target stream
93 * \param packet The data packet
105 */ 94 */
106 bool OpenPCMStream(GAME_PCM_FORMAT format, const GAME_AUDIO_CHANNEL* channel_map) 95 void AddStreamData(void *stream, const game_stream_packet &packet)
107 {
108 return m_callbacks->toKodi.OpenPCMStream(m_callbacks->toKodi.kodiInstance, format, channel_map) == 0;
109 }
110
111 /*!
112 * \brief Create an audio stream for encoded audio data
113 *
114 * \param codec The audio format accepted by this stream
115 * \param channel_map The channel layout terminated by GAME_CH_NULL
116 *
117 * \return 0 on success or -1 if an audio stream is already created
118 */
119 bool OpenAudioStream(GAME_AUDIO_CODEC codec, const GAME_AUDIO_CHANNEL* channel_map)
120 { 96 {
121 return m_callbacks->toKodi.OpenAudioStream(m_callbacks->toKodi.kodiInstance, codec, channel_map) == 0; 97 m_callbacks->toKodi.AddStreamData(m_callbacks->toKodi.kodiInstance, stream, &packet);
122 } 98 }
123 99
124 /*! 100 /*!
125 * \brief Add a data packet to an audio or video stream 101 * \brief Free an allocated buffer
126 * 102 *
127 * \param stream The target stream 103 * \param stream The stream handle
128 * \param data The data packet 104 * \param buffer The buffer returned from GetStreamBuffer()
129 * \param size The size of the data
130 */ 105 */
131 void AddStreamData(GAME_STREAM_TYPE stream, const uint8_t* data, unsigned int size) 106 void ReleaseStreamBuffer(void *stream, game_stream_buffer &buffer)
132 { 107 {
133 m_callbacks->toKodi.AddStreamData(m_callbacks->toKodi.kodiInstance, stream, data, size); 108 m_callbacks->toKodi.ReleaseStreamBuffer(m_callbacks->toKodi.kodiInstance, stream, &buffer);
134 } 109 }
135 110
136 /*! 111 /*!
@@ -138,7 +113,7 @@ public:
138 * 113 *
139 * \param stream The stream to close 114 * \param stream The stream to close
140 */ 115 */
141 void CloseStream(GAME_STREAM_TYPE stream) 116 void CloseStream(void *stream)
142 { 117 {
143 m_callbacks->toKodi.CloseStream(m_callbacks->toKodi.kodiInstance, stream); 118 m_callbacks->toKodi.CloseStream(m_callbacks->toKodi.kodiInstance, stream);
144 } 119 }
@@ -146,26 +121,6 @@ public:
146 // -- Hardware rendering callbacks ------------------------------------------- 121 // -- Hardware rendering callbacks -------------------------------------------
147 122
148 /*! 123 /*!
149 * \brief Enable hardware rendering
150 *
151 * \param hw_info A struct of properties for the hardware rendering system
152 */
153 void EnableHardwareRendering(const struct game_hw_info* hw_info)
154 {
155 return m_callbacks->toKodi.EnableHardwareRendering(m_callbacks->toKodi.kodiInstance, hw_info);
156 }
157
158 /*!
159 * \brief Get the framebuffer for rendering
160 *
161 * \return The framebuffer
162 */
163 uintptr_t HwGetCurrentFramebuffer(void)
164 {
165 return m_callbacks->toKodi.HwGetCurrentFramebuffer(m_callbacks->toKodi.kodiInstance);
166 }
167
168 /*!
169 * \brief Get a symbol from the hardware context 124 * \brief Get a symbol from the hardware context
170 * 125 *
171 * \param symbol The symbol's name 126 * \param symbol The symbol's name
@@ -177,14 +132,6 @@ public:
177 return m_callbacks->toKodi.HwGetProcAddress(m_callbacks->toKodi.kodiInstance, sym); 132 return m_callbacks->toKodi.HwGetProcAddress(m_callbacks->toKodi.kodiInstance, sym);
178 } 133 }
179 134
180 /*!
181 * \brief Called when a frame is being rendered
182 */
183 void RenderFrame()
184 {
185 return m_callbacks->toKodi.RenderFrame(m_callbacks->toKodi.kodiInstance);
186 }
187
188 // --- Input callbacks ------------------------------------------------------- 135 // --- Input callbacks -------------------------------------------------------
189 136
190 /*! 137 /*!
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2013 Team XBMC 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with XBMC; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include <string> 11#include <string>
23#include <vector> 12#include <vector>
24#include <string.h> 13#include <string.h>
@@ -539,7 +528,7 @@ public:
539 528
540 return m_cb->Control_Spin_GetValue(m_Handle->addonData, m_controlHandle); 529 return m_cb->Control_Spin_GetValue(m_Handle->addonData, m_controlHandle);
541 } 530 }
542 531
543 void SetValue(int iValue) 532 void SetValue(int iValue)
544 { 533 {
545 if (m_controlHandle) 534 if (m_controlHandle)
@@ -730,7 +719,7 @@ public:
730 { 719 {
731 m_controlHandle = m_cb->Window_GetControl_SettingsSlider(m_Handle->addonData, m_Window->GetControlHandle(), controlId); 720 m_controlHandle = m_cb->Window_GetControl_SettingsSlider(m_Handle->addonData, m_Window->GetControlHandle(), controlId);
732 } 721 }
733 722
734 ~CAddonGUISettingsSliderControl(void) override = default; 723 ~CAddonGUISettingsSliderControl(void) override = default;
735 724
736 void SetVisible(bool yesNo) 725 void SetVisible(bool yesNo)
@@ -906,7 +895,7 @@ inline bool CAddonGUIRenderingControl::OnDirtyCB(GUIHANDLE cbhdl)
906{ 895{
907 return static_cast<CAddonGUIRenderingControl*>(cbhdl)->Dirty(); 896 return static_cast<CAddonGUIRenderingControl*>(cbhdl)->Dirty();
908} 897}
909 898
910class CHelper_libKODI_guilib 899class CHelper_libKODI_guilib
911{ 900{
912public: 901public:
@@ -931,7 +920,7 @@ public:
931 m_Callbacks = (KodiAPI::GUI::CB_GUILib*)m_Handle->GUILib_RegisterMe(m_Handle->addonData); 920 m_Callbacks = (KodiAPI::GUI::CB_GUILib*)m_Handle->GUILib_RegisterMe(m_Handle->addonData);
932 if (!m_Callbacks) 921 if (!m_Callbacks)
933 fprintf(stderr, "libKODI_guilib-ERROR: GUILib_RegisterMe can't get callback table from Kodi !!!\n"); 922 fprintf(stderr, "libKODI_guilib-ERROR: GUILib_RegisterMe can't get callback table from Kodi !!!\n");
934 923
935 return m_Callbacks != nullptr; 924 return m_Callbacks != nullptr;
936 } 925 }
937 926
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2013 Team XBMC 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with XBMC; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include <string> 11#include <string>
23#include <vector> 12#include <vector>
24#include <string.h> 13#include <string.h>
@@ -195,7 +184,7 @@ namespace ADDON
195 m_Callbacks = (KodiAPI::AddOn::CB_AddOnLib*)m_Handle->AddOnLib_RegisterMe(m_Handle->addonData); 184 m_Callbacks = (KodiAPI::AddOn::CB_AddOnLib*)m_Handle->AddOnLib_RegisterMe(m_Handle->addonData);
196 if (!m_Callbacks) 185 if (!m_Callbacks)
197 fprintf(stderr, "libXBMC_addon-ERROR: AddOnLib_RegisterMe can't get callback table from Kodi !!!\n"); 186 fprintf(stderr, "libXBMC_addon-ERROR: AddOnLib_RegisterMe can't get callback table from Kodi !!!\n");
198 187
199 return m_Callbacks != nullptr; 188 return m_Callbacks != nullptr;
200 } 189 }
201 190
@@ -203,14 +192,18 @@ namespace ADDON
203 * @brief Add a message to XBMC's log. 192 * @brief Add a message to XBMC's log.
204 * @param loglevel The log level of the message. 193 * @param loglevel The log level of the message.
205 * @param format The format of the message to pass to XBMC. 194 * @param format The format of the message to pass to XBMC.
195 * @note This method uses limited buffer (16k) for the formatted output.
196 * So data, which will not fit into it, will be silently discarded.
206 */ 197 */
207 void Log(const addon_log_t loglevel, const char *format, ... ) 198 void Log(const addon_log_t loglevel, const char *format, ... )
208 { 199 {
209 char buffer[16384]; 200 char buffer[16384];
201 static constexpr size_t len = sizeof (buffer) - 1;
210 va_list args; 202 va_list args;
211 va_start (args, format); 203 va_start (args, format);
212 vsprintf (buffer, format, args); 204 vsnprintf (buffer, len, format, args);
213 va_end (args); 205 va_end (args);
206 buffer[len] = '\0'; // to be sure it's null-terminated
214 m_Callbacks->Log(m_Handle->addonData, loglevel, buffer); 207 m_Callbacks->Log(m_Handle->addonData, loglevel, buffer);
215 } 208 }
216 209
@@ -297,7 +290,7 @@ namespace ADDON
297 { 290 {
298 m_Callbacks->FreeString(m_Handle->addonData, str); 291 m_Callbacks->FreeString(m_Handle->addonData, str);
299 } 292 }
300 293
301 /*! 294 /*!
302 * @brief Free the memory used by arr including its elements 295 * @brief Free the memory used by arr including its elements
303 * @param arr The string array to free 296 * @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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2013 Team XBMC 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with XBMC; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include <string> 11#include <string>
23#include <vector> 12#include <vector>
24#include <string.h> 13#include <string.h>
@@ -61,7 +50,7 @@ public:
61 m_Callbacks = (AddonInstance_PVR*)m_Handle->PVRLib_RegisterMe(m_Handle->addonData); 50 m_Callbacks = (AddonInstance_PVR*)m_Handle->PVRLib_RegisterMe(m_Handle->addonData);
62 if (!m_Callbacks) 51 if (!m_Callbacks)
63 fprintf(stderr, "libXBMC_pvr-ERROR: PVRLib_register_me can't get callback table from Kodi !!!\n"); 52 fprintf(stderr, "libXBMC_pvr-ERROR: PVRLib_register_me can't get callback table from Kodi !!!\n");
64 53
65 return m_Callbacks != NULL; 54 return m_Callbacks != NULL;
66 } 55 }
67 56
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2018 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include "../../AddonBase.h" 11#include "../../AddonBase.h"
23 12
24/* 13/*
@@ -34,13 +23,14 @@
34 */ 23 */
35 24
36static const char* INTERFACE_ANDROID_SYSTEM_NAME = "ANDROID_SYSTEM"; 25static const char* INTERFACE_ANDROID_SYSTEM_NAME = "ANDROID_SYSTEM";
37static const char* INTERFACE_ANDROID_SYSTEM_VERSION = "1.0.0"; 26static const char* INTERFACE_ANDROID_SYSTEM_VERSION = "1.0.1";
38static const char* INTERFACE_ANDROID_SYSTEM_VERSION_MIN = "1.0.0"; 27static const char* INTERFACE_ANDROID_SYSTEM_VERSION_MIN = "1.0.1";
39 28
40struct AddonToKodiFuncTable_android_system 29struct AddonToKodiFuncTable_android_system
41{ 30{
42 void* (*get_jni_env)(); 31 void* (*get_jni_env)();
43 int (*get_sdk_version)(); 32 int (*get_sdk_version)();
33 const char *(*get_class_name)();
44}; 34};
45 35
46//============================================================================== 36//==============================================================================
@@ -99,6 +89,22 @@ namespace platform
99 return 0; 89 return 0;
100 } 90 }
101 91
92 //============================================================================
93 ///
94 /// \ingroup cpp_kodi_platform
95 /// @brief request the android main class name e.g. org.xbmc.kodi.
96 ///
97 /// @param[in]:
98 /// @return package class name
99 ///
100 inline std::string GetClassName()
101 {
102 if (m_interface)
103 return m_interface->get_class_name();
104
105 return std::string();
106 }
107
102 private: 108 private:
103 AddonToKodiFuncTable_android_system *m_interface; 109 AddonToKodiFuncTable_android_system *m_interface;
104 }; 110 };
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2017 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Kodi; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include <string> 11#include <string>
23#include <kodi/AddonBase.h> 12#include <kodi/AddonBase.h>
24 13
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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2016-2017 Team KODI 2 * Copyright (C) 2016-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with KODI; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include <string.h> 11#include <string.h>
23 12
24#define STR_HELPER(x) #x 13#define STR_HELPER(x) #x
@@ -86,8 +75,8 @@
86#define ADDON_INSTANCE_VERSION_AUDIOENCODER_XML_ID "kodi.binary.instance.audioencoder" 75#define ADDON_INSTANCE_VERSION_AUDIOENCODER_XML_ID "kodi.binary.instance.audioencoder"
87#define ADDON_INSTANCE_VERSION_AUDIOENCODER_DEPENDS "addon-instance/AudioEncoder.h" 76#define ADDON_INSTANCE_VERSION_AUDIOENCODER_DEPENDS "addon-instance/AudioEncoder.h"
88 77
89#define ADDON_INSTANCE_VERSION_GAME "1.0.36" 78#define ADDON_INSTANCE_VERSION_GAME "1.0.38"
90#define ADDON_INSTANCE_VERSION_GAME_MIN "1.0.36" 79#define ADDON_INSTANCE_VERSION_GAME_MIN "1.0.38"
91#define ADDON_INSTANCE_VERSION_GAME_XML_ID "kodi.binary.instance.game" 80#define ADDON_INSTANCE_VERSION_GAME_XML_ID "kodi.binary.instance.game"
92#define ADDON_INSTANCE_VERSION_GAME_DEPENDS "kodi_game_dll.h" \ 81#define ADDON_INSTANCE_VERSION_GAME_DEPENDS "kodi_game_dll.h" \
93 "kodi_game_types.h" \ 82 "kodi_game_types.h" \
@@ -98,8 +87,8 @@
98#define ADDON_INSTANCE_VERSION_IMAGEDECODER_XML_ID "kodi.binary.instance.imagedecoder" 87#define ADDON_INSTANCE_VERSION_IMAGEDECODER_XML_ID "kodi.binary.instance.imagedecoder"
99#define ADDON_INSTANCE_VERSION_IMAGEDECODER_DEPENDS "addon-instance/ImageDecoder.h" 88#define ADDON_INSTANCE_VERSION_IMAGEDECODER_DEPENDS "addon-instance/ImageDecoder.h"
100 89
101#define ADDON_INSTANCE_VERSION_INPUTSTREAM "2.0.6" 90#define ADDON_INSTANCE_VERSION_INPUTSTREAM "2.0.7"
102#define ADDON_INSTANCE_VERSION_INPUTSTREAM_MIN "2.0.6" 91#define ADDON_INSTANCE_VERSION_INPUTSTREAM_MIN "2.0.7"
103#define ADDON_INSTANCE_VERSION_INPUTSTREAM_XML_ID "kodi.binary.instance.inputstream" 92#define ADDON_INSTANCE_VERSION_INPUTSTREAM_XML_ID "kodi.binary.instance.inputstream"
104#define ADDON_INSTANCE_VERSION_INPUTSTREAM_DEPENDS "addon-instance/Inputstream.h" 93#define ADDON_INSTANCE_VERSION_INPUTSTREAM_DEPENDS "addon-instance/Inputstream.h"
105 94
@@ -109,8 +98,8 @@
109#define ADDON_INSTANCE_VERSION_PERIPHERAL_DEPENDS "addon-instance/Peripheral.h" \ 98#define ADDON_INSTANCE_VERSION_PERIPHERAL_DEPENDS "addon-instance/Peripheral.h" \
110 "addon-instance/PeripheralUtils.h" 99 "addon-instance/PeripheralUtils.h"
111 100
112#define ADDON_INSTANCE_VERSION_PVR "5.9.0" 101#define ADDON_INSTANCE_VERSION_PVR "5.10.1"
113#define ADDON_INSTANCE_VERSION_PVR_MIN "5.9.0" 102#define ADDON_INSTANCE_VERSION_PVR_MIN "5.10.0"
114#define ADDON_INSTANCE_VERSION_PVR_XML_ID "kodi.binary.instance.pvr" 103#define ADDON_INSTANCE_VERSION_PVR_XML_ID "kodi.binary.instance.pvr"
115#define ADDON_INSTANCE_VERSION_PVR_DEPENDS "xbmc_pvr_dll.h" \ 104#define ADDON_INSTANCE_VERSION_PVR_DEPENDS "xbmc_pvr_dll.h" \
116 "xbmc_pvr_types.h" \ 105 "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 @@
1#pragma once
2
3/* 1/*
4 * Copyright (C) 2005-2015 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
5 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
6 *
7 * This Program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * This Program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with Kodi; see the file COPYING. If not, see
19 * <http://www.gnu.org/licenses/>.
20 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
21 */ 7 */
22 8
9#pragma once
10
23#include "AddonBase.h" 11#include "AddonBase.h"
24 12
25#ifdef __cplusplus 13#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 @@
1#pragma once
2
3/* 1/*
4 * Copyright (C) 2005-2015 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
5 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
6 *
7 * This Program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * This Program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with Kodi; see the file COPYING. If not, see
19 * <http://www.gnu.org/licenses/>.
20 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
21 */ 7 */
22 8
9#pragma once
10
23#include "AddonBase.h" // compatibility fallback 11#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 @@
1#pragma once
2/* 1/*
3 * Copyright (C) 2005-2013 Team XBMC 2 * Copyright (C) 2005-2018 Team Kodi
4 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
5 *
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with XBMC; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
19 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
20 */ 7 */
21 8
9#pragma once
10
22#include <string.h> 11#include <string.h>
23#include <time.h> 12#include <time.h>
24 13
@@ -56,7 +45,7 @@
56#define EPG_EVENT_CONTENTMASK_USERDEFINED 0xF0 45#define EPG_EVENT_CONTENTMASK_USERDEFINED 0xF0
57//@} 46//@}
58 47
59/* Set EPGTAG.iGenreType to EPG_GENRE_USE_STRING to transfer genre strings to XBMC */ 48/* Set EPGTAG.iGenreType to EPG_GENRE_USE_STRING to transfer genre strings to Kodi */
60#define EPG_GENRE_USE_STRING 0x100 49#define EPG_GENRE_USE_STRING 0x100
61 50
62/* Separator to use in strings containing different tokens, for example writers, directors, actors of an event. */ 51/* 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 @@
1#pragma once
2
3/* 1/*
4 * Copyright (C) 2005-2015 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
5 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
6 *
7 * This Program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * This Program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with Kodi; see the file COPYING. If not, see
19 * <http://www.gnu.org/licenses/>.
20 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
21 */ 7 */
22 8
9#pragma once
10
23#include "xbmc_addon_dll.h" 11#include "xbmc_addon_dll.h"
24#include "xbmc_pvr_types.h" 12#include "xbmc_pvr_types.h"
25 13
@@ -35,7 +23,7 @@ extern "C"
35 //@{ 23 //@{
36 /*! 24 /*!
37 * Get the list of features that this add-on provides. 25 * Get the list of features that this add-on provides.
38 * Called by XBMC to query the add-on's capabilities. 26 * Called by Kodi to query the add-on's capabilities.
39 * Used to check which options should be presented in the UI, which methods to call, etc. 27 * Used to check which options should be presented in the UI, which methods to call, etc.
40 * All capabilities that the add-on supports should be set to true. 28 * All capabilities that the add-on supports should be set to true.
41 * @param pCapabilities The add-on's capabilities. 29 * @param pCapabilities The add-on's capabilities.
@@ -83,18 +71,19 @@ extern "C"
83 //@} 71 //@}
84 72
85 /*! @name PVR EPG methods 73 /*! @name PVR EPG methods
86 * @remarks Only used by XBMC if bSupportsEPG is set to true. 74 * @remarks Only used by Kodi if bSupportsEPG is set to true.
87 */ 75 */
88 //@{ 76 //@{
89 /*! 77 /*!
90 * Request the EPG for a channel from the backend. 78 * Request the EPG for a channel from the backend.
91 * EPG entries are added to XBMC by calling TransferEpgEntry() on the callback. 79 * EPG entries are added to Kodi by calling TransferEpgEntry() on the callback.
92 * @param handle Handle to pass to the callback method. 80 * @param handle Handle to pass to the callback method.
93 * @param channel The channel to get the EPG table for. 81 * @param channel The channel to get the EPG table for.
94 * @param iStart Get events after this time (UTC). 82 * @param iStart Get events after this time (UTC).
95 * @param iEnd Get events before this time (UTC). 83 * @param iEnd Get events before this time (UTC).
96 * @return PVR_ERROR_NO_ERROR if the table has been fetched successfully. 84 * @return PVR_ERROR_NO_ERROR if the table has been fetched successfully.
97 * @remarks Required if bSupportsEPG is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 85 * @remarks Required if bSupportsEPG is set to true.
86 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
98 */ 87 */
99 PVR_ERROR GetEPGForChannel(ADDON_HANDLE handle, const PVR_CHANNEL& channel, time_t iStart, time_t iEnd); 88 PVR_ERROR GetEPGForChannel(ADDON_HANDLE handle, const PVR_CHANNEL& channel, time_t iStart, time_t iEnd);
100 89
@@ -112,18 +101,20 @@ extern "C"
112 * @param tag the epg tag to check. 101 * @param tag the epg tag to check.
113 * @param [out] bIsPlayable Set to true if the tag can be played. 102 * @param [out] bIsPlayable Set to true if the tag can be played.
114 * @return PVR_ERROR_NO_ERROR if bIsPlayable has been set successfully. 103 * @return PVR_ERROR_NO_ERROR if bIsPlayable has been set successfully.
115 * @remarks Required if add-on supports playing epg tags. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 104 * @remarks Required if add-on supports playing epg tags.
105 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
116 */ 106 */
117 PVR_ERROR IsEPGTagPlayable(const EPG_TAG* tag, bool* bIsPlayable); 107 PVR_ERROR IsEPGTagPlayable(const EPG_TAG* tag, bool* bIsPlayable);
118 108
119 /*! 109 /*!
120 * Retrieve the edit decision list (EDL) of an EPG tag on the backend. 110 * Retrieve the edit decision list (EDL) of an EPG tag on the backend.
121 * @param epgTag The EPG tag. 111 * @param epgTag The EPG tag.
122 * @param edl out: The function has to write the EDL list into this array. 112 * @param edl out: The function has to write the EDL into this array.
123 * @param size in: The maximum size of the EDL, out: the actual size of the EDL. 113 * @param size in: The maximum size of the EDL, out: the actual size of the EDL.
124 * @return PVR_ERROR_NO_ERROR if the EDL was successfully read. 114 * @return PVR_ERROR_NO_ERROR if the EDL was successfully read or no EDL exists.
125 * @remarks Required if bSupportsEpgEdl is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 115 * @remarks Required if bSupportsEpgEdl is set to true.
126 */ 116 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
117 */
127 PVR_ERROR GetEPGTagEdl(const EPG_TAG* epgTag, PVR_EDL_ENTRY edl[], int *size); 118 PVR_ERROR GetEPGTagEdl(const EPG_TAG* epgTag, PVR_EDL_ENTRY edl[], int *size);
128 119
129 /*! 120 /*!
@@ -132,14 +123,16 @@ extern "C"
132 * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. 123 * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream.
133 * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned. 124 * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned.
134 * @return PVR_ERROR_NO_ERROR if the stream is available. 125 * @return PVR_ERROR_NO_ERROR if the stream is available.
135 * @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. 126 * @remarks Required if add-on supports playing epg tags.
127 * In this case your implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the epg tag.
128 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
136 */ 129 */
137 PVR_ERROR GetEPGTagStreamProperties(const EPG_TAG* tag, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount); 130 PVR_ERROR GetEPGTagStreamProperties(const EPG_TAG* tag, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount);
138 131
139 //@} 132 //@}
140 133
141 /*! @name PVR channel group methods 134 /*! @name PVR channel group methods
142 * @remarks Only used by XBMC is bSupportsChannelGroups is set to true. 135 * @remarks Only used by Kodi if bSupportsChannelGroups is set to true.
143 * 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 136 * 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
144 * should call TriggerChannelGroupsUpdate() 137 * should call TriggerChannelGroupsUpdate()
145 */ 138 */
@@ -147,27 +140,30 @@ extern "C"
147 /*! 140 /*!
148 * Get the total amount of channel groups on the backend if it supports channel groups. 141 * Get the total amount of channel groups on the backend if it supports channel groups.
149 * @return The amount of channels, or -1 on error. 142 * @return The amount of channels, or -1 on error.
150 * @remarks Required if bSupportsChannelGroups is set to true. Return -1 if this add-on won't provide this function. 143 * @remarks Required if bSupportsChannelGroups is set to true.
144 * Return -1 if this add-on won't provide this function.
151 */ 145 */
152 int GetChannelGroupsAmount(void); 146 int GetChannelGroupsAmount(void);
153 147
154 /*! 148 /*!
155 * Request the list of all channel groups from the backend if it supports channel groups. 149 * Request the list of all channel groups from the backend if it supports channel groups.
156 * Channel group entries are added to XBMC by calling TransferChannelGroup() on the callback. 150 * Channel group entries are added to Kodi by calling TransferChannelGroup() on the callback.
157 * @param handle Handle to pass to the callback method. 151 * @param handle Handle to pass to the callback method.
158 * @param bRadio True to get the radio channel groups, false to get the TV channel groups. 152 * @param bRadio True to get the radio channel groups, false to get the TV channel groups.
159 * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. 153 * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully.
160 * @remarks Required if bSupportsChannelGroups is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 154 * @remarks Required if bSupportsChannelGroups is set to true.
155 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
161 */ 156 */
162 PVR_ERROR GetChannelGroups(ADDON_HANDLE handle, bool bRadio); 157 PVR_ERROR GetChannelGroups(ADDON_HANDLE handle, bool bRadio);
163 158
164 /*! 159 /*!
165 * Request the list of all group members of a group from the backend if it supports channel groups. 160 * Request the list of all group members of a group from the backend if it supports channel groups.
166 * Member entries are added to XBMC by calling TransferChannelGroupMember() on the callback. 161 * Member entries are added to Kodi by calling TransferChannelGroupMember() on the callback.
167 * @param handle Handle to pass to the callback method. 162 * @param handle Handle to pass to the callback method.
168 * @param group The group to get the members for. 163 * @param group The group to get the members for.
169 * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. 164 * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully.
170 * @remarks Required if bSupportsChannelGroups is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 165 * @remarks Required if bSupportsChannelGroups is set to true.
166 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
171 */ 167 */
172 PVR_ERROR GetChannelGroupMembers(ADDON_HANDLE handle, const PVR_CHANNEL_GROUP& group); 168 PVR_ERROR GetChannelGroupMembers(ADDON_HANDLE handle, const PVR_CHANNEL_GROUP& group);
173 //@} 169 //@}
@@ -181,20 +177,21 @@ extern "C"
181 /*! 177 /*!
182 * Show the channel scan dialog if this backend supports it. 178 * Show the channel scan dialog if this backend supports it.
183 * @return PVR_ERROR_NO_ERROR if the dialog was displayed successfully. 179 * @return PVR_ERROR_NO_ERROR if the dialog was displayed successfully.
184 * @remarks Required if bSupportsChannelScan is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 180 * @remarks Required if bSupportsChannelScan is set to true.
181 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
185 * @note see libKODI_guilib.h about related parts 182 * @note see libKODI_guilib.h about related parts
186 */ 183 */
187 PVR_ERROR OpenDialogChannelScan(void); 184 PVR_ERROR OpenDialogChannelScan(void);
188 185
189 /*! 186 /*!
190 * @return The total amount of channels on the backend, or -1 on error. 187 * @return The total amount of channels on the backend, or -1 on error.
191 * @remarks Valid implementation required. 188 * @remarks Valid implementation required.
192 */ 189 */
193 int GetChannelsAmount(void); 190 int GetChannelsAmount(void);
194 191
195 /*! 192 /*!
196 * Request the list of all channels from the backend. 193 * Request the list of all channels from the backend.
197 * Channel entries are added to XBMC by calling TransferChannelEntry() on the callback. 194 * Channel entries are added to Kodi by calling TransferChannelEntry() on the callback.
198 * @param handle Handle to pass to the callback method. 195 * @param handle Handle to pass to the callback method.
199 * @param bRadio True to get the radio channels, false to get the TV channels. 196 * @param bRadio True to get the radio channels, false to get the TV channels.
200 * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. 197 * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully.
@@ -216,7 +213,8 @@ extern "C"
216 * Rename a channel on the backend. 213 * Rename a channel on the backend.
217 * @param channel The channel to rename, containing the new channel name. 214 * @param channel The channel to rename, containing the new channel name.
218 * @return PVR_ERROR_NO_ERROR if the channel has been renamed successfully. 215 * @return PVR_ERROR_NO_ERROR if the channel has been renamed successfully.
219 * @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. 216 * @remarks Optional, and only used if bSupportsChannelSettings is set to true.
217 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
220 */ 218 */
221 PVR_ERROR RenameChannel(const PVR_CHANNEL& channel); 219 PVR_ERROR RenameChannel(const PVR_CHANNEL& channel);
222 220
@@ -240,7 +238,7 @@ extern "C"
240 //@} 238 //@}
241 239
242 /** @name PVR recording methods 240 /** @name PVR recording methods
243 * @remarks Only used by XBMC is bSupportsRecordings is set to true. 241 * @remarks Only used by Kodi if bSupportsRecordings is set to true.
244 * If a recording changes after the initial import, or if a new one was added, 242 * If a recording changes after the initial import, or if a new one was added,
245 * then the add-on should call TriggerRecordingUpdate() 243 * then the add-on should call TriggerRecordingUpdate()
246 */ 244 */
@@ -254,11 +252,12 @@ extern "C"
254 252
255 /*! 253 /*!
256 * Request the list of all recordings from the backend, if supported. 254 * Request the list of all recordings from the backend, if supported.
257 * Recording entries are added to XBMC by calling TransferRecordingEntry() on the callback. 255 * Recording entries are added to Kodi by calling TransferRecordingEntry() on the callback.
258 * @param handle Handle to pass to the callback method. 256 * @param handle Handle to pass to the callback method.
259 * @param deleted if set return deleted recording (called if bSupportsRecordingsUndelete set to true) 257 * @param deleted if set return deleted recording (called if bSupportsRecordingsUndelete set to true)
260 * @return PVR_ERROR_NO_ERROR if the recordings have been fetched successfully. 258 * @return PVR_ERROR_NO_ERROR if the recordings have been fetched successfully.
261 * @remarks Required if bSupportsRecordings is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 259 * @remarks Required if bSupportsRecordings is set to true.
260 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
262 */ 261 */
263 PVR_ERROR GetRecordings(ADDON_HANDLE handle, bool deleted); 262 PVR_ERROR GetRecordings(ADDON_HANDLE handle, bool deleted);
264 263
@@ -266,7 +265,8 @@ extern "C"
266 * Delete a recording on the backend. 265 * Delete a recording on the backend.
267 * @param recording The recording to delete. 266 * @param recording The recording to delete.
268 * @return PVR_ERROR_NO_ERROR if the recording has been deleted successfully. 267 * @return PVR_ERROR_NO_ERROR if the recording has been deleted successfully.
269 * @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. 268 * @remarks Optional, and only used if bSupportsRecordings is set to true.
269 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
270 */ 270 */
271 PVR_ERROR DeleteRecording(const PVR_RECORDING& recording); 271 PVR_ERROR DeleteRecording(const PVR_RECORDING& recording);
272 272
@@ -274,7 +274,8 @@ extern "C"
274 * Undelete a recording on the backend. 274 * Undelete a recording on the backend.
275 * @param recording The recording to undelete. 275 * @param recording The recording to undelete.
276 * @return PVR_ERROR_NO_ERROR if the recording has been undeleted successfully. 276 * @return PVR_ERROR_NO_ERROR if the recording has been undeleted successfully.
277 * @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. 277 * @remarks Optional, and only used if bSupportsRecordingsUndelete is set to true.
278 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
278 */ 279 */
279 PVR_ERROR UndeleteRecording(const PVR_RECORDING& recording); 280 PVR_ERROR UndeleteRecording(const PVR_RECORDING& recording);
280 281
@@ -288,7 +289,8 @@ extern "C"
288 * Rename a recording on the backend. 289 * Rename a recording on the backend.
289 * @param recording The recording to rename, containing the new name. 290 * @param recording The recording to rename, containing the new name.
290 * @return PVR_ERROR_NO_ERROR if the recording has been renamed successfully. 291 * @return PVR_ERROR_NO_ERROR if the recording has been renamed successfully.
291 * @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. 292 * @remarks Optional, and only used if bSupportsRecordings is set to true.
293 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
292 */ 294 */
293 PVR_ERROR RenameRecording(const PVR_RECORDING& recording); 295 PVR_ERROR RenameRecording(const PVR_RECORDING& recording);
294 296
@@ -296,7 +298,8 @@ extern "C"
296 * Set the lifetime of a recording on the backend. 298 * Set the lifetime of a recording on the backend.
297 * @param recording The recording to change the lifetime for. recording.iLifetime contains the new lieftime value. 299 * @param recording The recording to change the lifetime for. recording.iLifetime contains the new lieftime value.
298 * @return PVR_ERROR_NO_ERROR if the recording's lifetime has been set successfully. 300 * @return PVR_ERROR_NO_ERROR if the recording's lifetime has been set successfully.
299 * @remarks Required if bSupportsRecordingsLifetimeChange is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 301 * @remarks Required if bSupportsRecordingsLifetimeChange is set to true.
302 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
300 */ 303 */
301 PVR_ERROR SetRecordingLifetime(const PVR_RECORDING* recording); 304 PVR_ERROR SetRecordingLifetime(const PVR_RECORDING* recording);
302 305
@@ -305,49 +308,54 @@ extern "C"
305 * @param recording The recording to change the play count. 308 * @param recording The recording to change the play count.
306 * @param count Play count. 309 * @param count Play count.
307 * @return PVR_ERROR_NO_ERROR if the recording's play count has been set successfully. 310 * @return PVR_ERROR_NO_ERROR if the recording's play count has been set successfully.
308 * @remarks Required if bSupportsRecordingPlayCount is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 311 * @remarks Required if bSupportsRecordingPlayCount is set to true.
312 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
309 */ 313 */
310 PVR_ERROR SetRecordingPlayCount(const PVR_RECORDING& recording, int count); 314 PVR_ERROR SetRecordingPlayCount(const PVR_RECORDING& recording, int count);
311 315
312 /*! 316 /*!
313 * Set the last watched position of a recording on the backend. 317 * Set the last watched position of a recording on the backend.
314 * @param recording The recording. 318 * @param recording The recording.
315 * @param position The last watched position in seconds 319 * @param position The last watched position in seconds
316 * @return PVR_ERROR_NO_ERROR if the position has been stored successfully. 320 * @return PVR_ERROR_NO_ERROR if the position has been stored successfully.
317 * @remarks Required if bSupportsLastPlayedPosition is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 321 * @remarks Required if bSupportsLastPlayedPosition is set to true.
318 */ 322 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
323 */
319 PVR_ERROR SetRecordingLastPlayedPosition(const PVR_RECORDING& recording, int lastplayedposition); 324 PVR_ERROR SetRecordingLastPlayedPosition(const PVR_RECORDING& recording, int lastplayedposition);
320 325
321 /*! 326 /*!
322 * Retrieve the last watched position of a recording on the backend. 327 * Retrieve the last watched position of a recording on the backend.
323 * @param recording The recording. 328 * @param recording The recording.
324 * @return The last watched position in seconds or -1 on error 329 * @return The last watched position in seconds or -1 on error
325 * @remarks Required if bSupportsRecordingPlayCount is set to true. Return -1 if this add-on won't provide this function. 330 * @remarks Required if bSupportsRecordingPlayCount is set to true.
326 */ 331 * Return -1 if this add-on won't provide this function.
332 */
327 int GetRecordingLastPlayedPosition(const PVR_RECORDING& recording); 333 int GetRecordingLastPlayedPosition(const PVR_RECORDING& recording);
328 334
329 /*! 335 /*!
330 * Retrieve the edit decision list (EDL) of a recording on the backend. 336 * Retrieve the edit decision list (EDL) of a recording on the backend.
331 * @param recording The recording. 337 * @param recording The recording.
332 * @param edl out: The function has to write the EDL list into this array. 338 * @param edl out: The function has to write the EDL into this array.
333 * @param size in: The maximum size of the EDL, out: the actual size of the EDL. 339 * @param size in: The maximum size of the EDL, out: the actual size of the EDL.
334 * @return PVR_ERROR_NO_ERROR if the EDL was successfully read. 340 * @return PVR_ERROR_NO_ERROR if the EDL was successfully read or no EDL exists.
335 * @remarks Required if bSupportsRecordingEdl is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 341 * @remarks Required if bSupportsRecordingEdl is set to true.
336 */ 342 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
343 */
337 PVR_ERROR GetRecordingEdl(const PVR_RECORDING& recording, PVR_EDL_ENTRY edl[], int *size); 344 PVR_ERROR GetRecordingEdl(const PVR_RECORDING& recording, PVR_EDL_ENTRY edl[], int *size);
338 345
339 /*! 346 /*!
340 * Retrieve the timer types supported by the backend. 347 * Retrieve the timer types supported by the backend.
341 * @param types out: The function has to write the definition of the supported timer types into this array. 348 * @param types out: The function has to write the definition of the supported timer types into this array.
342 * @param typesCount in: The maximum size of the list, out: the actual size of the list. default: PVR_ADDON_TIMERTYPE_ARRAY_SIZE 349 * @param typesCount in: The maximum size of the list, out: the actual size of the list. default: PVR_ADDON_TIMERTYPE_ARRAY_SIZE
343 * @return PVR_ERROR_NO_ERROR if the types were successfully written to the array. 350 * @return PVR_ERROR_NO_ERROR if the types were successfully written to the array.
344 * @remarks Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 351 * @remarks Required if bSupportsTimers is set to true.
345 */ 352 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
353 */
346 PVR_ERROR GetTimerTypes(PVR_TIMER_TYPE types[], int *typesCount); 354 PVR_ERROR GetTimerTypes(PVR_TIMER_TYPE types[], int *typesCount);
347 355
348 //@} 356 //@}
349 /** @name PVR timer methods 357 /** @name PVR timer methods
350 * @remarks Only used by XBMC is bSupportsTimers is set to true. 358 * @remarks Only used by Kodi if bSupportsTimers is set to true.
351 * If a timer changes after the initial import, or if a new one was added, 359 * If a timer changes after the initial import, or if a new one was added,
352 * then the add-on should call TriggerTimerUpdate() 360 * then the add-on should call TriggerTimerUpdate()
353 */ 361 */
@@ -360,10 +368,11 @@ extern "C"
360 368
361 /*! 369 /*!
362 * Request the list of all timers from the backend if supported. 370 * Request the list of all timers from the backend if supported.
363 * Timer entries are added to XBMC by calling TransferTimerEntry() on the callback. 371 * Timer entries are added to Kodi by calling TransferTimerEntry() on the callback.
364 * @param handle Handle to pass to the callback method. 372 * @param handle Handle to pass to the callback method.
365 * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully. 373 * @return PVR_ERROR_NO_ERROR if the list has been fetched successfully.
366 * @remarks Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 374 * @remarks Required if bSupportsTimers is set to true.
375 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
367 */ 376 */
368 PVR_ERROR GetTimers(ADDON_HANDLE handle); 377 PVR_ERROR GetTimers(ADDON_HANDLE handle);
369 378
@@ -371,7 +380,8 @@ extern "C"
371 * Add a timer on the backend. 380 * Add a timer on the backend.
372 * @param timer The timer to add. 381 * @param timer The timer to add.
373 * @return PVR_ERROR_NO_ERROR if the timer has been added successfully. 382 * @return PVR_ERROR_NO_ERROR if the timer has been added successfully.
374 * @remarks Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 383 * @remarks Required if bSupportsTimers is set to true.
384 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
375 */ 385 */
376 PVR_ERROR AddTimer(const PVR_TIMER& timer); 386 PVR_ERROR AddTimer(const PVR_TIMER& timer);
377 387
@@ -380,7 +390,8 @@ extern "C"
380 * @param timer The timer to delete. 390 * @param timer The timer to delete.
381 * @param bForceDelete Set to true to delete a timer that is currently recording a program. 391 * @param bForceDelete Set to true to delete a timer that is currently recording a program.
382 * @return PVR_ERROR_NO_ERROR if the timer has been deleted successfully. 392 * @return PVR_ERROR_NO_ERROR if the timer has been deleted successfully.
383 * @remarks Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 393 * @remarks Required if bSupportsTimers is set to true.
394 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
384 */ 395 */
385 PVR_ERROR DeleteTimer(const PVR_TIMER& timer, bool bForceDelete); 396 PVR_ERROR DeleteTimer(const PVR_TIMER& timer, bool bForceDelete);
386 397
@@ -388,7 +399,8 @@ extern "C"
388 * Update the timer information on the backend. 399 * Update the timer information on the backend.
389 * @param timer The timer to update. 400 * @param timer The timer to update.
390 * @return PVR_ERROR_NO_ERROR if the timer has been updated successfully. 401 * @return PVR_ERROR_NO_ERROR if the timer has been updated successfully.
391 * @remarks Required if bSupportsTimers is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 402 * @remarks Required if bSupportsTimers is set to true.
403 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
392 */ 404 */
393 PVR_ERROR UpdateTimer(const PVR_TIMER& timer); 405 PVR_ERROR UpdateTimer(const PVR_TIMER& timer);
394 406
@@ -400,7 +412,8 @@ extern "C"
400 * Open a live stream on the backend. 412 * Open a live stream on the backend.
401 * @param channel The channel to stream. 413 * @param channel The channel to stream.
402 * @return True if the stream has been opened successfully, false otherwise. 414 * @return True if the stream has been opened successfully, false otherwise.
403 * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true. Return false if this add-on won't provide this function. 415 * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true.
416 * Return false if this add-on won't provide this function.
404 */ 417 */
405 bool OpenLiveStream(const PVR_CHANNEL& channel); 418 bool OpenLiveStream(const PVR_CHANNEL& channel);
406 419
@@ -415,7 +428,8 @@ extern "C"
415 * @param pBuffer The buffer to store the data in. 428 * @param pBuffer The buffer to store the data in.
416 * @param iBufferSize The amount of bytes to read. 429 * @param iBufferSize The amount of bytes to read.
417 * @return The amount of bytes that were actually read from the stream. 430 * @return The amount of bytes that were actually read from the stream.
418 * @remarks Required if bHandlesInputStream is set to true. Return -1 if this add-on won't provide this function. 431 * @remarks Required if bHandlesInputStream is set to true.
432 * Return -1 if this add-on won't provide this function.
419 */ 433 */
420 int ReadLiveStream(unsigned char* pBuffer, unsigned int iBufferSize); 434 int ReadLiveStream(unsigned char* pBuffer, unsigned int iBufferSize);
421 435
@@ -424,29 +438,34 @@ extern "C"
424 * @param iPosition The position to seek to. 438 * @param iPosition The position to seek to.
425 * @param iWhence ? 439 * @param iWhence ?
426 * @return The new position. 440 * @return The new position.
427 * @remarks Optional, and only used if bHandlesInputStream is set to true. Return -1 if this add-on won't provide this function. 441 * @remarks Optional, and only used if bHandlesInputStream is set to true.
442 * Return -1 if this add-on won't provide this function.
428 */ 443 */
429 long long SeekLiveStream(long long iPosition, int iWhence = SEEK_SET); 444 long long SeekLiveStream(long long iPosition, int iWhence = SEEK_SET);
430 445
431 /*! 446 /*!
447 * Obtain the length of a live stream.
432 * @return The total length of the stream that's currently being read. 448 * @return The total length of the stream that's currently being read.
433 * @remarks Optional, and only used if bHandlesInputStream is set to true. Return -1 if this add-on won't provide this function. 449 * @remarks Optional, and only used if bHandlesInputStream is set to true.
450 * Return -1 if this add-on won't provide this function.
434 */ 451 */
435 long long LengthLiveStream(void); 452 long long LengthLiveStream(void);
436 453
437 /*! 454 /*!
438 * Get the signal status of the stream that's currently open. 455 * Get the signal status of the stream that's currently open.
439 * @param signalStatus The signal status. 456 * @param signalStatus The signal status.
440 * @return True if the signal status has been read successfully, false otherwise. 457 * @return PVR_ERROR_NO_ERROR if the signal status has been read successfully, false otherwise.
441 * @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. 458 * @remarks Optional, and only used if PVR_ADDON_CAPABILITIES::bHandlesInputStream or PVR_ADDON_CAPABILITIES::bHandlesDemuxing is set to true.
459 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
442 */ 460 */
443 PVR_ERROR SignalStatus(PVR_SIGNAL_STATUS& signalStatus); 461 PVR_ERROR SignalStatus(PVR_SIGNAL_STATUS& signalStatus);
444 462
445 /*! 463 /*!
446 * Get the descramble information of the stream that's currently open. 464 * Get the descramble information of the stream that's currently open.
447 * @param[out] descrambleInfo The descramble information. 465 * @param [out] descrambleInfo The descramble information.
448 * @return True if the decramble information has been read successfully, false otherwise. 466 * @return PVR_ERROR_NO_ERROR if the descramble information has been read successfully, false otherwise.
449 * @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. 467 * @remarks Optional, and only used if PVR_ADDON_CAPABILITIES::bSupportsDescrambleInfo is set to true.
468 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
450 */ 469 */
451 PVR_ERROR GetDescrambleInfo(PVR_DESCRAMBLE_INFO* descrambleInfo); 470 PVR_ERROR GetDescrambleInfo(PVR_DESCRAMBLE_INFO* descrambleInfo);
452 471
@@ -456,7 +475,9 @@ extern "C"
456 * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. 475 * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream.
457 * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned. 476 * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned.
458 * @return PVR_ERROR_NO_ERROR if the stream is available. 477 * @return PVR_ERROR_NO_ERROR if the stream is available.
459 * @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. 478 * @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.
479 * In this case the implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the channel.
480 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
460 */ 481 */
461 PVR_ERROR GetChannelStreamProperties(const PVR_CHANNEL* channel, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount); 482 PVR_ERROR GetChannelStreamProperties(const PVR_CHANNEL* channel, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount);
462 483
@@ -466,7 +487,9 @@ extern "C"
466 * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream. 487 * @param[inout] properties in: an array for the properties to return, out: the properties required to play the stream.
467 * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned. 488 * @param[inout] iPropertiesCount in: the size of the properties array, out: the number of properties returned.
468 * @return PVR_ERROR_NO_ERROR if the stream is available. 489 * @return PVR_ERROR_NO_ERROR if the stream is available.
469 * @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. 490 * @remarks Required if PVR_ADDON_CAPABILITIES::bSupportsRecordings is set to true and the add-on does not implement recording stream functions (OpenRecordedStream, ...).
491 * In this case your implementation must fill the property PVR_STREAM_PROPERTY_STREAMURL with the URL Kodi should resolve to playback the recording.
492 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
470 */ 493 */
471 PVR_ERROR GetRecordingStreamProperties(const PVR_RECORDING* recording, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount); 494 PVR_ERROR GetRecordingStreamProperties(const PVR_RECORDING* recording, PVR_NAMED_VALUE* properties, unsigned int* iPropertiesCount);
472 495
@@ -474,7 +497,8 @@ extern "C"
474 * Get the stream properties of the stream that's currently being read. 497 * Get the stream properties of the stream that's currently being read.
475 * @param pProperties The properties of the currently playing stream. 498 * @param pProperties The properties of the currently playing stream.
476 * @return PVR_ERROR_NO_ERROR if the properties have been fetched successfully. 499 * @return PVR_ERROR_NO_ERROR if the properties have been fetched successfully.
477 * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true. Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function. 500 * @remarks Required if bHandlesInputStream or bHandlesDemuxing is set to true.
501 * Return PVR_ERROR_NOT_IMPLEMENTED if this add-on won't provide this function.
478 */ 502 */
479 PVR_ERROR GetStreamProperties(PVR_STREAM_PROPERTIES* pProperties); 503 PVR_ERROR GetStreamProperties(PVR_STREAM_PROPERTIES* pProperties);
480 //@} 504 //@}
@@ -484,10 +508,22 @@ extern "C"
484 */ 508 */
485 //@{ 509 //@{
486 /*! 510 /*!
511 * Obtain the chunk size to use when reading streams.
512 * @param chunksize must be filled with the chunk size in bytes.
513 * @return PVR_ERROR_NO_ERROR if the chunk size has been fetched successfully.
514 * @remarks Optional, and only used if not reading from demuxer (=> DemuxRead) and
515 * PVR_ADDON_CAPABILITIES::bSupportsRecordings is true (=> ReadRecordedStream) or
516 * PVR_ADDON_CAPABILITIES::bHandlesInputStream is true (=> ReadLiveStream).
517 * 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.
518 */
519 PVR_ERROR GetStreamReadChunkSize(int* chunksize);
520
521 /*!
487 * Open a stream to a recording on the backend. 522 * Open a stream to a recording on the backend.
488 * @param recording The recording to open. 523 * @param recording The recording to open.
489 * @return True if the stream has been opened successfully, false otherwise. 524 * @return True if the stream has been opened successfully, false otherwise.
490 * @remarks Optional, and only used if bSupportsRecordings is set to true. Return false if this add-on won't provide this function. 525 * @remarks Optional, and only used if bSupportsRecordings is set to true.
526 * Return false if this add-on won't provide this function.
491 */ 527 */
492 bool OpenRecordedStream(const PVR_RECORDING& recording); 528 bool OpenRecordedStream(const PVR_RECORDING& recording);
493 529
@@ -502,7 +538,8 @@ extern "C"
502 * @param pBuffer The buffer to store the data in. 538 * @param pBuffer The buffer to store the data in.
503 * @param iBufferSize The amount of bytes to read. 539 * @param iBufferSize The amount of bytes to read.
504 * @return The amount of bytes that were actually read from the stream. 540 * @return The amount of bytes that were actually read from the stream.
505 * @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. 541 * @remarks Optional, and only used if bSupportsRecordings is set to true, but required if OpenRecordedStream() is implemented.
542 * Return -1 if this add-on won't provide this function.
506 */ 543 */
507 int ReadRecordedStream(unsigned char* pBuffer, unsigned int iBufferSize); 544 int ReadRecordedStream(unsigned char* pBuffer, unsigned int iBufferSize);
508 545
@@ -511,19 +548,23 @@ extern "C"
511 * @param iPosition The position to seek to. 548 * @param iPosition The position to seek to.
512 * @param iWhence ? 549 * @param iWhence ?
513 * @return The new position. 550 * @return The new position.
514 * @remarks Optional, and only used if bSupportsRecordings is set to true. Return -1 if this add-on won't provide this function. 551 * @remarks Optional, and only used if bSupportsRecordings is set to true.
552 * Return -1 if this add-on won't provide this function.
515 */ 553 */
516 long long SeekRecordedStream(long long iPosition, int iWhence = SEEK_SET); 554 long long SeekRecordedStream(long long iPosition, int iWhence = SEEK_SET);
517 555
518 /*! 556 /*!
557 * Obtain the length of a recorded stream.
519 * @return The total length of the stream that's currently being read. 558 * @return The total length of the stream that's currently being read.
520 * @remarks Optional, and only used if bSupportsRecordings is set to true. Return -1 if this add-on won't provide this function. 559 * @remarks Optional, and only used if bSupportsRecordings is set to true.
560 * Return -1 if this add-on won't provide this function.
521 */ 561 */
522 long long LengthRecordedStream(void); 562 long long LengthRecordedStream(void);
563
523 //@} 564 //@}
524 565
525 /** @name PVR demultiplexer methods 566 /** @name PVR demultiplexer methods
526 * @remarks Only used by XBMC is bHandlesDemuxing is set to true. 567 * @remarks Only used by Kodi if bHandlesDemuxing is set to true.
527 */ 568 */
528 //@{ 569 //@{
529 /*! 570 /*!
@@ -549,47 +590,49 @@ extern "C"
549 * @return The next packet. 590 * @return The next packet.
550 * If there is no next packet, then the add-on should return the 591 * If there is no next packet, then the add-on should return the
551 * packet created by calling AllocateDemuxPacket(0) on the callback. 592 * packet created by calling AllocateDemuxPacket(0) on the callback.
552 * If the stream changed and XBMC's player needs to be reinitialised, 593 * If the stream changed and Kodi's player needs to be reinitialised,
553 * then, the add-on should call AllocateDemuxPacket(0) on the 594 * then, the add-on should call AllocateDemuxPacket(0) on the
554 * callback, and set the streamid to DMX_SPECIALID_STREAMCHANGE and 595 * callback, and set the streamid to DMX_SPECIALID_STREAMCHANGE and
555 * return the value. 596 * return the value.
556 * The add-on should return NULL if an error occured. 597 * The add-on should return NULL if an error occured.
557 * @remarks Required if bHandlesDemuxing is set to true. Return NULL if this add-on won't provide this function. 598 * @remarks Required if bHandlesDemuxing is set to true.
599 * Return NULL if this add-on won't provide this function.
558 */ 600 */
559 DemuxPacket* DemuxRead(void); 601 DemuxPacket* DemuxRead(void);
560 //@} 602 //@}
561 603
562 /*! 604 /*!
563 * Check if the backend support pausing the currently playing stream 605 * Check if the backend support pausing the currently playing stream
564 * This will enable/disable the pause button in XBMC based on the return value 606 * This will enable/disable the pause button in Kodi based on the return value
565 * @return false if the PVR addon/backend does not support pausing, true if possible 607 * @return false if the PVR addon/backend does not support pausing, true if possible
566 */ 608 */
567 bool CanPauseStream(); 609 bool CanPauseStream();
568 610
569 /*! 611 /*!
570 * Check if the backend supports seeking for the currently playing stream 612 * Check if the backend supports seeking for the currently playing stream
571 * This will enable/disable the rewind/forward buttons in XBMC based on the return value 613 * This will enable/disable the rewind/forward buttons in Kodi based on the return value
572 * @return false if the PVR addon/backend does not support seeking, true if possible 614 * @return false if the PVR addon/backend does not support seeking, true if possible
573 */ 615 */
574 bool CanSeekStream(); 616 bool CanSeekStream();
575 617
576 /*! 618 /*!
577 * @brief Notify the pvr addon that XBMC (un)paused the currently playing stream 619 * @brief Notify the pvr addon that Kodi (un)paused the currently playing stream
578 */ 620 */
579 void PauseStream(bool bPaused); 621 void PauseStream(bool bPaused);
580 622
581 /*! 623 /*!
582 * Notify the pvr addon/demuxer that XBMC wishes to seek the stream by time 624 * Notify the pvr addon/demuxer that Kodi wishes to seek the stream by time
583 * @param time The absolute time since stream start 625 * @param time The absolute time since stream start
584 * @param backwards True to seek to keyframe BEFORE time, else AFTER 626 * @param backwards True to seek to keyframe BEFORE time, else AFTER
585 * @param startpts can be updated to point to where display should start 627 * @param startpts can be updated to point to where display should start
586 * @return True if the seek operation was possible 628 * @return True if the seek operation was possible
587 * @remarks Optional, and only used if addon has its own demuxer. Return False if this add-on won't provide this function. 629 * @remarks Optional, and only used if addon has its own demuxer.
630 * Return False if this add-on won't provide this function.
588 */ 631 */
589 bool SeekTime(double time, bool backwards, double *startpts); 632 bool SeekTime(double time, bool backwards, double *startpts);
590 633
591 /*! 634 /*!
592 * Notify the pvr addon/demuxer that XBMC wishes to change playback speed 635 * Notify the pvr addon/demuxer that Kodi wishes to change playback speed
593 * @param speed The requested playback speed 636 * @param speed The requested playback speed
594 * @remarks Optional, and only used if addon has its own demuxer. 637 * @remarks Optional, and only used if addon has its own demuxer.
595 */ 638 */
@@ -597,8 +640,7 @@ extern "C"
597 640
598 /*! 641 /*!
599 * Get the hostname of the pvr backend server 642 * Get the hostname of the pvr backend server
600 * @return hostname as ip address or alias. If backend does not 643 * @return hostname as ip address or alias. If backend does not utilize a server, return empty string.
601 * utilize a server, return empty string.
602 */ 644 */
603 const char* GetBackendHostname(); 645 const char* GetBackendHostname();
604 646
@@ -639,7 +681,7 @@ extern "C"
639 PVR_ERROR GetStreamTimes(PVR_STREAM_TIMES *times); 681 PVR_ERROR GetStreamTimes(PVR_STREAM_TIMES *times);
640 682
641 /*! 683 /*!
642 * Called by XBMC to assign the function pointers of this add-on to pClient. 684 * Called by Kodi to assign the function pointers of this add-on to pClient.
643 * @param ptr The struct to assign the function pointers to. 685 * @param ptr The struct to assign the function pointers to.
644 */ 686 */
645 void __declspec(dllexport) get_addon(void* ptr) 687 void __declspec(dllexport) get_addon(void* ptr)
@@ -731,5 +773,7 @@ extern "C"
731 pClient->toAddon.OnPowerSavingActivated = OnPowerSavingActivated; 773 pClient->toAddon.OnPowerSavingActivated = OnPowerSavingActivated;
732 pClient->toAddon.OnPowerSavingDeactivated = OnPowerSavingDeactivated; 774 pClient->toAddon.OnPowerSavingDeactivated = OnPowerSavingDeactivated;
733 pClient->toAddon.GetStreamTimes = GetStreamTimes; 775 pClient->toAddon.GetStreamTimes = GetStreamTimes;
776
777 pClient->toAddon.GetStreamReadChunkSize = GetStreamReadChunkSize;
734 }; 778 };
735}; 779};
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 @@
1#pragma once
2
3/* 1/*
4 * Copyright (C) 2005-2015 Team Kodi 2 * Copyright (C) 2005-2018 Team Kodi
5 * http://kodi.tv 3 * This file is part of Kodi - https://kodi.tv
6 *
7 * This Program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
11 *
12 * This Program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with Kodi; see the file COPYING. If not, see
19 * <http://www.gnu.org/licenses/>.
20 * 4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
21 */ 7 */
22 8
9#pragma once
10
23#ifndef TARGET_WINDOWS 11#ifndef TARGET_WINDOWS
24#ifndef __cdecl 12#ifndef __cdecl
25#define __cdecl 13#define __cdecl
@@ -36,7 +24,7 @@
36#include "xbmc_epg_types.h" 24#include "xbmc_epg_types.h"
37 25
38/*! @note Define "USE_DEMUX" at compile time if demuxing in the PVR add-on is used. 26/*! @note Define "USE_DEMUX" at compile time if demuxing in the PVR add-on is used.
39 * Also XBMC's "DVDDemuxPacket.h" file must be in the include path of the add-on, 27 * Also, "DVDDemuxPacket.h" file must be in the include path of the add-on,
40 * and the add-on should set bHandlesDemuxing to true. 28 * and the add-on should set bHandlesDemuxing to true.
41 */ 29 */
42#ifdef USE_DEMUX 30#ifdef USE_DEMUX
@@ -79,7 +67,8 @@ struct DemuxPacket;
79#define PVR_STREAM_MAX_PROPERTIES 20 67#define PVR_STREAM_MAX_PROPERTIES 20
80#define PVR_STREAM_PROPERTY_STREAMURL "streamurl" /*!< @brief the URL of the stream that should be played. */ 68#define PVR_STREAM_PROPERTY_STREAMURL "streamurl" /*!< @brief the URL of the stream that should be played. */
81#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. */ 69#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. */
82#define PVR_STREAM_PROPERTY_MIMETYPE "mimetype" /*!< @brief the Mime-Type of the stream that should be played. */ 70#define PVR_STREAM_PROPERTY_MIMETYPE "mimetype" /*!< @brief the MIME type of the stream that should be played. */
71#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.*/
83 72
84/* using the default avformat's MAX_STREAMS value to be safe */ 73/* using the default avformat's MAX_STREAMS value to be safe */
85#define PVR_STREAM_MAX_STREAMS 20 74#define PVR_STREAM_MAX_STREAMS 20
@@ -202,7 +191,7 @@ extern "C" {
202 { 191 {
203 PVR_ERROR_NO_ERROR = 0, /*!< @brief no error occurred */ 192 PVR_ERROR_NO_ERROR = 0, /*!< @brief no error occurred */
204 PVR_ERROR_UNKNOWN = -1, /*!< @brief an unknown error occurred */ 193 PVR_ERROR_UNKNOWN = -1, /*!< @brief an unknown error occurred */
205 PVR_ERROR_NOT_IMPLEMENTED = -2, /*!< @brief the method that XBMC called is not implemented by the add-on */ 194 PVR_ERROR_NOT_IMPLEMENTED = -2, /*!< @brief the method that Kodi called is not implemented by the add-on */
206 PVR_ERROR_SERVER_ERROR = -3, /*!< @brief the backend reported an error, or the add-on isn't connected */ 195 PVR_ERROR_SERVER_ERROR = -3, /*!< @brief the backend reported an error, or the add-on isn't connected */
207 PVR_ERROR_SERVER_TIMEOUT = -4, /*!< @brief the command was sent to the backend, but the response timed out */ 196 PVR_ERROR_SERVER_TIMEOUT = -4, /*!< @brief the command was sent to the backend, but the response timed out */
208 PVR_ERROR_REJECTED = -5, /*!< @brief the command was rejected by the backend */ 197 PVR_ERROR_REJECTED = -5, /*!< @brief the command was rejected by the backend */
@@ -312,7 +301,7 @@ extern "C" {
312 bool bSupportsChannelGroups; /*!< @brief true if this add-on supports channel groups */ 301 bool bSupportsChannelGroups; /*!< @brief true if this add-on supports channel groups */
313 bool bSupportsChannelScan; /*!< @brief true if this add-on support scanning for new channels on the backend */ 302 bool bSupportsChannelScan; /*!< @brief true if this add-on support scanning for new channels on the backend */
314 bool bSupportsChannelSettings; /*!< @brief true if this add-on supports the following functions: DeleteChannel, RenameChannel, DialogChannelSettings and DialogAddChannel */ 303 bool bSupportsChannelSettings; /*!< @brief true if this add-on supports the following functions: DeleteChannel, RenameChannel, DialogChannelSettings and DialogAddChannel */
315 bool bHandlesInputStream; /*!< @brief true if this add-on provides an input stream. false if XBMC handles the stream. */ 304 bool bHandlesInputStream; /*!< @brief true if this add-on provides an input stream. false if Kodi handles the stream. */
316 bool bHandlesDemuxing; /*!< @brief true if this add-on demultiplexes packets. */ 305 bool bHandlesDemuxing; /*!< @brief true if this add-on demultiplexes packets. */
317 bool bSupportsRecordingPlayCount; /*!< @brief true if the backend supports play count for recordings. */ 306 bool bSupportsRecordingPlayCount; /*!< @brief true if the backend supports play count for recordings. */
318 bool bSupportsLastPlayedPosition; /*!< @brief true if the backend supports store/retrieve of last played position for recordings. */ 307 bool bSupportsLastPlayedPosition; /*!< @brief true if the backend supports store/retrieve of last played position for recordings. */
@@ -628,7 +617,7 @@ extern "C" {
628 } AddonToKodiFuncTable_PVR; 617 } AddonToKodiFuncTable_PVR;
629 618
630 /*! 619 /*!
631 * @brief Structure to transfer the methods from xbmc_pvr_dll.h to XBMC 620 * @brief Structure to transfer the methods from xbmc_pvr_dll.h to Kodi
632 */ 621 */
633 typedef struct KodiToAddonFuncTable_PVR 622 typedef struct KodiToAddonFuncTable_PVR
634 { 623 {
@@ -706,6 +695,7 @@ extern "C" {
706 void (__cdecl* OnPowerSavingActivated)(void); 695 void (__cdecl* OnPowerSavingActivated)(void);
707 void (__cdecl* OnPowerSavingDeactivated)(void); 696 void (__cdecl* OnPowerSavingDeactivated)(void);
708 PVR_ERROR (__cdecl* GetStreamTimes)(PVR_STREAM_TIMES*); 697 PVR_ERROR (__cdecl* GetStreamTimes)(PVR_STREAM_TIMES*);
698 PVR_ERROR (__cdecl* GetStreamReadChunkSize)(int*);
709 } KodiToAddonFuncTable_PVR; 699 } KodiToAddonFuncTable_PVR;
710 700
711 typedef struct AddonInstance_PVR 701 typedef struct AddonInstance_PVR