![]() |
OpenICC Documentation
git-devel
OpenICC provides a simple Color Management configuration API
|
Introduction | API Documentation | Programming Tutorial | References
OpenICC Configuration API provides a platformindependent C interface to persistently store settings across applications and services.
The OpenICC Configuration API is declared in the openicc_config.h and openicc_db.h header files.
The following API is declared in openicc_core.h.
OpenICC comes with a few tools, which use the OpenICC API's.
Frist you have to put a
in your source text, in order to use the OpenICC Configuration API.
Then you can put OpenICC functions in your code and compile with:
cc `pkg-config --cflags --libs openicc`
to link OpenICC into your application.
The following examples gives more details about parsing JSON and get structured key/value device configurations.
First we init language:Then we need to read the JSON by whatever is appropriate and start parsing JSON:
Providing debug infos is good behaviour and then the number of devices are available:
key/values pairs can be printed with openiccConfig_DeviceGet() or dumped again as JSON:
For a complete device class the JSON head and trail needs to be masked out appropriately:
The complete code can be found in openicc_config_read.c