| ESR_SHARED_API ESR_ReturnCode ESR_SessionAddListener | ( | ESR_SessionType * | self, | |
| ESR_SessionTypeListenerPair * | listener | |||
| ) |
Adds an event-listener.
| self | ESR_SessionType handle | |
| listener | The event-listener to add |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionContains | ( | const LCHAR * | name, | |
| ESR_BOOL * | exists | |||
| ) |
Indicates if key exists in the session.
| name | Property name | |
| exists | True if key exists, false otherwise |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionConvertToBool | ( | const LCHAR * | key | ) |
Convert the specified argument to bool.
| key | Property name |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionConvertToFloat | ( | const LCHAR * | key | ) |
Convert the specified argument to float.
| key | Property name |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionConvertToInt | ( | const LCHAR * | key | ) |
Convert the specified argument to int.
| key | Property name |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionConvertToSize_t | ( | const LCHAR * | key | ) |
Convert the specified argument to size_t.
| key | Property name |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionConvertToUint16_t | ( | const LCHAR * | key | ) |
Convert the specified argument to int.
| key | Property name |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionCreate | ( | const LCHAR * | filename | ) |
Initializes the system session.
| filename | File to read session information from |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionDestroy | ( | void | ) |
Destroys the system session.
| ESR_SHARED_API ESR_ReturnCode ESR_SessionExists | ( | ESR_BOOL * | val | ) |
Sets val to true if a session object exists (non-null), FALSE otherwise.
| val | True if session is non-null, false otherwise |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionGetBool | ( | const LCHAR * | name, | |
| ESR_BOOL * | value | |||
| ) |
Returns copy of session property value.
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionGetFloat | ( | const LCHAR * | name, | |
| float * | value | |||
| ) |
Returns copy of session property value.
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionGetInt | ( | const LCHAR * | name, | |
| int * | value | |||
| ) |
Returns copy of session property value.
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionGetKeyAtIndex | ( | size_t | index, | |
| LCHAR ** | key | |||
| ) |
Returns the key associated with the specified index.
| index | Element index | |
| key | [out] Key name |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionGetLCHAR | ( | const LCHAR * | name, | |
| LCHAR * | value, | |||
| size_t * | len | |||
| ) |
Returns copy of session property value.
| name | Property name | |
| value | Property value | |
| len | Length of value argument. If the return code is ESR_BUFFER_OVERFLOW, the required length is returned in this variable. |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionGetProperty | ( | const LCHAR * | name, | |
| void ** | value, | |||
| VariableTypes | type | |||
| ) |
Returns session property value.
| name | Property name | |
| value | Property value | |
| type | Expected variable type (for strong-typing purposes) |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionGetPropertyType | ( | const LCHAR * | name, | |
| VariableTypes * | type | |||
| ) |
Returns the type of a property value.
| name | Property name | |
| type | [out] Value type |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionGetSize | ( | size_t * | size | ) |
Returns the number of elements in the session.
| size | [out] Session size |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionGetSize_t | ( | const LCHAR * | name, | |
| size_t * | value | |||
| ) |
Returns copy of session property value.
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionGetUint16_t | ( | const LCHAR * | name, | |
| asr_uint16_t * | value | |||
| ) |
Returns copy of session property value.
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionImportCommandLine | ( | int | argc, | |
| LCHAR * | argv[] | |||
| ) |
Imports commandline arguments into the system session.
Keys are imported as "cmdline.[name]" where [name] is the name of the command-line argument Values are set in char* format.
For example, given the argument "-timer=5", the following key will be added to the session: ["cmdline.timer", "5"]
Validation is left up to the application.
If the session contains a key that is clobbered by the parser, the old [key, value] pair will be deallocated. For example, if the session contained ["cmdline.timer", "value"] before the aforementioned example occured, then the old [key, value] pair will be allocated by the parser.
| argc | Number of arguments | |
| argv | Argument values |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionImportParFile | ( | const LCHAR * | filename | ) |
Import PAR file into session.
| filename | File to read session from |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionPrefixWithBaseDirectory | ( | LCHAR * | path, | |
| size_t * | len | |||
| ) |
Prefixes relative paths with the PAR-file base directory. If the path is not relative, it is not changed.
| path | Path to be prefixed | |
| len | Length of path argument. If the return code is ESR_BUFFER_OVERFLOW, the required length is returned in this variable. |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionRemoveAndFreeProperty | ( | const LCHAR * | name | ) |
Removes and deallocates property from session.
| name | Property name |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionRemoveListener | ( | ESR_SessionType * | self, | |
| ESR_SessionTypeListenerPair * | listener | |||
| ) |
Removes an event-listener.
| self | ESR_SessionType handle | |
| listener | The event-listener to remove |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionRemoveProperty | ( | const LCHAR * | name | ) |
Removes property from session.
| name | Property name |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionSetBool | ( | const LCHAR * | name, | |
| ESR_BOOL | value | |||
| ) |
Sets session property value, storing a copy of the value.
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionSetBoolIfEmpty | ( | const LCHAR * | name, | |
| ESR_BOOL | value | |||
| ) |
If the key does not exist in the session, calls SessionSetBool().
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionSetFloat | ( | const LCHAR * | name, | |
| float | value | |||
| ) |
Sets session property value, storing a copy of the value.
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionSetFloatIfEmpty | ( | const LCHAR * | name, | |
| float | value | |||
| ) |
If the key does not exist in the session, calls SessionSetFloat().
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionSetInt | ( | const LCHAR * | name, | |
| int | value | |||
| ) |
Sets session property value, storing a copy of the value.
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionSetIntIfEmpty | ( | const LCHAR * | name, | |
| int | value | |||
| ) |
If the key does not exist in the session, calls SessionSetInt().
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionSetLCHAR | ( | const LCHAR * | name, | |
| LCHAR * | value | |||
| ) |
Sets session property value, storing a copy of the value.
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionSetLCHARIfEmpty | ( | const LCHAR * | name, | |
| LCHAR * | value | |||
| ) |
If the key does not exist in the session, calls SessionSetLCHAR().
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionSetProperty | ( | const LCHAR * | name, | |
| void * | value, | |||
| VariableTypes | type | |||
| ) |
Sets session property value.
| name | Property name | |
| value | Property value | |
| type | Type of value being set |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionSetSize_t | ( | const LCHAR * | name, | |
| size_t | value | |||
| ) |
Sets session property value, storing a copy of the value.
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionSetSize_tIfEmpty | ( | const LCHAR * | name, | |
| size_t | value | |||
| ) |
If the key does not exist in the session, calls SessionSetSize_t().
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionSetUint16_t | ( | const LCHAR * | name, | |
| asr_uint16_t | value | |||
| ) |
Sets session property value, storing a copy of the value.
| name | Property name | |
| value | Property value |
| ESR_SHARED_API ESR_ReturnCode ESR_SessionSetUint16_tIfEmpty | ( | const LCHAR * | name, | |
| asr_uint16_t | value | |||
| ) |
If the key does not exist in the session, calls SessionSetSize_t().
| name | Property name | |
| value | Property value |
1.5.3