Kodi Development
22.0
for Binary and Script based Add-Ons
Loading...
Searching...
No Matches
System.h
1
/*
2
* Copyright (C) 2005-2018 Team Kodi
3
* This file is part of Kodi - https://kodi.tv
4
*
5
* SPDX-License-Identifier: GPL-2.0-or-later
6
* See LICENSES/README.md for more information.
7
*/
8
9
/*---AUTO_GEN_PARSE<$$CORE_SYSTEM_NAME:android>---*/
10
11
#pragma once
12
13
#include "../../AddonBase.h"
14
#include "../../c-api/platform/android/system.h"
15
16
#ifdef __cplusplus
17
namespace
kodi
18
{
19
namespace
platform
20
{
21
22
//==============================================================================
45
class
ATTR_DLL_LOCAL
CInterfaceAndroidSystem
46
{
47
public
:
48
CInterfaceAndroidSystem
()
49
: m_interface(
static_cast<
AddonToKodiFuncTable_android_system
*
>
(
kodi::addon::GetInterface
(
50
INTERFACE_ANDROID_SYSTEM_NAME, INTERFACE_ANDROID_SYSTEM_VERSION)))
51
{
52
}
53
54
//============================================================================
63
inline
void
*
GetJNIEnv
()
64
{
65
if
(m_interface)
66
return
m_interface->get_jni_env();
67
68
return
nullptr
;
69
}
70
//----------------------------------------------------------------------------
71
72
//============================================================================
78
inline
int
GetSDKVersion
()
79
{
80
if
(m_interface)
81
return
m_interface->get_sdk_version();
82
83
return
0;
84
}
85
//----------------------------------------------------------------------------
86
87
//============================================================================
93
inline
std::string
GetClassName
()
94
{
95
if
(m_interface)
96
return
m_interface->get_class_name();
97
98
return
std::string();
99
}
100
//----------------------------------------------------------------------------
101
102
private
:
103
AddonToKodiFuncTable_android_system
* m_interface;
104
};
105
//------------------------------------------------------------------------------
106
107
}
/* namespace platform */
108
}
/* namespace kodi */
109
#endif
/* __cplusplus */
kodi::platform::CInterfaceAndroidSystem
Definition
System.h:46
kodi::addon::GetInterface
void * GetInterface(const std::string &name, const std::string &version)
Returns a function table to a named interface.
Definition
AddonBase.h:1849
kodi::platform::CInterfaceAndroidSystem::GetClassName
std::string GetClassName()
Request the android main class name e.g. org.xbmc.kodi.
Definition
System.h:93
kodi::platform::CInterfaceAndroidSystem::GetSDKVersion
int GetSDKVersion()
Request the android sdk version to e.g. initialize JNIBase.
Definition
System.h:78
kodi::platform::CInterfaceAndroidSystem::GetJNIEnv
void * GetJNIEnv()
Request an JNI env pointer for the calling thread.
Definition
System.h:63
AddonToKodiFuncTable_android_system
Definition
system.h:24
include
kodi
platform
android
System.h
Generated by
1.12.0