From 2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a Mon Sep 17 00:00:00 2001 From: manuel Date: Thu, 30 Aug 2018 00:42:04 +0200 Subject: sync with upstream --- .../include/kodi/platform/android/System.h | 44 ++++++++++++---------- 1 file changed, 25 insertions(+), 19 deletions(-) (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/platform/android/System.h') diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/platform/android/System.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/platform/android/System.h index bee00ef..aad3a28 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/platform/android/System.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/platform/android/System.h @@ -1,24 +1,13 @@ -#pragma once /* - * Copyright (C) 2005-2018 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * . + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. */ +#pragma once + #include "../../AddonBase.h" /* @@ -34,13 +23,14 @@ */ static const char* INTERFACE_ANDROID_SYSTEM_NAME = "ANDROID_SYSTEM"; -static const char* INTERFACE_ANDROID_SYSTEM_VERSION = "1.0.0"; -static const char* INTERFACE_ANDROID_SYSTEM_VERSION_MIN = "1.0.0"; +static const char* INTERFACE_ANDROID_SYSTEM_VERSION = "1.0.1"; +static const char* INTERFACE_ANDROID_SYSTEM_VERSION_MIN = "1.0.1"; struct AddonToKodiFuncTable_android_system { void* (*get_jni_env)(); int (*get_sdk_version)(); + const char *(*get_class_name)(); }; //============================================================================== @@ -99,6 +89,22 @@ namespace platform return 0; } + //============================================================================ + /// + /// \ingroup cpp_kodi_platform + /// @brief request the android main class name e.g. org.xbmc.kodi. + /// + /// @param[in]: + /// @return package class name + /// + inline std::string GetClassName() + { + if (m_interface) + return m_interface->get_class_name(); + + return std::string(); + } + private: AddonToKodiFuncTable_android_system *m_interface; }; -- cgit v1.2.3