The Configuration API provides a way to store key/value pairs in a canonical way into JSON format DB files.
const char** const openiccConfigGetDeviceClasses |
( |
const char ** |
device_classes, |
|
|
int * |
count |
|
) |
| |
char * openiccDBSearchEmptyKeyname |
( |
const char * |
keyParentName, |
|
|
openiccSCOPE_e |
scope |
|
) |
| |
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 |
[in] | scope | specify to intended user or system scope |
[in] | value | a value string |
[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.
References openiccDB_s::openiccDB_NewFrom(), and openiccDB_s::openiccDB_Release().
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.