![]() |
OpenICC Documentation
git-devel
OpenICC provides a simple Color Management configuration API
|
Low level Configuration Object. More...

Public Member Functions | |
| openiccConfig_s * | openiccConfig_FromMem (const char *data) |
| load configurations from in memory JSON text More... | |
| void | openiccConfig_Release (openiccConfig_s **config) |
| release the data base object More... | |
| void | openiccConfig_SetInfo (openiccConfig_s *config, const char *debug_info) |
| add a string for debugging and error messages More... | |
| int | openiccConfig_DevicesCount (openiccConfig_s *config, const char **device_classes) |
| count devices in data base object More... | |
| const char * | openiccConfig_DeviceGet (openiccConfig_s *config, const char **device_classes, int pos, char ***keys, char ***values, openiccAlloc_f alloc, openiccDeAlloc_f dealloc) |
| get keys and their values More... | |
| const char * | openiccConfig_DeviceGetJSON (openiccConfig_s *config, const char **device_classes, int pos, int flags, const char *device_class, char **json, openiccAlloc_f alloc, openiccDeAlloc_f dealloc) |
| obtain a JSON string More... | |
| char * | openiccConfig_DeviceClassGet (openiccConfig_s *config, openiccAlloc_f alloc) |
| find out the device class of a given data base entry More... | |
| int | openiccConfig_GetKeyNames (openiccConfig_s *config, const char *xpath, int child_levels, openiccAlloc_f alloc, char ***key_names, int *n) |
| get a filtered list of key names More... | |
| int | openiccConfig_GetString (openiccConfig_s *config, const char *xpath, const char **value) |
| get a value More... | |
| int | openiccConfig_GetStringf (openiccConfig_s *config, const char **value, const char *format,...) |
| get a value More... | |
| int | openiccConfig_GetStrings (openiccConfig_s *config, const char **xpaths, openiccAlloc_f alloc, char ***values, int *n) |
| get a set of values More... | |
Low level Configuration Object.
Hold a set of keys inside a text/json representation.
| char * openiccConfig_DeviceClassGet | ( | openiccConfig_s * | config, |
| openiccAlloc_f | alloc | ||
| ) |
find out the device class of a given data base entry
| [in] | config | a data base entry object |
| [in] | alloc | user allocation function |
| const char * openiccConfig_DeviceGet | ( | openiccConfig_s * | config, |
| const char ** | device_classes, | ||
| int | pos, | ||
| char *** | keys, | ||
| char *** | values, | ||
| openiccAlloc_f | alloc, | ||
| openiccDeAlloc_f | dealloc | ||
| ) |
get keys and their values
| [in] | config | the data base object |
| [in] | device_classes | the device class filter |
| [in] | pos | the device position |
| [out] | keys | a zero terminated list of device keys |
| [out] | values | a zero terminated list of device values |
| [in] | alloc | user allocation function |
| const char * openiccConfig_DeviceGetJSON | ( | openiccConfig_s * | config, |
| const char ** | device_classes, | ||
| int | pos, | ||
| int | flags, | ||
| const char * | device_class, | ||
| char ** | json, | ||
| openiccAlloc_f | alloc, | ||
| openiccDeAlloc_f | dealloc | ||
| ) |
obtain a JSON string
| [in] | config | a data base object |
| [in] | device_classes | a zero terminated list of device class strings |
| [in] | pos | device position in list |
| [in] | flags | - OPENICC_CONFIGS_SKIP_HEADER
|
| [in] | device_class | the last written device class |
| [out] | json | the resulting JSON string allocated by alloc |
| [in] | alloc | user allocation function |
| int openiccConfig_DevicesCount | ( | openiccConfig_s * | config, |
| const char ** | device_classes | ||
| ) |
count devices in data base object
| [in] | config | the data base object |
| [in] | device_classes | the device class filter |
References openiccConfigGetDeviceClasses().
| openiccConfig_s * openiccConfig_FromMem | ( | const char * | data | ) |
load configurations from in memory JSON text
Create a config object from JSON text. Add a ID afterwards for better error messages with openiccConfig_SetInfo() = source_file_name.
| int openiccConfig_GetKeyNames | ( | openiccConfig_s * | config, |
| const char * | xpath, | ||
| int | child_levels, | ||
| openiccAlloc_f | alloc, | ||
| char *** | key_names, | ||
| int * | n | ||
| ) |
get a filtered list of key names
| [in] | config | a data base entry object |
| [in] | xpath | top key name to filter for |
| [in] | child_levels | how deeply nested child levels are desired; 0 - means all levels |
| [in] | alloc | user allocation function; optional - default: malloc |
| [out] | key_names | found full keys with path part; optional |
| [out] | n | number of found keys; optional |
| int openiccConfig_GetString | ( | openiccConfig_s * | config, |
| const char * | xpath, | ||
| const char ** | value | ||
| ) |
get a value
| [in] | config | a data base entry object |
| [in] | xpath | key name to ask for |
| [out] | value | found value; optional |
Referenced by openiccConfig_GetStringf().
| int openiccConfig_GetStringf | ( | openiccConfig_s * | config, |
| const char ** | value, | ||
| const char * | format, | ||
| ... | |||
| ) |
get a value
| [in] | config | a data base entry object |
| [out] | value | found value |
| [in] | format | full key name to ask for |
References openiccConfig_GetString().
| int openiccConfig_GetStrings | ( | openiccConfig_s * | config, |
| const char ** | xpaths, | ||
| openiccAlloc_f | alloc, | ||
| char *** | values, | ||
| int * | n | ||
| ) |
get a set of values
| [in] | config | a data base entry object |
| [in] | xpaths | key names to use |
| [in] | alloc | user allocation function; optional - default: malloc |
| [out] | values | found values; optional |
| [out] | n | number of found values; optional |
| void openiccConfig_Release | ( | openiccConfig_s ** | config | ) |
release the data base object
| void openiccConfig_SetInfo | ( | openiccConfig_s * | config, |
| const char * | debug_info | ||
| ) |
add a string for debugging and error messages
1.8.13