stmm-games-doc  0.32.0
Functions
stmg::libconfig::xmlgtk Namespace Reference

Functions

const std::string & getVersion ()
 The stmm-games-xml-gtk library version. More...
 
std::string getUserDataHomeRelDirPath ()
 The data directory path relative to the user's home directory. More...
 
std::string getUserDataDirPath ()
 The user data directory path. More...
 
const std::string getPackageDataDirPath ()
 The data directory path for the installation prefix. More...
 
std::vector< std::string > getDataDirPaths (bool bIncludeHomeLocal, bool bIncludeAdditionalEnvPath)
 All the games and themes base directory paths. More...
 

Function Documentation

◆ getDataDirPaths()

std::vector<std::string> stmg::libconfig::xmlgtk::getDataDirPaths ( bool  bIncludeHomeLocal,
bool  bIncludeAdditionalEnvPath 
)

All the games and themes base directory paths.

These directories are used by game-apps to store games and themes and are usually readonly, except for the home local path, which can optionally be excluded. The home local path can be used to create new games and themes.

Example: if this function returns the path /usr/local/share/stmm-games, an app named jointris would have its games in directory /usr/local/share/stmm-games/games/jointris and its themes in directory /usr/local/share/stmm-games/themes/jointris.

Parameters
bIncludeHomeLocalWhether to include the '/home/user/.local/share/stmm-games' base path.
bIncludeAdditionalEnvPathWhether to include the additional base path in environment variable.
Returns
The absolute paths of games and themes base directories. Cannot be empty.

◆ getPackageDataDirPath()

const std::string stmg::libconfig::xmlgtk::getPackageDataDirPath ( )

The data directory path for the installation prefix.

This is also one of the paths of getDataDirPaths().

During development this function returns '/usr/local/share/stmm-games', on a release install '/usr/share/stmm-games'.

Returns
The installation prefix data directory. Cannot be empty.

◆ getUserDataDirPath()

std::string stmg::libconfig::xmlgtk::getUserDataDirPath ( )

The user data directory path.

This is used to store preferences and highscores.

Example: if this function returns /home/user/.local/share/stmm-games, an app named jointris would have its preferences in directory /home/user/.local/share/stmm-games/preferences/jointris.

Returns
The absolute path of preferences and highscores base directory. Can be empty.

◆ getUserDataHomeRelDirPath()

std::string stmg::libconfig::xmlgtk::getUserDataHomeRelDirPath ( )

The data directory path relative to the user's home directory.

Example: '.local/share/stmm-games'.

Returns
The relative base path. Can be empty.

◆ getVersion()

const std::string& stmg::libconfig::xmlgtk::getVersion ( )

The stmm-games-xml-gtk library version.

Returns
The version string. Cannot be empty.