From f44ecaa4f27e7538ddcad66d40e543bffa2d2d86 Mon Sep 17 00:00:00 2001 From: manuel Date: Sun, 4 Jun 2017 16:57:49 +0200 Subject: sync with upstream --- addons/library.kodi.guilib/libKODI_guilib.h | 845 ------ addons/library.xbmc.addon/libXBMC_addon.h | 600 ---- addons/library.xbmc.codec/libXBMC_codec.h | 124 - addons/library.xbmc.pvr/libXBMC_pvr.h | 332 --- cmake/KodiConfig.cmake.in | 35 + cmake/README.md | 299 ++ cmake/addons/CMakeLists.txt | 439 +++ cmake/addons/README.md | 65 + cmake/addons/addons/pvr.dvbviewer/platforms.txt | 1 + .../addons/addons/pvr.dvbviewer/pvr.dvbviewer.txt | 1 + cmake/addons/bootstrap/Bootstrap.cmake | 39 + cmake/addons/bootstrap/CMakeLists.txt | 93 + cmake/addons/bootstrap/README.md | 48 + .../bootstrap/repositories/binary-addons.txt | 1 + cmake/addons/depends/CMakeLists.txt | 41 + cmake/addons/depends/README | 61 + cmake/addons/depends/common/kodi-platform/deps.txt | 2 + .../depends/common/kodi-platform/kodi-platform.txt | 1 + .../depends/common/p8-platform/p8-platform.txt | 1 + cmake/addons/depends/common/tinyxml/CMakeLists.txt | 22 + cmake/addons/depends/common/tinyxml/tinyxml.txt | 1 + cmake/addons/depends/windows/CMakeLists.txt | 52 + cmake/addons/depends/windows/Install.cmake | 24 + cmake/addons/depends/windows/README | 19 + .../depends/windows/cmake/mingw/CMakeLists.txt | 37 + .../windows/cmake/mingw/MinGWConfig.cmake.in | 3 + .../windows/cmake/mingw/Toolchain_mingw32.cmake.in | 17 + cmake/addons/depends/windows/cmake/mingw/mingw.txt | 1 + .../depends/windows/cmake/mingw/mingw32-cmd.bat.in | 6 + .../depends/windows/cmake/mingw/noinstall.txt | 0 .../depends/windows/cmake/msys/CMakeLists.txt | 5 + cmake/addons/depends/windows/cmake/msys/msys.txt | 1 + .../depends/windows/cmake/msys/noinstall.txt | 0 cmake/addons/depends/windows/prebuilt/README | 21 + cmake/cpack/CPackConfigDEB.cmake | 349 +++ cmake/cpack/deb/NEWS.Debian | 24 + cmake/cpack/deb/copyright | 3126 ++++++++++++++++++++ cmake/cpack/deb/lintian/overrides/kodi | 1 + cmake/cpack/deb/menu/kodi | 2 + cmake/cpack/deb/package-description.txt | 16 + cmake/cpack/deb/packages/kodi-addon-dev.txt.in | 25 + cmake/cpack/deb/packages/kodi-bin.txt.in | 25 + .../deb/packages/kodi-eventclients-common.txt.in | 25 + .../deb/packages/kodi-eventclients-dev.txt.in | 25 + .../deb/packages/kodi-eventclients-ps3.txt.in | 25 + .../packages/kodi-eventclients-wiiremote.txt.in | 25 + .../packages/kodi-eventclients-xbmc-send.txt.in | 25 + .../deb/packages/kodi-tools-texturepacker.txt.in | 25 + cmake/cpack/deb/packages/kodi.txt.in | 25 + cmake/cpack/deb/postinst | 5 + cmake/cpack/deb/postrm | 3 + cmake/installdata/common/addons.txt | 45 + cmake/installdata/common/common.txt | 12 + cmake/installdata/ios/certificates.txt | 1 + cmake/installdata/ios/fontconfig.txt | 1 + cmake/installdata/ios/packaging.txt | 3 + cmake/installdata/ios/runtime.txt | 2 + cmake/installdata/linux/lirc.txt | 1 + cmake/installdata/osx/certificates.txt | 1 + cmake/installdata/osx/packaging.txt | 4 + cmake/installdata/osx/runtime.txt | 2 + cmake/installdata/rbpi/lirc.txt | 1 + cmake/installdata/test-reference-data.txt | 10 + cmake/installdata/windows/addons.txt | 1 + cmake/installdata/windows/dlls.txt | 3 + cmake/installdata/windows/irss.txt | 2 + cmake/installdata/windows/python.txt | 2 + cmake/modules/FindAML.cmake | 35 + cmake/modules/FindASS.cmake | 44 + cmake/modules/FindAlsa.cmake | 46 + cmake/modules/FindAvahi.cmake | 63 + cmake/modules/FindBluetooth.cmake | 44 + cmake/modules/FindBluray.cmake | 58 + cmake/modules/FindCAP.cmake | 44 + cmake/modules/FindCCache.cmake | 18 + cmake/modules/FindCEC.cmake | 68 + cmake/modules/FindCWiid.cmake | 44 + cmake/modules/FindCXX11.cmake | 18 + cmake/modules/FindCdio.cmake | 45 + cmake/modules/FindCpluff.cmake | 62 + cmake/modules/FindCrossGUID.cmake | 78 + cmake/modules/FindCurl.cmake | 83 + cmake/modules/FindD3DX11Effects.cmake | 30 + cmake/modules/FindDBus.cmake | 52 + cmake/modules/FindEGL.cmake | 48 + cmake/modules/FindEMBEDDED.cmake | 16 + cmake/modules/FindFFMPEG.cmake | 293 ++ cmake/modules/FindFmt.cmake | 57 + cmake/modules/FindFreeType.cmake | 45 + cmake/modules/FindFriBidi.cmake | 48 + cmake/modules/FindGIF.cmake | 46 + cmake/modules/FindGLX.cmake | 44 + cmake/modules/FindIMX.cmake | 38 + cmake/modules/FindJsonSchemaBuilder.cmake | 26 + cmake/modules/FindLCMS2.cmake | 48 + cmake/modules/FindLibDRM.cmake | 45 + cmake/modules/FindLibDvd.cmake | 219 ++ cmake/modules/FindLibUSB.cmake | 45 + cmake/modules/FindLibXml2.cmake | 84 + cmake/modules/FindLzo2.cmake | 37 + cmake/modules/FindMDNS.cmake | 47 + cmake/modules/FindMMAL.cmake | 55 + cmake/modules/FindMicroHttpd.cmake | 51 + cmake/modules/FindMir.cmake | 33 + cmake/modules/FindMySqlClient.cmake | 69 + cmake/modules/FindNFS.cmake | 58 + cmake/modules/FindOpenGLES.cmake | 48 + cmake/modules/FindOpenGl.cmake | 43 + cmake/modules/FindPCRE.cmake | 87 + cmake/modules/FindPlist.cmake | 58 + cmake/modules/FindPulseAudio.cmake | 68 + cmake/modules/FindPython.cmake | 39 + cmake/modules/FindRapidJSON.cmake | 40 + cmake/modules/FindSSE.cmake | 156 + cmake/modules/FindSSH.cmake | 47 + cmake/modules/FindSWIG.cmake | 29 + cmake/modules/FindSdl.cmake | 29 + cmake/modules/FindShairplay.cmake | 63 + cmake/modules/FindSmbClient.cmake | 47 + cmake/modules/FindSndio.cmake | 34 + cmake/modules/FindSqlite3.cmake | 44 + cmake/modules/FindTagLib.cmake | 60 + cmake/modules/FindTexturePacker.cmake | 41 + cmake/modules/FindTinyXML.cmake | 68 + cmake/modules/FindUDEV.cmake | 47 + cmake/modules/FindUUID.cmake | 43 + cmake/modules/FindVAAPI.cmake | 72 + cmake/modules/FindVDPAU.cmake | 47 + cmake/modules/FindX.cmake | 57 + cmake/modules/FindXRandR.cmake | 47 + cmake/modules/FindXSLT.cmake | 50 + cmake/modules/FindYajl.cmake | 62 + cmake/modules/FindZip.cmake | 46 + cmake/modules/LDGOLD.cmake | 45 + cmake/modules/extra/ECMEnableSanitizers.cmake | 149 + cmake/platform/android/android.cmake | 1 + cmake/platform/android/defines.txt | 1 + cmake/platform/freebsd/defines.txt | 1 + cmake/platform/ios/defines.txt | 1 + cmake/platform/ios/ios.cmake | 1 + cmake/platform/linux/aml.cmake | 1 + cmake/platform/linux/defines.txt | 1 + cmake/platform/linux/imx.cmake | 1 + cmake/platform/linux/mir.cmake | 2 + cmake/platform/linux/x11.cmake | 2 + cmake/platform/osx/defines.txt | 1 + cmake/platform/osx/osx.cmake | 1 + cmake/platform/rbpi/defines.txt | 1 + cmake/platform/rbpi/rbpi.cmake | 1 + cmake/platform/windows/defines.txt | 1 + cmake/platform/windows/windows.cmake | 1 + cmake/scripts/android/ArchSetup.cmake | 34 + cmake/scripts/android/Install.cmake | 137 + cmake/scripts/android/Macros.cmake | 1 + cmake/scripts/android/PathSetup.cmake | 33 + cmake/scripts/common/AddOptions.cmake | 78 + cmake/scripts/common/AddonHelpers.cmake | 378 +++ cmake/scripts/common/ArchSetup.cmake | 159 + cmake/scripts/common/CMakeHelpers.cmake | 54 + cmake/scripts/common/CheckCommits.cmake | 75 + cmake/scripts/common/CheckTargetPlatform.cmake | 67 + cmake/scripts/common/GenerateVersionedFiles.cmake | 38 + cmake/scripts/common/GeneratorSetup.cmake | 49 + cmake/scripts/common/HandleDepends.cmake | 252 ++ cmake/scripts/common/Macros.cmake | 722 +++++ cmake/scripts/common/PrepareEnv.cmake | 65 + cmake/scripts/common/ProjectMacros.cmake | 89 + cmake/scripts/common/Uninstall.cmake | 22 + cmake/scripts/freebsd/ArchSetup.cmake | 16 + cmake/scripts/freebsd/Install.cmake | 1 + cmake/scripts/freebsd/Macros.cmake | 1 + cmake/scripts/freebsd/PathSetup.cmake | 1 + cmake/scripts/ios/ArchSetup.cmake | 57 + cmake/scripts/ios/Install.cmake | 86 + cmake/scripts/ios/Macros.cmake | 1 + cmake/scripts/ios/PathSetup.cmake | 1 + cmake/scripts/linux/ArchSetup.cmake | 46 + cmake/scripts/linux/CodeCoverage.cmake | 97 + cmake/scripts/linux/ExtraTargets.cmake | 15 + cmake/scripts/linux/Install.cmake | 312 ++ cmake/scripts/linux/Macros.cmake | 95 + cmake/scripts/linux/PathSetup.cmake | 40 + cmake/scripts/osx/ArchSetup.cmake | 37 + cmake/scripts/osx/ExtraTargets.cmake | 3 + cmake/scripts/osx/Install.cmake | 40 + cmake/scripts/osx/Macros.cmake | 118 + cmake/scripts/osx/PathSetup.cmake | 32 + cmake/scripts/rbpi/ArchSetup.cmake | 35 + cmake/scripts/rbpi/ExtraTargets.cmake | 1 + cmake/scripts/rbpi/Install.cmake | 1 + cmake/scripts/rbpi/Macros.cmake | 1 + cmake/scripts/rbpi/PathSetup.cmake | 1 + cmake/scripts/windows/ArchSetup.cmake | 112 + cmake/scripts/windows/CFlagOverrides.cmake | 5 + cmake/scripts/windows/CXXFlagOverrides.cmake | 5 + cmake/scripts/windows/Install.cmake | 0 cmake/scripts/windows/Macros.cmake | 66 + cmake/scripts/windows/PathSetup.cmake | 34 + cmake/scripts/windows/tools/patch.cmake | 37 + cmake/treedata/android/subdirs.txt | 15 + cmake/treedata/common/addons.txt | 0 cmake/treedata/common/cores.txt | 9 + cmake/treedata/common/events.txt | 2 + cmake/treedata/common/externals.txt | 1 + cmake/treedata/common/filesystem.txt | 3 + cmake/treedata/common/games.txt | 12 + cmake/treedata/common/interfaces.txt | 6 + cmake/treedata/common/music.txt | 5 + cmake/treedata/common/network.txt | 2 + cmake/treedata/common/peripherals.txt | 6 + cmake/treedata/common/profiles.txt | 3 + cmake/treedata/common/pvr.txt | 8 + cmake/treedata/common/settings.txt | 4 + cmake/treedata/common/subdirs.txt | 35 + cmake/treedata/common/tests.txt | 10 + cmake/treedata/common/video.txt | 4 + cmake/treedata/common/videoplayer.txt | 12 + cmake/treedata/freebsd/subdirs.txt | 13 + cmake/treedata/ios/subdirs.txt | 15 + cmake/treedata/linux/subdirs.txt | 13 + cmake/treedata/optional/common/X.txt | 1 + cmake/treedata/optional/common/aml.txt | 2 + cmake/treedata/optional/common/cdrip.txt | 1 + cmake/treedata/optional/common/dacp.txt | 1 + cmake/treedata/optional/common/mdns.txt | 1 + cmake/treedata/optional/common/mir.txt | 1 + cmake/treedata/optional/common/opengl.txt | 1 + cmake/treedata/optional/common/opengles.txt | 1 + cmake/treedata/optional/common/python.txt | 4 + cmake/treedata/optional/common/upnp.txt | 2 + cmake/treedata/optional/common/webserver.txt | 2 + cmake/treedata/osx/subdirs.txt | 12 + cmake/treedata/rbpi/omxplayer.txt | 1 + cmake/treedata/rbpi/subdirs.txt | 12 + cmake/treedata/windows/externals.txt | 1 + cmake/treedata/windows/subdirs.txt | 14 + project/cmake/CMakeLists.txt | 501 ---- project/cmake/KodiConfig.cmake.in | 34 - project/cmake/README.md | 299 -- project/cmake/addons/CMakeLists.txt | 434 --- project/cmake/addons/README.md | 65 - .../addons/addons/pvr.dvbviewer/platforms.txt | 1 - .../addons/addons/pvr.dvbviewer/pvr.dvbviewer.txt | 1 - project/cmake/addons/bootstrap/Bootstrap.cmake | 39 - project/cmake/addons/bootstrap/CMakeLists.txt | 94 - project/cmake/addons/bootstrap/README.md | 48 - .../bootstrap/repositories/binary-addons.txt | 1 - project/cmake/addons/depends/CMakeLists.txt | 41 - project/cmake/addons/depends/README | 61 - .../addons/depends/common/kodi-platform/deps.txt | 2 - .../depends/common/kodi-platform/kodi-platform.txt | 1 - .../depends/common/p8-platform/p8-platform.txt | 1 - .../addons/depends/common/tinyxml/CMakeLists.txt | 22 - .../addons/depends/common/tinyxml/tinyxml.txt | 1 - .../cmake/addons/depends/windows/CMakeLists.txt | 52 - project/cmake/addons/depends/windows/Install.cmake | 24 - project/cmake/addons/depends/windows/README | 19 - .../depends/windows/cmake/mingw/CMakeLists.txt | 33 - .../windows/cmake/mingw/MinGWConfig.cmake.in | 3 - .../windows/cmake/mingw/Toolchain_mingw32.cmake.in | 17 - .../addons/depends/windows/cmake/mingw/mingw.txt | 1 - .../depends/windows/cmake/mingw/mingw32-cmd.bat.in | 6 - .../depends/windows/cmake/mingw/noinstall.txt | 0 .../depends/windows/cmake/msys/CMakeLists.txt | 5 - .../addons/depends/windows/cmake/msys/msys.txt | 1 - .../depends/windows/cmake/msys/noinstall.txt | 0 .../cmake/addons/depends/windows/prebuilt/README | 21 - project/cmake/cpack/CPackConfigDEB.cmake | 352 --- project/cmake/cpack/deb/NEWS.Debian | 24 - project/cmake/cpack/deb/copyright | 3126 -------------------- project/cmake/cpack/deb/lintian/overrides/kodi | 1 - project/cmake/cpack/deb/menu/kodi | 2 - project/cmake/cpack/deb/package-description.txt | 16 - .../cmake/cpack/deb/packages/kodi-addon-dev.txt.in | 25 - .../cmake/cpack/deb/packages/kodi-audio-dev.txt.in | 25 - project/cmake/cpack/deb/packages/kodi-bin.txt.in | 25 - .../deb/packages/kodi-eventclients-common.txt.in | 25 - .../deb/packages/kodi-eventclients-dev.txt.in | 25 - .../deb/packages/kodi-eventclients-ps3.txt.in | 25 - .../packages/kodi-eventclients-wiiremote.txt.in | 25 - .../packages/kodi-eventclients-xbmc-send.txt.in | 25 - .../cpack/deb/packages/kodi-inputstream-dev.txt.in | 25 - .../cpack/deb/packages/kodi-peripheral-dev.txt.in | 24 - .../cmake/cpack/deb/packages/kodi-pvr-dev.txt.in | 25 - .../cpack/deb/packages/kodi-screensaver-dev.txt.in | 25 - .../deb/packages/kodi-tools-texturepacker.txt.in | 25 - .../deb/packages/kodi-visualization-dev.txt.in | 25 - project/cmake/cpack/deb/packages/kodi.txt.in | 25 - project/cmake/cpack/deb/postinst | 5 - project/cmake/cpack/deb/postrm | 3 - project/cmake/installdata/common/addons.txt | 49 - project/cmake/installdata/common/common.txt | 13 - project/cmake/installdata/ios/certificates.txt | 1 - project/cmake/installdata/ios/packaging.txt | 3 - project/cmake/installdata/ios/runtime.txt | 2 - project/cmake/installdata/linux/lirc.txt | 1 - project/cmake/installdata/osx/certificates.txt | 1 - project/cmake/installdata/osx/packaging.txt | 4 - project/cmake/installdata/osx/runtime.txt | 2 - project/cmake/installdata/rbpi/lirc.txt | 1 - project/cmake/installdata/test-reference-data.txt | 10 - project/cmake/installdata/windows/addons.txt | 1 - project/cmake/installdata/windows/dlls.txt | 2 - project/cmake/installdata/windows/irss.txt | 2 - project/cmake/installdata/windows/python.txt | 1 - project/cmake/modules/FindAML.cmake | 35 - project/cmake/modules/FindASS.cmake | 44 - project/cmake/modules/FindAlsa.cmake | 46 - project/cmake/modules/FindAvahi.cmake | 63 - project/cmake/modules/FindBluetooth.cmake | 44 - project/cmake/modules/FindBluray.cmake | 58 - project/cmake/modules/FindCAP.cmake | 44 - project/cmake/modules/FindCCache.cmake | 18 - project/cmake/modules/FindCEC.cmake | 68 - project/cmake/modules/FindCWiid.cmake | 44 - project/cmake/modules/FindCXX11.cmake | 18 - project/cmake/modules/FindCdio.cmake | 45 - project/cmake/modules/FindCpluff.cmake | 61 - project/cmake/modules/FindCrossGUID.cmake | 78 - project/cmake/modules/FindCurl.cmake | 83 - project/cmake/modules/FindD3DX11Effects.cmake | 30 - project/cmake/modules/FindDBus.cmake | 52 - project/cmake/modules/FindEGL.cmake | 48 - project/cmake/modules/FindEMBEDDED.cmake | 16 - project/cmake/modules/FindFFMPEG.cmake | 292 -- project/cmake/modules/FindFreeType.cmake | 45 - project/cmake/modules/FindFribidi.cmake | 48 - project/cmake/modules/FindGIF.cmake | 46 - project/cmake/modules/FindJsonSchemaBuilder.cmake | 21 - project/cmake/modules/FindLibDRM.cmake | 45 - project/cmake/modules/FindLibDvd.cmake | 219 -- project/cmake/modules/FindLibUSB.cmake | 45 - project/cmake/modules/FindLibXml2.cmake | 84 - project/cmake/modules/FindLzo2.cmake | 37 - project/cmake/modules/FindMMAL.cmake | 36 - project/cmake/modules/FindMicroHttpd.cmake | 49 - project/cmake/modules/FindMir.cmake | 33 - project/cmake/modules/FindMySqlClient.cmake | 69 - project/cmake/modules/FindNFS.cmake | 58 - project/cmake/modules/FindOpenGLES.cmake | 48 - project/cmake/modules/FindOpenGl.cmake | 43 - project/cmake/modules/FindPCRE.cmake | 87 - project/cmake/modules/FindPlist.cmake | 58 - project/cmake/modules/FindPulseAudio.cmake | 68 - project/cmake/modules/FindPython.cmake | 38 - project/cmake/modules/FindSSE.cmake | 143 - project/cmake/modules/FindSSH.cmake | 47 - project/cmake/modules/FindSWIG.cmake | 29 - project/cmake/modules/FindSdl.cmake | 46 - project/cmake/modules/FindShairplay.cmake | 63 - project/cmake/modules/FindSmbClient.cmake | 47 - project/cmake/modules/FindSqlite3.cmake | 44 - project/cmake/modules/FindTagLib.cmake | 60 - project/cmake/modules/FindTexturePacker.cmake | 41 - project/cmake/modules/FindTinyXML.cmake | 68 - project/cmake/modules/FindUDEV.cmake | 47 - project/cmake/modules/FindUUID.cmake | 43 - project/cmake/modules/FindVAAPI.cmake | 72 - project/cmake/modules/FindVDPAU.cmake | 47 - project/cmake/modules/FindX.cmake | 57 - project/cmake/modules/FindXRandR.cmake | 47 - project/cmake/modules/FindXSLT.cmake | 50 - project/cmake/modules/FindYajl.cmake | 62 - project/cmake/modules/FindZip.cmake | 46 - project/cmake/modules/LDGOLD.cmake | 45 - .../cmake/modules/extra/ECMEnableSanitizers.cmake | 149 - project/cmake/platform/android/defines.txt | 1 - project/cmake/platform/freebsd/defines.txt | 1 - project/cmake/platform/ios/defines.txt | 1 - project/cmake/platform/linux/defines.txt | 1 - project/cmake/platform/osx/defines.txt | 1 - project/cmake/platform/rbpi/defines.txt | 1 - project/cmake/platform/windows/defines.txt | 1 - project/cmake/scripts/android/ArchSetup.cmake | 35 - project/cmake/scripts/android/Install.cmake | 122 - project/cmake/scripts/android/Macros.cmake | 1 - project/cmake/scripts/android/PathSetup.cmake | 33 - project/cmake/scripts/common/AddOptions.cmake | 78 - project/cmake/scripts/common/AddonHelpers.cmake | 268 -- project/cmake/scripts/common/ArchSetup.cmake | 155 - project/cmake/scripts/common/CMakeHelpers.cmake | 54 - project/cmake/scripts/common/CheckCommits.cmake | 75 - .../cmake/scripts/common/CheckTargetPlatform.cmake | 67 - .../scripts/common/GenerateVersionedFiles.cmake | 18 - project/cmake/scripts/common/GeneratorSetup.cmake | 49 - project/cmake/scripts/common/HandleDepends.cmake | 252 -- project/cmake/scripts/common/Macros.cmake | 622 ---- project/cmake/scripts/common/PrepareEnv.cmake | 64 - project/cmake/scripts/common/ProjectMacros.cmake | 89 - project/cmake/scripts/common/Uninstall.cmake | 22 - project/cmake/scripts/freebsd/ArchSetup.cmake | 16 - project/cmake/scripts/freebsd/Install.cmake | 1 - project/cmake/scripts/freebsd/Macros.cmake | 1 - project/cmake/scripts/freebsd/PathSetup.cmake | 1 - project/cmake/scripts/ios/ArchSetup.cmake | 57 - project/cmake/scripts/ios/Install.cmake | 85 - project/cmake/scripts/ios/Macros.cmake | 1 - project/cmake/scripts/ios/PathSetup.cmake | 1 - project/cmake/scripts/linux/ArchSetup.cmake | 45 - project/cmake/scripts/linux/CodeCoverage.cmake | 97 - project/cmake/scripts/linux/ExtraTargets.cmake | 12 - project/cmake/scripts/linux/Install.cmake | 367 --- project/cmake/scripts/linux/Macros.cmake | 95 - project/cmake/scripts/linux/PathSetup.cmake | 39 - project/cmake/scripts/osx/ArchSetup.cmake | 34 - project/cmake/scripts/osx/ExtraTargets.cmake | 3 - project/cmake/scripts/osx/Install.cmake | 40 - project/cmake/scripts/osx/Macros.cmake | 118 - project/cmake/scripts/osx/PathSetup.cmake | 32 - project/cmake/scripts/rbpi/ArchSetup.cmake | 28 - project/cmake/scripts/rbpi/Install.cmake | 1 - project/cmake/scripts/rbpi/Macros.cmake | 1 - project/cmake/scripts/rbpi/PathSetup.cmake | 1 - project/cmake/scripts/windows/ArchSetup.cmake | 89 - project/cmake/scripts/windows/CFlagOverrides.cmake | 5 - .../cmake/scripts/windows/CXXFlagOverrides.cmake | 5 - project/cmake/scripts/windows/Install.cmake | 0 project/cmake/scripts/windows/Macros.cmake | 66 - project/cmake/scripts/windows/PathSetup.cmake | 34 - project/cmake/scripts/windows/tools/patch.cmake | 37 - project/cmake/treedata/android/subdirs.txt | 17 - project/cmake/treedata/common/addons.txt | 7 - project/cmake/treedata/common/cores.txt | 9 - project/cmake/treedata/common/events.txt | 2 - project/cmake/treedata/common/externals.txt | 2 - project/cmake/treedata/common/filesystem.txt | 3 - project/cmake/treedata/common/games.txt | 12 - project/cmake/treedata/common/interfaces.txt | 9 - project/cmake/treedata/common/music.txt | 5 - project/cmake/treedata/common/network.txt | 2 - project/cmake/treedata/common/peripherals.txt | 6 - project/cmake/treedata/common/profiles.txt | 3 - project/cmake/treedata/common/pvr.txt | 7 - project/cmake/treedata/common/settings.txt | 4 - project/cmake/treedata/common/subdirs.txt | 41 - project/cmake/treedata/common/tests.txt | 10 - project/cmake/treedata/common/video.txt | 5 - project/cmake/treedata/common/videoplayer.txt | 12 - project/cmake/treedata/freebsd/subdirs.txt | 13 - project/cmake/treedata/ios/subdirs.txt | 15 - project/cmake/treedata/linux/subdirs.txt | 13 - project/cmake/treedata/optional/common/X11.txt | 1 - project/cmake/treedata/optional/common/cdrip.txt | 1 - project/cmake/treedata/optional/common/dacp.txt | 1 - project/cmake/treedata/optional/common/mir.txt | 1 - project/cmake/treedata/optional/common/nonfree.txt | 1 - project/cmake/treedata/optional/common/opengl.txt | 1 - .../cmake/treedata/optional/common/opengles.txt | 1 - project/cmake/treedata/optional/common/upnp.txt | 2 - .../cmake/treedata/optional/common/webserver.txt | 2 - project/cmake/treedata/osx/subdirs.txt | 12 - project/cmake/treedata/rbpi/omxplayer.txt | 1 - project/cmake/treedata/rbpi/subdirs.txt | 12 - project/cmake/treedata/windows/externals.txt | 1 - project/cmake/treedata/windows/subdirs.txt | 14 - scripts/excl.txt | 2 +- scripts/sync_buildenv.sh | 21 +- version.txt | 3 +- xbmc/addons/addon-bindings.mk | 55 +- xbmc/addons/kodi-addon-dev-kit/.gitignore | 31 + xbmc/addons/kodi-addon-dev-kit/doxygen/Doxyfile | 2532 ++++++++++++++++ .../kodi-addon-dev-kit/doxygen/DoxygenLayout.xml | 207 ++ .../doxygen/General/DoxygenOnAddon.dox | 90 + .../kodi-addon-dev-kit/doxygen/General/General.dox | 29 + .../doxygen/Modules/logo-python.png | Bin 0 -> 6550 bytes .../doxygen/Modules/modules_general.dox | 8 + .../doxygen/Modules/modules_python.dox | 179 ++ .../kodi-addon-dev-kit/doxygen/Skin/skin.dox | 24 + .../addons/kodi-addon-dev-kit/doxygen/kodi-dev.png | Bin 0 -> 2208 bytes xbmc/addons/kodi-addon-dev-kit/doxygen/main.txt | 49 + xbmc/addons/kodi-addon-dev-kit/include/NOTE | 15 + .../kodi-addon-dev-kit/include/kodi/AddonBase.h | 634 ++++ .../kodi-addon-dev-kit/include/kodi/AudioEngine.h | 580 ++++ .../kodi-addon-dev-kit/include/kodi/Filesystem.h | 1490 ++++++++++ .../kodi-addon-dev-kit/include/kodi/General.h | 376 +++ .../kodi-addon-dev-kit/include/kodi/Network.h | 187 ++ .../include/kodi/addon-instance/Screensaver.h | 141 + .../include/kodi/gui/DialogContextMenu.h | 95 + .../include/kodi/gui/DialogExtendedProgress.h | 244 ++ .../include/kodi/gui/DialogFileBrowser.h | 293 ++ .../include/kodi/gui/DialogKeyboard.h | 416 +++ .../include/kodi/gui/DialogNumeric.h | 366 +++ .../kodi-addon-dev-kit/include/kodi/gui/DialogOK.h | 104 + .../include/kodi/gui/DialogProgress.h | 249 ++ .../include/kodi/gui/DialogSelect.h | 101 + .../include/kodi/gui/DialogTextViewer.h | 115 + .../include/kodi/gui/DialogYesNo.h | 187 ++ .../kodi-addon-dev-kit/include/kodi/gui/General.h | 156 + .../kodi-addon-dev-kit/include/kodi/gui/ListItem.h | 336 +++ .../kodi-addon-dev-kit/include/kodi/gui/Window.h | 503 ++++ .../include/kodi/gui/definitions.h | 209 ++ .../include/kodi/kodi_adsp_dll.h | 45 +- .../include/kodi/kodi_adsp_types.h | 63 +- .../include/kodi/kodi_audiodec_dll.h | 16 +- .../include/kodi/kodi_audiodec_types.h | 22 +- .../include/kodi/kodi_audioengine_types.h | 165 -- .../include/kodi/kodi_game_callbacks.h | 161 - .../include/kodi/kodi_game_dll.h | 72 +- .../include/kodi/kodi_game_types.h | 56 +- .../include/kodi/kodi_imagedec_dll.h | 46 + .../include/kodi/kodi_imagedec_types.h | 76 + .../include/kodi/kodi_inputstream_dll.h | 71 +- .../include/kodi/kodi_inputstream_types.h | 47 +- .../include/kodi/kodi_peripheral_callbacks.h | 63 - .../include/kodi/kodi_peripheral_dll.h | 62 +- .../include/kodi/kodi_peripheral_types.h | 44 +- .../include/kodi/kodi_peripheral_utils.hpp | 38 +- .../kodi-addon-dev-kit/include/kodi/kodi_vfs_dll.h | 126 + .../include/kodi/kodi_vfs_types.h | 240 ++ .../kodi-addon-dev-kit/include/kodi/libKODI_adsp.h | 215 +- .../include/kodi/libKODI_audioengine.h | 306 -- .../kodi-addon-dev-kit/include/kodi/libKODI_game.h | 252 +- .../include/kodi/libKODI_guilib.h | 1393 +++++---- .../include/kodi/libKODI_inputstream.h | 36 +- .../include/kodi/libKODI_peripheral.h | 114 +- .../include/kodi/libXBMC_addon.h | 399 +-- .../include/kodi/libXBMC_codec.h | 111 - .../kodi-addon-dev-kit/include/kodi/libXBMC_pvr.h | 83 +- .../kodi-addon-dev-kit/include/kodi/versions.h | 436 +++ .../include/kodi/xbmc_addon_cpp_dll.h | 189 -- .../include/kodi/xbmc_addon_dll.h | 23 +- .../include/kodi/xbmc_addon_types.h | 41 +- .../include/kodi/xbmc_audioenc_dll.h | 14 +- .../include/kodi/xbmc_audioenc_types.h | 31 +- .../include/kodi/xbmc_codec_types.h | 55 - .../kodi-addon-dev-kit/include/kodi/xbmc_pvr_dll.h | 214 +- .../include/kodi/xbmc_pvr_types.h | 222 +- .../kodi-addon-dev-kit/include/kodi/xbmc_scr_dll.h | 42 - .../include/kodi/xbmc_scr_types.h | 50 - .../include/kodi/xbmc_stream_utils.hpp | 264 -- .../kodi-addon-dev-kit/include/kodi/xbmc_vis_dll.h | 24 +- .../include/kodi/xbmc_vis_types.h | 46 +- .../cores/VideoPlayer/DVDDemuxers/DVDDemuxPacket.h | 16 +- xbmc/cores/VideoPlayer/DVDDemuxers/DemuxCrypto.h | 81 + xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPacket.h | 36 - xbmc/filesystem/IFileTypes.h | 2 +- xbmc/input/ActionIDs.h | 310 ++ 537 files changed, 26091 insertions(+), 18198 deletions(-) delete mode 100644 addons/library.kodi.guilib/libKODI_guilib.h delete mode 100644 addons/library.xbmc.addon/libXBMC_addon.h delete mode 100644 addons/library.xbmc.codec/libXBMC_codec.h delete mode 100644 addons/library.xbmc.pvr/libXBMC_pvr.h create mode 100644 cmake/KodiConfig.cmake.in create mode 100644 cmake/README.md create mode 100644 cmake/addons/CMakeLists.txt create mode 100644 cmake/addons/README.md create mode 100644 cmake/addons/addons/pvr.dvbviewer/platforms.txt create mode 100644 cmake/addons/addons/pvr.dvbviewer/pvr.dvbviewer.txt create mode 100644 cmake/addons/bootstrap/Bootstrap.cmake create mode 100644 cmake/addons/bootstrap/CMakeLists.txt create mode 100644 cmake/addons/bootstrap/README.md create mode 100644 cmake/addons/bootstrap/repositories/binary-addons.txt create mode 100644 cmake/addons/depends/CMakeLists.txt create mode 100644 cmake/addons/depends/README create mode 100644 cmake/addons/depends/common/kodi-platform/deps.txt create mode 100644 cmake/addons/depends/common/kodi-platform/kodi-platform.txt create mode 100644 cmake/addons/depends/common/p8-platform/p8-platform.txt create mode 100644 cmake/addons/depends/common/tinyxml/CMakeLists.txt create mode 100644 cmake/addons/depends/common/tinyxml/tinyxml.txt create mode 100644 cmake/addons/depends/windows/CMakeLists.txt create mode 100644 cmake/addons/depends/windows/Install.cmake create mode 100644 cmake/addons/depends/windows/README create mode 100644 cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt create mode 100644 cmake/addons/depends/windows/cmake/mingw/MinGWConfig.cmake.in create mode 100644 cmake/addons/depends/windows/cmake/mingw/Toolchain_mingw32.cmake.in create mode 100644 cmake/addons/depends/windows/cmake/mingw/mingw.txt create mode 100644 cmake/addons/depends/windows/cmake/mingw/mingw32-cmd.bat.in create mode 100644 cmake/addons/depends/windows/cmake/mingw/noinstall.txt create mode 100644 cmake/addons/depends/windows/cmake/msys/CMakeLists.txt create mode 100644 cmake/addons/depends/windows/cmake/msys/msys.txt create mode 100644 cmake/addons/depends/windows/cmake/msys/noinstall.txt create mode 100644 cmake/addons/depends/windows/prebuilt/README create mode 100644 cmake/cpack/CPackConfigDEB.cmake create mode 100644 cmake/cpack/deb/NEWS.Debian create mode 100644 cmake/cpack/deb/copyright create mode 100644 cmake/cpack/deb/lintian/overrides/kodi create mode 100644 cmake/cpack/deb/menu/kodi create mode 100644 cmake/cpack/deb/package-description.txt create mode 100644 cmake/cpack/deb/packages/kodi-addon-dev.txt.in create mode 100644 cmake/cpack/deb/packages/kodi-bin.txt.in create mode 100644 cmake/cpack/deb/packages/kodi-eventclients-common.txt.in create mode 100644 cmake/cpack/deb/packages/kodi-eventclients-dev.txt.in create mode 100644 cmake/cpack/deb/packages/kodi-eventclients-ps3.txt.in create mode 100644 cmake/cpack/deb/packages/kodi-eventclients-wiiremote.txt.in create mode 100644 cmake/cpack/deb/packages/kodi-eventclients-xbmc-send.txt.in create mode 100644 cmake/cpack/deb/packages/kodi-tools-texturepacker.txt.in create mode 100644 cmake/cpack/deb/packages/kodi.txt.in create mode 100755 cmake/cpack/deb/postinst create mode 100755 cmake/cpack/deb/postrm create mode 100644 cmake/installdata/common/addons.txt create mode 100644 cmake/installdata/common/common.txt create mode 100644 cmake/installdata/ios/certificates.txt create mode 100644 cmake/installdata/ios/fontconfig.txt create mode 100644 cmake/installdata/ios/packaging.txt create mode 100644 cmake/installdata/ios/runtime.txt create mode 100644 cmake/installdata/linux/lirc.txt create mode 100644 cmake/installdata/osx/certificates.txt create mode 100644 cmake/installdata/osx/packaging.txt create mode 100644 cmake/installdata/osx/runtime.txt create mode 120000 cmake/installdata/rbpi/lirc.txt create mode 100644 cmake/installdata/test-reference-data.txt create mode 100644 cmake/installdata/windows/addons.txt create mode 100644 cmake/installdata/windows/dlls.txt create mode 100644 cmake/installdata/windows/irss.txt create mode 100644 cmake/installdata/windows/python.txt create mode 100644 cmake/modules/FindAML.cmake create mode 100644 cmake/modules/FindASS.cmake create mode 100644 cmake/modules/FindAlsa.cmake create mode 100644 cmake/modules/FindAvahi.cmake create mode 100644 cmake/modules/FindBluetooth.cmake create mode 100644 cmake/modules/FindBluray.cmake create mode 100644 cmake/modules/FindCAP.cmake create mode 100644 cmake/modules/FindCCache.cmake create mode 100644 cmake/modules/FindCEC.cmake create mode 100644 cmake/modules/FindCWiid.cmake create mode 100644 cmake/modules/FindCXX11.cmake create mode 100644 cmake/modules/FindCdio.cmake create mode 100644 cmake/modules/FindCpluff.cmake create mode 100644 cmake/modules/FindCrossGUID.cmake create mode 100644 cmake/modules/FindCurl.cmake create mode 100644 cmake/modules/FindD3DX11Effects.cmake create mode 100644 cmake/modules/FindDBus.cmake create mode 100644 cmake/modules/FindEGL.cmake create mode 100644 cmake/modules/FindEMBEDDED.cmake create mode 100644 cmake/modules/FindFFMPEG.cmake create mode 100644 cmake/modules/FindFmt.cmake create mode 100644 cmake/modules/FindFreeType.cmake create mode 100644 cmake/modules/FindFriBidi.cmake create mode 100644 cmake/modules/FindGIF.cmake create mode 100644 cmake/modules/FindGLX.cmake create mode 100644 cmake/modules/FindIMX.cmake create mode 100644 cmake/modules/FindJsonSchemaBuilder.cmake create mode 100644 cmake/modules/FindLCMS2.cmake create mode 100644 cmake/modules/FindLibDRM.cmake create mode 100644 cmake/modules/FindLibDvd.cmake create mode 100644 cmake/modules/FindLibUSB.cmake create mode 100644 cmake/modules/FindLibXml2.cmake create mode 100644 cmake/modules/FindLzo2.cmake create mode 100644 cmake/modules/FindMDNS.cmake create mode 100644 cmake/modules/FindMMAL.cmake create mode 100644 cmake/modules/FindMicroHttpd.cmake create mode 100644 cmake/modules/FindMir.cmake create mode 100644 cmake/modules/FindMySqlClient.cmake create mode 100644 cmake/modules/FindNFS.cmake create mode 100644 cmake/modules/FindOpenGLES.cmake create mode 100644 cmake/modules/FindOpenGl.cmake create mode 100644 cmake/modules/FindPCRE.cmake create mode 100644 cmake/modules/FindPlist.cmake create mode 100644 cmake/modules/FindPulseAudio.cmake create mode 100644 cmake/modules/FindPython.cmake create mode 100644 cmake/modules/FindRapidJSON.cmake create mode 100644 cmake/modules/FindSSE.cmake create mode 100644 cmake/modules/FindSSH.cmake create mode 100644 cmake/modules/FindSWIG.cmake create mode 100644 cmake/modules/FindSdl.cmake create mode 100644 cmake/modules/FindShairplay.cmake create mode 100644 cmake/modules/FindSmbClient.cmake create mode 100644 cmake/modules/FindSndio.cmake create mode 100644 cmake/modules/FindSqlite3.cmake create mode 100644 cmake/modules/FindTagLib.cmake create mode 100644 cmake/modules/FindTexturePacker.cmake create mode 100644 cmake/modules/FindTinyXML.cmake create mode 100644 cmake/modules/FindUDEV.cmake create mode 100644 cmake/modules/FindUUID.cmake create mode 100644 cmake/modules/FindVAAPI.cmake create mode 100644 cmake/modules/FindVDPAU.cmake create mode 100644 cmake/modules/FindX.cmake create mode 100644 cmake/modules/FindXRandR.cmake create mode 100644 cmake/modules/FindXSLT.cmake create mode 100644 cmake/modules/FindYajl.cmake create mode 100644 cmake/modules/FindZip.cmake create mode 100644 cmake/modules/LDGOLD.cmake create mode 100644 cmake/modules/extra/ECMEnableSanitizers.cmake create mode 100644 cmake/platform/android/android.cmake create mode 100644 cmake/platform/android/defines.txt create mode 100644 cmake/platform/freebsd/defines.txt create mode 100644 cmake/platform/ios/defines.txt create mode 100644 cmake/platform/ios/ios.cmake create mode 100644 cmake/platform/linux/aml.cmake create mode 100644 cmake/platform/linux/defines.txt create mode 100644 cmake/platform/linux/imx.cmake create mode 100644 cmake/platform/linux/mir.cmake create mode 100644 cmake/platform/linux/x11.cmake create mode 100644 cmake/platform/osx/defines.txt create mode 100644 cmake/platform/osx/osx.cmake create mode 100644 cmake/platform/rbpi/defines.txt create mode 100644 cmake/platform/rbpi/rbpi.cmake create mode 100644 cmake/platform/windows/defines.txt create mode 100644 cmake/platform/windows/windows.cmake create mode 100644 cmake/scripts/android/ArchSetup.cmake create mode 100644 cmake/scripts/android/Install.cmake create mode 120000 cmake/scripts/android/Macros.cmake create mode 100644 cmake/scripts/android/PathSetup.cmake create mode 100644 cmake/scripts/common/AddOptions.cmake create mode 100644 cmake/scripts/common/AddonHelpers.cmake create mode 100644 cmake/scripts/common/ArchSetup.cmake create mode 100644 cmake/scripts/common/CMakeHelpers.cmake create mode 100644 cmake/scripts/common/CheckCommits.cmake create mode 100644 cmake/scripts/common/CheckTargetPlatform.cmake create mode 100644 cmake/scripts/common/GenerateVersionedFiles.cmake create mode 100644 cmake/scripts/common/GeneratorSetup.cmake create mode 100644 cmake/scripts/common/HandleDepends.cmake create mode 100644 cmake/scripts/common/Macros.cmake create mode 100644 cmake/scripts/common/PrepareEnv.cmake create mode 100644 cmake/scripts/common/ProjectMacros.cmake create mode 100644 cmake/scripts/common/Uninstall.cmake create mode 100644 cmake/scripts/freebsd/ArchSetup.cmake create mode 120000 cmake/scripts/freebsd/Install.cmake create mode 120000 cmake/scripts/freebsd/Macros.cmake create mode 120000 cmake/scripts/freebsd/PathSetup.cmake create mode 100644 cmake/scripts/ios/ArchSetup.cmake create mode 100644 cmake/scripts/ios/Install.cmake create mode 120000 cmake/scripts/ios/Macros.cmake create mode 120000 cmake/scripts/ios/PathSetup.cmake create mode 100644 cmake/scripts/linux/ArchSetup.cmake create mode 100644 cmake/scripts/linux/CodeCoverage.cmake create mode 100644 cmake/scripts/linux/ExtraTargets.cmake create mode 100644 cmake/scripts/linux/Install.cmake create mode 100644 cmake/scripts/linux/Macros.cmake create mode 100644 cmake/scripts/linux/PathSetup.cmake create mode 100644 cmake/scripts/osx/ArchSetup.cmake create mode 100644 cmake/scripts/osx/ExtraTargets.cmake create mode 100644 cmake/scripts/osx/Install.cmake create mode 100644 cmake/scripts/osx/Macros.cmake create mode 100644 cmake/scripts/osx/PathSetup.cmake create mode 100644 cmake/scripts/rbpi/ArchSetup.cmake create mode 120000 cmake/scripts/rbpi/ExtraTargets.cmake create mode 120000 cmake/scripts/rbpi/Install.cmake create mode 120000 cmake/scripts/rbpi/Macros.cmake create mode 120000 cmake/scripts/rbpi/PathSetup.cmake create mode 100644 cmake/scripts/windows/ArchSetup.cmake create mode 100644 cmake/scripts/windows/CFlagOverrides.cmake create mode 100644 cmake/scripts/windows/CXXFlagOverrides.cmake create mode 100644 cmake/scripts/windows/Install.cmake create mode 100644 cmake/scripts/windows/Macros.cmake create mode 100644 cmake/scripts/windows/PathSetup.cmake create mode 100644 cmake/scripts/windows/tools/patch.cmake create mode 100644 cmake/treedata/android/subdirs.txt create mode 100644 cmake/treedata/common/addons.txt create mode 100644 cmake/treedata/common/cores.txt create mode 100644 cmake/treedata/common/events.txt create mode 100644 cmake/treedata/common/externals.txt create mode 100644 cmake/treedata/common/filesystem.txt create mode 100644 cmake/treedata/common/games.txt create mode 100644 cmake/treedata/common/interfaces.txt create mode 100644 cmake/treedata/common/music.txt create mode 100644 cmake/treedata/common/network.txt create mode 100644 cmake/treedata/common/peripherals.txt create mode 100644 cmake/treedata/common/profiles.txt create mode 100644 cmake/treedata/common/pvr.txt create mode 100644 cmake/treedata/common/settings.txt create mode 100644 cmake/treedata/common/subdirs.txt create mode 100644 cmake/treedata/common/tests.txt create mode 100644 cmake/treedata/common/video.txt create mode 100644 cmake/treedata/common/videoplayer.txt create mode 100644 cmake/treedata/freebsd/subdirs.txt create mode 100644 cmake/treedata/ios/subdirs.txt create mode 100644 cmake/treedata/linux/subdirs.txt create mode 100644 cmake/treedata/optional/common/X.txt create mode 100644 cmake/treedata/optional/common/aml.txt create mode 100644 cmake/treedata/optional/common/cdrip.txt create mode 100644 cmake/treedata/optional/common/dacp.txt create mode 100644 cmake/treedata/optional/common/mdns.txt create mode 100644 cmake/treedata/optional/common/mir.txt create mode 100644 cmake/treedata/optional/common/opengl.txt create mode 100644 cmake/treedata/optional/common/opengles.txt create mode 100644 cmake/treedata/optional/common/python.txt create mode 100644 cmake/treedata/optional/common/upnp.txt create mode 100644 cmake/treedata/optional/common/webserver.txt create mode 100644 cmake/treedata/osx/subdirs.txt create mode 100644 cmake/treedata/rbpi/omxplayer.txt create mode 100644 cmake/treedata/rbpi/subdirs.txt create mode 100644 cmake/treedata/windows/externals.txt create mode 100644 cmake/treedata/windows/subdirs.txt delete mode 100644 project/cmake/CMakeLists.txt delete mode 100644 project/cmake/KodiConfig.cmake.in delete mode 100644 project/cmake/README.md delete mode 100644 project/cmake/addons/CMakeLists.txt delete mode 100644 project/cmake/addons/README.md delete mode 100644 project/cmake/addons/addons/pvr.dvbviewer/platforms.txt delete mode 100644 project/cmake/addons/addons/pvr.dvbviewer/pvr.dvbviewer.txt delete mode 100644 project/cmake/addons/bootstrap/Bootstrap.cmake delete mode 100644 project/cmake/addons/bootstrap/CMakeLists.txt delete mode 100644 project/cmake/addons/bootstrap/README.md delete mode 100644 project/cmake/addons/bootstrap/repositories/binary-addons.txt delete mode 100644 project/cmake/addons/depends/CMakeLists.txt delete mode 100644 project/cmake/addons/depends/README delete mode 100644 project/cmake/addons/depends/common/kodi-platform/deps.txt delete mode 100644 project/cmake/addons/depends/common/kodi-platform/kodi-platform.txt delete mode 100644 project/cmake/addons/depends/common/p8-platform/p8-platform.txt delete mode 100644 project/cmake/addons/depends/common/tinyxml/CMakeLists.txt delete mode 100644 project/cmake/addons/depends/common/tinyxml/tinyxml.txt delete mode 100644 project/cmake/addons/depends/windows/CMakeLists.txt delete mode 100644 project/cmake/addons/depends/windows/Install.cmake delete mode 100644 project/cmake/addons/depends/windows/README delete mode 100644 project/cmake/addons/depends/windows/cmake/mingw/CMakeLists.txt delete mode 100644 project/cmake/addons/depends/windows/cmake/mingw/MinGWConfig.cmake.in delete mode 100644 project/cmake/addons/depends/windows/cmake/mingw/Toolchain_mingw32.cmake.in delete mode 100644 project/cmake/addons/depends/windows/cmake/mingw/mingw.txt delete mode 100644 project/cmake/addons/depends/windows/cmake/mingw/mingw32-cmd.bat.in delete mode 100644 project/cmake/addons/depends/windows/cmake/mingw/noinstall.txt delete mode 100644 project/cmake/addons/depends/windows/cmake/msys/CMakeLists.txt delete mode 100644 project/cmake/addons/depends/windows/cmake/msys/msys.txt delete mode 100644 project/cmake/addons/depends/windows/cmake/msys/noinstall.txt delete mode 100644 project/cmake/addons/depends/windows/prebuilt/README delete mode 100644 project/cmake/cpack/CPackConfigDEB.cmake delete mode 100644 project/cmake/cpack/deb/NEWS.Debian delete mode 100644 project/cmake/cpack/deb/copyright delete mode 100644 project/cmake/cpack/deb/lintian/overrides/kodi delete mode 100644 project/cmake/cpack/deb/menu/kodi delete mode 100644 project/cmake/cpack/deb/package-description.txt delete mode 100644 project/cmake/cpack/deb/packages/kodi-addon-dev.txt.in delete mode 100644 project/cmake/cpack/deb/packages/kodi-audio-dev.txt.in delete mode 100644 project/cmake/cpack/deb/packages/kodi-bin.txt.in delete mode 100644 project/cmake/cpack/deb/packages/kodi-eventclients-common.txt.in delete mode 100644 project/cmake/cpack/deb/packages/kodi-eventclients-dev.txt.in delete mode 100644 project/cmake/cpack/deb/packages/kodi-eventclients-ps3.txt.in delete mode 100644 project/cmake/cpack/deb/packages/kodi-eventclients-wiiremote.txt.in delete mode 100644 project/cmake/cpack/deb/packages/kodi-eventclients-xbmc-send.txt.in delete mode 100644 project/cmake/cpack/deb/packages/kodi-inputstream-dev.txt.in delete mode 100644 project/cmake/cpack/deb/packages/kodi-peripheral-dev.txt.in delete mode 100644 project/cmake/cpack/deb/packages/kodi-pvr-dev.txt.in delete mode 100644 project/cmake/cpack/deb/packages/kodi-screensaver-dev.txt.in delete mode 100644 project/cmake/cpack/deb/packages/kodi-tools-texturepacker.txt.in delete mode 100644 project/cmake/cpack/deb/packages/kodi-visualization-dev.txt.in delete mode 100644 project/cmake/cpack/deb/packages/kodi.txt.in delete mode 100755 project/cmake/cpack/deb/postinst delete mode 100755 project/cmake/cpack/deb/postrm delete mode 100644 project/cmake/installdata/common/addons.txt delete mode 100644 project/cmake/installdata/common/common.txt delete mode 100644 project/cmake/installdata/ios/certificates.txt delete mode 100644 project/cmake/installdata/ios/packaging.txt delete mode 100644 project/cmake/installdata/ios/runtime.txt delete mode 100644 project/cmake/installdata/linux/lirc.txt delete mode 100644 project/cmake/installdata/osx/certificates.txt delete mode 100644 project/cmake/installdata/osx/packaging.txt delete mode 100644 project/cmake/installdata/osx/runtime.txt delete mode 120000 project/cmake/installdata/rbpi/lirc.txt delete mode 100644 project/cmake/installdata/test-reference-data.txt delete mode 100644 project/cmake/installdata/windows/addons.txt delete mode 100644 project/cmake/installdata/windows/dlls.txt delete mode 100644 project/cmake/installdata/windows/irss.txt delete mode 100644 project/cmake/installdata/windows/python.txt delete mode 100644 project/cmake/modules/FindAML.cmake delete mode 100644 project/cmake/modules/FindASS.cmake delete mode 100644 project/cmake/modules/FindAlsa.cmake delete mode 100644 project/cmake/modules/FindAvahi.cmake delete mode 100644 project/cmake/modules/FindBluetooth.cmake delete mode 100644 project/cmake/modules/FindBluray.cmake delete mode 100644 project/cmake/modules/FindCAP.cmake delete mode 100644 project/cmake/modules/FindCCache.cmake delete mode 100644 project/cmake/modules/FindCEC.cmake delete mode 100644 project/cmake/modules/FindCWiid.cmake delete mode 100644 project/cmake/modules/FindCXX11.cmake delete mode 100644 project/cmake/modules/FindCdio.cmake delete mode 100644 project/cmake/modules/FindCpluff.cmake delete mode 100644 project/cmake/modules/FindCrossGUID.cmake delete mode 100644 project/cmake/modules/FindCurl.cmake delete mode 100644 project/cmake/modules/FindD3DX11Effects.cmake delete mode 100644 project/cmake/modules/FindDBus.cmake delete mode 100644 project/cmake/modules/FindEGL.cmake delete mode 100644 project/cmake/modules/FindEMBEDDED.cmake delete mode 100644 project/cmake/modules/FindFFMPEG.cmake delete mode 100644 project/cmake/modules/FindFreeType.cmake delete mode 100644 project/cmake/modules/FindFribidi.cmake delete mode 100644 project/cmake/modules/FindGIF.cmake delete mode 100644 project/cmake/modules/FindJsonSchemaBuilder.cmake delete mode 100644 project/cmake/modules/FindLibDRM.cmake delete mode 100644 project/cmake/modules/FindLibDvd.cmake delete mode 100644 project/cmake/modules/FindLibUSB.cmake delete mode 100644 project/cmake/modules/FindLibXml2.cmake delete mode 100644 project/cmake/modules/FindLzo2.cmake delete mode 100644 project/cmake/modules/FindMMAL.cmake delete mode 100644 project/cmake/modules/FindMicroHttpd.cmake delete mode 100644 project/cmake/modules/FindMir.cmake delete mode 100644 project/cmake/modules/FindMySqlClient.cmake delete mode 100644 project/cmake/modules/FindNFS.cmake delete mode 100644 project/cmake/modules/FindOpenGLES.cmake delete mode 100644 project/cmake/modules/FindOpenGl.cmake delete mode 100644 project/cmake/modules/FindPCRE.cmake delete mode 100644 project/cmake/modules/FindPlist.cmake delete mode 100644 project/cmake/modules/FindPulseAudio.cmake delete mode 100644 project/cmake/modules/FindPython.cmake delete mode 100644 project/cmake/modules/FindSSE.cmake delete mode 100644 project/cmake/modules/FindSSH.cmake delete mode 100644 project/cmake/modules/FindSWIG.cmake delete mode 100644 project/cmake/modules/FindSdl.cmake delete mode 100644 project/cmake/modules/FindShairplay.cmake delete mode 100644 project/cmake/modules/FindSmbClient.cmake delete mode 100644 project/cmake/modules/FindSqlite3.cmake delete mode 100644 project/cmake/modules/FindTagLib.cmake delete mode 100644 project/cmake/modules/FindTexturePacker.cmake delete mode 100644 project/cmake/modules/FindTinyXML.cmake delete mode 100644 project/cmake/modules/FindUDEV.cmake delete mode 100644 project/cmake/modules/FindUUID.cmake delete mode 100644 project/cmake/modules/FindVAAPI.cmake delete mode 100644 project/cmake/modules/FindVDPAU.cmake delete mode 100644 project/cmake/modules/FindX.cmake delete mode 100644 project/cmake/modules/FindXRandR.cmake delete mode 100644 project/cmake/modules/FindXSLT.cmake delete mode 100644 project/cmake/modules/FindYajl.cmake delete mode 100644 project/cmake/modules/FindZip.cmake delete mode 100644 project/cmake/modules/LDGOLD.cmake delete mode 100644 project/cmake/modules/extra/ECMEnableSanitizers.cmake delete mode 100644 project/cmake/platform/android/defines.txt delete mode 100644 project/cmake/platform/freebsd/defines.txt delete mode 100644 project/cmake/platform/ios/defines.txt delete mode 100644 project/cmake/platform/linux/defines.txt delete mode 100644 project/cmake/platform/osx/defines.txt delete mode 100644 project/cmake/platform/rbpi/defines.txt delete mode 100644 project/cmake/platform/windows/defines.txt delete mode 100644 project/cmake/scripts/android/ArchSetup.cmake delete mode 100644 project/cmake/scripts/android/Install.cmake delete mode 120000 project/cmake/scripts/android/Macros.cmake delete mode 100644 project/cmake/scripts/android/PathSetup.cmake delete mode 100644 project/cmake/scripts/common/AddOptions.cmake delete mode 100644 project/cmake/scripts/common/AddonHelpers.cmake delete mode 100644 project/cmake/scripts/common/ArchSetup.cmake delete mode 100644 project/cmake/scripts/common/CMakeHelpers.cmake delete mode 100644 project/cmake/scripts/common/CheckCommits.cmake delete mode 100644 project/cmake/scripts/common/CheckTargetPlatform.cmake delete mode 100644 project/cmake/scripts/common/GenerateVersionedFiles.cmake delete mode 100644 project/cmake/scripts/common/GeneratorSetup.cmake delete mode 100644 project/cmake/scripts/common/HandleDepends.cmake delete mode 100644 project/cmake/scripts/common/Macros.cmake delete mode 100644 project/cmake/scripts/common/PrepareEnv.cmake delete mode 100644 project/cmake/scripts/common/ProjectMacros.cmake delete mode 100644 project/cmake/scripts/common/Uninstall.cmake delete mode 100644 project/cmake/scripts/freebsd/ArchSetup.cmake delete mode 120000 project/cmake/scripts/freebsd/Install.cmake delete mode 120000 project/cmake/scripts/freebsd/Macros.cmake delete mode 120000 project/cmake/scripts/freebsd/PathSetup.cmake delete mode 100644 project/cmake/scripts/ios/ArchSetup.cmake delete mode 100644 project/cmake/scripts/ios/Install.cmake delete mode 120000 project/cmake/scripts/ios/Macros.cmake delete mode 120000 project/cmake/scripts/ios/PathSetup.cmake delete mode 100644 project/cmake/scripts/linux/ArchSetup.cmake delete mode 100644 project/cmake/scripts/linux/CodeCoverage.cmake delete mode 100644 project/cmake/scripts/linux/ExtraTargets.cmake delete mode 100644 project/cmake/scripts/linux/Install.cmake delete mode 100644 project/cmake/scripts/linux/Macros.cmake delete mode 100644 project/cmake/scripts/linux/PathSetup.cmake delete mode 100644 project/cmake/scripts/osx/ArchSetup.cmake delete mode 100644 project/cmake/scripts/osx/ExtraTargets.cmake delete mode 100644 project/cmake/scripts/osx/Install.cmake delete mode 100644 project/cmake/scripts/osx/Macros.cmake delete mode 100644 project/cmake/scripts/osx/PathSetup.cmake delete mode 100644 project/cmake/scripts/rbpi/ArchSetup.cmake delete mode 120000 project/cmake/scripts/rbpi/Install.cmake delete mode 120000 project/cmake/scripts/rbpi/Macros.cmake delete mode 120000 project/cmake/scripts/rbpi/PathSetup.cmake delete mode 100644 project/cmake/scripts/windows/ArchSetup.cmake delete mode 100644 project/cmake/scripts/windows/CFlagOverrides.cmake delete mode 100644 project/cmake/scripts/windows/CXXFlagOverrides.cmake delete mode 100644 project/cmake/scripts/windows/Install.cmake delete mode 100644 project/cmake/scripts/windows/Macros.cmake delete mode 100644 project/cmake/scripts/windows/PathSetup.cmake delete mode 100644 project/cmake/scripts/windows/tools/patch.cmake delete mode 100644 project/cmake/treedata/android/subdirs.txt delete mode 100644 project/cmake/treedata/common/addons.txt delete mode 100644 project/cmake/treedata/common/cores.txt delete mode 100644 project/cmake/treedata/common/events.txt delete mode 100644 project/cmake/treedata/common/externals.txt delete mode 100644 project/cmake/treedata/common/filesystem.txt delete mode 100644 project/cmake/treedata/common/games.txt delete mode 100644 project/cmake/treedata/common/interfaces.txt delete mode 100644 project/cmake/treedata/common/music.txt delete mode 100644 project/cmake/treedata/common/network.txt delete mode 100644 project/cmake/treedata/common/peripherals.txt delete mode 100644 project/cmake/treedata/common/profiles.txt delete mode 100644 project/cmake/treedata/common/pvr.txt delete mode 100644 project/cmake/treedata/common/settings.txt delete mode 100644 project/cmake/treedata/common/subdirs.txt delete mode 100644 project/cmake/treedata/common/tests.txt delete mode 100644 project/cmake/treedata/common/video.txt delete mode 100644 project/cmake/treedata/common/videoplayer.txt delete mode 100644 project/cmake/treedata/freebsd/subdirs.txt delete mode 100644 project/cmake/treedata/ios/subdirs.txt delete mode 100644 project/cmake/treedata/linux/subdirs.txt delete mode 100644 project/cmake/treedata/optional/common/X11.txt delete mode 100644 project/cmake/treedata/optional/common/cdrip.txt delete mode 100644 project/cmake/treedata/optional/common/dacp.txt delete mode 100644 project/cmake/treedata/optional/common/mir.txt delete mode 100644 project/cmake/treedata/optional/common/nonfree.txt delete mode 100644 project/cmake/treedata/optional/common/opengl.txt delete mode 100644 project/cmake/treedata/optional/common/opengles.txt delete mode 100644 project/cmake/treedata/optional/common/upnp.txt delete mode 100644 project/cmake/treedata/optional/common/webserver.txt delete mode 100644 project/cmake/treedata/osx/subdirs.txt delete mode 100644 project/cmake/treedata/rbpi/omxplayer.txt delete mode 100644 project/cmake/treedata/rbpi/subdirs.txt delete mode 100644 project/cmake/treedata/windows/externals.txt delete mode 100644 project/cmake/treedata/windows/subdirs.txt create mode 100644 xbmc/addons/kodi-addon-dev-kit/.gitignore create mode 100644 xbmc/addons/kodi-addon-dev-kit/doxygen/Doxyfile create mode 100644 xbmc/addons/kodi-addon-dev-kit/doxygen/DoxygenLayout.xml create mode 100644 xbmc/addons/kodi-addon-dev-kit/doxygen/General/DoxygenOnAddon.dox create mode 100644 xbmc/addons/kodi-addon-dev-kit/doxygen/General/General.dox create mode 100644 xbmc/addons/kodi-addon-dev-kit/doxygen/Modules/logo-python.png create mode 100644 xbmc/addons/kodi-addon-dev-kit/doxygen/Modules/modules_general.dox create mode 100644 xbmc/addons/kodi-addon-dev-kit/doxygen/Modules/modules_python.dox create mode 100644 xbmc/addons/kodi-addon-dev-kit/doxygen/Skin/skin.dox create mode 100644 xbmc/addons/kodi-addon-dev-kit/doxygen/kodi-dev.png create mode 100644 xbmc/addons/kodi-addon-dev-kit/doxygen/main.txt create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/NOTE create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/AddonBase.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/AudioEngine.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/Filesystem.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/General.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/Network.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/addon-instance/Screensaver.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogContextMenu.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogExtendedProgress.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogFileBrowser.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogKeyboard.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogNumeric.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogOK.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogProgress.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogSelect.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogTextViewer.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/DialogYesNo.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/General.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/ListItem.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/Window.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/gui/definitions.h delete mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_audioengine_types.h delete mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_callbacks.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_imagedec_dll.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_imagedec_types.h delete mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_peripheral_callbacks.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_vfs_dll.h delete mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_audioengine.h delete mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_codec.h create mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/versions.h delete mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_addon_cpp_dll.h delete mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_codec_types.h delete mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_scr_dll.h delete mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_scr_types.h delete mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/xbmc_stream_utils.hpp create mode 100644 xbmc/cores/VideoPlayer/DVDDemuxers/DemuxCrypto.h delete mode 100644 xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxPacket.h create mode 100644 xbmc/input/ActionIDs.h diff --git a/addons/library.kodi.guilib/libKODI_guilib.h b/addons/library.kodi.guilib/libKODI_guilib.h deleted file mode 100644 index 26be664..0000000 --- a/addons/library.kodi.guilib/libKODI_guilib.h +++ /dev/null @@ -1,845 +0,0 @@ -#pragma once -/* - * Copyright (C) 2005-2013 Team XBMC - * http://xbmc.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, see - * . - * - */ - -#include -#include -#include -#include -#include -#include "libXBMC_addon.h" - -typedef void* GUIHANDLE; - -#ifdef _WIN32 -#define GUI_HELPER_DLL "\\library.kodi.guilib\\libKODI_guilib" ADDON_HELPER_EXT -#else -#define GUI_HELPER_DLL_NAME "libKODI_guilib-" ADDON_HELPER_ARCH ADDON_HELPER_EXT -#define GUI_HELPER_DLL "/library.kodi.guilib/" GUI_HELPER_DLL_NAME -#endif - -/* current ADDONGUI API version */ -#define KODI_GUILIB_API_VERSION "5.8.0" - -/* min. ADDONGUI API version */ -#define KODI_GUILIB_MIN_API_VERSION "5.8.0" - -#define ADDON_ACTION_PREVIOUS_MENU 10 -#define ADDON_ACTION_CLOSE_DIALOG 51 -#define ADDON_ACTION_NAV_BACK 92 - -class CAddonGUIWindow; -class CAddonGUISpinControl; -class CAddonGUIRadioButton; -class CAddonGUIProgressControl; -class CAddonListItem; -class CAddonGUIRenderingControl; -class CAddonGUISliderControl; -class CAddonGUISettingsSliderControl; - -class CHelper_libKODI_guilib -{ -public: - CHelper_libKODI_guilib() - { - m_libKODI_guilib = NULL; - m_Handle = NULL; - } - - ~CHelper_libKODI_guilib() - { - if (m_libKODI_guilib) - { - GUI_unregister_me(m_Handle, m_Callbacks); - dlclose(m_libKODI_guilib); - } - } - - bool RegisterMe(void *Handle) - { - m_Handle = Handle; - - std::string libBasePath; - libBasePath = ((cb_array*)m_Handle)->libPath; - libBasePath += GUI_HELPER_DLL; - -#if defined(ANDROID) - struct stat st; - if(stat(libBasePath.c_str(),&st) != 0) - { - std::string tempbin = getenv("XBMC_ANDROID_LIBS"); - libBasePath = tempbin + "/" + GUI_HELPER_DLL_NAME; - } -#endif - - m_libKODI_guilib = dlopen(libBasePath.c_str(), RTLD_LAZY); - if (m_libKODI_guilib == NULL) - { - fprintf(stderr, "Unable to load %s\n", dlerror()); - return false; - } - - GUI_register_me = (void* (*)(void *HANDLE)) - dlsym(m_libKODI_guilib, "GUI_register_me"); - if (GUI_register_me == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_unregister_me = (void (*)(void *HANDLE, void *CB)) - dlsym(m_libKODI_guilib, "GUI_unregister_me"); - if (GUI_unregister_me == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_lock = (void (*)(void *HANDLE, void *CB)) - dlsym(m_libKODI_guilib, "GUI_lock"); - if (GUI_lock == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_unlock = (void (*)(void *HANDLE, void *CB)) - dlsym(m_libKODI_guilib, "GUI_unlock"); - if (GUI_unlock == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_get_screen_height = (int (*)(void *HANDLE, void *CB)) - dlsym(m_libKODI_guilib, "GUI_get_screen_height"); - if (GUI_get_screen_height == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_get_screen_width = (int (*)(void *HANDLE, void *CB)) - dlsym(m_libKODI_guilib, "GUI_get_screen_width"); - if (GUI_get_screen_width == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_get_video_resolution = (int (*)(void *HANDLE, void *CB)) - dlsym(m_libKODI_guilib, "GUI_get_video_resolution"); - if (GUI_get_video_resolution == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_Window_create = (CAddonGUIWindow* (*)(void *HANDLE, void *CB, const char *xmlFilename, const char *defaultSkin, bool forceFallback, bool asDialog)) - dlsym(m_libKODI_guilib, "GUI_Window_create"); - if (GUI_Window_create == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_Window_destroy = (void (*)(CAddonGUIWindow* p)) - dlsym(m_libKODI_guilib, "GUI_Window_destroy"); - if (GUI_Window_destroy == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_control_get_spin = (CAddonGUISpinControl* (*)(void *HANDLE, void *CB, CAddonGUIWindow *window, int controlId)) - dlsym(m_libKODI_guilib, "GUI_control_get_spin"); - if (GUI_control_get_spin == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_control_release_spin = (void (*)(CAddonGUISpinControl* p)) - dlsym(m_libKODI_guilib, "GUI_control_release_spin"); - if (GUI_control_release_spin == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_control_get_radiobutton = (CAddonGUIRadioButton* (*)(void *HANDLE, void *CB, CAddonGUIWindow *window, int controlId)) - dlsym(m_libKODI_guilib, "GUI_control_get_radiobutton"); - if (GUI_control_get_radiobutton == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_control_release_radiobutton = (void (*)(CAddonGUIRadioButton* p)) - dlsym(m_libKODI_guilib, "GUI_control_release_radiobutton"); - if (GUI_control_release_radiobutton == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_control_get_progress = (CAddonGUIProgressControl* (*)(void *HANDLE, void *CB, CAddonGUIWindow *window, int controlId)) - dlsym(m_libKODI_guilib, "GUI_control_get_progress"); - if (GUI_control_get_progress == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_control_release_progress = (void (*)(CAddonGUIProgressControl* p)) - dlsym(m_libKODI_guilib, "GUI_control_release_progress"); - if (GUI_control_release_progress == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_ListItem_create = (CAddonListItem* (*)(void *HANDLE, void *CB, const char *label, const char *label2, const char *iconImage, const char *thumbnailImage, const char *path)) - dlsym(m_libKODI_guilib, "GUI_ListItem_create"); - if (GUI_ListItem_create == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_ListItem_destroy = (void (*)(CAddonListItem* p)) - dlsym(m_libKODI_guilib, "GUI_ListItem_destroy"); - if (GUI_ListItem_destroy == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_control_get_rendering = (CAddonGUIRenderingControl* (*)(void *HANDLE, void *CB, CAddonGUIWindow *window, int controlId)) - dlsym(m_libKODI_guilib, "GUI_control_get_rendering"); - if (GUI_control_get_rendering == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_control_release_rendering = (void (*)(CAddonGUIRenderingControl* p)) - dlsym(m_libKODI_guilib, "GUI_control_release_rendering"); - if (GUI_control_release_rendering == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_control_get_slider = (CAddonGUISliderControl* (*)(void *HANDLE, void *CB, CAddonGUIWindow *window, int controlId)) - dlsym(m_libKODI_guilib, "GUI_control_get_slider"); - if (GUI_control_get_slider == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_control_release_slider = (void (*)(CAddonGUISliderControl* p)) - dlsym(m_libKODI_guilib, "GUI_control_release_slider"); - if (GUI_control_release_slider == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_control_get_settings_slider = (CAddonGUISettingsSliderControl* (*)(void *HANDLE, void *CB, CAddonGUIWindow *window, int controlId)) - dlsym(m_libKODI_guilib, "GUI_control_get_settings_slider"); - if (GUI_control_get_settings_slider == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_control_release_settings_slider = (void (*)(CAddonGUISettingsSliderControl* p)) - dlsym(m_libKODI_guilib, "GUI_control_release_settings_slider"); - if (GUI_control_release_settings_slider == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_keyboard_show_and_get_input_with_head = (bool (*)(void *HANDLE, void *CB, char &aTextString, unsigned int iMaxStringSize, const char *heading, bool allowEmptyResult, bool hiddenInput, unsigned int autoCloseMs)) - dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_get_input_with_head"); - if (GUI_dialog_keyboard_show_and_get_input_with_head == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_keyboard_show_and_get_input = (bool (*)(void *HANDLE, void *CB, char &aTextString, unsigned int iMaxStringSize, bool allowEmptyResult, unsigned int autoCloseMs)) - dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_get_input"); - if (GUI_dialog_keyboard_show_and_get_input == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_keyboard_show_and_get_new_password_with_head = (bool (*)(void *HANDLE, void *CB, char &newPassword, unsigned int iMaxStringSize, const char *heading, bool allowEmptyResult, unsigned int autoCloseMs)) - dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_get_new_password_with_head"); - if (GUI_dialog_keyboard_show_and_get_new_password_with_head == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_keyboard_show_and_get_new_password = (bool (*)(void *HANDLE, void *CB, char &strNewPassword, unsigned int iMaxStringSize, unsigned int autoCloseMs)) - dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_get_new_password"); - if (GUI_dialog_keyboard_show_and_get_new_password == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_keyboard_show_and_verify_new_password_with_head = (bool (*)(void *HANDLE, void *CB, char &strNewPassword, unsigned int iMaxStringSize, const char *heading, bool allowEmptyResult, unsigned int autoCloseMs)) - dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_verify_new_password_with_head"); - if (GUI_dialog_keyboard_show_and_verify_new_password_with_head == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_keyboard_show_and_verify_new_password = (bool (*)(void *HANDLE, void *CB, char &strNewPassword, unsigned int iMaxStringSize, unsigned int autoCloseMs)) - dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_verify_new_password"); - if (GUI_dialog_keyboard_show_and_verify_new_password == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_keyboard_show_and_verify_password = (int (*)(void *HANDLE, void *CB, char &strPassword, unsigned int iMaxStringSize, const char *strHeading, int iRetries, unsigned int autoCloseMs)) - dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_verify_password"); - if (GUI_dialog_keyboard_show_and_verify_password == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_keyboard_show_and_get_filter = (bool (*)(void *HANDLE, void *CB, char &aTextString, unsigned int iMaxStringSize, bool searching, unsigned int autoCloseMs)) - dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_show_and_get_filter"); - if (GUI_dialog_keyboard_show_and_get_filter == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_keyboard_send_text_to_active_keyboard = (bool (*)(void *HANDLE, void *CB, const char *aTextString, bool closeKeyboard)) - dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_send_text_to_active_keyboard"); - if (GUI_dialog_keyboard_send_text_to_active_keyboard == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_keyboard_is_activated = (bool (*)(void *HANDLE, void *CB)) - dlsym(m_libKODI_guilib, "GUI_dialog_keyboard_is_activated"); - if (GUI_dialog_keyboard_is_activated == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_numeric_show_and_verify_new_password = (bool (*)(void *HANDLE, void *CB, char &strNewPassword, unsigned int iMaxStringSize)) - dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_verify_new_password"); - if (GUI_dialog_numeric_show_and_verify_new_password == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_numeric_show_and_verify_password = (int (*)(void *HANDLE, void *CB, char &strPassword, unsigned int iMaxStringSize, const char *strHeading, int iRetries)) - dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_verify_password"); - if (GUI_dialog_numeric_show_and_verify_password == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_numeric_show_and_verify_input = (bool (*)(void *HANDLE, void *CB, char &strPassword, unsigned int iMaxStringSize, const char *strHeading, bool bGetUserInput)) - dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_verify_input"); - if (GUI_dialog_numeric_show_and_verify_input == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_numeric_show_and_get_time = (bool (*)(void *HANDLE, void *CB, tm &time, const char *strHeading)) - dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_get_time"); - if (GUI_dialog_numeric_show_and_get_time == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_numeric_show_and_get_date = (bool (*)(void *HANDLE, void *CB, tm &date, const char *strHeading)) - dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_get_date"); - if (GUI_dialog_numeric_show_and_get_date == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_numeric_show_and_get_ipaddress = (bool (*)(void *HANDLE, void *CB, char &IPAddress, unsigned int iMaxStringSize, const char *strHeading)) - dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_get_ipaddress"); - if (GUI_dialog_numeric_show_and_get_ipaddress == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_numeric_show_and_get_number = (bool (*)(void *HANDLE, void *CB, char &strInput, unsigned int iMaxStringSize, const char *strHeading, unsigned int iAutoCloseTimeoutMs)) - dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_get_number"); - if (GUI_dialog_numeric_show_and_get_number == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_numeric_show_and_get_seconds = (bool (*)(void *HANDLE, void *CB, char &strTime, unsigned int iMaxStringSize, const char *strHeading)) - dlsym(m_libKODI_guilib, "GUI_dialog_numeric_show_and_get_seconds"); - if (GUI_dialog_numeric_show_and_get_seconds == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_filebrowser_show_and_get_file = (bool (*)(void *HANDLE, void *CB, const char *directory, const char *mask, const char *heading, char &path, unsigned int iMaxStringSize, bool useThumbs, bool useFileDirectories, bool singleList)) - dlsym(m_libKODI_guilib, "GUI_dialog_filebrowser_show_and_get_file"); - if (GUI_dialog_filebrowser_show_and_get_file == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_ok_show_and_get_input_single_text = (void (*)(void *HANDLE, void *CB, const char *heading, const char *text)) - dlsym(m_libKODI_guilib, "GUI_dialog_ok_show_and_get_input_single_text"); - if (GUI_dialog_ok_show_and_get_input_single_text == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_ok_show_and_get_input_line_text = (void (*)(void *HANDLE, void *CB, const char *heading, const char *line0, const char *line1, const char *line2)) - dlsym(m_libKODI_guilib, "GUI_dialog_ok_show_and_get_input_line_text"); - if (GUI_dialog_ok_show_and_get_input_line_text == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_yesno_show_and_get_input_singletext = (bool (*)(void *HANDLE, void *CB, const char *heading, const char *text, bool& bCanceled, const char *noLabel, const char *yesLabel)) - dlsym(m_libKODI_guilib, "GUI_dialog_yesno_show_and_get_input_singletext"); - if (GUI_dialog_yesno_show_and_get_input_singletext == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_yesno_show_and_get_input_linetext = (bool (*)(void *HANDLE, void *CB, const char *heading, const char *line0, const char *line1, const char *line2, const char *noLabel, const char *yesLabel)) - dlsym(m_libKODI_guilib, "GUI_dialog_yesno_show_and_get_input_linetext"); - if (GUI_dialog_yesno_show_and_get_input_linetext == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_yesno_show_and_get_input_linebuttontext = (bool (*)(void *HANDLE, void *CB, const char *heading, const char *line0, const char *line1, const char *line2, bool &bCanceled, const char *noLabel, const char *yesLabel)) - dlsym(m_libKODI_guilib, "GUI_dialog_yesno_show_and_get_input_linebuttontext"); - if (GUI_dialog_yesno_show_and_get_input_linebuttontext == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_text_viewer = (void (*)(void *hdl, void *cb, const char *heading, const char *text)) - dlsym(m_libKODI_guilib, "GUI_dialog_text_viewer"); - if (GUI_dialog_text_viewer == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - GUI_dialog_select = (int (*)(void *hdl, void *cb, const char *heading, const char *entries[], unsigned int size, int selected)) - dlsym(m_libKODI_guilib, "GUI_dialog_select"); - if (GUI_dialog_select == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - m_Callbacks = GUI_register_me(m_Handle); - return m_Callbacks != NULL; - } - - void Lock() - { - return GUI_lock(m_Handle, m_Callbacks); - } - - void Unlock() - { - return GUI_unlock(m_Handle, m_Callbacks); - } - - int GetScreenHeight() - { - return GUI_get_screen_height(m_Handle, m_Callbacks); - } - - int GetScreenWidth() - { - return GUI_get_screen_width(m_Handle, m_Callbacks); - } - - int GetVideoResolution() - { - return GUI_get_video_resolution(m_Handle, m_Callbacks); - } - - CAddonGUIWindow* Window_create(const char *xmlFilename, const char *defaultSkin, bool forceFallback, bool asDialog) - { - return GUI_Window_create(m_Handle, m_Callbacks, xmlFilename, defaultSkin, forceFallback, asDialog); - } - - void Window_destroy(CAddonGUIWindow* p) - { - return GUI_Window_destroy(p); - } - - CAddonGUISpinControl* Control_getSpin(CAddonGUIWindow *window, int controlId) - { - return GUI_control_get_spin(m_Handle, m_Callbacks, window, controlId); - } - - void Control_releaseSpin(CAddonGUISpinControl* p) - { - return GUI_control_release_spin(p); - } - - CAddonGUIRadioButton* Control_getRadioButton(CAddonGUIWindow *window, int controlId) - { - return GUI_control_get_radiobutton(m_Handle, m_Callbacks, window, controlId); - } - - void Control_releaseRadioButton(CAddonGUIRadioButton* p) - { - return GUI_control_release_radiobutton(p); - } - - CAddonGUIProgressControl* Control_getProgress(CAddonGUIWindow *window, int controlId) - { - return GUI_control_get_progress(m_Handle, m_Callbacks, window, controlId); - } - - void Control_releaseProgress(CAddonGUIProgressControl* p) - { - return GUI_control_release_progress(p); - } - - CAddonListItem* ListItem_create(const char *label, const char *label2, const char *iconImage, const char *thumbnailImage, const char *path) - { - return GUI_ListItem_create(m_Handle, m_Callbacks, label, label2, iconImage, thumbnailImage, path); - } - - void ListItem_destroy(CAddonListItem* p) - { - return GUI_ListItem_destroy(p); - } - - CAddonGUIRenderingControl* Control_getRendering(CAddonGUIWindow *window, int controlId) - { - return GUI_control_get_rendering(m_Handle, m_Callbacks, window, controlId); - } - - void Control_releaseRendering(CAddonGUIRenderingControl* p) - { - return GUI_control_release_rendering(p); - } - - CAddonGUISliderControl* Control_getSlider(CAddonGUIWindow *window, int controlId) - { - return GUI_control_get_slider(m_Handle, m_Callbacks, window, controlId); - } - - void Control_releaseSlider(CAddonGUISliderControl* p) - { - return GUI_control_release_slider(p); - } - - CAddonGUISettingsSliderControl* Control_getSettingsSlider(CAddonGUIWindow *window, int controlId) - { - return GUI_control_get_settings_slider(m_Handle, m_Callbacks, window, controlId); - } - - void Control_releaseSettingsSlider(CAddonGUISettingsSliderControl* p) - { - return GUI_control_release_settings_slider(p); - } - - /*! @name GUI Keyboard functions */ - //@{ - bool Dialog_Keyboard_ShowAndGetInput(char &strText, unsigned int iMaxStringSize, const char *strHeading, bool allowEmptyResult, bool hiddenInput, unsigned int autoCloseMs = 0) - { - return GUI_dialog_keyboard_show_and_get_input_with_head(m_Handle, m_Callbacks, strText, iMaxStringSize, strHeading, allowEmptyResult, hiddenInput, autoCloseMs); - } - - bool Dialog_Keyboard_ShowAndGetInput(char &strText, unsigned int iMaxStringSize, bool allowEmptyResult, unsigned int autoCloseMs = 0) - { - return GUI_dialog_keyboard_show_and_get_input(m_Handle, m_Callbacks, strText, iMaxStringSize, allowEmptyResult, autoCloseMs); - } - - bool Dialog_Keyboard_ShowAndGetNewPassword(char &strNewPassword, unsigned int iMaxStringSize, const char *strHeading, bool allowEmptyResult, unsigned int autoCloseMs = 0) - { - return GUI_dialog_keyboard_show_and_get_new_password_with_head(m_Handle, m_Callbacks, strNewPassword, iMaxStringSize, strHeading, allowEmptyResult, autoCloseMs); - } - - bool Dialog_Keyboard_ShowAndGetNewPassword(char &strNewPassword, unsigned int iMaxStringSize, unsigned int autoCloseMs = 0) - { - return GUI_dialog_keyboard_show_and_get_new_password(m_Handle, m_Callbacks, strNewPassword, iMaxStringSize, autoCloseMs); - } - - bool Dialog_Keyboard_ShowAndVerifyNewPassword(char &strNewPassword, unsigned int iMaxStringSize, const char *strHeading, bool allowEmptyResult, unsigned int autoCloseMs = 0) - { - return GUI_dialog_keyboard_show_and_verify_new_password_with_head(m_Handle, m_Callbacks, strNewPassword, iMaxStringSize, strHeading, allowEmptyResult, autoCloseMs); - } - - bool Dialog_Keyboard_ShowAndVerifyNewPassword(char &strNewPassword, unsigned int iMaxStringSize, unsigned int autoCloseMs = 0) - { - return GUI_dialog_keyboard_show_and_verify_new_password(m_Handle, m_Callbacks, strNewPassword, iMaxStringSize, autoCloseMs); - } - - int Dialog_Keyboard_ShowAndVerifyPassword(char &strPassword, unsigned int iMaxStringSize, const char *strHeading, int iRetries, unsigned int autoCloseMs = 0) - { - return GUI_dialog_keyboard_show_and_verify_password(m_Handle, m_Callbacks, strPassword, iMaxStringSize, strHeading, iRetries, autoCloseMs); - } - - bool Dialog_Keyboard_ShowAndGetFilter(char &strText, unsigned int iMaxStringSize, bool searching, unsigned int autoCloseMs = 0) - { - return GUI_dialog_keyboard_show_and_get_filter(m_Handle, m_Callbacks, strText, iMaxStringSize, searching, autoCloseMs); - } - - bool Dialog_Keyboard_SendTextToActiveKeyboard(const char *aTextString, bool closeKeyboard = false) - { - return GUI_dialog_keyboard_send_text_to_active_keyboard(m_Handle, m_Callbacks, aTextString, closeKeyboard); - } - - bool Dialog_Keyboard_isKeyboardActivated() - { - return GUI_dialog_keyboard_is_activated(m_Handle, m_Callbacks); - } - //@} - - /*! @name GUI Numeric functions */ - //@{ - bool Dialog_Numeric_ShowAndVerifyNewPassword(char &strNewPassword, unsigned int iMaxStringSize) - { - return GUI_dialog_numeric_show_and_verify_new_password(m_Handle, m_Callbacks, strNewPassword, iMaxStringSize); - } - - int Dialog_Numeric_ShowAndVerifyPassword(char &strPassword, unsigned int iMaxStringSize, const char *strHeading, int iRetries) - { - return GUI_dialog_numeric_show_and_verify_password(m_Handle, m_Callbacks, strPassword, iMaxStringSize, strHeading, iRetries); - } - - bool Dialog_Numeric_ShowAndVerifyInput(char &strPassword, unsigned int iMaxStringSize, const char *strHeading, bool bGetUserInput) - { - return GUI_dialog_numeric_show_and_verify_input(m_Handle, m_Callbacks, strPassword, iMaxStringSize, strHeading, bGetUserInput); - } - - bool Dialog_Numeric_ShowAndGetTime(tm &time, const char *strHeading) - { - return GUI_dialog_numeric_show_and_get_time(m_Handle, m_Callbacks, time, strHeading); - } - - bool Dialog_Numeric_ShowAndGetDate(tm &date, const char *strHeading) - { - return GUI_dialog_numeric_show_and_get_date(m_Handle, m_Callbacks, date, strHeading); - } - - bool Dialog_Numeric_ShowAndGetIPAddress(char &strIPAddress, unsigned int iMaxStringSize, const char *strHeading) - { - return GUI_dialog_numeric_show_and_get_ipaddress(m_Handle, m_Callbacks, strIPAddress, iMaxStringSize, strHeading); - } - - bool Dialog_Numeric_ShowAndGetNumber(char &strInput, unsigned int iMaxStringSize, const char *strHeading, unsigned int iAutoCloseTimeoutMs = 0) - { - return GUI_dialog_numeric_show_and_get_number(m_Handle, m_Callbacks, strInput, iMaxStringSize, strHeading, iAutoCloseTimeoutMs = 0); - } - - bool Dialog_Numeric_ShowAndGetSeconds(char &strTime, unsigned int iMaxStringSize, const char *strHeading) - { - return GUI_dialog_numeric_show_and_get_seconds(m_Handle, m_Callbacks, strTime, iMaxStringSize, strHeading); - } - //@} - - /*! @name GUI File browser functions */ - //@{ - bool Dialog_FileBrowser_ShowAndGetFile(const char *directory, const char *mask, const char *heading, char &strPath, unsigned int iMaxStringSize, bool useThumbs = false, bool useFileDirectories = false, bool singleList = false) - { - return GUI_dialog_filebrowser_show_and_get_file(m_Handle, m_Callbacks, directory, mask, heading, strPath, iMaxStringSize, useThumbs, useFileDirectories, singleList); - } - //@} - - /*! @name GUI OK Dialog functions */ - //@{ - void Dialog_OK_ShowAndGetInput(const char *heading, const char *text) - { - GUI_dialog_ok_show_and_get_input_single_text(m_Handle, m_Callbacks, heading, text); - } - - void Dialog_OK_ShowAndGetInput(const char *heading, const char *line0, const char *line1, const char *line2) - { - GUI_dialog_ok_show_and_get_input_line_text(m_Handle, m_Callbacks, heading, line0, line1, line2); - } - //@} - - /*! @name GUI Yes No Dialog functions */ - //@{ - bool Dialog_YesNo_ShowAndGetInput(const char *heading, const char *text, bool& bCanceled, const char *noLabel = "", const char *yesLabel = "") - { - return GUI_dialog_yesno_show_and_get_input_singletext(m_Handle, m_Callbacks, heading, text, bCanceled, noLabel, yesLabel); - } - - bool Dialog_YesNo_ShowAndGetInput(const char *heading, const char *line0, const char *line1, const char *line2, const char *noLabel = "", const char *yesLabel = "") - { - return GUI_dialog_yesno_show_and_get_input_linetext(m_Handle, m_Callbacks, heading, line0, line1, line2, noLabel, yesLabel); - } - - bool Dialog_YesNo_ShowAndGetInput(const char *heading, const char *line0, const char *line1, const char *line2, bool &bCanceled, const char *noLabel = "", const char *yesLabel = "") - { - return GUI_dialog_yesno_show_and_get_input_linebuttontext(m_Handle, m_Callbacks, heading, line0, line1, line2, bCanceled, noLabel, yesLabel); - } - //@} - - /*! @name GUI Text viewer Dialog */ - //@{ - void Dialog_TextViewer(const char *heading, const char *text) - { - return GUI_dialog_text_viewer(m_Handle, m_Callbacks, heading, text); - } - //@} - - /*! @name GUI select Dialog */ - //@{ - int Dialog_Select(const char *heading, const char *entries[], unsigned int size, int selected = -1) - { - return GUI_dialog_select(m_Handle, m_Callbacks, heading, entries, size, selected); - } - //@} - -protected: - void* (*GUI_register_me)(void *HANDLE); - void (*GUI_unregister_me)(void *HANDLE, void* CB); - void (*GUI_lock)(void *HANDLE, void* CB); - void (*GUI_unlock)(void *HANDLE, void* CB); - int (*GUI_get_screen_height)(void *HANDLE, void* CB); - int (*GUI_get_screen_width)(void *HANDLE, void* CB); - int (*GUI_get_video_resolution)(void *HANDLE, void* CB); - CAddonGUIWindow* (*GUI_Window_create)(void *HANDLE, void* CB, const char *xmlFilename, const char *defaultSkin, bool forceFallback, bool asDialog); - void (*GUI_Window_destroy)(CAddonGUIWindow* p); - CAddonGUISpinControl* (*GUI_control_get_spin)(void *HANDLE, void* CB, CAddonGUIWindow *window, int controlId); - void (*GUI_control_release_spin)(CAddonGUISpinControl* p); - CAddonGUIRadioButton* (*GUI_control_get_radiobutton)(void *HANDLE, void* CB, CAddonGUIWindow *window, int controlId); - void (*GUI_control_release_radiobutton)(CAddonGUIRadioButton* p); - CAddonGUIProgressControl* (*GUI_control_get_progress)(void *HANDLE, void* CB, CAddonGUIWindow *window, int controlId); - void (*GUI_control_release_progress)(CAddonGUIProgressControl* p); - CAddonListItem* (*GUI_ListItem_create)(void *HANDLE, void* CB, const char *label, const char *label2, const char *iconImage, const char *thumbnailImage, const char *path); - void (*GUI_ListItem_destroy)(CAddonListItem* p); - CAddonGUIRenderingControl* (*GUI_control_get_rendering)(void *HANDLE, void* CB, CAddonGUIWindow *window, int controlId); - void (*GUI_control_release_rendering)(CAddonGUIRenderingControl* p); - CAddonGUISliderControl* (*GUI_control_get_slider)(void *HANDLE, void* CB, CAddonGUIWindow *window, int controlId); - void (*GUI_control_release_slider)(CAddonGUISliderControl* p); - CAddonGUISettingsSliderControl* (*GUI_control_get_settings_slider)(void *HANDLE, void* CB, CAddonGUIWindow *window, int controlId); - void (*GUI_control_release_settings_slider)(CAddonGUISettingsSliderControl* p); - bool (*GUI_dialog_keyboard_show_and_get_input_with_head)(void *HANDLE, void *CB, char &aTextString, unsigned int iMaxStringSize, const char *heading, bool allowEmptyResult, bool hiddenInput, unsigned int autoCloseMs); - bool (*GUI_dialog_keyboard_show_and_get_input)(void *HANDLE, void *CB, char &aTextString, unsigned int iMaxStringSize, bool allowEmptyResult, unsigned int autoCloseMs); - bool (*GUI_dialog_keyboard_show_and_get_new_password_with_head)(void *HANDLE, void *CB, char &newPassword, unsigned int iMaxStringSize, const char *heading, bool allowEmptyResult, unsigned int autoCloseMs); - bool (*GUI_dialog_keyboard_show_and_get_new_password)(void *HANDLE, void *CB, char &strNewPassword, unsigned int iMaxStringSize, unsigned int autoCloseMs); - bool (*GUI_dialog_keyboard_show_and_verify_new_password_with_head)(void *HANDLE, void *CB, char &strNewPassword, unsigned int iMaxStringSize, const char *heading, bool allowEmptyResult, unsigned int autoCloseMs); - bool (*GUI_dialog_keyboard_show_and_verify_new_password)(void *HANDLE, void *CB, char &strNewPassword, unsigned int iMaxStringSize, unsigned int autoCloseMs); - int (*GUI_dialog_keyboard_show_and_verify_password)(void *HANDLE, void *CB, char &strPassword, unsigned int iMaxStringSize, const char *strHeading, int iRetries, unsigned int autoCloseMs); - bool (*GUI_dialog_keyboard_show_and_get_filter)(void *HANDLE, void *CB, char &aTextString, unsigned int iMaxStringSize, bool searching, unsigned int autoCloseMs); - bool (*GUI_dialog_keyboard_send_text_to_active_keyboard)(void *HANDLE, void *CB, const char *aTextString, bool closeKeyboard); - bool (*GUI_dialog_keyboard_is_activated)(void *HANDLE, void *CB); - bool (*GUI_dialog_numeric_show_and_verify_new_password)(void *HANDLE, void *CB, char &strNewPassword, unsigned int iMaxStringSize); - int (*GUI_dialog_numeric_show_and_verify_password)(void *HANDLE, void *CB, char &strPassword, unsigned int iMaxStringSize, const char *strHeading, int iRetries); - bool (*GUI_dialog_numeric_show_and_verify_input)(void *HANDLE, void *CB, char &strPassword, unsigned int iMaxStringSize, const char *strHeading, bool bGetUserInput); - bool (*GUI_dialog_numeric_show_and_get_time)(void *HANDLE, void *CB, tm &time, const char *strHeading); - bool (*GUI_dialog_numeric_show_and_get_date)(void *HANDLE, void *CB, tm &date, const char *strHeading); - bool (*GUI_dialog_numeric_show_and_get_ipaddress)(void *HANDLE, void *CB, char &IPAddress, unsigned int iMaxStringSize, const char *strHeading); - bool (*GUI_dialog_numeric_show_and_get_number)(void *HANDLE, void *CB, char &strInput, unsigned int iMaxStringSize, const char *strHeading, unsigned int iAutoCloseTimeoutMs); - bool (*GUI_dialog_numeric_show_and_get_seconds)(void *HANDLE, void *CB, char &strTime, unsigned int iMaxStringSize, const char *strHeading); - bool (*GUI_dialog_filebrowser_show_and_get_file)(void *HANDLE, void *CB, const char *directory, const char *mask, const char *heading, char &path, unsigned int iMaxStringSize, bool useThumbs, bool useFileDirectories, bool singleList); - void (*GUI_dialog_ok_show_and_get_input_single_text)(void *HANDLE, void *CB, const char *heading, const char *text); - void (*GUI_dialog_ok_show_and_get_input_line_text)(void *HANDLE, void *CB, const char *heading, const char *line0, const char *line1, const char *line2); - bool (*GUI_dialog_yesno_show_and_get_input_singletext)(void *HANDLE, void *CB, const char *heading, const char *text, bool& bCanceled, const char *noLabel, const char *yesLabel); - bool (*GUI_dialog_yesno_show_and_get_input_linetext)(void *HANDLE, void *CB, const char *heading, const char *line0, const char *line1, const char *line2, const char *noLabel, const char *yesLabel); - bool (*GUI_dialog_yesno_show_and_get_input_linebuttontext)(void *HANDLE, void *CB, const char *heading, const char *line0, const char *line1, const char *line2, bool &bCanceled, const char *noLabel, const char *yesLabel); - void (*GUI_dialog_text_viewer)(void *hdl, void *cb, const char *heading, const char *text); - int (*GUI_dialog_select)(void *hdl, void *cb, const char *heading, const char *entries[], unsigned int size, int selected); - -private: - void *m_libKODI_guilib; - void *m_Handle; - void *m_Callbacks; - struct cb_array - { - const char* libPath; - }; -}; - -class CAddonGUISpinControl -{ -public: - CAddonGUISpinControl(void *hdl, void *cb, CAddonGUIWindow *window, int controlId); - virtual ~CAddonGUISpinControl(void) {} - - virtual void SetVisible(bool yesNo); - virtual void SetText(const char *label); - virtual void Clear(); - virtual void AddLabel(const char *label, int iValue); - virtual int GetValue(); - virtual void SetValue(int iValue); - -private: - CAddonGUIWindow *m_Window; - int m_ControlId; - GUIHANDLE m_SpinHandle; - void *m_Handle; - void *m_cb; -}; - -class CAddonGUIRadioButton -{ -public: - CAddonGUIRadioButton(void *hdl, void *cb, CAddonGUIWindow *window, int controlId); - virtual ~CAddonGUIRadioButton() {} - - virtual void SetVisible(bool yesNo); - virtual void SetText(const char *label); - virtual void SetSelected(bool yesNo); - virtual bool IsSelected(); - -private: - CAddonGUIWindow *m_Window; - int m_ControlId; - GUIHANDLE m_ButtonHandle; - void *m_Handle; - void *m_cb; -}; - -class CAddonGUIProgressControl -{ -public: - CAddonGUIProgressControl(void *hdl, void *cb, CAddonGUIWindow *window, int controlId); - virtual ~CAddonGUIProgressControl(void) {} - - virtual void SetPercentage(float fPercent); - virtual float GetPercentage() const; - virtual void SetInfo(int iInfo); - virtual int GetInfo() const; - virtual std::string GetDescription() const; - -private: - CAddonGUIWindow *m_Window; - int m_ControlId; - GUIHANDLE m_ProgressHandle; - void *m_Handle; - void *m_cb; -}; - -class CAddonGUISliderControl -{ -public: - CAddonGUISliderControl(void *hdl, void *cb, CAddonGUIWindow *window, int controlId); - virtual ~CAddonGUISliderControl(void) {} - - virtual void SetVisible(bool yesNo); - virtual std::string GetDescription() const; - - virtual void SetIntRange(int iStart, int iEnd); - virtual void SetIntValue(int iValue); - virtual int GetIntValue() const; - virtual void SetIntInterval(int iInterval); - - virtual void SetPercentage(float fPercent); - virtual float GetPercentage() const; - - virtual void SetFloatRange(float fStart, float fEnd); - virtual void SetFloatValue(float fValue); - virtual float GetFloatValue() const; - virtual void SetFloatInterval(float fInterval); - -private: - CAddonGUIWindow *m_Window; - int m_ControlId; - GUIHANDLE m_SliderHandle; - void *m_Handle; - void *m_cb; -}; - -class CAddonGUISettingsSliderControl -{ -public: - CAddonGUISettingsSliderControl(void *hdl, void *cb, CAddonGUIWindow *window, int controlId); - virtual ~CAddonGUISettingsSliderControl(void) {} - - virtual void SetVisible(bool yesNo); - virtual void SetText(const char *label); - virtual std::string GetDescription() const; - - virtual void SetIntRange(int iStart, int iEnd); - virtual void SetIntValue(int iValue); - virtual int GetIntValue() const; - virtual void SetIntInterval(int iInterval); - - virtual void SetPercentage(float fPercent); - virtual float GetPercentage() const; - - virtual void SetFloatRange(float fStart, float fEnd); - virtual void SetFloatValue(float fValue); - virtual float GetFloatValue() const; - virtual void SetFloatInterval(float fInterval); - -private: - CAddonGUIWindow *m_Window; - int m_ControlId; - GUIHANDLE m_SettingsSliderHandle; - void *m_Handle; - void *m_cb; -}; - -class CAddonListItem -{ -friend class CAddonGUIWindow; - -public: - CAddonListItem(void *hdl, void *cb, const char *label, const char *label2, const char *iconImage, const char *thumbnailImage, const char *path); - virtual ~CAddonListItem(void) {} - - virtual const char *GetLabel(); - virtual void SetLabel(const char *label); - virtual const char *GetLabel2(); - virtual void SetLabel2(const char *label); - virtual void SetIconImage(const char *image); - virtual void SetThumbnailImage(const char *image); - virtual void SetInfo(const char *Info); - virtual void SetProperty(const char *key, const char *value); - virtual const char *GetProperty(const char *key) const; - virtual void SetPath(const char *Path); - -// {(char*)"select(); -// {(char*)"isSelected(); -protected: - GUIHANDLE m_ListItemHandle; - void *m_Handle; - void *m_cb; -}; - -class CAddonGUIWindow -{ -friend class CAddonGUISpinControl; -friend class CAddonGUIRadioButton; -friend class CAddonGUIProgressControl; -friend class CAddonGUIRenderingControl; -friend class CAddonGUISliderControl; -friend class CAddonGUISettingsSliderControl; - -public: - CAddonGUIWindow(void *hdl, void *cb, const char *xmlFilename, const char *defaultSkin, bool forceFallback, bool asDialog); - virtual ~CAddonGUIWindow(); - - virtual bool Show(); - virtual void Close(); - virtual void DoModal(); - virtual bool SetFocusId(int iControlId); - virtual int GetFocusId(); - virtual bool SetCoordinateResolution(int res); - virtual void SetProperty(const char *key, const char *value); - virtual void SetPropertyInt(const char *key, int value); - virtual void SetPropertyBool(const char *key, bool value); - virtual void SetPropertyDouble(const char *key, double value); - virtual const char *GetProperty(const char *key) const; - virtual int GetPropertyInt(const char *key) const; - virtual bool GetPropertyBool(const char *key) const; - virtual double GetPropertyDouble(const char *key) const; - virtual void ClearProperties(); - virtual int GetListSize(); - virtual void ClearList(); - virtual GUIHANDLE AddStringItem(const char *name, int itemPosition = -1); - virtual void AddItem(GUIHANDLE item, int itemPosition = -1); - virtual void AddItem(CAddonListItem *item, int itemPosition = -1); - virtual void RemoveItem(int itemPosition); - virtual GUIHANDLE GetListItem(int listPos); - virtual void SetCurrentListPosition(int listPos); - virtual int GetCurrentListPosition(); - virtual void SetControlLabel(int controlId, const char *label); - virtual void MarkDirtyRegion(); - - virtual bool OnClick(int controlId); - virtual bool OnFocus(int controlId); - virtual bool OnInit(); - virtual bool OnAction(int actionId); - - GUIHANDLE m_cbhdl; - bool (*CBOnInit)(GUIHANDLE cbhdl); - bool (*CBOnFocus)(GUIHANDLE cbhdl, int controlId); - bool (*CBOnClick)(GUIHANDLE cbhdl, int controlId); - bool (*CBOnAction)(GUIHANDLE cbhdl, int actionId); - -protected: - GUIHANDLE m_WindowHandle; - void *m_Handle; - void *m_cb; -}; - -class CAddonGUIRenderingControl -{ -public: - CAddonGUIRenderingControl(void *hdl, void *cb, CAddonGUIWindow *window, int controlId); - virtual ~CAddonGUIRenderingControl(); - virtual void Init(); - - virtual bool Create(int x, int y, int w, int h, void *device); - virtual void Render(); - virtual void Stop(); - virtual bool Dirty(); - - GUIHANDLE m_cbhdl; - bool (*CBCreate)(GUIHANDLE cbhdl, int x, int y, int w, int h, void *device); - void (*CBRender)(GUIHANDLE cbhdl); - void (*CBStop)(GUIHANDLE cbhdl); - bool (*CBDirty)(GUIHANDLE cbhdl); - -private: - CAddonGUIWindow *m_Window; - int m_ControlId; - GUIHANDLE m_RenderingHandle; - void *m_Handle; - void *m_cb; -}; diff --git a/addons/library.xbmc.addon/libXBMC_addon.h b/addons/library.xbmc.addon/libXBMC_addon.h deleted file mode 100644 index c3ed54f..0000000 --- a/addons/library.xbmc.addon/libXBMC_addon.h +++ /dev/null @@ -1,600 +0,0 @@ -#pragma once -/* - * Copyright (C) 2005-2013 Team XBMC - * http://xbmc.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, see - * . - * - */ - -#include -#include -#include -#include -#include -#include -#include - -#ifdef _WIN32 // windows -#ifndef _SSIZE_T_DEFINED -typedef intptr_t ssize_t; -#define _SSIZE_T_DEFINED -#endif // !_SSIZE_T_DEFINED -#include "dlfcn-win32.h" -#define ADDON_DLL "\\library.xbmc.addon\\libXBMC_addon" ADDON_HELPER_EXT -#define ADDON_HELPER_EXT ".dll" -#else -#if defined(__APPLE__) // osx -#if defined(__POWERPC__) -#define ADDON_HELPER_ARCH "powerpc-osx" -#elif defined(__arm__) -#define ADDON_HELPER_ARCH "arm-osx" -#elif defined(__x86_64__) -#define ADDON_HELPER_ARCH "x86-osx" -#else -#define ADDON_HELPER_ARCH "x86-osx" -#endif -#else // linux -#if defined(__x86_64__) -#define ADDON_HELPER_ARCH "x86_64-linux" -#elif defined(_POWERPC) -#define ADDON_HELPER_ARCH "powerpc-linux" -#elif defined(_POWERPC64) -#define ADDON_HELPER_ARCH "powerpc64-linux" -#elif defined(__ARMEL__) -#define ADDON_HELPER_ARCH "arm" -#elif defined(__mips__) -#define ADDON_HELPER_ARCH "mips" -#else -#define ADDON_HELPER_ARCH "i486-linux" -#endif -#endif -#include // linux+osx -#define ADDON_HELPER_EXT ".so" -#define ADDON_DLL_NAME "libXBMC_addon-" ADDON_HELPER_ARCH ADDON_HELPER_EXT -#define ADDON_DLL "/library.xbmc.addon/" ADDON_DLL_NAME -#endif -#if defined(ANDROID) -#include -#endif - -#ifdef LOG_DEBUG -#undef LOG_DEBUG -#endif -#ifdef LOG_INFO -#undef LOG_INFO -#endif -#ifdef LOG_NOTICE -#undef LOG_NOTICE -#endif -#ifdef LOG_ERROR -#undef LOG_ERROR -#endif - -namespace ADDON -{ - typedef enum addon_log - { - LOG_DEBUG, - LOG_INFO, - LOG_NOTICE, - LOG_ERROR - } addon_log_t; - - typedef enum queue_msg - { - QUEUE_INFO, - QUEUE_WARNING, - QUEUE_ERROR - } queue_msg_t; - - class CHelper_libXBMC_addon - { - public: - CHelper_libXBMC_addon() - { - m_libXBMC_addon = NULL; - m_Handle = NULL; - } - - ~CHelper_libXBMC_addon() - { - if (m_libXBMC_addon) - { - XBMC_unregister_me(m_Handle, m_Callbacks); - dlclose(m_libXBMC_addon); - } - } - - bool RegisterMe(void *Handle) - { - m_Handle = Handle; - - std::string libBasePath; - libBasePath = ((cb_array*)m_Handle)->libPath; - libBasePath += ADDON_DLL; - -#if defined(ANDROID) - struct stat st; - if(stat(libBasePath.c_str(),&st) != 0) - { - std::string tempbin = getenv("XBMC_ANDROID_LIBS"); - libBasePath = tempbin + "/" + ADDON_DLL_NAME; - } -#endif - - m_libXBMC_addon = dlopen(libBasePath.c_str(), RTLD_LAZY); - if (m_libXBMC_addon == NULL) - { - fprintf(stderr, "Unable to load %s\n", dlerror()); - return false; - } - - XBMC_register_me = (void* (*)(void *HANDLE)) - dlsym(m_libXBMC_addon, "XBMC_register_me"); - if (XBMC_register_me == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_unregister_me = (void (*)(void* HANDLE, void* CB)) - dlsym(m_libXBMC_addon, "XBMC_unregister_me"); - if (XBMC_unregister_me == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_log = (void (*)(void* HANDLE, void* CB, const addon_log_t loglevel, const char *msg)) - dlsym(m_libXBMC_addon, "XBMC_log"); - if (XBMC_log == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_get_setting = (bool (*)(void* HANDLE, void* CB, const char* settingName, void *settingValue)) - dlsym(m_libXBMC_addon, "XBMC_get_setting"); - if (XBMC_get_setting == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_queue_notification = (void (*)(void* HANDLE, void* CB, const queue_msg_t loglevel, const char *msg)) - dlsym(m_libXBMC_addon, "XBMC_queue_notification"); - if (XBMC_queue_notification == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_wake_on_lan = (bool (*)(void* HANDLE, void *CB, const char *mac)) - dlsym(m_libXBMC_addon, "XBMC_wake_on_lan"); - if (XBMC_wake_on_lan == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_unknown_to_utf8 = (char* (*)(void* HANDLE, void* CB, const char* str)) - dlsym(m_libXBMC_addon, "XBMC_unknown_to_utf8"); - if (XBMC_unknown_to_utf8 == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_get_localized_string = (char* (*)(void* HANDLE, void* CB, int dwCode)) - dlsym(m_libXBMC_addon, "XBMC_get_localized_string"); - if (XBMC_get_localized_string == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_free_string = (void (*)(void* HANDLE, void* CB, char* str)) - dlsym(m_libXBMC_addon, "XBMC_free_string"); - if (XBMC_free_string == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_get_dvd_menu_language = (char* (*)(void* HANDLE, void* CB)) - dlsym(m_libXBMC_addon, "XBMC_get_dvd_menu_language"); - if (XBMC_get_dvd_menu_language == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_open_file = (void* (*)(void* HANDLE, void* CB, const char* strFileName, unsigned int flags)) - dlsym(m_libXBMC_addon, "XBMC_open_file"); - if (XBMC_open_file == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_open_file_for_write = (void* (*)(void* HANDLE, void* CB, const char* strFileName, bool bOverWrite)) - dlsym(m_libXBMC_addon, "XBMC_open_file_for_write"); - if (XBMC_open_file_for_write == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_read_file = (ssize_t (*)(void* HANDLE, void* CB, void* file, void* lpBuf, size_t uiBufSize)) - dlsym(m_libXBMC_addon, "XBMC_read_file"); - if (XBMC_read_file == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_read_file_string = (bool (*)(void* HANDLE, void* CB, void* file, char *szLine, int iLineLength)) - dlsym(m_libXBMC_addon, "XBMC_read_file_string"); - if (XBMC_read_file_string == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_write_file = (ssize_t (*)(void* HANDLE, void* CB, void* file, const void* lpBuf, size_t uiBufSize)) - dlsym(m_libXBMC_addon, "XBMC_write_file"); - if (XBMC_write_file == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_flush_file = (void (*)(void* HANDLE, void* CB, void* file)) - dlsym(m_libXBMC_addon, "XBMC_flush_file"); - if (XBMC_flush_file == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_seek_file = (int64_t (*)(void* HANDLE, void* CB, void* file, int64_t iFilePosition, int iWhence)) - dlsym(m_libXBMC_addon, "XBMC_seek_file"); - if (XBMC_seek_file == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_truncate_file = (int (*)(void* HANDLE, void* CB, void* file, int64_t iSize)) - dlsym(m_libXBMC_addon, "XBMC_truncate_file"); - if (XBMC_truncate_file == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_get_file_position = (int64_t (*)(void* HANDLE, void* CB, void* file)) - dlsym(m_libXBMC_addon, "XBMC_get_file_position"); - if (XBMC_get_file_position == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_get_file_length = (int64_t (*)(void* HANDLE, void* CB, void* file)) - dlsym(m_libXBMC_addon, "XBMC_get_file_length"); - if (XBMC_get_file_length == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_close_file = (void (*)(void* HANDLE, void* CB, void* file)) - dlsym(m_libXBMC_addon, "XBMC_close_file"); - if (XBMC_close_file == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_get_file_chunk_size = (int (*)(void* HANDLE, void* CB, void* file)) - dlsym(m_libXBMC_addon, "XBMC_get_file_chunk_size"); - if (XBMC_get_file_chunk_size == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_file_exists = (bool (*)(void* HANDLE, void* CB, const char *strFileName, bool bUseCache)) - dlsym(m_libXBMC_addon, "XBMC_file_exists"); - if (XBMC_file_exists == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_stat_file = (int (*)(void* HANDLE, void* CB, const char *strFileName, struct __stat64* buffer)) - dlsym(m_libXBMC_addon, "XBMC_stat_file"); - if (XBMC_stat_file == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_delete_file = (bool (*)(void* HANDLE, void* CB, const char *strFileName)) - dlsym(m_libXBMC_addon, "XBMC_delete_file"); - if (XBMC_delete_file == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_can_open_directory = (bool (*)(void* HANDLE, void* CB, const char* strURL)) - dlsym(m_libXBMC_addon, "XBMC_can_open_directory"); - if (XBMC_can_open_directory == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_create_directory = (bool (*)(void* HANDLE, void* CB, const char* strPath)) - dlsym(m_libXBMC_addon, "XBMC_create_directory"); - if (XBMC_create_directory == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_directory_exists = (bool (*)(void* HANDLE, void* CB, const char* strPath)) - dlsym(m_libXBMC_addon, "XBMC_directory_exists"); - if (XBMC_directory_exists == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - XBMC_remove_directory = (bool (*)(void* HANDLE, void* CB, const char* strPath)) - dlsym(m_libXBMC_addon, "XBMC_remove_directory"); - if (XBMC_remove_directory == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - m_Callbacks = XBMC_register_me(m_Handle); - return m_Callbacks != NULL; - } - - /*! - * @brief Add a message to XBMC's log. - * @param loglevel The log level of the message. - * @param format The format of the message to pass to XBMC. - */ - void Log(const addon_log_t loglevel, const char *format, ... ) - { - char buffer[16384]; - va_list args; - va_start (args, format); - vsprintf (buffer, format, args); - va_end (args); - return XBMC_log(m_Handle, m_Callbacks, loglevel, buffer); - } - - /*! - * @brief Get a settings value for this add-on. - * @param settingName The name of the setting to get. - * @param settingValue The value. - * @return True if the settings was fetched successfully, false otherwise. - */ - bool GetSetting(const char* settingName, void *settingValue) - { - return XBMC_get_setting(m_Handle, m_Callbacks, settingName, settingValue); - } - - /*! - * @brief Queue a notification in the GUI. - * @param type The message type. - * @param format The format of the message to pass to display in XBMC. - */ - void QueueNotification(const queue_msg_t type, const char *format, ... ) - { - char buffer[16384]; - va_list args; - va_start (args, format); - vsprintf (buffer, format, args); - va_end (args); - return XBMC_queue_notification(m_Handle, m_Callbacks, type, buffer); - } - - /*! - * @brief Send WakeOnLan magic packet. - * @param mac Network address of the host to wake. - * @return True if the magic packet was successfully sent, false otherwise. - */ - bool WakeOnLan(const char* mac) - { - return XBMC_wake_on_lan(m_Handle, m_Callbacks, mac); - } - - /*! - * @brief Translate a string with an unknown encoding to UTF8. - * @param str The string to translate. - * @return The string translated to UTF8. Must be freed by calling FreeString() when done. - */ - char* UnknownToUTF8(const char* str) - { - return XBMC_unknown_to_utf8(m_Handle, m_Callbacks, str); - } - - /*! - * @brief Get a localised message. - * @param dwCode The code of the message to get. - * @return The message. Must be freed by calling FreeString() when done. - */ - char* GetLocalizedString(int dwCode) - { - return XBMC_get_localized_string(m_Handle, m_Callbacks, dwCode); - } - - - /*! - * @brief Get the DVD menu language. - * @return The language. Must be freed by calling FreeString() when done. - */ - char* GetDVDMenuLanguage() - { - return XBMC_get_dvd_menu_language(m_Handle, m_Callbacks); - } - - /*! - * @brief Free the memory used by str - * @param str The string to free - */ - void FreeString(char* str) - { - return XBMC_free_string(m_Handle, m_Callbacks, str); - } - - /*! - * @brief Open the file with filename via XBMC's CFile. Needs to be closed by calling CloseFile() when done. - * @param strFileName The filename to open. - * @param flags The flags to pass. Documented in XBMC's File.h - * @return A handle for the file, or NULL if it couldn't be opened. - */ - void* OpenFile(const char* strFileName, unsigned int flags) - { - return XBMC_open_file(m_Handle, m_Callbacks, strFileName, flags); - } - - /*! - * @brief Open the file with filename via XBMC's CFile in write mode. Needs to be closed by calling CloseFile() when done. - * @param strFileName The filename to open. - * @param bOverWrite True to overwrite, false otherwise. - * @return A handle for the file, or NULL if it couldn't be opened. - */ - void* OpenFileForWrite(const char* strFileName, bool bOverWrite) - { - return XBMC_open_file_for_write(m_Handle, m_Callbacks, strFileName, bOverWrite); - } - - /*! - * @brief Read from an open file. - * @param file The file handle to read from. - * @param lpBuf The buffer to store the data in. - * @param uiBufSize The size of the buffer. - * @return number of successfully read bytes if any bytes were read and stored in - * buffer, zero if no bytes are available to read (end of file was reached) - * or undetectable error occur, -1 in case of any explicit error - */ - ssize_t ReadFile(void* file, void* lpBuf, size_t uiBufSize) - { - return XBMC_read_file(m_Handle, m_Callbacks, file, lpBuf, uiBufSize); - } - - /*! - * @brief Read a string from an open file. - * @param file The file handle to read from. - * @param szLine The buffer to store the data in. - * @param iLineLength The size of the buffer. - * @return True when a line was read, false otherwise. - */ - bool ReadFileString(void* file, char *szLine, int iLineLength) - { - return XBMC_read_file_string(m_Handle, m_Callbacks, file, szLine, iLineLength); - } - - /*! - * @brief Write to a file opened in write mode. - * @param file The file handle to write to. - * @param lpBuf The data to write. - * @param uiBufSize Size of the data to write. - * @return number of successfully written bytes if any bytes were written, - * zero if no bytes were written and no detectable error occur, - * -1 in case of any explicit error - */ - ssize_t WriteFile(void* file, const void* lpBuf, size_t uiBufSize) - { - return XBMC_write_file(m_Handle, m_Callbacks, file, lpBuf, uiBufSize); - } - - /*! - * @brief Flush buffered data. - * @param file The file handle to flush the data for. - */ - void FlushFile(void* file) - { - return XBMC_flush_file(m_Handle, m_Callbacks, file); - } - - /*! - * @brief Seek in an open file. - * @param file The file handle to see in. - * @param iFilePosition The new position. - * @param iWhence Seek argument. See stdio.h for possible values. - * @return The new position. - */ - int64_t SeekFile(void* file, int64_t iFilePosition, int iWhence) - { - return XBMC_seek_file(m_Handle, m_Callbacks, file, iFilePosition, iWhence); - } - - /*! - * @brief Truncate a file to the requested size. - * @param file The file handle to truncate. - * @param iSize The new max size. - * @return New size? - */ - int TruncateFile(void* file, int64_t iSize) - { - return XBMC_truncate_file(m_Handle, m_Callbacks, file, iSize); - } - - /*! - * @brief The current position in an open file. - * @param file The file handle to get the position for. - * @return The requested position. - */ - int64_t GetFilePosition(void* file) - { - return XBMC_get_file_position(m_Handle, m_Callbacks, file); - } - - /*! - * @brief Get the file size of an open file. - * @param file The file to get the size for. - * @return The requested size. - */ - int64_t GetFileLength(void* file) - { - return XBMC_get_file_length(m_Handle, m_Callbacks, file); - } - - /*! - * @brief Close an open file. - * @param file The file handle to close. - */ - void CloseFile(void* file) - { - return XBMC_close_file(m_Handle, m_Callbacks, file); - } - - /*! - * @brief Get the chunk size for an open file. - * @param file the file handle to get the size for. - * @return The requested size. - */ - int GetFileChunkSize(void* file) - { - return XBMC_get_file_chunk_size(m_Handle, m_Callbacks, file); - } - - /*! - * @brief Check if a file exists. - * @param strFileName The filename to check. - * @param bUseCache Check in file cache. - * @return true if the file exists false otherwise. - */ - bool FileExists(const char *strFileName, bool bUseCache) - { - return XBMC_file_exists(m_Handle, m_Callbacks, strFileName, bUseCache); - } - - /*! - * @brief Reads file status. - * @param strFileName The filename to read the status from. - * @param buffer The file status is written into this buffer. - * @return The file status was successfully read. - */ - int StatFile(const char *strFileName, struct __stat64* buffer) - { - return XBMC_stat_file(m_Handle, m_Callbacks, strFileName, buffer); - } - - /*! - * @brief Deletes a file. - * @param strFileName The filename to delete. - * @return The file was successfully deleted. - */ - bool DeleteFile(const char *strFileName) - { - return XBMC_delete_file(m_Handle, m_Callbacks, strFileName); - } - - /*! - * @brief Checks whether a directory can be opened. - * @param strUrl The URL of the directory to check. - * @return True when it can be opened, false otherwise. - */ - bool CanOpenDirectory(const char* strUrl) - { - return XBMC_can_open_directory(m_Handle, m_Callbacks, strUrl); - } - - /*! - * @brief Creates a directory. - * @param strPath Path to the directory. - * @return True when it was created, false otherwise. - */ - bool CreateDirectory(const char *strPath) - { - return XBMC_create_directory(m_Handle, m_Callbacks, strPath); - } - - /*! - * @brief Checks if a directory exists. - * @param strPath Path to the directory. - * @return True when it exists, false otherwise. - */ - bool DirectoryExists(const char *strPath) - { - return XBMC_directory_exists(m_Handle, m_Callbacks, strPath); - } - - /*! - * @brief Removes a directory. - * @param strPath Path to the directory. - * @return True when it was removed, false otherwise. - */ - bool RemoveDirectory(const char *strPath) - { - return XBMC_remove_directory(m_Handle, m_Callbacks, strPath); - } - - protected: - void* (*XBMC_register_me)(void *HANDLE); - void (*XBMC_unregister_me)(void *HANDLE, void* CB); - void (*XBMC_log)(void *HANDLE, void* CB, const addon_log_t loglevel, const char *msg); - bool (*XBMC_get_setting)(void *HANDLE, void* CB, const char* settingName, void *settingValue); - void (*XBMC_queue_notification)(void *HANDLE, void* CB, const queue_msg_t type, const char *msg); - bool (*XBMC_wake_on_lan)(void *HANDLE, void* CB, const char* mac); - char* (*XBMC_unknown_to_utf8)(void *HANDLE, void* CB, const char* str); - char* (*XBMC_get_localized_string)(void *HANDLE, void* CB, int dwCode); - char* (*XBMC_get_dvd_menu_language)(void *HANDLE, void* CB); - void (*XBMC_free_string)(void *HANDLE, void* CB, char* str); - void* (*XBMC_open_file)(void *HANDLE, void* CB, const char* strFileName, unsigned int flags); - void* (*XBMC_open_file_for_write)(void *HANDLE, void* CB, const char* strFileName, bool bOverWrite); - ssize_t (*XBMC_read_file)(void *HANDLE, void* CB, void* file, void* lpBuf, size_t uiBufSize); - bool (*XBMC_read_file_string)(void *HANDLE, void* CB, void* file, char *szLine, int iLineLength); - ssize_t(*XBMC_write_file)(void *HANDLE, void* CB, void* file, const void* lpBuf, size_t uiBufSize); - void (*XBMC_flush_file)(void *HANDLE, void* CB, void* file); - int64_t (*XBMC_seek_file)(void *HANDLE, void* CB, void* file, int64_t iFilePosition, int iWhence); - int (*XBMC_truncate_file)(void *HANDLE, void* CB, void* file, int64_t iSize); - int64_t (*XBMC_get_file_position)(void *HANDLE, void* CB, void* file); - int64_t (*XBMC_get_file_length)(void *HANDLE, void* CB, void* file); - void (*XBMC_close_file)(void *HANDLE, void* CB, void* file); - int (*XBMC_get_file_chunk_size)(void *HANDLE, void* CB, void* file); - bool (*XBMC_file_exists)(void *HANDLE, void* CB, const char *strFileName, bool bUseCache); - int (*XBMC_stat_file)(void *HANDLE, void* CB, const char *strFileName, struct __stat64* buffer); - bool (*XBMC_delete_file)(void *HANDLE, void* CB, const char *strFileName); - bool (*XBMC_can_open_directory)(void *HANDLE, void* CB, const char* strURL); - bool (*XBMC_create_directory)(void *HANDLE, void* CB, const char* strPath); - bool (*XBMC_directory_exists)(void *HANDLE, void* CB, const char* strPath); - bool (*XBMC_remove_directory)(void *HANDLE, void* CB, const char* strPath); - - private: - void *m_libXBMC_addon; - void *m_Handle; - void *m_Callbacks; - struct cb_array - { - const char* libPath; - }; - }; -}; diff --git a/addons/library.xbmc.codec/libXBMC_codec.h b/addons/library.xbmc.codec/libXBMC_codec.h deleted file mode 100644 index 3853f08..0000000 --- a/addons/library.xbmc.codec/libXBMC_codec.h +++ /dev/null @@ -1,124 +0,0 @@ -#pragma once -/* - * Copyright (C) 2005-2013 Team XBMC - * http://xbmc.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, see - * . - * - */ - -#include -#include -#include -#include -#include -#include "xbmc_codec_types.h" -#include "libXBMC_addon.h" - -#ifdef _WIN32 -#define CODEC_HELPER_DLL "\\library.xbmc.codec\\libXBMC_codec" ADDON_HELPER_EXT -#else -#define CODEC_HELPER_DLL_NAME "libXBMC_codec-" ADDON_HELPER_ARCH ADDON_HELPER_EXT -#define CODEC_HELPER_DLL "/library.xbmc.codec/" CODEC_HELPER_DLL_NAME -#endif - -class CHelper_libXBMC_codec -{ -public: - CHelper_libXBMC_codec(void) - { - m_libXBMC_codec = NULL; - m_Handle = NULL; - } - - ~CHelper_libXBMC_codec(void) - { - if (m_libXBMC_codec) - { - CODEC_unregister_me(m_Handle, m_Callbacks); - dlclose(m_libXBMC_codec); - } - } - - /*! - * @brief Resolve all callback methods - * @param handle Pointer to the add-on - * @return True when all methods were resolved, false otherwise. - */ - bool RegisterMe(void* handle) - { - m_Handle = handle; - - std::string libBasePath; - libBasePath = ((cb_array*)m_Handle)->libPath; - libBasePath += CODEC_HELPER_DLL; - -#if defined(ANDROID) - struct stat st; - if(stat(libBasePath.c_str(),&st) != 0) - { - std::string tempbin = getenv("XBMC_ANDROID_LIBS"); - libBasePath = tempbin + "/" + CODEC_HELPER_DLL_NAME; - } -#endif - - m_libXBMC_codec = dlopen(libBasePath.c_str(), RTLD_LAZY); - if (m_libXBMC_codec == NULL) - { - fprintf(stderr, "Unable to load %s\n", dlerror()); - return false; - } - - CODEC_register_me = (void* (*)(void *HANDLE)) - dlsym(m_libXBMC_codec, "CODEC_register_me"); - if (CODEC_register_me == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - CODEC_unregister_me = (void (*)(void* HANDLE, void* CB)) - dlsym(m_libXBMC_codec, "CODEC_unregister_me"); - if (CODEC_unregister_me == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - CODEC_get_codec_by_name = (xbmc_codec_t (*)(void* HANDLE, void* CB, const char* strCodecName)) - dlsym(m_libXBMC_codec, "CODEC_get_codec_by_name"); - if (CODEC_get_codec_by_name == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - m_Callbacks = CODEC_register_me(m_Handle); - return m_Callbacks != NULL; - } - - /*! - * @brief Get the codec id used by XBMC - * @param strCodecName The name of the codec - * @return The codec_id, or a codec_id with 0 values when not supported - */ - xbmc_codec_t GetCodecByName(const char* strCodecName) - { - return CODEC_get_codec_by_name(m_Handle, m_Callbacks, strCodecName); - } - -protected: - void* (*CODEC_register_me)(void*); - void (*CODEC_unregister_me)(void*, void*); - xbmc_codec_t (*CODEC_get_codec_by_name)(void *HANDLE, void* CB, const char* strCodecName); - -private: - void* m_libXBMC_codec; - void* m_Handle; - void* m_Callbacks; - struct cb_array - { - const char* libPath; - }; -}; - diff --git a/addons/library.xbmc.pvr/libXBMC_pvr.h b/addons/library.xbmc.pvr/libXBMC_pvr.h deleted file mode 100644 index 3116514..0000000 --- a/addons/library.xbmc.pvr/libXBMC_pvr.h +++ /dev/null @@ -1,332 +0,0 @@ -#pragma once -/* - * Copyright (C) 2005-2013 Team XBMC - * http://xbmc.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with XBMC; see the file COPYING. If not, see - * . - * - */ - -#include -#include -#include -#include -#include -#include "xbmc_pvr_types.h" -#include "libXBMC_addon.h" - -#ifdef _WIN32 -#define PVR_HELPER_DLL "\\library.xbmc.pvr\\libXBMC_pvr" ADDON_HELPER_EXT -#else -#define PVR_HELPER_DLL_NAME "libXBMC_pvr-" ADDON_HELPER_ARCH ADDON_HELPER_EXT -#define PVR_HELPER_DLL "/library.xbmc.pvr/" PVR_HELPER_DLL_NAME -#endif - -#define DVD_TIME_BASE 1000000 -#define DVD_NOPTS_VALUE (-1LL<<52) // should be possible to represent in both double and __int64 - -class CHelper_libXBMC_pvr -{ -public: - CHelper_libXBMC_pvr(void) - { - m_libXBMC_pvr = NULL; - m_Handle = NULL; - } - - ~CHelper_libXBMC_pvr(void) - { - if (m_libXBMC_pvr) - { - PVR_unregister_me(m_Handle, m_Callbacks); - dlclose(m_libXBMC_pvr); - } - } - - /*! - * @brief Resolve all callback methods - * @param handle Pointer to the add-on - * @return True when all methods were resolved, false otherwise. - */ - bool RegisterMe(void* handle) - { - m_Handle = handle; - - std::string libBasePath; - libBasePath = ((cb_array*)m_Handle)->libPath; - libBasePath += PVR_HELPER_DLL; - -#if defined(ANDROID) - struct stat st; - if(stat(libBasePath.c_str(),&st) != 0) - { - std::string tempbin = getenv("XBMC_ANDROID_LIBS"); - libBasePath = tempbin + "/" + PVR_HELPER_DLL_NAME; - } -#endif - - m_libXBMC_pvr = dlopen(libBasePath.c_str(), RTLD_LAZY); - if (m_libXBMC_pvr == NULL) - { - fprintf(stderr, "Unable to load %s\n", dlerror()); - return false; - } - - PVR_register_me = (void* (*)(void *HANDLE)) - dlsym(m_libXBMC_pvr, "PVR_register_me"); - if (PVR_register_me == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - PVR_unregister_me = (void (*)(void* HANDLE, void* CB)) - dlsym(m_libXBMC_pvr, "PVR_unregister_me"); - if (PVR_unregister_me == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - PVR_transfer_epg_entry = (void (*)(void* HANDLE, void* CB, const ADDON_HANDLE handle, const EPG_TAG *epgentry)) - dlsym(m_libXBMC_pvr, "PVR_transfer_epg_entry"); - if (PVR_transfer_epg_entry == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - PVR_transfer_channel_entry = (void (*)(void* HANDLE, void* CB, const ADDON_HANDLE handle, const PVR_CHANNEL *chan)) - dlsym(m_libXBMC_pvr, "PVR_transfer_channel_entry"); - if (PVR_transfer_channel_entry == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - PVR_transfer_timer_entry = (void (*)(void* HANDLE, void* CB, const ADDON_HANDLE handle, const PVR_TIMER *timer)) - dlsym(m_libXBMC_pvr, "PVR_transfer_timer_entry"); - if (PVR_transfer_timer_entry == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - PVR_transfer_recording_entry = (void (*)(void* HANDLE, void* CB, const ADDON_HANDLE handle, const PVR_RECORDING *recording)) - dlsym(m_libXBMC_pvr, "PVR_transfer_recording_entry"); - if (PVR_transfer_recording_entry == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - PVR_add_menu_hook = (void (*)(void* HANDLE, void* CB, PVR_MENUHOOK *hook)) - dlsym(m_libXBMC_pvr, "PVR_add_menu_hook"); - if (PVR_add_menu_hook == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - PVR_recording = (void (*)(void* HANDLE, void* CB, const char *Name, const char *FileName, bool On)) - dlsym(m_libXBMC_pvr, "PVR_recording"); - if (PVR_recording == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - PVR_trigger_timer_update = (void (*)(void* HANDLE, void* CB)) - dlsym(m_libXBMC_pvr, "PVR_trigger_timer_update"); - if (PVR_trigger_timer_update == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - PVR_trigger_recording_update = (void (*)(void* HANDLE, void* CB)) - dlsym(m_libXBMC_pvr, "PVR_trigger_recording_update"); - if (PVR_trigger_recording_update == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - PVR_trigger_channel_update = (void (*)(void* HANDLE, void* CB)) - dlsym(m_libXBMC_pvr, "PVR_trigger_channel_update"); - if (PVR_trigger_channel_update == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - PVR_trigger_channel_groups_update = (void (*)(void* HANDLE, void* CB)) - dlsym(m_libXBMC_pvr, "PVR_trigger_channel_groups_update"); - if (PVR_trigger_channel_groups_update == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - PVR_trigger_epg_update = (void (*)(void* HANDLE, void* CB, unsigned int iChannelUid)) - dlsym(m_libXBMC_pvr, "PVR_trigger_epg_update"); - if (PVR_trigger_epg_update == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - PVR_transfer_channel_group = (void (*)(void* HANDLE, void* CB, const ADDON_HANDLE handle, const PVR_CHANNEL_GROUP *group)) - dlsym(m_libXBMC_pvr, "PVR_transfer_channel_group"); - if (PVR_transfer_channel_group == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - PVR_transfer_channel_group_member = (void (*)(void* HANDLE, void* CB, const ADDON_HANDLE handle, const PVR_CHANNEL_GROUP_MEMBER *member)) - dlsym(m_libXBMC_pvr, "PVR_transfer_channel_group_member"); - if (PVR_transfer_channel_group_member == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - -#ifdef USE_DEMUX - PVR_free_demux_packet = (void (*)(void* HANDLE, void* CB, DemuxPacket* pPacket)) - dlsym(m_libXBMC_pvr, "PVR_free_demux_packet"); - if (PVR_free_demux_packet == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } - - PVR_allocate_demux_packet = (DemuxPacket* (*)(void* HANDLE, void* CB, int iDataSize)) - dlsym(m_libXBMC_pvr, "PVR_allocate_demux_packet"); - if (PVR_allocate_demux_packet == NULL) { fprintf(stderr, "Unable to assign function %s\n", dlerror()); return false; } -#endif - - m_Callbacks = PVR_register_me(m_Handle); - return m_Callbacks != NULL; - } - - /*! - * @brief Transfer an EPG tag from the add-on to XBMC - * @param handle The handle parameter that XBMC used when requesting the EPG data - * @param entry The entry to transfer to XBMC - */ - void TransferEpgEntry(const ADDON_HANDLE handle, const EPG_TAG* entry) - { - return PVR_transfer_epg_entry(m_Handle, m_Callbacks, handle, entry); - } - - /*! - * @brief Transfer a channel entry from the add-on to XBMC - * @param handle The handle parameter that XBMC used when requesting the channel list - * @param entry The entry to transfer to XBMC - */ - void TransferChannelEntry(const ADDON_HANDLE handle, const PVR_CHANNEL* entry) - { - return PVR_transfer_channel_entry(m_Handle, m_Callbacks, handle, entry); - } - - /*! - * @brief Transfer a timer entry from the add-on to XBMC - * @param handle The handle parameter that XBMC used when requesting the timers list - * @param entry The entry to transfer to XBMC - */ - void TransferTimerEntry(const ADDON_HANDLE handle, const PVR_TIMER* entry) - { - return PVR_transfer_timer_entry(m_Handle, m_Callbacks, handle, entry); - } - - /*! - * @brief Transfer a recording entry from the add-on to XBMC - * @param handle The handle parameter that XBMC used when requesting the recordings list - * @param entry The entry to transfer to XBMC - */ - void TransferRecordingEntry(const ADDON_HANDLE handle, const PVR_RECORDING* entry) - { - return PVR_transfer_recording_entry(m_Handle, m_Callbacks, handle, entry); - } - - /*! - * @brief Transfer a channel group from the add-on to XBMC. The group will be created if it doesn't exist. - * @param handle The handle parameter that XBMC used when requesting the channel groups list - * @param entry The entry to transfer to XBMC - */ - void TransferChannelGroup(const ADDON_HANDLE handle, const PVR_CHANNEL_GROUP* entry) - { - return PVR_transfer_channel_group(m_Handle, m_Callbacks, handle, entry); - } - - /*! - * @brief Transfer a channel group member entry from the add-on to XBMC. The channel will be added to the group if the group can be found. - * @param handle The handle parameter that XBMC used when requesting the channel group members list - * @param entry The entry to transfer to XBMC - */ - void TransferChannelGroupMember(const ADDON_HANDLE handle, const PVR_CHANNEL_GROUP_MEMBER* entry) - { - return PVR_transfer_channel_group_member(m_Handle, m_Callbacks, handle, entry); - } - - /*! - * @brief Add or replace a menu hook for the context menu for this add-on - * @param hook The hook to add - */ - void AddMenuHook(PVR_MENUHOOK* hook) - { - return PVR_add_menu_hook(m_Handle, m_Callbacks, hook); - } - - /*! - * @brief Display a notification in XBMC that a recording started or stopped on the server - * @param strRecordingName The name of the recording to display - * @param strFileName The filename of the recording - * @param bOn True when recording started, false when it stopped - */ - void Recording(const char* strRecordingName, const char* strFileName, bool bOn) - { - return PVR_recording(m_Handle, m_Callbacks, strRecordingName, strFileName, bOn); - } - - /*! - * @brief Request XBMC to update it's list of timers - */ - void TriggerTimerUpdate(void) - { - return PVR_trigger_timer_update(m_Handle, m_Callbacks); - } - - /*! - * @brief Request XBMC to update it's list of recordings - */ - void TriggerRecordingUpdate(void) - { - return PVR_trigger_recording_update(m_Handle, m_Callbacks); - } - - /*! - * @brief Request XBMC to update it's list of channels - */ - void TriggerChannelUpdate(void) - { - return PVR_trigger_channel_update(m_Handle, m_Callbacks); - } - - /*! - * @brief Schedule an EPG update for the given channel channel - * @param iChannelUid The unique id of the channel for this add-on - */ - void TriggerEpgUpdate(unsigned int iChannelUid) - { - return PVR_trigger_epg_update(m_Handle, m_Callbacks, iChannelUid); - } - - /*! - * @brief Request XBMC to update it's list of channel groups - */ - void TriggerChannelGroupsUpdate(void) - { - return PVR_trigger_channel_groups_update(m_Handle, m_Callbacks); - } - -#ifdef USE_DEMUX - /*! - * @brief Free a packet that was allocated with AllocateDemuxPacket - * @param pPacket The packet to free - */ - void FreeDemuxPacket(DemuxPacket* pPacket) - { - return PVR_free_demux_packet(m_Handle, m_Callbacks, pPacket); - } - - /*! - * @brief Allocate a demux packet. Free with FreeDemuxPacket - * @param iDataSize The size of the data that will go into the packet - * @return The allocated packet - */ - DemuxPacket* AllocateDemuxPacket(int iDataSize) - { - return PVR_allocate_demux_packet(m_Handle, m_Callbacks, iDataSize); - } -#endif - -protected: - void* (*PVR_register_me)(void*); - void (*PVR_unregister_me)(void*, void*); - void (*PVR_transfer_epg_entry)(void*, void*, const ADDON_HANDLE, const EPG_TAG*); - void (*PVR_transfer_channel_entry)(void*, void*, const ADDON_HANDLE, const PVR_CHANNEL*); - void (*PVR_transfer_timer_entry)(void*, void*, const ADDON_HANDLE, const PVR_TIMER*); - void (*PVR_transfer_recording_entry)(void*, void*, const ADDON_HANDLE, const PVR_RECORDING*); - void (*PVR_add_menu_hook)(void*, void*, PVR_MENUHOOK*); - void (*PVR_recording)(void*, void*, const char*, const char*, bool); - void (*PVR_trigger_channel_update)(void*, void*); - void (*PVR_trigger_channel_groups_update)(void*, void*); - void (*PVR_trigger_timer_update)(void*, void*); - void (*PVR_trigger_recording_update)(void* , void*); - void (*PVR_trigger_epg_update)(void*, void*, unsigned int); - void (*PVR_transfer_channel_group)(void*, void*, const ADDON_HANDLE, const PVR_CHANNEL_GROUP*); - void (*PVR_transfer_channel_group_member)(void*, void*, const ADDON_HANDLE, const PVR_CHANNEL_GROUP_MEMBER*); -#ifdef USE_DEMUX - void (*PVR_free_demux_packet)(void*, void*, DemuxPacket*); - DemuxPacket* (*PVR_allocate_demux_packet)(void*, void*, int); -#endif - -private: - void* m_libXBMC_pvr; - void* m_Handle; - void* m_Callbacks; - struct cb_array - { - const char* libPath; - }; -}; diff --git a/cmake/KodiConfig.cmake.in b/cmake/KodiConfig.cmake.in new file mode 100644 index 0000000..58dfc40 --- /dev/null +++ b/cmake/KodiConfig.cmake.in @@ -0,0 +1,35 @@ +set(APP_NAME @APP_NAME@) +set(APP_NAME_LC @APP_NAME_LC@) +set(APP_NAME_UC @APP_NAME_UC@) +set(APP_PACKAGE @APP_PACKAGE@) +set(APP_VERSION_MAJOR @APP_VERSION_MAJOR@) +set(APP_VERSION_MINOR @APP_VERSION_MINOR@) +if(NOT @APP_NAME_UC@_PREFIX) + set(@APP_NAME_UC@_PREFIX @APP_PREFIX@) +endif() +if(NOT @APP_NAME_UC@_INCLUDE_DIR) + set(@APP_NAME_UC@_INCLUDE_DIR @APP_INCLUDE_DIR@) +endif() +if(NOT @APP_NAME_UC@_LIB_DIR) + set(@APP_NAME_UC@_LIB_DIR @APP_LIB_DIR@) +endif() +if(NOT @APP_NAME_UC@_DATA_DIR) + set(@APP_NAME_UC@_DATA_DIR @APP_DATA_DIR@) +endif() +if(NOT WIN32) + set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} @CXX11_SWITCH@") +endif() +list(APPEND CMAKE_MODULE_PATH @APP_LIB_DIR@ @APP_DATA_DIR@/cmake) + +string(REPLACE ";" " " ARCH_DEFINES "@ARCH_DEFINES@") +add_definitions(${ARCH_DEFINES} -DBUILD_KODI_ADDON) + +if(NOT CORE_SYSTEM_NAME) + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(CORE_SYSTEM_NAME "osx") + else() + string(TOLOWER ${CMAKE_SYSTEM_NAME} CORE_SYSTEM_NAME) + endif() +endif() + +include(AddonHelpers) diff --git a/cmake/README.md b/cmake/README.md new file mode 100644 index 0000000..6d338a4 --- /dev/null +++ b/cmake/README.md @@ -0,0 +1,299 @@ +# Kodi CMake based buildsystem + +This files describes Kodi's CMake based buildsystem. CMake is a cross-platform +tool for generating makefiles as well as project files used by IDEs. + +The current version of the buildsystem is capable of building and packaging +Kodi for the following platforms: + +- Linux (GNU Makefiles, Ninja) +- Windows (NMake Makefiles, Visual Studio 14 (2015), Ninja) +- macOS and iOS (GNU Makefiles, Xcode, Ninja) +- Android (GNU Makefiles) +- FreeBSD (GNU Makefiles) + +Before building Kodi with CMake, please ensure that you have the platform +specific dependencies installed. + +While the legacy build systems typically used in-source builds it's recommended +to use out-of-source builds with CMake. The necessary runtime dependencies such +as dlls, skins and configuration files are copied over to the build directory +automatically. + +## Dependency installation + +### Linux + +The dependencies required to build on Linux can be found in +[docs/README.xxx](https://github.com/xbmc/xbmc/tree/master/docs). + +### Raspberry Pi + +The cross compilation environment for the Raspberry Pi as well as the +dependencies have to be installed as explained in +[docs/README.raspberrypi](https://github.com/xbmc/xbmc/tree/master/docs/README.raspberrypi). + +### Windows + +For Windows the dependencies can be found in the +[Wiki](http://kodi.wiki/view/HOW-TO:Compile_Kodi_for_Windows) (Step 1-4). If not already available on your pc, you should +install the [Windows Software Development Kit (SDK)](https://dev.windows.com/en-us/downloads/sdk-archive) for your Windows version. This is required for HLSL shader offline compiling with the [Effect-Compiler Tool](https://msdn.microsoft.com/de-de/library/windows/desktop/bb232919(v=vs.85).aspx) (fxc.exe). + +On Windows, the CMake based buildsystem requires that the binary dependencies +are downloaded using `DownloadBuildDeps.bat` and `DownloadMingwBuildEnv.bat` +and that the mingw libs (ffmpeg, libdvd and others) are built using +`make-mingwlibs.bat`. + +### macOS + +For macOS the required dependencies can be found in +[docs/README.osx.md](https://github.com/xbmc/xbmc/tree/master/docs/README.osx.md). + +On macOS it is necessary to build the dependencies in `tools/depends` using +`./bootstrap && ./configure --host= && make`. The other steps such +as `make -C tools/depends/target/xbmc` and `make xcode_depends` are not needed +as these steps are covered already by the CMake project. + +### Android + +The dependencies needed to compile for Android can be found in +[docs/README.android](https://github.com/xbmc/xbmc/tree/master/docs/README.android) +. All described steps have to be executed (except 5.2 which is replaced by the +respective CMake command below). + +## Building Kodi + +This section lists the necessary commands for building Kodi with CMake. +CMake supports different generators that can be classified into two categories: +single- and multiconfiguration generators. + +A single configuration generator (GNU/NMake Makefiles) generates project files +for a single build type (e.g. Debug, Release) specified at configure time. +Multi configuration generators (Visual Studio, Xcode) allow to specify the +build type at compile time. + +All examples below are for out-of-source builds with Kodi checked out to +``: + +``` +mkdir kodi-build && cd kodi-build +``` + +### Linux with GNU Makefiles + +``` +cmake +cmake --build . -- VERBOSE=1 -j$(nproc) # or: make VERBOSE=1 -j$(nproc) +./kodi.bin +``` + +`CMAKE_BUILD_TYPE` defaults to `Release`. + +#### Debian package generation +The buildsystem is capable of generating Debian packages using CPack. To generate them, `CPACK_GENERATOR` has to be set to *DEB*, i.e. executing CMake's configure step with `-DCPACK_GENERATOR=DEB`. +You should use CMake/CPack 3.6.0 or higher. Lower versions can generate the packages but package names will be mangled. + +The following optional variables (which can be passed to buildsystem when executing cmake with the -D`=` format) can be used to manipulate package type, name and version: + +- `DEBIAN_PACKAGE_TYPE` controls the name and version of generated packages. Accepted values are `stable`, `unstable` and `nightly` (default is `nightly`). +- `DEBIAN_PACKAGE_EPOCH` controls package epoch (default is `2`) +- `DEBIAN_PACKAGE_VERSION` controls package version (default is `0`) +- `DEBIAN_PACKAGE_REVISION` controls package revision (no default is set) + +Packages metadata can be changed simply by editing files present in the `cpack/deb` folder +A lot more variables are available (see cpack/CPackDebian.cmake file) but you shouldn't mess with them unless you know what you're doing. + +Generated packages can be found in /packages. + +### Raspberry Pi with GNU Makefiles + +``` +cmake -DCMAKE_TOOLCHAIN_FILE=/tools/depends/target/Toolchain.cmake +cmake --build . -- VERBOSE=1 -j$(nproc) # or: make VERBOSE=1 -j$(nproc) +``` + +### Windows with Visual Studio project files + +``` +cmake -G "Visual Studio 14" +cmake --build . --config "Debug" # or: Build solution with Visual Studio +Debug\kodi.exe +``` + +#### Windows installer generation + +The script [project/Win32BuildSetup](https://github.com/xbmc/xbmc/blob/master/project/Win32BuildSetup/BuildSetup.bat) +builds an installable package for Windows. + +### Windows with NMake Makefiles + +``` +cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release +cmake --build . # or: nmake +kodi.exe +``` + +### macOS with GNU Makefiles + +``` +cmake -DCMAKE_TOOLCHAIN_FILE=/tools/depends/target/Toolchain.cmake +cmake --build . -- VERBOSE=1 -j$(sysctl -n hw.ncpu) # or: make VERBOSE=1 -j$(sysctl -n hw.ncpu) +./kodi.bin +``` + +### macOS with Xcode project files + +``` +cmake -DCMAKE_TOOLCHAIN_FILE=/tools/depends/target/Toolchain.cmake -G "Xcode" +cmake --build . --config "Release" -- -verbose -jobs $(sysctl -n hw.ncpu) # or: Build solution with Xcode +./Release/kodi.bin +``` + +#### macOS installer generation + +Afterwards an installable DMG for macOS can be built with the following command: + +``` +cmake --build . --config "Release" --target "dmg" # or: make dmg +``` + +#### iOS package generation + +Consequently an installable DEB for iOS can be built with the following command: + +``` +make deb +``` + +### Android with GNU Makefiles + +``` +cmake -DCMAKE_TOOLCHAIN_FILE=/tools/depends/target/Toolchain.cmake +cmake --build . -- VERBOSE=1 -j$(nproc) # or: make VERBOSE=1 -j$(nproc) +``` + +#### Android package generation + +An installable APK for Android can be built with the following command: + +``` +make apk +``` + +## Options + +Kodi supports a number of build options that can enable or disable certain +functionality.i These options must be set when running CMake with +`-DENABLE_