Oyranos Colour Management System API
Data Structures | Functions
Values Handling
Miscellaneous
Collaboration diagram for Values Handling:

Data Structures

struct  oyConfig_s
 a group of options for a device More...
struct  oyConfigs_s
 a Configs list More...

Functions

oyRankPad * oyConfig_s::oyRankMapCopy (const oyRankPad *rank_map, oyAlloc_f allocateFunc)
 copy a rank map
OYAPI oyConfig_s *OYEXPORT oyConfig_s::oyConfig_New (const char *registration, oyObject_s object)
 allocate a new Config object
OYAPI int OYEXPORT oyConfig_s::oyConfig_GetDB (oyConfig_s *device, int32_t *rank_value)
 search a configuration in the DB for a configuration from module
OYAPI oyConfig_s *OYEXPORT oyConfig_s::oyConfig_Copy (oyConfig_s *obj, oyObject_s object)
 copy or reference a Config object
OYAPI int OYEXPORT oyConfig_s::oyConfig_Release (oyConfig_s **obj)
 release and possibly deallocate a Config object
OYAPI int OYEXPORT oyConfig_s::oyConfig_AddDBData (oyConfig_s *config, const char *key, const char *value, uint32_t flags)
 add a key value pair to a oyConfig_s::db
OYAPI int OYEXPORT oyConfig_s::oyConfig_ClearDBData (oyConfig_s *config)
 remove all additional data from the oyConfig_s::db object cache
OYAPI int OYEXPORT oyConfig_s::oyConfig_SaveToDB (oyConfig_s *config)
 store a oyConfig_s in DB
int oyConfig_s::oyRegistrationEraseFromDB (const char *registration)
 remove a registration config from DB
OYAPI int OYEXPORT oyConfig_s::oyConfig_EraseFromDB (oyConfig_s *config)
 remove a oyConfig_s from DB
int oyConfig_s::oyConfig_Compare (oyConfig_s *module_device, oyConfig_s *db_pattern, int32_t *rank_value)
 check for matching to a given pattern
OYAPI int OYEXPORT oyConfig_s::oyConfig_DomainRank (oyConfig_s *config)
 check for being recognised by a given module
OYAPI const char *OYEXPORT oyConfig_s::oyConfig_FindString (oyConfig_s *config, const char *key, const char *value)
 search in data sets for a key/value
OYAPI oyOption_s *OYEXPORT oyConfig_s::oyConfig_Find (oyConfig_s *config, const char *key)
 search in data sets for a key
OYAPI int OYEXPORT oyConfig_s::oyConfig_Has (oyConfig_s *config, const char *key)
 search in data sets for a key
OYAPI int OYEXPORT oyConfig_s::oyConfig_Count (oyConfig_s *config)
 number of all options
OYAPI oyOption_s *OYEXPORT oyConfig_s::oyConfig_Get (oyConfig_s *config, int pos)
 get one option
OYAPI oyConfigs_s *OYEXPORT oyConfigs_s::oyConfigs_New (oyObject_s object)
 allocate a new Configs list
OYAPI int OYEXPORT oyConfigs_s::oyConfigs_FromDomain (const char *registration_domain, oyOptions_s *options, oyConfigs_s **configs, oyObject_s object)
 send a request to a configuration module
OYAPI int OYEXPORT oyConfigs_s::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
OYAPI int OYEXPORT oyConfigs_s::oyConfigs_Modify (oyConfigs_s *configs, oyOptions_s *options)
 ask a module for device informations or other direct calls
OYAPI oyConfigs_s *OYEXPORT oyConfigs_s::oyConfigs_Copy (oyConfigs_s *obj, oyObject_s object)
 copy or reference a Configs list
OYAPI int OYEXPORT oyConfigs_s::oyConfigs_Release (oyConfigs_s **obj)
 release and possibly deallocate a Configs list
OYAPI int OYEXPORT oyConfigs_s::oyConfigs_MoveIn (oyConfigs_s *list, oyConfig_s **obj, int pos)
 add a element to a Configs list
OYAPI int OYEXPORT oyConfigs_s::oyConfigs_ReleaseAt (oyConfigs_s *list, int pos)
 release a element from a Configs list
OYAPI oyConfig_s *OYEXPORT oyConfigs_s::oyConfigs_Get (oyConfigs_s *list, int pos)
 get a element of a Configs list
OYAPI int OYEXPORT oyConfigs_s::oyConfigs_Count (oyConfigs_s *list)
 count the elements in a Configs list
OYAPI int OYEXPORT oyConfigs_s::oyConfigs_SelectSimiliars (oyConfigs_s *list, const char *pattern[][2], oyConfigs_s **filtered)
 filter similiar configs compared by a pattern
OYAPI int OYEXPORT oyConfigs_s::oyConfigs_FromDB (const char *registration, oyConfigs_s **configs, oyObject_s object)
 get all oyConfigs_s from DB
OYAPI int OYEXPORT oyConfigs_s::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
OYAPI oyConfDomain_s *OYEXPORT oyConfDomain_s::oyConfDomain_FromReg (const char *registration_domain, oyObject_s object)
 allocate a new ConfDomain object
OYAPI oyConfDomain_s *OYEXPORT oyConfDomain_s::oyConfDomain_Copy (oyConfDomain_s *obj, oyObject_s object)
 copy or reference a ConfDomain object
OYAPI int OYEXPORT oyConfDomain_s::oyConfDomain_Release (oyConfDomain_s **obj)
 release and possibly deallocate a ConfDomain object
OYAPI const char *OYEXPORT oyConfDomain_s::oyConfDomain_GetText (oyConfDomain_s *obj, const char *name, oyNAME_e type)
 obtain a UI text from a ConfDomain object
OYAPI const char **OYEXPORT oyConfDomain_s::oyConfDomain_GetTexts (oyConfDomain_s *obj)
 obtain a list of possible UI text from a ConfDomain object

Function Documentation

OYAPI oyConfDomain_s *OYEXPORT oyConfDomain_Copy ( oyConfDomain_s obj,
oyObject_s  object 
)

copy or reference a ConfDomain object

Function oyConfDomain_Copy

Parameters:
[in]objstruct object
objectthe optional object
Version:
Oyranos: 0.1.10
Since:
2009/12/30 (Oyranos: 0.1.10)
Date:
2009/12/30
OYAPI oyConfDomain_s *OYEXPORT oyConfDomain_FromReg ( const char *  registration_domain,
oyObject_s  object 
)

allocate a new ConfDomain object

Function oyConfDomain_New

Version:
Oyranos: 0.1.10
Since:
2009/12/30 (Oyranos: 0.1.10)
Date:
2009/12/30

Referenced by oyDeviceToJSON().

OYAPI const char *OYEXPORT oyConfDomain_GetText ( oyConfDomain_s obj,
const char *  name,
oyNAME_e  type 
)

obtain a UI text from a ConfDomain object

Function oyConfDomain_GetText

Parameters:
[in,out]objstruct object
[in]namethe category to return
[in]typethe type of string
Version:
Oyranos: 0.1.10
Since:
2009/12/30 (Oyranos: 0.1.10)
Date:
2009/12/30

Referenced by oyDeviceToJSON().

OYAPI const char **OYEXPORT oyConfDomain_GetTexts ( oyConfDomain_s obj)

obtain a list of possible UI text from a ConfDomain object

Function oyConfDomain_GetTexts

Returns:
zero terminated list of strings, Each string is a "name" option to oyConfDomain_GetText().
Version:
Oyranos: 0.1.10
Since:
2009/12/30 (Oyranos: 0.1.10)
Date:
2009/12/30
OYAPI int OYEXPORT oyConfDomain_Release ( oyConfDomain_s **  obj)

release and possibly deallocate a ConfDomain object

Function oyConfDomain_Release

Parameters:
[in,out]objstruct object
Version:
Oyranos: 0.1.10
Since:
2009/12/30 (Oyranos: 0.1.10)
Date:
2009/12/30

Referenced by oyDeviceToJSON().

OYAPI int OYEXPORT oyConfig_AddDBData ( oyConfig_s config,
const char *  key,
const char *  value,
uint32_t  flags 
)

add a key value pair to a oyConfig_s::db

Function oyConfig_AddDBData

This functions handles canonical user side settings. The keys added with this function can later be stored in the DB. A call to oyConfig_GetDB() or oyConfig_ClearDBData() overwrite the added entries.
Modules should add informations to oyConfig_s::data.

Parameters:
[in]configthe configuration
[in]keya key name, e.g. "my_key"
[in]valuea value, e.g. "my_value"
[in]flagssee oyOptions_s::oyOptions_SetFromText(.., flags,..)
Returns:
0 - good, 1 >= error
Version:
Oyranos: 0.1.10
Since:
2009/01/21 (Oyranos: 0.1.10)
Date:
2009/02/08

We provide basically a wrapper for oyOptions_SetFromText().

References oyConfig_s::db, and oyConfig_s::registration.

Referenced by oyConfig_s::oyConfig_SaveToDB(), oyConfigs_s::oyConfigs_FromDB(), oyDeviceFromJSON(), and oyDeviceSetProfile().

OYAPI int OYEXPORT oyConfig_ClearDBData ( oyConfig_s config)

remove all additional data from the oyConfig_s::db object cache

Function oyConfig_ClearDBCache

Clear the local DB cache. The function will be called as well from oyConfig_GetDB().

Parameters:
[in]configthe configuration
Returns:
0 - good, 1 >= error
Version:
Oyranos: 0.1.10
Since:
2009/02/08 (Oyranos: 0.1.10)
Date:
2009/02/08

References oyConfig_s::db.

Referenced by oyDeviceSetProfile().

int oyConfig_Compare ( oyConfig_s module_device,
oyConfig_s db_pattern,
int32_t *  rank_value 
)

check for matching to a given pattern

Function oyConfig_Compare

Parameters:
[in]module_devicethe to be checked configuration from oyConfigs_FromPattern_f; Additional allowed are DB configs.
[in]db_patternthe to be compared configuration from elsewhere, e.g. ICC dict tag
[out]rank_valuethe number of matches between config and pattern, -1 means invalid
Returns:
0 - good, >= 1 - error + a message should be sent
Version:
Oyranos: 0.1.13
Since:
2009/01/26 (Oyranos: 0.1.10)
Date:
2010/11/21

Option name is equal and and value matches : increase rank value

we need a comparision mechanism here. The pattern value should be expandable to several values. Do we need more than the ICC dict style syntax here?

References oyConfig_s::db, oyConfig_s::oyConfig_DomainRank(), oyFilterRegistrationToText(), oyTextIccDictMatch(), and oyConfig_s::rank_map.

Referenced by oyConfig_s::oyConfig_GetDB(), and oyProfiles_s::oyProfiles_DeviceRank().

OYAPI oyConfig_s *OYEXPORT oyConfig_Copy ( oyConfig_s obj,
oyObject_s  object 
)

copy or reference a Config object

Function oyConfig_Copy

Parameters:
[in]objstruct object
objectthe optional object
Version:
Oyranos: 0.1.10
Since:
2009/01/15 (Oyranos: 0.1.10)
Date:
2009/01/15

Referenced by oyConfig_s::oyConfig_GetDB(), oyConfig_s::oyConfig_New(), and oyDeviceBackendCall().

OYAPI int OYEXPORT oyConfig_Count ( oyConfig_s config)

number of all options

Function oyConfig_Count

Parameters:
[in]configthe configuration
Returns:
the options count
Version:
Oyranos: 0.1.10
Since:
2009/02/08 (Oyranos: 0.1.10)
Date:
2009/02/08

References oyConfig_s::backend_core, oyConfig_s::data, and oyConfig_s::db.

Referenced by oyDeviceSelectSimiliar(), oyDeviceToJSON(), and oyProfile_s::oyProfile_DeviceAdd().

OYAPI int OYEXPORT oyConfig_DomainRank ( oyConfig_s config)

check for being recognised by a given module

Function oyConfig_DomainRank

Parameters:
[in]configthe configuration to be checked wether or not the module can make sense of it and support the data
Returns:
0 - indifferent, <= -1 - no fit
Version:
Oyranos: 0.1.10
Since:
2009/01/26 (Oyranos: 0.1.10)
Date:
2009/01/26

Ask the module if it wants later on to accept this configuration.

References oyCMMapi8_s::oyConfig_Rank, oyConfig_s::registration, and oyCMMapi8_s::release.

Referenced by oyConfig_s::oyConfig_Compare().

OYAPI int OYEXPORT oyConfig_EraseFromDB ( oyConfig_s config)

remove a oyConfig_s from DB

Function oyConfig_EraseFromDB

Parameters:
[in]configthe configuration
Returns:
0 - good, 1 >= error
Version:
Oyranos: 0.1.10
Since:
2009/01/27 (Oyranos: 0.1.10)
Date:
2009/01/27

References oyConfig_s::db, and oyConfig_s::registration.

Referenced by oyDeviceSetProfile().

OYAPI oyOption_s *OYEXPORT oyConfig_Find ( oyConfig_s config,
const char *  key 
)

search in data sets for a key

Function oyConfig_Find

Parameters:
[in]configthe configuration to be checked wether or not the module can make sense of it and support the data
[in]keythe key name
Returns:
the found value
Version:
Oyranos: 0.1.10
Since:
2009/02/08 (Oyranos: 0.1.10)
Date:
2009/02/08

References oyConfig_s::backend_core, oyConfig_s::data, and oyConfig_s::db.

Referenced by oyDeviceAskProfile2(), and oyDeviceProfileFromDB().

OYAPI const char *OYEXPORT oyConfig_FindString ( oyConfig_s config,
const char *  key,
const char *  value 
)

search in data sets for a key/value

Function oyConfig_FindString

Parameters:
[in]configthe configuration to be checked wether or not the module can make sense of it and support the data
[in]keythe key name
[in]valuethe optional value
Returns:
the found value
Version:
Oyranos: 0.1.10
Since:
2009/02/08 (Oyranos: 0.1.10)
Date:
2009/02/08

References oyConfig_s::backend_core, oyConfig_s::data, and oyConfig_s::db.

Referenced by oyConfigs_s::oyConfigs_FromDeviceClass(), oyConfigs_s::oyConfigs_SelectSimiliars(), oyDeviceProfileFromDB(), oyDeviceSelectSimiliar(), oyDeviceSetProfile(), oyDeviceSetup(), oyDeviceUnset(), oyProfile_s::oyProfile_DeviceAdd(), and oyProfiles_s::oyProfiles_DeviceRank().

OYAPI oyOption_s *OYEXPORT oyConfig_Get ( oyConfig_s config,
int  pos 
)

get one option

Function oyConfig_Get

Parameters:
[in]configthe configuration
[in]posoption position
Returns:
the selected option
Version:
Oyranos: 0.1.10
Since:
2009/02/08 (Oyranos: 0.1.10)
Date:
2009/02/08

References oyConfig_s::backend_core, oyConfig_s::data, and oyConfig_s::db.

Referenced by oyDeviceSelectSimiliar(), oyDeviceToJSON(), and oyProfile_s::oyProfile_DeviceAdd().

OYAPI int OYEXPORT oyConfig_GetDB ( oyConfig_s device,
int32_t *  rank_value 
)

search a configuration in the DB for a configuration from module

Function oyConfig_GetDB

Parameters:
[in]devicethe to be checked configuration from oyConfigs_FromPattern_f
[out]rank_valuethe number of matches between config and pattern, -1 means invalid
Returns:
0 - good, >= 1 - error + a message should be sent
Version:
Oyranos: 0.1.10
Since:
2009/01/26 (Oyranos: 0.1.10)
Date:
2009/01/26

References oyConfig_s::db, oyConfig_s::oyConfig_Compare(), oyConfig_s::oyConfig_Copy(), oyConfig_s::oyConfig_Release(), oyConfigs_s::oyConfigs_Count(), oyConfigs_s::oyConfigs_FromDB(), oyConfigs_s::oyConfigs_Get(), and oyConfig_s::registration.

Referenced by oyDeviceProfileFromDB(), and oyDeviceSetProfile().

OYAPI int OYEXPORT oyConfig_Has ( oyConfig_s config,
const char *  key 
)

search in data sets for a key

Function oyConfig_Has

Parameters:
[in]configthe configuration to be checked wether or not the module can make sense of it and support the data
[in]keythe key name
Returns:
0 - not found; 1 - key found
Version:
Oyranos: 0.1.10
Since:
2009/12/10 (Oyranos: 0.1.10)
Date:
2009/12/10

References oyConfig_s::backend_core, oyConfig_s::data, and oyConfig_s::db.

Referenced by oyDeviceSetup().

OYAPI oyConfig_s *OYEXPORT oyConfig_New ( const char *  registration,
oyObject_s  object 
)

allocate a new Config object

Function oyConfig_New

Version:
Oyranos: 0.1.10
Since:
2009/01/15 (Oyranos: 0.1.10)
Date:
2009/01/15

References oyConfig_s::oyConfig_Copy(), oyConfig_s::oyConfig_Release(), and oyConfig_s::release.

Referenced by oyConfigs_s::oyConfigs_FromDB(), oyDeviceFromJSON(), and oyProfiles_s::oyProfiles_DeviceRank().

OYAPI int OYEXPORT oyConfig_Release ( oyConfig_s **  obj)

release and possibly deallocate a Config object

Function oyConfig_Release

Parameters:
[in,out]objstruct object
Version:
Oyranos: 0.1.10
Since:
2009/01/15 (Oyranos: 0.1.10)
Date:
2009/01/15

References oyConfig_s::backend_core, oyConfig_s::data, oyConfig_s::db, and oyConfig_s::rank_map.

Referenced by oyConfig_s::oyConfig_GetDB(), oyConfig_s::oyConfig_New(), oyConfigs_s::oyConfigs_FromDeviceClass(), oyConfigs_s::oyConfigs_FromDomain(), oyConfigs_s::oyConfigs_Modify(), oyConfigs_s::oyConfigs_SelectSimiliars(), oyDeviceGet(), oyDeviceGetInfo(), oyDeviceSelectSimiliar(), and oyDeviceSetProfile().

OYAPI int OYEXPORT oyConfig_SaveToDB ( oyConfig_s config)

store a oyConfig_s in DB

Function oyConfig_SaveToDB

The new key set name is stored inside the key "key_set_name".

Parameters:
[in]configthe configuration
Returns:
0 - good, 1 >= error
Version:
Oyranos: 0.1.10
Since:
2009/01/21 (Oyranos: 0.1.10)
Date:
2011/01/29

References oyConfig_s::backend_core, oyConfig_s::db, oyConfig_s::oyConfig_AddDBData(), and oyConfig_s::registration.

Referenced by oyDeviceSetProfile().

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

    uint32_t count = 0,
           * rank_list = 0;
    char ** texts = 0,
          * temp = 0,
         ** attributes = 0,
          * device_class = 0;
    int i,j, attributes_n;

    // get all configuration filters
    oyConfigDomainList("//"OY_TYPE_STD"/config", &texts, &count,&rank_list ,0 );
    for( i = 0; i < count; ++i )
    {
      attributes_n = 0;

      // pick the filters name and remove the common config part
      temp = oyFilterRegistrationToText( texts[i], oyFILTER_REG_APPLICATION,
                                         malloc );
      attributes = oyStringSplit_( temp, '.', &attributes_n, malloc );
      free(temp);
      temp = malloc(1024); temp[0] = 0;
      for(j = 0; j < attributes_n; ++j)
      {
        if(strcmp(attributes[j], "config") == 0)
          continue;

        if(j && temp[0])
          sprintf( &temp[strlen(temp)], "." );
        sprintf( &temp[strlen(temp)], "%s", attributes[j]);
      }

      // The string in temp can be passed as the device_class argument to 
      // oyDevicesGet()
      printf("%d: %s \"%s\"\n", i, texts[i], temp);

      oyStringListRelease_( &attributes, attributes_n, free );
      free (device_class);
      free(temp);
    }
    
Parameters:
[in]registration_patterna optional filter
[out]listthe list with full filter registrations
[out]countthe list count
[out]rank_listthe rank fitting to list
[in]allocateFuncthe user allocator for list
Returns:
0 - good, >= 1 - error, <= -1 unknown
Version:
Oyranos: 0.1.10
Since:
2009/01/19 (Oyranos: 0.1.10)
Date:
2009/01/19

References oyFILTER_REG_MODE_STRIP_IMPLEMENTATION_ATTR, oyCMMapiFilter_s::registration, and oyCMMapiFilter_s::release.

Referenced by oyConfigs_s::oyConfigs_FromDB(), oyConfigs_s::oyConfigs_FromDeviceClass(), and oyConfigs_s::oyConfigs_Modify().

OYAPI oyConfigs_s *OYEXPORT oyConfigs_Copy ( oyConfigs_s obj,
oyObject_s  object 
)

copy or reference a Configs list

Function oyConfigs_Copy

Parameters:
[in]objstruct object
objectthe optional object
Version:
Oyranos: 0.1.10
Since:
2009/01/19 (Oyranos: 0.1.10)
Date:
2009/01/19

References oyConfigs_s::oy_, and oyConfigs_s::type_.

Referenced by oyConfigs_s::oyConfigs_New().

OYAPI int OYEXPORT oyConfigs_Count ( oyConfigs_s list)

count the elements in a Configs list

Function oyConfigs_Count

Parameters:
[in,out]listthe list
Returns:
element count
Version:
Oyranos: 0.1.10
Since:
2009/01/19 (Oyranos: 0.1.10)
Date:
2009/01/19

References oyConfigs_s::list_.

Referenced by oyConfig_s::oyConfig_GetDB(), oyConfigs_s::oyConfigs_FromDeviceClass(), oyConfigs_s::oyConfigs_FromDomain(), oyConfigs_s::oyConfigs_Modify(), oyConfigs_s::oyConfigs_SelectSimiliars(), oyDeviceSelectSimiliar(), and oyDeviceSetProfile().

OYAPI int OYEXPORT oyConfigs_FromDB ( const char *  registration,
oyConfigs_s **  configs,
oyObject_s  object 
)

get all oyConfigs_s from DB

Function oyConfigs_FromDB

Parameters:
[in]registrationthe filter
[out]configsthe found configuration list
[in]objecta optional user object
Returns:
error
Version:
Oyranos: 0.1.10
Since:
2009/01/23 (Oyranos: 0.1.10)
Date:
2010/02/25

0. setup Elektra

1. get all module names for the registration pattern

2. obtain the directory structure for configurations

3. obtain all keys from one configuration directory

4. create a oyOption_s for each Elektra DB key/value pair

References oyConfig_s::db, oyConfig_s::oyConfig_AddDBData(), oyConfig_s::oyConfig_New(), oyConfigs_s::oyConfigDomainList(), oyConfigs_s::oyConfigs_MoveIn(), oyConfigs_s::oyConfigs_New(), oyConfigs_s::oyConfigs_Release(), oyConfig_s::oyRankMapCopy(), oyConfig_s::rank_map, and oyCMMapi8_s::rank_map.

Referenced by oyConfig_s::oyConfig_GetDB(), and oyDeviceSetProfile().

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

Parameters:
[in]device_typethe device type ::oyFILTER_REG_TYPE, defaults to OY_TYPE_STD (optional)
[in]device_classthe device class, e.g. "monitor", ::oyFILTER_REG_APPLICATION
[in]optionsoptions to pass to the module, for zero the usage instructions are requested, a option "device_name" can be used as filter
[out]devicesthe devices
[in]objectthe optional object
Returns:
0 - good, >= 1 - error
    // pass empty options to the module to get a usage message
    oyOptions_s * options = 0;
    int error = oyConfigs_FromDeviceClass( OY_TYPE_STD, "monitor",
                                              options, 0, 0 );
    
Version:
Oyranos: 0.1.10
Since:
2009/01/28 (Oyranos: 0.1.10)
Date:
2009/01/30

1. obtain detailed and expensive device informations

1.2.1 build a device class registration string

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

References oyConfig_s::oyConfig_FindString(), oyConfig_s::oyConfig_Release(), oyConfigs_s::oyConfigDomainList(), oyConfigs_s::oyConfigs_Count(), oyConfigs_s::oyConfigs_FromDomain(), oyConfigs_s::oyConfigs_Get(), oyConfigs_s::oyConfigs_MoveIn(), oyConfigs_s::oyConfigs_New(), and oyConfigs_s::oyConfigs_Release().

Referenced by oyDeviceGet(), and oyDevicesGet().

OYAPI int OYEXPORT oyConfigs_FromDomain ( const char *  registration_domain,
oyOptions_s *  options,
oyConfigs_s **  configs,
oyObject_s  object 
)

send a request to a configuration module

Function oyConfigs_FromDomain

The convention an empty options argument should be send an Warning message containing intructions on how to talk with the module as a fallback for programmers. Otherwise the calls are pure convention and depend on the usage and agreement of the partners.

For the convention to call to colour devices

See also:
oyX1Configs_FromPatternUsage().
Parameters:
[in]registration_domainthe module to call to
[in]optionsoptions to specify the calling into modules messages are bound to this object
[out]configsthe returned configurations
[in]objecta optional user object
Returns:
0 - good, 1 <= error, -1 >= issues, look for messages
Version:
Oyranos: 0.1.10
Since:
2009/01/16 (Oyranos: 0.1.10)
Date:
2009/01/19

1. first we search for oyCMMapi8_s complex config support matching to our registration_domain 2. if we find a module, we ask for the options 3. add the options to the config (in the module)

References oyConfig_s::backend_core, oyConfig_s::data, oyConfig_s::oyConfig_Release(), oyConfigs_s::oyConfigs_Count(), oyCMMapi8_s::oyConfigs_FromPattern, oyConfigs_s::oyConfigs_Get(), and oyConfigs_s::oyConfigs_Release().

Referenced by oyConfigs_s::oyConfigs_FromDeviceClass(), and oyDeviceUnset().

OYAPI oyConfig_s *OYEXPORT oyConfigs_Get ( oyConfigs_s list,
int  pos 
)

get a element of a Configs list

Function oyConfigs_Get

Parameters:
[in,out]listthe list
posposition
Version:
Oyranos: 0.1.10
Since:
2009/01/19 (Oyranos: 0.1.10)
Date:
2009/01/19

References oyConfigs_s::list_, and oyConfigs_s::type_.

Referenced by oyConfig_s::oyConfig_GetDB(), oyConfigs_s::oyConfigs_FromDeviceClass(), oyConfigs_s::oyConfigs_FromDomain(), oyConfigs_s::oyConfigs_Modify(), oyConfigs_s::oyConfigs_SelectSimiliars(), oyDeviceGet(), oyDeviceSelectSimiliar(), and oyDeviceSetProfile().

OYAPI int OYEXPORT oyConfigs_Modify ( oyConfigs_s configs,
oyOptions_s *  options 
)

ask a module for device informations or other direct calls

Function oyConfigs_Modify

Parameters:
[in,out]configsThe 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]optionsoptions to pass to the module; With zero the usage instructions are requested.
Returns:
0 - good, >= 1 - error, issue <= -1
Version:
Oyranos: 0.1.10
Since:
2009/08/21 (Oyranos: 0.1.10)
Date:
2009/08/25

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 oyConfig_s::oyConfig_Release(), oyConfigs_s::oyConfigDomainList(), oyConfigs_s::oyConfigs_Count(), oyConfigs_s::oyConfigs_Get(), oyCMMapi8_s::oyConfigs_Modify, and oyConfig_s::registration.

Referenced by oyDeviceBackendCall().

OYAPI int OYEXPORT oyConfigs_MoveIn ( oyConfigs_s list,
oyConfig_s **  obj,
int  pos 
)

add a element to a Configs list

Function oyConfigs_MoveIn

Parameters:
[in]listlist
[in,out]objlist element
posposition
Version:
Oyranos: 0.1.10
Since:
2009/01/19 (Oyranos: 0.1.10)
Date:
2009/01/19

References oyConfigs_s::list_, and oyConfigs_s::oyConfigs_New().

Referenced by oyConfigs_s::oyConfigs_FromDB(), oyConfigs_s::oyConfigs_FromDeviceClass(), oyConfigs_s::oyConfigs_SelectSimiliars(), oyDeviceBackendCall(), and oyDeviceSelectSimiliar().

OYAPI oyConfigs_s *OYEXPORT oyConfigs_New ( oyObject_s  object)
OYAPI int OYEXPORT oyConfigs_Release ( oyConfigs_s **  obj)

release and possibly deallocate a Configs list

Function oyConfigs_Release

Parameters:
[in,out]objstruct object
Version:
Oyranos: 0.1.10
Since:
2009/01/19 (Oyranos: 0.1.10)
Date:
2009/01/19

References oyConfigs_s::list_, and oyConfigs_s::oy_.

Referenced by oyConfigs_s::oyConfigs_FromDB(), oyConfigs_s::oyConfigs_FromDeviceClass(), oyConfigs_s::oyConfigs_FromDomain(), oyConfigs_s::oyConfigs_New(), oyDeviceBackendCall(), oyDeviceGet(), oyDeviceSelectSimiliar(), and oyDeviceSetProfile().

OYAPI int OYEXPORT oyConfigs_ReleaseAt ( oyConfigs_s list,
int  pos 
)

release a element from a Configs list

Function oyConfigs_ReleaseAt

Parameters:
[in,out]listthe list
posposition
Version:
Oyranos: 0.1.10
Since:
2009/01/19 (Oyranos: 0.1.10)
Date:
2009/01/19

References oyConfigs_s::list_.

OYAPI int OYEXPORT oyConfigs_SelectSimiliars ( oyConfigs_s list,
const char *  pattern[][2],
oyConfigs_s **  filtered 
)

filter similiar configs compared by a pattern

Function oyConfigs_SelectSimiliars

This is a simple convenience function to select from a list existing configurations.

    const char * pattern[][2] = {{"device_name",0},
                                 {"manufacturer",0},
                                 {"model",0},
                                 {"serial",0},
                                 {0,0}};
    oyConfigs_s * devices = 0, * filtered = 0;
    int error = oyConfigs_FromDB( registration, &devices, 0 );
    error = oyConfigs_SelectSimiliars( devices, pattern, &filtered )
 *  
Parameters:
[in]listthe list
[in]patternuser supplied zero terminated pattern list; The first element is a mandadory key to meet. The second element is the optional value. Each
[out]filteredthe result
Returns:
error
Version:
Oyranos: 0.1.10
Since:
2009/02/26 (Oyranos: 0.1.10)
Date:
2009/02/26

0. setup Elektra

References oyConfig_s::oyConfig_FindString(), oyConfig_s::oyConfig_Release(), oyConfigs_s::oyConfigs_Count(), oyConfigs_s::oyConfigs_Get(), oyConfigs_s::oyConfigs_MoveIn(), and oyConfigs_s::oyConfigs_New().

oyRankPad * oyRankMapCopy ( const oyRankPad *  rank_map,
oyAlloc_f  allocateFunc 
)

copy a rank map

Function oyRankMapCopy

Version:
Oyranos: 0.1.10
Since:
2009/01/27 (Oyranos: 0.1.10)
Date:
2009/01/27

Referenced by oyConfigs_s::oyConfigs_FromDB().

int oyRegistrationEraseFromDB ( const char *  registration)

remove a registration config from DB

Function oyRegistrationEraseFromDB

The configs registration needs to be a config group, one with 4 slashes. The last level is typical a number.

Parameters:
[in]config_registrationthe configuration
Returns:
0 - good, 1 >= error
Version:
Oyranos: 0.3.0
Since:
2009/01/27 (Oyranos: 0.3.0)
Date:
2011/01/29