![]() |
Oyranos
git-devel
Oyranos is a full featured Color Management System
|
A Configs list. More...
#include <oyConfigs_s.h>
Public Member Functions | |
OYAPI oyConfigs_s *OYEXPORT | oyConfigs_New (oyObject_s object) |
allocate a new Configs object More... | |
OYAPI oyConfigs_s *OYEXPORT | oyConfigs_Copy (oyConfigs_s *configs, oyObject_s object) |
Copy or Reference a Configs object. More... | |
OYAPI int OYEXPORT | oyConfigs_Release (oyConfigs_s **configs) |
release and possibly deallocate a oyConfigs_s object More... | |
OYAPI int OYEXPORT | oyConfigs_MoveIn (oyConfigs_s *list, oyConfig_s **obj, int pos) |
add an element to a Configs list More... | |
OYAPI int OYEXPORT | oyConfigs_ReleaseAt (oyConfigs_s *list, int pos) |
release a element from a Configs list More... | |
OYAPI oyConfig_s *OYEXPORT | oyConfigs_Get (oyConfigs_s *list, int pos) |
get a element of a Configs list More... | |
OYAPI int OYEXPORT | oyConfigs_Count (oyConfigs_s *list) |
count the elements in a Configs list More... | |
OYAPI int OYEXPORT | oyConfigs_Clear (oyConfigs_s *list) |
clear the elements in a Configs list More... | |
OYAPI int OYEXPORT | oyConfigs_Sort (oyConfigs_s *list, int32_t *rank_list) |
sort a list according to a rank_list More... | |
OYAPI int OYEXPORT | oyConfigs_FromDomain (const char *registration_domain, oyOptions_s *options, oyConfigs_s **configs, oyObject_s object OY_UNUSED) |
Send a request to a configuration module. More... | |
OYAPI int OYEXPORT | oyConfigs_FromDeviceClass (const char *device_type, const char *device_class, oyOptions_s *options, oyConfigs_s **devices, oyObject_s object) |
Ask a module for device informations or other direct calls. More... | |
OYAPI int OYEXPORT | oyConfigs_SelectSimilars (oyConfigs_s *list, const char *pattern[][2], oyConfigs_s **filtered) |
filter similiar configs compared by a pattern More... | |
OYAPI int OYEXPORT | oyConfigs_FromDB (const char *registration, oyOptions_s *options, oyConfigs_s **configs, oyObject_s object) |
Get all oyConfigs_s from DB. More... | |
OYAPI int OYEXPORT | oyConfigs_Modify (oyConfigs_s *configs, oyOptions_s *options) |
Ask a module for device informations or other direct calls. More... | |
OYAPI int OYEXPORT | oyConfigDomainList (const char *registration_pattern, char ***list, uint32_t *count, uint32_t **rank_list, oyAlloc_f allocateFunc) |
Count and show the global oyConfigs_s suppliers. More... | |
void | oyConfigs_Release__Members (oyConfigs_s_ *configs) |
Custom Configs destructor. More... | |
int | oyConfigs_Init__Members (oyConfigs_s_ *configs OY_UNUSED) |
Custom Configs constructor. More... | |
int | oyConfigs_Copy__Members (oyConfigs_s_ *dst, oyConfigs_s_ *src) |
Custom Configs copy constructor. More... | |
![]() | |
const char * | oyStruct_GetTextFromModule (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags) |
get object infos from a module More... | |
const char * | oyStruct_GetText (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags) |
Get a text dump. More... | |
int | oyStruct_RegisterStaticMessageFunc (int type, oyStruct_RegisterStaticMessageFunc_f msg, oyStruct_RegisterStaticFreeFunc_f free_func) |
register a function for verbosity More... | |
const char * | oyStruct_GetInfo (oyPointer context_object, oyNAME_e type, int flags) |
get a additional string from a object More... | |
const char * | oyStructTypeToText (oyOBJECT_e type) |
Objects type to small string. More... | |
Data Fields | |
const oyOBJECT_e | type_ |
Type of object. More... | |
oyStruct_Copy_f | copy |
Copy function. More... | |
oyStruct_Release_f | release |
Release function. More... | |
oyObject_s | oy_ |
Oyranos internal object. More... | |
![]() | |
const oyOBJECT_e | type_ |
Type of object. More... | |
oyStruct_Copy_f | copy |
Copy function. More... | |
oyStruct_Release_f | release |
Release function. More... | |
oyObject_s | oy_ |
Oyranos internal object. More... | |
A Configs list.
Managing the plural of oyConfig_s for the sake of typesafety.
OYAPI int OYEXPORT oyConfigDomainList | ( | const char * | registration_pattern, |
char *** | list, | ||
uint32_t * | count, | ||
uint32_t ** | rank_list, | ||
oyAlloc_f | allocateFunc | ||
) |
Count and show the global oyConfigs_s suppliers.
Function oyConfigDomainList
[in] | registration_pattern | a optional filter |
[out] | list | the list with full filter registrations |
[out] | count | the list count |
[out] | rank_list | the rank fitting to list |
[in] | allocateFunc | the user allocator for list |
OYAPI int OYEXPORT oyConfigs_Clear | ( | oyConfigs_s * | list | ) |
clear the elements in a Configs list
Function oyConfigs_Clear
[in,out] | list | the list |
OYAPI oyConfigs_s *OYEXPORT oyConfigs_Copy | ( | oyConfigs_s * | configs, |
oyObject_s | object | ||
) |
Copy or Reference a Configs object.
Function oyConfigs_Copy
The function is for copying and for referencing. The reference is the most often used way, which saves resourcs and time.
[in] | configs | Configs struct object |
object | NULL - means reference, the optional object triggers a real copy |
int oyConfigs_Copy__Members | ( | oyConfigs_s_ * | dst, |
oyConfigs_s_ * | src | ||
) |
Custom Configs copy constructor.
Function oyConfigs_Copy__Members
OYAPI int OYEXPORT oyConfigs_Count | ( | oyConfigs_s * | list | ) |
count the elements in a Configs list
Function oyConfigs_Count
[in,out] | list | the list |
Referenced by oyConfigs_Modify().
OYAPI int OYEXPORT oyConfigs_FromDB | ( | const char * | registration, |
oyOptions_s * | options, | ||
oyConfigs_s ** | configs, | ||
oyObject_s | object | ||
) |
Get all oyConfigs_s from DB.
Function oyConfigs_FromDB
[in] | registration | the key path |
[in] | options | supported is "module" containing a registration string to select a module |
[out] | configs | the found configuration list |
[in] | object | a optional user object |
1.) setup Elektra
2.) get all module names for the module pattern
3.) obtain the directory structure for configurations
4.) obtain all keys from one configuration directory
4.1.) add information about the data's origin
5.) add a rank map to each object to allow for comparisions
5.1.) try the rank map from module
5.2.) search a rank map from DB
6.) move the object into the list
OYAPI int OYEXPORT oyConfigs_FromDeviceClass | ( | const char * | device_type, |
const char * | device_class, | ||
oyOptions_s * | options, | ||
oyConfigs_s ** | devices, | ||
oyObject_s | object | ||
) |
Ask a module for device informations or other direct calls.
Function oyConfigs_FromDeviceClass
[in] | device_type | the device type oyFILTER_REG_TYPE, defaults to OY_TYPE_STD (optional) |
[in] | device_class | the device class, e.g. "monitor", oyFILTER_REG_APPLICATION |
[in] | options | options to pass to the module, for zero the usage instructions are requested, a option "device_name" can be used as filter |
[out] | devices | the devices |
[in] | object | the optional object |
1.) obtain detailed and expensive device informations
1.1.) build a device class registration string
1.2.) get all device class module names
1.3.) ask each module
1.3.1.) call into module
1.3.1.1.) Compare the device_name with the device_name option and collect the matching devices.
1.3.1.2.) ... or collect all device configurations
The basic call on how to obtain the configuration is added here as the objects name. "properties" and "list" are known.
OYAPI int OYEXPORT oyConfigs_FromDomain | ( | const char * | registration_domain, |
oyOptions_s * | options, | ||
oyConfigs_s ** | configs, | ||
oyObject_s object | OY_UNUSED | ||
) |
Send a request to a configuration module.
Function oyConfigs_FromDomain
A empty options argument should send out an warning message, which contains intructions on how to talk with the module. Otherwise the calls are pure convention and depend on the usage and agreement of the partners.
For the convention to call to color devices
[in] | registration_domain | the module to call to |
[in] | options | options to specify the calling into modules messages are bound to this object |
[out] | configs | the returned configurations |
[in] | object | a optional user object |
OYAPI oyConfig_s *OYEXPORT oyConfigs_Get | ( | oyConfigs_s * | list, |
int | pos | ||
) |
get a element of a Configs list
Function oyConfigs_Get
[in,out] | list | the list |
pos | position |
int oyConfigs_Init__Members | ( | oyConfigs_s_ *configs | OY_UNUSED | ) |
Custom Configs constructor.
Function oyConfigs_Init__Members
OYAPI int OYEXPORT oyConfigs_Modify | ( | oyConfigs_s * | configs, |
oyOptions_s * | options | ||
) |
Ask a module for device informations or other direct calls.
Function oyConfigs_Modify
[in,out] | configs | The passed configs first member is used to obtain a registration string and select a appropriate module. Regarding the module the configs need to be homogenous. All configs are passed at once to the module. Mixing configs from different modules is not defined. |
[in] | options | options to pass to the module; With zero the usage instructions are requested. |
1.) pick the first device to select a registration
1.2.) get all device class module names from the firsts oyConfig_s registration
2.) call each modules oyCMMapi8_s::oyConfigs_Modify
References oyConfigs_Count().
OYAPI int OYEXPORT oyConfigs_MoveIn | ( | oyConfigs_s * | list, |
oyConfig_s ** | obj, | ||
int | pos | ||
) |
add an element to a Configs list
Function oyConfigs_MoveIn
[in] | list | list |
[in,out] | obj | list element |
pos | position |
OYAPI oyConfigs_s *OYEXPORT oyConfigs_New | ( | oyObject_s | object | ) |
allocate a new Configs object
Function oyConfigs_New
OYAPI int OYEXPORT oyConfigs_Release | ( | oyConfigs_s ** | configs | ) |
release and possibly deallocate a oyConfigs_s object
Function oyConfigs_Release
[in,out] | configs | Configs struct object |
Referenced by oyLibConfigRelease().
void oyConfigs_Release__Members | ( | oyConfigs_s_ * | configs | ) |
Custom Configs destructor.
Function oyConfigs_Release__Members
OYAPI int OYEXPORT oyConfigs_ReleaseAt | ( | oyConfigs_s * | list, |
int | pos | ||
) |
release a element from a Configs list
Function oyConfigs_ReleaseAt
[in,out] | list | the list |
pos | position |
OYAPI int OYEXPORT oyConfigs_SelectSimilars | ( | oyConfigs_s * | list, |
const char * | pattern[][2], | ||
oyConfigs_s ** | filtered | ||
) |
filter similiar configs compared by a pattern
Function oyConfigs_SelectSimilars
This is a simple convenience function to select from a list existing configurations.
[in] | list | the list |
[in] | pattern | user supplied zero terminated pattern list; The first element is a mandadory key to meet. The second element is the optional value. Each |
[out] | filtered | the result |
OYAPI int OYEXPORT oyConfigs_Sort | ( | oyConfigs_s * | list, |
int32_t * | rank_list | ||
) |
sort a list according to a rank_list
Function oyConfigs_Sort
oyStruct_Copy_f oyConfigs_s::copy |
Copy function.
oyObject_s oyConfigs_s::oy_ |
Oyranos internal object.
Features name and hash. Do not change during object life time.
oyStruct_Release_f oyConfigs_s::release |
Release function.
const oyOBJECT_e oyConfigs_s::type_ |
Type of object.
The struct type tells Oyranos how to interprete hidden fields.