TReK ANSI-C
5.3.3
All ANSI-C APIs
|
The commonly shared macros, structures and functions. More...
Data Structures | |
struct | message_struct_type |
Structure of parameters needed for message support. More... | |
Enumerations | |
enum | message_category { MSG_CAT_ERROR = 0x00000010 , MSG_CAT_ERROR_ALERT = 0x80000010 , MSG_CAT_WARNING = 0x00000008 , MSG_CAT_WARNING_ALERT = 0x80000008 , MSG_CAT_INFO = 0x00000004 , MSG_CAT_INFO_ALERT = 0x80000004 , MSG_CAT_PROGRESS = 0x00000002 , MSG_CAT_DEBUG = 0x00000001 } |
Message category enumeration. More... | |
Functions | |
const char EXPORT_THIS_TREK_TOOLKIT_COMMON_API_FUNCTION * | GetMessageCategoryAsString (enum message_category input) |
Converts an enumerated message category value into its equivalent character string. More... | |
const char EXPORT_THIS_TREK_TOOLKIT_COMMON_API_FUNCTION * | GetMessageCategoryAsPaddedString (enum message_category input) |
Converts an enumerated message category value into its equivalent character string with padded spaces. More... | |
int EXPORT_THIS_TREK_TOOLKIT_COMMON_API_FUNCTION | TCAACGetHomeDirectory (char *directory_buffer, int buffer_size) |
Gets the path to the users home directory. More... | |
int EXPORT_THIS_TREK_TOOLKIT_COMMON_API_FUNCTION | TcaGetTrekErrorMessage (int error, char *message, int buf_size) |
Gets a message string for a TReK error code. User is required to allocate buffer for the string. Message buffer size can be up to 1024 bytes. If the message string cannot be found a generic message will be returned. More... | |
The commonly shared macros, structures and functions.
enum message_category |
Message category enumeration.
const char EXPORT_THIS_TREK_TOOLKIT_COMMON_API_FUNCTION * GetMessageCategoryAsPaddedString | ( | enum message_category | input | ) |
Converts an enumerated message category value into its equivalent character string with padded spaces.
[in] | input | The enum message_category (e.g., MSG_CAT_ERROR, MSG_CAT_ERROR_ALERT, MSG_CAT_WARNING, MSG_CAT_WARNING_ALERT, MSG_CAT_INFO, MSG_CAT_INFO_ALERT, MSG_CAT_PROGRESS, MSG_CAT_DEBUG). |
Example:
const char EXPORT_THIS_TREK_TOOLKIT_COMMON_API_FUNCTION * GetMessageCategoryAsString | ( | enum message_category | input | ) |
Converts an enumerated message category value into its equivalent character string.
[in] | input | The enum message_category (e.g., MSG_CAT_ERROR, MSG_CAT_ERROR_ALERT, MSG_CAT_WARNING, MSG_CAT_WARNING_ALERT, MSG_CAT_INFO, MSG_CAT_INFO_ALERT, MSG_CAT_PROGRESS, MSG_CAT_DEBUG). |
Example:
int EXPORT_THIS_TREK_TOOLKIT_COMMON_API_FUNCTION TCAACGetHomeDirectory | ( | char * | directory_buffer, |
int | buffer_size | ||
) |
Gets the path to the users home directory.
[in] | buffer_size | Size of the directory buffer. |
[out] | directory_buffer | The buffer that contains the directory path. |
Example:
int EXPORT_THIS_TREK_TOOLKIT_COMMON_API_FUNCTION TcaGetTrekErrorMessage | ( | int | error, |
char * | message, | ||
int | buf_size | ||
) |
Gets a message string for a TReK error code. User is required to allocate buffer for the string. Message buffer size can be up to 1024 bytes. If the message string cannot be found a generic message will be returned.
[in] | error | The error code for the requested string |
[out] | message | The buffer that will contain the returned message string. |
[in] | buf_size | The number of bytes allocated for message. |
Example: