The Configuration API provides a way to store key/value pairs in a canonical way into JSON format DB files.
◆ openiccOBJECT_e
Enumerator |
---|
openiccOBJECT_OPTION | openiccOption_s
|
openiccOBJECT_OPTION_GROUP | openiccOptionGroup_s
|
openiccOBJECT_OPTIONS | openiccOptions_s
|
openiccOBJECT_UI_HEADER_SECTION | openiccUiHeaderSection_s
|
openiccOBJECT_UI | openiccUi_s
|
◆ openiccConfigGetDeviceClasses()
const char** openiccConfigGetDeviceClasses |
( |
const char ** |
device_classes, |
|
|
int * |
count |
|
) |
| |
◆ openiccDBGetJSONFile()
obtain path string of OpenICC DB
- Parameters
-
[in] | scope | specify to intended user or system scope |
- Returns
- file path string
◆ openiccDBSearchEmptyKeyname()
char * openiccDBSearchEmptyKeyname |
( |
const char * |
keyParentName, |
|
|
openiccSCOPE_e |
scope |
|
) |
| |
get a empty key name to add a new config group to a array
- Parameters
-
[in] | keyParentName | a key name string |
[in] | scope | specify to intended user or system scope |
- Returns
- the free key name from the array
- Examples:
- test.c.
◆ openiccDBSetString()
int openiccDBSetString |
( |
const char * |
keyName, |
|
|
openiccSCOPE_e |
scope, |
|
|
const char * |
value, |
|
|
const char * |
comment |
|
) |
| |
set a key name to a value
- Parameters
-
[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". |
- Returns
- 0 - success, >=1 - error, <0 - issue
- Examples:
- test.c.
◆ openiccGetShortKeyFromFullKeyPath()
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.
- Parameters
-
[in] | key | a key name string |
[in] | temp | a temporary string to be freed by the user |
- Returns
- the short key name
- Examples:
- test.c.