Jameo Core Library
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
jm::System Class Reference

Basic system information. More...

Static Public Member Functions

static Preferencespreferences ()
 returns the global application settings
 
static void savePreferences ()
 
static String language ()
 This method returns the language of the system that is currently set. The programme can use this variable to decide which language it should display.
 
static String userId ()
 This method returns the username of the currently logged-in user. This function determines the "system name" UserID. Typically, this is the account name.
 
static String userFullName ()
 This method returns the username of the currently logged-in user. This function determines the "natural language" user name. It usually contains spaces and is not identical to the account name.
 
static String macAddress1 ()
 Returns the first available MAC address of the system.
 
static const StringbundleId ()
 Returns the bundleId which was provided on init()
 
static void init (const jm::String &bundleId)
 This method must be called first to set up important static objects.
 
static void quit ()
 This method cleans up static system objects. After calling this method, the program must be terminated because otherwise unwanted side effects may occur when using objects from this library.
 
static void logEnableDate (bool status)
 Turns logging of timestamp on or of.
 
static void logEnableLabel (LogLevel logLevel)
 Set the minimum level where the level label will be logged.
 
static void log (const String &message, LogLevel logLevel)
 Logs a message.
 
static const StringlastErrorMessage ()
 Returns the last error message.
 
static void * loadDynamicLibrary (File *file)
 This method loads a dynamic library. On macOS *.dylib, Windows *.dll, and Linux *.so.
 
static void unloadDynamicLibrary (void *library)
 This method unloads a loaded dynamic library.
 
static void * findSymbol (void *library, const String &name)
 This method searches for symbols in the library.
 
static AutoreleasePoolautoreleasePool ()
 This method returns the path to the autoreleased objects pool.
 

Detailed Description

Basic system information.

Member Function Documentation

◆ autoreleasePool()

static AutoreleasePool * jm::System::autoreleasePool ( )
static

This method returns the path to the autoreleased objects pool.

◆ bundleId()

static const String & jm::System::bundleId ( )
static

Returns the bundleId which was provided on init()

◆ findSymbol()

static void * jm::System::findSymbol ( void *  library,
const String name 
)
static

This method searches for symbols in the library.

Parameters
libraryReference to the library to search in.
nameName of the symbol.

◆ init()

static void jm::System::init ( const jm::String bundleId)
static

This method must be called first to set up important static objects.

Note
When exiting, quit() must be called

◆ language()

static String jm::System::language ( )
static

This method returns the language of the system that is currently set. The programme can use this variable to decide which language it should display.

Returns
The string has the form "de-DE"

◆ lastErrorMessage()

static const String & jm::System::lastErrorMessage ( )
static

Returns the last error message.

◆ loadDynamicLibrary()

static void * jm::System::loadDynamicLibrary ( File file)
static

This method loads a dynamic library. On macOS *.dylib, Windows *.dll, and Linux *.so.

Parameters
fileFile of the library.
Returns
Pointer to the library or NULL if it was not found.

◆ log()

static void jm::System::log ( const String message,
LogLevel  logLevel 
)
static

Logs a message.

◆ logEnableDate()

static void jm::System::logEnableDate ( bool  status)
static

Turns logging of timestamp on or of.

Parameters
statusIf true the timestamp will be logged. Otherwise false.

◆ logEnableLabel()

static void jm::System::logEnableLabel ( LogLevel  logLevel)
static

Set the minimum level where the level label will be logged.

Parameters
logLevelThe minimum level.

◆ macAddress1()

static String jm::System::macAddress1 ( )
static

Returns the first available MAC address of the system.

◆ preferences()

static Preferences * jm::System::preferences ( )
static

returns the global application settings

◆ quit()

static void jm::System::quit ( )
static

This method cleans up static system objects. After calling this method, the program must be terminated because otherwise unwanted side effects may occur when using objects from this library.

Note
init() must be called at startup

◆ savePreferences()

static void jm::System::savePreferences ( )
static

◆ unloadDynamicLibrary()

static void jm::System::unloadDynamicLibrary ( void *  library)
static

This method unloads a loaded dynamic library.

◆ userFullName()

static String jm::System::userFullName ( )
static

This method returns the username of the currently logged-in user. This function determines the "natural language" user name. It usually contains spaces and is not identical to the account name.

◆ userId()

static String jm::System::userId ( )
static

This method returns the username of the currently logged-in user. This function determines the "system name" UserID. Typically, this is the account name.