Data Structures | |
struct | openiccConfig_s |
Low level Configuration Object. More... | |
struct | openiccDB_s |
High level Configuration Object. More... | |
Enumerations | |
enum | openiccOBJECT_e { , openiccOBJECT_OPTION = 1769433455, openiccOBJECT_OPTION_GROUP = 1735879023, openiccOBJECT_OPTIONS = 1937205615, openiccOBJECT_UI_HEADER_SECTION = 1936222575, openiccOBJECT_UI = 1769302383 } |
Functions | |
const char ** | openiccConfigGetDeviceClasses (const char **device_classes, int *count) |
get default device class More... | |
const char * | openiccGetShortKeyFromFullKeyPath (const char *key, char **temp) |
get a plain key name More... | |
int | openiccDBSetString (const char *keyName, openiccSCOPE_e scope, const char *value, const char *comment) |
set a key name to a value More... | |
char * | openiccDBSearchEmptyKeyname (const char *keyParentName, openiccSCOPE_e scope) |
get a empty key name to add a new config group to a array More... | |
char * | openiccDBGetJSONFile (openiccSCOPE_e scope) |
obtain path string of OpenICC DB More... | |
The Configuration API provides a way to store key/value pairs in a canonical way into JSON format DB files.
enum openiccOBJECT_e |
const char** openiccConfigGetDeviceClasses | ( | const char ** | device_classes, |
int * | count | ||
) |
get default device class
Referenced by openiccConfig_s::openiccConfig_DevicesCount().
char* openiccDBGetJSONFile | ( | openiccSCOPE_e | scope | ) |
obtain path string of OpenICC DB
[in] | scope | specify to intended user or system scope |
Referenced by openiccDBSetString().
char * openiccDBSearchEmptyKeyname | ( | const char * | keyParentName, |
openiccSCOPE_e | scope | ||
) |
get a empty key name to add a new config group to a array
[in] | keyParentName | a key name string |
[in] | scope | specify to intended user or system scope |
References openiccDB_s::openiccDB_NewFrom(), and openiccDB_s::openiccDB_Release().
int openiccDBSetString | ( | const char * | keyName, |
openiccSCOPE_e | scope, | ||
const char * | value, | ||
const char * | comment | ||
) |
set a key name to a value
[in] | keyName | a key name string; e.g. "org/freedesktop/openicc/foo" |
[in] | scope | specify to intended user or system scope |
[out] | value | a value string; e.g. "bar" |
[in] | comment | a comment string; The keyName will be deleted with value=NULL and comment="delete". |
References openiccDB_s::openiccDB_NewFrom(), openiccDB_s::openiccDB_Release(), and openiccDBGetJSONFile().
const char * openiccGetShortKeyFromFullKeyPath | ( | const char * | key, |
char ** | temp | ||
) |
get a plain key name
This function takes in a key of pattern: "path1/path2/key.attribute" and returns a pure key: "key" without path parts or attributes.
[in] | key | a key name string |
[in] | temp | a temporary string to be freed by the user |