GATE
Loading...
Searching...
No Matches
configurations.h File Reference

application configuration access utilities More...

Macros

#define GATE_APPCONFIG_SCOPE_LOCAL   0x0000
 
#define GATE_APPCONFIG_SCOPE_GLOBAL   0x0001
 
#define GATE_APPCONFIG_SCOPE_NATIVE   0x1000
 

Functions

GATE_SYSTEM_API gate_result_t gate_appconfig_read_text (gate_string_t const *app_name, gate_string_t const *source_name, gate_string_t const *subcategory, gate_enumint_t scope, gate_string_t const *key, gate_string_t *value)
 Read a string config parameter (/app/source/category/key)
 
GATE_SYSTEM_API gate_result_t gate_appconfig_read_num (gate_string_t const *app_name, gate_string_t const *source_name, gate_string_t const *subcategory, gate_enumint_t scope, gate_string_t const *key, gate_int32_t *num)
 Read an integer config parameter (/app/source/category/key)
 
GATE_SYSTEM_API gate_result_t gate_appconfig_write_text (gate_string_t const *app_name, gate_string_t const *source_name, gate_string_t const *subcategory, gate_enumint_t scope, gate_string_t const *key, gate_string_t const *value)
 Write a string config parameter (/app/source/category/key)
 
GATE_SYSTEM_API gate_result_t gate_appconfig_write_num (gate_string_t const *app_name, gate_string_t const *source_name, gate_string_t const *subcategory, gate_enumint_t scope, gate_string_t const *key, gate_int32_t num)
 Write a string config parameter (/app/source/category/key)
 
GATE_SYSTEM_API gate_result_t gate_appconfig_remove (gate_string_t const *app_name, gate_string_t const *source_name, gate_string_t const *subcategory, gate_enumint_t scope, gate_string_t const *key)
 Removes a config parameter (/app/source/category/key)
 

Detailed Description

application configuration access utilities

Macro Definition Documentation

◆ GATE_APPCONFIG_SCOPE_LOCAL

#define GATE_APPCONFIG_SCOPE_LOCAL   0x0000

Local user specific configuration

◆ GATE_APPCONFIG_SCOPE_GLOBAL

#define GATE_APPCONFIG_SCOPE_GLOBAL   0x0001

Global system specific configuration

◆ GATE_APPCONFIG_SCOPE_NATIVE

#define GATE_APPCONFIG_SCOPE_NATIVE   0x1000

Native application configuration (identified by source_name)

Function Documentation

◆ gate_appconfig_read_text()

GATE_SYSTEM_API gate_result_t gate_appconfig_read_text ( gate_string_t const * app_name,
gate_string_t const * source_name,
gate_string_t const * subcategory,
gate_enumint_t scope,
gate_string_t const * key,
gate_string_t * value )

Read a string config parameter (/app/source/category/key)

Parameters
[in]app_nameName of application (1st level identifier)
[in]source_nameName of configuration source (2nd level identifier)
[in]subcategoryParameter subcategory to access (3rd level identifier)
[in]scopeConfig storage scope, GATE_APPCONFIG_SCOPE_* value
[in]keyParameter key to read
[out]valuePointer to string to be initialized with retrieved parameter
Returns
GATE_RESULT_* result code

◆ gate_appconfig_read_num()

GATE_SYSTEM_API gate_result_t gate_appconfig_read_num ( gate_string_t const * app_name,
gate_string_t const * source_name,
gate_string_t const * subcategory,
gate_enumint_t scope,
gate_string_t const * key,
gate_int32_t * num )

Read an integer config parameter (/app/source/category/key)

Parameters
[in]app_nameName of application (1st level identifier)
[in]source_nameName of configuration source (2nd level identifier)
[in]subcategoryParameter subcategory to access (3rd level identifier)
[in]scopeConfig storage scope, GATE_APPCONFIG_SCOPE_* value
[in]keyParameter key to read
[out]numPointer to integer to be initialized with retrieved parameter value
Returns
GATE_RESULT_* result code

◆ gate_appconfig_write_text()

GATE_SYSTEM_API gate_result_t gate_appconfig_write_text ( gate_string_t const * app_name,
gate_string_t const * source_name,
gate_string_t const * subcategory,
gate_enumint_t scope,
gate_string_t const * key,
gate_string_t const * value )

Write a string config parameter (/app/source/category/key)

Parameters
[in]app_nameName of application (1st level identifier)
[in]source_nameName of configuration source (2nd level identifier)
[in]subcategoryParameter subcategory to access (3rd level identifier)
[in]scopeConfig storage scope, GATE_APPCONFIG_SCOPE_* value
[in]keyParameter key to write
[in]valuePointer to string to be written into configuration store
Returns
GATE_RESULT_* result code

◆ gate_appconfig_write_num()

GATE_SYSTEM_API gate_result_t gate_appconfig_write_num ( gate_string_t const * app_name,
gate_string_t const * source_name,
gate_string_t const * subcategory,
gate_enumint_t scope,
gate_string_t const * key,
gate_int32_t num )

Write a string config parameter (/app/source/category/key)

Parameters
[in]app_nameName of application (1st level identifier)
[in]source_nameName of configuration source (2nd level identifier)
[in]subcategoryParameter subcategory to access (3rd level identifier)
[in]scopeConfig storage scope, GATE_APPCONFIG_SCOPE_* value
[in]keyParameter key to write
[in]numInteger to be written into configuration store
Returns
GATE_RESULT_* result code

◆ gate_appconfig_remove()

GATE_SYSTEM_API gate_result_t gate_appconfig_remove ( gate_string_t const * app_name,
gate_string_t const * source_name,
gate_string_t const * subcategory,
gate_enumint_t scope,
gate_string_t const * key )

Removes a config parameter (/app/source/category/key)

Parameters
[in]app_nameName of application (1st level identifier)
[in]source_nameName of configuration source (2nd level identifier)
[in]subcategoryParameter subcategory to access (3rd level identifier)
[in]scopeConfig storage scope, GATE_APPCONFIG_SCOPE_* value
[in]keyParameter key to delete
Returns
GATE_RESULT_* result code