FPL provides a couple of functions for query operating system or platform information.
Get Current Platform Type/Name
Use fplGetPlatformType() to get the current fplPlatformType .
This can be useful to do different operations on different platforms.
Use fplGetPlatformName() to get a string representation for the given fplPlatformType .
fpl_common_api void fplConsoleFormatOut(const char *format,...)
Writes the given formatted text to the standard output console buffer.
fplPlatformType
An enumeration of platform types.
Query OS Version, Kernel, Distribution etc.
You can retrieve the version/name of your operating system by calling fplOSGetVersionInfos() .
See fplOSVersionInfos for more details.
}
#define fplZeroInit
Initializes a struct to zero.
A structure that contains the version information for the operating system.
char osName[FPL_MAX_NAME_LENGTH]
Name of the operating system.
Get current username
Use fplSessionGetUsername() to get the username for the current session.
char usernameBuffer[256];
}
#define fplArrayCount(arr)
Returns the element count from a static array. This should ideally produce a compile error when passi...
fpl_platform_api size_t fplSessionGetUsername(char *nameBuffer, const size_t maxNameBufferLen)
Gets the username of the current logged-in user from the session.