ARX  1.2.0
The next-generation open source augmented reality toolkit.
Loading...
Searching...
No Matches
system.c File Reference
#include <ARX/ARUtil/system.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <dlfcn.h>
Include dependency graph for system.c:

Macros

#define _GNU_SOURCE

Functions

char * arUtilGetOSName (void)
 Get a string holding a descriptive name of the current operating system.
char * arUtilGetOSVersion (void)
 Get a string holding a descriptive name of current operating system version.
char * arUtilGetCPUName (void)
 Get a string holding a descriptive name of the current CPU type.
char * arUtilGetModulePath (void)
 Get the full pathname of the code module in which this function exists.
char * arUtilGetDeviceID ()
 Get an identifier for the device on which we are running.

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Function Documentation

◆ arUtilGetCPUName()

char * arUtilGetCPUName ( void )

Get a string holding a descriptive name of the current CPU type.

For applications requiring some information on CPU type, this function provides the type of the CPU currently executing. It is determined in an operating system-dependent manner, and thus the results may not be directly comparable between different operating systems running on the same hardware.

If the CPU type cannot be determined, the string "unknown" will be returned.

Returns
A c-string holding a descriptive name of the current CPU type. It is the responsibility of the caller to dispose of the string (by calling free()).
Here is the call graph for this function:

◆ arUtilGetDeviceID()

char * arUtilGetDeviceID ( )

Get an identifier for the device on which we are running.

Gets an identifier for the device on which we are running, consisting of three fields, separated by the forward-slash ('/') character. The first field is the device manufacturer, the second set a device model (e.g. on Android, the phone or tablet model name, or for Apple devices something like "iPhone", "iPad", or "Mac", and the third field is a unique identifier for the specific device. On Android, this will be a board ID, on Apple devicest the hardware model. e.g. "iPhone1,1", "iPad1,1" or "MacBookPro1,1".

Returns
Returns A null-terminated string with the identifier. The returned value is malloc()ed internally and must be free()d by the caller. NULL in case of error.
Here is the call graph for this function:

◆ arUtilGetModulePath()

char * arUtilGetModulePath ( void )

Get the full pathname of the code module in which this function exists.

Gets the full filesystem path of the module in which this function is running. This is typically either an executable path or a dynamic library path.

Returns
Returns A null-terminated string with the filesystem path. The returned value is malloc()ed internally and must be free()d by the caller. NULL in case of error.
Here is the call graph for this function:

◆ arUtilGetOSName()

char * arUtilGetOSName ( void )

Get a string holding a descriptive name of the current operating system.

For applications requiring some information on operating system, this function provides the type of the operating system currently executing. It is defined to be one of the following values: "macos", "ios", "linux", "android", "windows", or "unknown" if the current OS cannot be determined.

Returns
A c-string holding a descriptive name of the current operating system. It is the responsibility of the caller to dispose of the string (by calling free()).
Here is the call graph for this function:

◆ arUtilGetOSVersion()

char * arUtilGetOSVersion ( void )

Get a string holding a descriptive name of current operating system version.

For applications requiring some information on operating system, this function provides the version of the operating system currently executing. It is determined in an operating system-dependent manner.

If the version cannot be determined, the string "unknown" will be returned.

Returns
A c-string holding a descriptive name of the current operating system version. It is the responsibility of the caller to dispose of the string (by calling free()).
Here is the call graph for this function: