Policy API
Detailed Description
Functions to set and export policies in Oyranos.
- Todo:
- define some default policies internally
Function Documentation
int oyPolicySaveActual |
( |
oyGROUP_e |
group, |
|
|
const char * |
name | |
|
) |
| | |
save a options group to a file
The function is basically a wrapper for oyPolicyToXML() and will write the resulting XML to a file somewhere in XDG_CONFIG_HOME.
- Parameters:
-
| group | use oyGROUP_ALL for a typical snapshot |
| name | the name will become part of a filename |
- Returns:
- error
- Version:
- Oyranos: 0.1.8
- Since:
- 2008/07/23 (Oyranos: 0.1.8)
- Date:
- 2008/07/23
int oyPolicySet |
( |
const char * |
policy_file, |
|
|
const char * |
full_name | |
|
) |
| | |
Load a group of policy settings.
use xml-ish file input produced by oyPolicyToXML()
- Parameters:
-
| policy_file | the policy file, will be locked up in standard paths |
| full_name | file name including path |
- Returns:
- errors
Save a group of policy settings.
Write only such variables, which are available and ignore unknown ones. This currently produces pseudo xml configuration files.
- Parameters:
-
| group | the policy group |
| add_header | add description |
| allocate_func | user provided function for allocating the strings memory |
- Returns:
- the configuration as XML to save to file
int oyReadXMLPolicy |
( |
oyGROUP_e |
group, |
|
|
const char * |
xml | |
|
) |
| | |
Load a group of policy settings.
use xml-ish input produced by oyPolicyToXML()
- Parameters:
-
| group | the policy group |
| xml | xml configuration string |
- Returns:
- errors