OpenICC Documentation  git-devel
OpenICC provides a simple Color Management configuration API
Data Structures | Enumerations | Functions
Configuration API

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...
 

Detailed Description

The Configuration API provides a way to store key/value pairs in a canonical way into JSON format DB files.

Enumeration Type Documentation

◆ 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

Function Documentation

◆ openiccConfigGetDeviceClasses()

const char** openiccConfigGetDeviceClasses ( const char **  device_classes,
int *  count 
)

get default device class

Referenced by openiccConfig_s::openiccConfig_DevicesCount().

◆ openiccDBGetJSONFile()

char* openiccDBGetJSONFile ( openiccSCOPE_e  scope)

obtain path string of OpenICC DB

Parameters
[in]scopespecify 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]keyParentNamea key name string
[in]scopespecify 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]keyNamea key name string; e.g. "org/freedesktop/openicc/foo"
[in]scopespecify to intended user or system scope
[out]valuea value string; e.g. "bar"
[in]commenta 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]keya key name string
[in]tempa temporary string to be freed by the user
Returns
the short key name
Examples:
test.c.