OpenICC Documentation  git-devel
OpenICC provides a simple Color Management configuration API
Public Member Functions
openiccDB_s Struct Reference

High level Configuration Object. More...

Collaboration diagram for openiccDB_s:
Collaboration graph

Public Member Functions

openiccDB_sopeniccDB_NewFrom (const char *top_key_name, openiccSCOPE_e scope)
 create a new DB object More...
 
void openiccDB_Release (openiccDB_s **db)
 free a DB object More...
 
int openiccDB_GetString (openiccDB_s *db, const char *xpath, const char **value)
 get a value More...
 
int openiccDB_GetKeyNames (openiccDB_s *db, const char *xpath, int child_levels, openiccAlloc_f alloc, openiccDeAlloc_f dealloc, char ***key_names, int *n)
 get a filtered list of key names More...
 

Detailed Description

High level Configuration Object.

Holds cascaded sets of keys inside a text/json representation.

Version
OpenICC Config: 0.1.0
Date
2015/10/03
Since
2015/10/03 (OpenICC Config: 0.1.0)
Examples:
test.c.

Member Function Documentation

◆ openiccDB_GetKeyNames()

int openiccDB_GetKeyNames ( openiccDB_s db,
const char *  xpath,
int  child_levels,
openiccAlloc_f  alloc,
openiccDeAlloc_f  dealloc,
char ***  key_names,
int *  n 
)

get a filtered list of key names

Parameters
[in]dba data base object
[in]xpathtop key name to filter for
[in]child_levelshow deeply nested child levels are desired; 0 - means all levels
[in]allocuser allocation function; optional - default: malloc
[out]key_namesfound full keys with path part; optional
[out]nnumber of found keys; optional
Returns
0 - success, >=1 - error, <0 - issue
Examples:
test.c.

◆ openiccDB_GetString()

int openiccDB_GetString ( openiccDB_s db,
const char *  xpath,
const char **  value 
)

get a value

Parameters
[in]dba data base object
[in]xpathkey name to ask for
[out]valuefound value; optional
Returns
0 - success, >=1 - error, <0 - issue
Examples:
test.c.

◆ openiccDB_NewFrom()

openiccDB_s * openiccDB_NewFrom ( const char *  top_key_name,
openiccSCOPE_e  scope 
)

create a new DB object

Create a DB by scope. Locate the physical configuration DB's and store them inside a single object.

Examples:
test.c.

◆ openiccDB_Release()

void openiccDB_Release ( openiccDB_s **  db)

free a DB object

Examples:
test.c.