Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches

Functions to manage the addon and get basic information about it More...

Functions

 kodi::addon::CInstanceGame::CInstanceGame ()
 Game class constructor.
 
 kodi::addon::CInstanceGame::~CInstanceGame () override=default
 Destructor.
 
std::string kodi::addon::CInstanceGame::GameClientDllPath () const
 Callback to Kodi Function
The path of the game client being loaded.
 
bool kodi::addon::CInstanceGame::ProxyDllPaths (std::vector< std::string > &paths)
 Callback to Kodi Function
Paths to proxy DLLs used to load the game client.
 
bool kodi::addon::CInstanceGame::ResourceDirectories (std::vector< std::string > &dirs)
 Callback to Kodi Function
The "system" directories of the frontend.
 
std::string kodi::addon::CInstanceGame::ProfileDirectory () const
 Callback to Kodi Function
The writable directory of the frontend.
 
bool kodi::addon::CInstanceGame::SupportsVFS () const
 Callback to Kodi Function
The value of the <supports_vfs> property from addon.xml.
 
bool kodi::addon::CInstanceGame::Extensions (std::vector< std::string > &extensions)
 Callback to Kodi Function
The extensions in the <extensions> property from addon.xml.
 
 kodi::addon::CInstanceShaderPreset::CInstanceShaderPreset ()
 Shader preset class constructor.
 
 kodi::addon::CInstanceShaderPreset::~CInstanceShaderPreset () override=default
 Destructor.
 
std::string kodi::addon::CInstanceShaderPreset::UserPath () const
 Used to get the full path to the add-on's user profile.
 
std::string kodi::addon::CInstanceShaderPreset::AddonPath () const
 Used to get the full path where the add-on is installed.
 
virtual preset_file kodi::addon::CInstanceShaderPreset::PresetFileNew (const char *path)
 Loads a preset file
 
virtual void kodi::addon::CInstanceShaderPreset::PresetFileFree (preset_file file)
 Free a preset file
 
virtual bool kodi::addon::CInstanceShaderPreset::ShaderPresetRead (preset_file file, video_shader &shader)
 Loads preset file and all associated state (passes, textures, imports, etc)
 
virtual void kodi::addon::CInstanceShaderPreset::ShaderPresetWrite (preset_file file, const video_shader &shader)
 Save preset and all associated state (passes, textures, imports, etc) to disk.
 
virtual bool kodi::addon::CInstanceShaderPreset::ShaderPresetResolveParameters (preset_file file, video_shader &shader)
 Resolve all shader parameters belonging to the shader preset.
 
virtual void kodi::addon::CInstanceShaderPreset::ShaderPresetFree (video_shader &shader)
 Free all state related to shader preset.
 

Detailed Description

Functions to manage the addon and get basic information about it

Function Documentation

◆ AddonPath()

std::string kodi::addon::CInstanceShaderPreset::AddonPath ( ) const
inline

Used to get the full path where the add-on is installed.

Returns
The add-on installation path
Remarks
Only called from the add-on itself

◆ CInstanceGame()

kodi::addon::CInstanceGame::CInstanceGame ( )
inline

Game class constructor.

Used by an add-on that only supports only Game and only in one instance.

This class is created at addon by Kodi.


Here's example about the use of this:

...
class ATTR_DLL_LOCAL CGameExample
{
public:
CGameExample()
{
}
virtual ~CGameExample();
{
}
...
};
ADDONCREATOR(CGameExample)
#define ATTR_DLL_LOCAL
Definition addon_base.h:86
Definition kodi-dev-kit/include/kodi/AddonBase.h:772
Definition addon-instance/Game.h:118
#define ADDONCREATOR(AddonClass)
Definition kodi-dev-kit/include/kodi/AddonBase.h:2044

◆ CInstanceShaderPreset()

kodi::addon::CInstanceShaderPreset::CInstanceShaderPreset ( )
inline

Shader preset class constructor.

Used by an add-on that only supports Shader Presets, and only in one instance.

This class is created in the addon by Kodi.


Here's an example of how to use this class:

...
class ATTR_DLL_LOCAL CShaderPresetExample
{
public:
CShaderPresetExample()
{
}
virtual ~CShaderPresetExample();
{
}
...
};
ADDONCREATOR(CShaderPresetExample)
Definition addons/kodi-dev-kit/include/kodi/addon-instance/ShaderPreset.h:33

◆ Extensions()

bool kodi::addon::CInstanceGame::Extensions ( std::vector< std::string > &  extensions)
inline

Callback to Kodi Function
The extensions in the <extensions> property from addon.xml.

Parameters
[out]extensionsvector list to store available extension
Returns
true if success and extensions present
Remarks
Only called from addon itself

◆ GameClientDllPath()

std::string kodi::addon::CInstanceGame::GameClientDllPath ( ) const
inline

Callback to Kodi Function
The path of the game client being loaded.

Returns
the used game client Dll path
Remarks
Only called from addon itself

◆ PresetFileFree()

virtual void kodi::addon::CInstanceShaderPreset::PresetFileFree ( preset_file  file)
inlinevirtual

Free a preset file

◆ PresetFileNew()

virtual preset_file kodi::addon::CInstanceShaderPreset::PresetFileNew ( const char *  path)
inlinevirtual

Loads a preset file

Parameters
pathThe path to the preset file
Returns
The preset file, or NULL if file doesn't exist

◆ ProfileDirectory()

std::string kodi::addon::CInstanceGame::ProfileDirectory ( ) const
inline

Callback to Kodi Function
The writable directory of the frontend.

This directory can be used to store SRAM, memory cards, high scores, etc, if the game client cannot use the regular memory interface, GetMemoryData().

Returns
the used profile directory
Remarks
Only called from addon itself

◆ ProxyDllPaths()

bool kodi::addon::CInstanceGame::ProxyDllPaths ( std::vector< std::string > &  paths)
inline

Callback to Kodi Function
Paths to proxy DLLs used to load the game client.

Parameters
[out]pathsvector list to store available dll paths
Returns
true if success and dll paths present
Remarks
Only called from addon itself

◆ ResourceDirectories()

bool kodi::addon::CInstanceGame::ResourceDirectories ( std::vector< std::string > &  dirs)
inline

Callback to Kodi Function
The "system" directories of the frontend.

These directories can be used to store system-specific ROMs such as BIOSes, configuration data, etc.

Returns
the used resource directory
Remarks
Only called from addon itself

◆ ShaderPresetFree()

virtual void kodi::addon::CInstanceShaderPreset::ShaderPresetFree ( video_shader shader)
inlinevirtual

Free all state related to shader preset.

Parameters
Theshader object to free

◆ ShaderPresetRead()

virtual bool kodi::addon::CInstanceShaderPreset::ShaderPresetRead ( preset_file  file,
video_shader shader 
)
inlinevirtual

Loads preset file and all associated state (passes, textures, imports, etc)

Parameters
filePreset file to read from
shaderShader passes handle
Returns
True if successful, otherwise false

◆ ShaderPresetResolveParameters()

virtual bool kodi::addon::CInstanceShaderPreset::ShaderPresetResolveParameters ( preset_file  file,
video_shader shader 
)
inlinevirtual

Resolve all shader parameters belonging to the shader preset.

Parameters
filePreset file to read from
shaderShader passes handle
Returns
True if successful, otherwise false

◆ ShaderPresetWrite()

virtual void kodi::addon::CInstanceShaderPreset::ShaderPresetWrite ( preset_file  file,
const video_shader shader 
)
inlinevirtual

Save preset and all associated state (passes, textures, imports, etc) to disk.

Parameters
filePreset file to read from
shaderShader passes handle

◆ SupportsVFS()

bool kodi::addon::CInstanceGame::SupportsVFS ( ) const
inline

Callback to Kodi Function
The value of the <supports_vfs> property from addon.xml.

Returns
true if VFS is supported
Remarks
Only called from addon itself

◆ UserPath()

std::string kodi::addon::CInstanceShaderPreset::UserPath ( ) const
inline

Used to get the full path to the add-on's user profile.

Returns
Path to the user profile
Remarks
Only called from the add-on

◆ ~CInstanceGame()

kodi::addon::CInstanceGame::~CInstanceGame ( )
overridedefault

Destructor.

◆ ~CInstanceShaderPreset()

kodi::addon::CInstanceShaderPreset::~CInstanceShaderPreset ( )
overridedefault

Destructor.