xbmc
Static Public Member Functions | List of all members
KODI::GAME::CGameUtils Class Reference

Game related utilities. More...

#include <GameUtils.h>

Static Public Member Functions

static bool FillInGameClient (CFileItem &item, std::string &savestatePath)
 Set the game client property, prompt the user for a savestate if there are any (savestates store the information of which game client created it). If there are no savestates or the user wants a new savestate, prompt the user for a game client. More...
 
static bool HasGameExtension (const std::string &path)
 Check if the file extension is supported by an add-on in a local or remote repository. More...
 
static std::set< std::string > GetGameExtensions ()
 Get all game extensions.
 
static bool IsStandaloneGame (const ADDON::AddonPtr &addon)
 Check if game script or game add-on can be launched directly. More...
 

Detailed Description

Game related utilities.

Member Function Documentation

◆ FillInGameClient()

bool CGameUtils::FillInGameClient ( CFileItem item,
std::string &  savestatePath 
)
static

Set the game client property, prompt the user for a savestate if there are any (savestates store the information of which game client created it). If there are no savestates or the user wants a new savestate, prompt the user for a game client.

Parameters
itemThe item with or without a game client in its info tag
savestatePathOutput. The path to the savestate selected. Empty if new savestate was selected
Returns
True if the item has a valid game client ID in its info tag

◆ HasGameExtension()

bool CGameUtils::HasGameExtension ( const std::string &  path)
static

Check if the file extension is supported by an add-on in a local or remote repository.

Parameters
pathThe path of the game file
Returns
true if the path's extension is supported by a known game client

◆ IsStandaloneGame()

bool CGameUtils::IsStandaloneGame ( const ADDON::AddonPtr &  addon)
static

Check if game script or game add-on can be launched directly.

Returns
true if the add-on can be launched, false otherwise

The documentation for this class was generated from the following files: