Oyranos Color Management System API
Public Member Functions | Data Fields
oyProfileTag_s Struct Reference

A profile constituting element. More...

#include <oyProfileTag_s.h>

Inheritance diagram for oyProfileTag_s:
Inheritance graph
Collaboration diagram for oyProfileTag_s:
Collaboration graph

Public Member Functions

OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_New (oyObject_s object)
 allocate a new ProfileTag object More...
 
OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_Copy (oyProfileTag_s *profiletag, oyObject_s object)
 copy or reference a ProfileTag object More...
 
OYAPI int OYEXPORT oyProfileTag_Release (oyProfileTag_s **profiletag)
 release and possibly deallocate a oyProfileTag_s object More...
 
OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_Create (oyStructList_s *list, icTagSignature tag_use, icTagTypeSignature tag_type, uint32_t version, const char *required_cmm, oyObject_s object)
 Create a oyProfileTag_s from a list of arguments. More...
 
OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_CreateFromText (const char *text, icTagTypeSignature tag_type, icTagSignature tag_usage, oyObject_s object)
 Create a oyProfileTag_s from a string. More...
 
OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_CreateFromData (icTagSignature sig, icTagTypeSignature type, oySTATUS_e status, size_t tag_size, oyPointer tag_block, oyObject_s object)
 Create a oyProfileTag_s from some data. More...
 
OYAPI int OYEXPORT oyProfileTag_Set (oyProfileTag_s *tag, icTagSignature sig, icTagTypeSignature type, oySTATUS_e status, size_t tag_size, oyPointer tag_block)
 The function is a simple setter for the object elements. More...
 
oyStructList_soyProfileTag_Get (oyProfileTag_s *tag)
 
char ** oyProfileTag_GetText (oyProfileTag_s *tag, int32_t *n, const char *language, const char *country, int32_t *tag_size, oyAlloc_f allocateFunc)
 
int oyProfileTag_GetBlock (oyProfileTag_s *tag, oyPointer *tag_block, size_t *tag_size, oyAlloc_f allocateFunc)
 Get the raw memory block of the tag. More...
 
size_t oyProfileTag_GetOffset (oyProfileTag_s *tag)
 Get the offset of the tag in the profile. More...
 
int oyProfileTag_SetOffset (oyProfileTag_s *tag, size_t offset)
 Set the offset of the tag in the profile. More...
 
oySTATUS_e oyProfileTag_GetStatus (oyProfileTag_s *tag)
 Get the status. More...
 
int oyProfileTag_SetStatus (oyProfileTag_s *tag, oySTATUS_e status)
 Set the status. More...
 
OYAPI const char *OYEXPORT oyProfileTag_GetCMM (oyProfileTag_s *tag)
 Get the profile cmm of the tag. More...
 
OYAPI int OYEXPORT oyProfileTag_SetCMM (oyProfileTag_s *tag, const char *profile_cmm)
 Set the profile CMM in the tag. More...
 
OYAPI const char *OYEXPORT oyProfileTag_GetLastCMM (oyProfileTag_s *tag)
 Get the last processing cmm of the tag. More...
 
OYAPI int OYEXPORT oyProfileTag_SetLastCMM (oyProfileTag_s *tag, const char *cmm)
 Set the last processing CMM. More...
 
OYAPI const char *OYEXPORT oyProfileTag_GetRequiredCMM (oyProfileTag_s *tag)
 Get the certainly selected CMM. More...
 
OYAPI int OYEXPORT oyProfileTag_SetRequiredCMM (oyProfileTag_s *tag, const char *cmm)
 Require a certain CMM. More...
 
OYAPI icTagSignature OYEXPORT oyProfileTag_GetUse (oyProfileTag_s *tag)
 Get the usage signature. More...
 
OYAPI icTagTypeSignature OYEXPORT oyProfileTag_GetType (oyProfileTag_s *tag)
 Get the type signature. More...
 
OYAPI size_t OYEXPORT oyProfileTag_GetSize (oyProfileTag_s *tag)
 Get the data size. More...
 
OYAPI size_t OYEXPORT oyProfileTag_GetSizeCheck (oyProfileTag_s *tag)
 Get the data check size. More...
 
OYAPI void OYEXPORT oyProfileTag_SetSizeCheck (oyProfileTag_s *tag, size_t size_check)
 Set the data check size. More...
 
- Public Member Functions inherited from oyStruct_s
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...
 

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...
 
- Data Fields inherited from oyStruct_s
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...
 

Detailed Description

A profile constituting element.

Since
Oyranos: version 0.1.8
Date
1 january 2008 (API 0.1.8)

Member Function Documentation

OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_Copy ( oyProfileTag_s profiletag,
oyObject_s  object 
)

copy or reference a ProfileTag object

Function oyProfileTag_Copy

The function is for copying and for referencing. The reference is the most often used way, which saves resourcs and time.

Parameters
[in]profiletagProfileTag struct object
objectNULL - means reference, the optional object triggers a real copy

References oyOBJECT_PROFILE_TAG_S.

OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_Create ( oyStructList_s list,
icTagSignature  tag_use,
icTagTypeSignature  tag_type,
uint32_t  version,
const char *  required_cmm,
oyObject_s  object 
)

Create a oyProfileTag_s from a list of arguments.

Function oyProfileTag_Create

The API relies on an generic arguments inside a list. The arguments are not specified here but in the appropriate modules. This allows flexibility, which needs more understanding.

For the effect of the parameters look at the appropriate module documentation and the function infos.

See also
oyraProfileTag_Create
oyraFunctionGetInfo
Parameters
[in]lista list of arguments
[in]tag_typetype to create
[in]versionversion as supported
[in,out]required_cmmin: CMM to create the tag; out: used CMM
[in]objectthe user object for the tag creation
Returns
a profile tag
Version
Oyranos: 0.1.8
Since
2008/01/08 (Oyranos: 0.1.8)
Date
2008/01/08

References oyOBJECT_CMM_API3_S, oyOBJECT_STRUCT_LIST_S, oyProfileTag_New(), and oyQUERY_PROFILE_TAG_TYPE_WRITE.

Referenced by oyProfile_s::oyProfile_AddTagText(), and oyProfileTag_CreateFromText().

OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_CreateFromData ( icTagSignature  sig,
icTagTypeSignature  type,
oySTATUS_e  status,
size_t  tag_size,
oyPointer  tag_block,
oyObject_s  object 
)

Create a oyProfileTag_s from some data.

Function oyProfileTag_CreateFromData

Parameters
[in]sigusage signature
[in]typecontent type
[in]statusto be set
[in]tag_sizememory size of tag_block
[in]tag_blockthe to be copied memory
[in]objectthe user object for the tag creation
Returns
a profile tag
Version
Oyranos: 0.3.1
Since
2011/05/13 (Oyranos: 0.3.1)
Date
2011/05/13

References oyOBJECT_PROFILE_TAG_S, and oyProfileTag_New().

OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_CreateFromText ( const char *  text,
icTagTypeSignature  tag_type,
icTagSignature  tag_usage,
oyObject_s  object 
)

Create a oyProfileTag_s from a string.

Function oyProfileTag_CreateFromText

Parameters
[in]texta string
[in]tag_typetype to create, e.g. icSigTextDescriptionType or icSigTextType
[in]tag_usagesignature, e.g. icSigCopyrightTag
[in]objectthe user object for the tag creation
Returns
a profile tag
Version
Oyranos: 0.1.10
Since
2009/01/06 (Oyranos: 0.1.10)
Date
2009/01/06

References OY_MODULE_NICK, oyNAME_NAME, oyProfileTag_Create(), oyStructList_s::oyStructList_MoveIn(), oyStructList_s::oyStructList_New(), and oyStructList_s::oyStructList_Release().

oyStructList_s * oyProfileTag_Get ( oyProfileTag_s tag)

Function oyProfileTag_Get

Hint: to select a certain module use the oyProfileTag_s::required_cmm element from the tag parameter.

Parameters
[in]tagthe tag to read
Returns
a list of strings
Version
Oyranos: 0.3.1
Since
2008/06/19 (Oyranos: 0.1.8)
Date
2008/05/17

References oyOBJECT_CMM_API3_S, oyOBJECT_PROFILE_TAG_S, and oyQUERY_PROFILE_TAG_TYPE_READ.

Referenced by oyProfileTag_GetText().

int oyProfileTag_GetBlock ( oyProfileTag_s tag,
oyPointer *  tag_block,
size_t *  tag_size,
oyAlloc_f  allocateFunc 
)

Get the raw memory block of the tag.

Function oyProfileTag_GetBlock

Parameters
[in]tagthe tag to read
[out]tag_blockthe raw data owned by the user; on success the block if it has a size; else undefined; optional
[out]tag_sizethe data size; on success the size returned in tag_block else undefined
[in]allocateFuncthe user allocator, optional
Returns
0 - success, >= 1 - error
Version
Oyranos: 0.2.0
Since
2010/01/31 (Oyranos: 0.2.0)
Date
2010/06/31

References oyOBJECT_PROFILE_TAG_S.

OYAPI const char *OYEXPORT oyProfileTag_GetCMM ( oyProfileTag_s tag)

Get the profile cmm of the tag.

Function oyProfileTag_GetCMM

Parameters

References oyOBJECT_PROFILE_TAG_S.

OYAPI const char *OYEXPORT oyProfileTag_GetLastCMM ( oyProfileTag_s tag)

Get the last processing cmm of the tag.

Function oyProfileTag_GetLastCMM

Parameters

References oyOBJECT_PROFILE_TAG_S.

size_t oyProfileTag_GetOffset ( oyProfileTag_s tag)

Get the offset of the tag in the profile.

Function oyProfileTag_GetOffset

Parameters
[in]tagthe tag to read
Returns
offset
Version
Oyranos: 0.5.0
Since
2012/09/05 (Oyranos: 0.5.0)
Date
2012/09/05

References oyOBJECT_PROFILE_TAG_S.

OYAPI const char *OYEXPORT oyProfileTag_GetRequiredCMM ( oyProfileTag_s tag)

Get the certainly selected CMM.

Function oyProfileTag_GetRequiredCMM

Parameters

References oyOBJECT_PROFILE_TAG_S.

OYAPI size_t OYEXPORT oyProfileTag_GetSize ( oyProfileTag_s tag)

Get the data size.

Function oyProfileTag_GetSize

Parameters
[in]tagthe tag to read
Returns
size
Version
Oyranos: 0.5.0
Since
2012/09/05 (Oyranos: 0.5.0)
Date
2012/09/05

References oyOBJECT_PROFILE_TAG_S.

OYAPI size_t OYEXPORT oyProfileTag_GetSizeCheck ( oyProfileTag_s tag)

Get the data check size.

Function oyProfileTag_GetSizeCheck

Parameters
[in]tagthe tag to read
Returns
check size
Version
Oyranos: 0.5.0
Since
2012/09/24 (Oyranos: 0.5.0)
Date
2012/09/24

References oyOBJECT_PROFILE_TAG_S.

oySTATUS_e oyProfileTag_GetStatus ( oyProfileTag_s tag)

Get the status.

Function oyProfileTag_GetStatus

Parameters
[in]tagthe tag to read
Returns
status
Version
Oyranos: 0.5.0
Since
2012/09/05 (Oyranos: 0.5.0)
Date
2012/09/05

References oyOBJECT_PROFILE_TAG_S.

char ** oyProfileTag_GetText ( oyProfileTag_s tag,
int32_t *  n,
const char *  language,
const char *  country,
int32_t *  tag_size,
oyAlloc_f  allocateFunc 
)

Function oyProfileTag_GetText

For the effect of the parameters look at the appropriate module.

See also
oyIMProfileTag_GetValues

Hint: to select a certain module use the oyProfileTag_s::required_cmm element from the tag parameter.

For localised strings, e.g. icSigMultiLocalizedUnicodeType:

  • zero language and country args: all localisation strings are returned
  • with language and/or country args: return appropriate matches
  • for language != "", the string starts with language code, the text follows after a colon ":"
  • a non zero but empty language argument == "", returns the pure string in the actual Oyranos locale, no language code
Parameters
[in]tagthe tag to read
[out]nthe number of returned strings
[in]language2 byte language code, or "" for current
[in]country2 byte country code
[out]tag_sizethe processed tag size
[in]allocateFuncthe user allocator for the returned list
Returns
a list of strings
Version
Oyranos: 0.9.5
Since
2008/01/03 (Oyranos: 0.1.8)
Date
2014/01/18

References oyBlob_s::oyBlob_GetPointer(), oyBlob_s::oyBlob_GetSize(), oyCountry(), oyLanguage(), oyOBJECT_BLOB_S, oyOBJECT_NAME_S, oyOBJECT_PROFILE_TAG_S, oyProfileTag_Get(), oyStructList_s::oyStructList_Count(), oyStructList_s::oyStructList_GetRefType(), and oyStructList_s::oyStructList_Release().

Referenced by oyProfile_s::oyProfile_GetDevice(), oyProfile_s::oyProfile_GetFileName(), and oyProfile_s::oyProfile_GetText().

OYAPI icTagTypeSignature OYEXPORT oyProfileTag_GetType ( oyProfileTag_s tag)

Get the type signature.

Function oyProfileTag_GetType

Parameters

References oyOBJECT_PROFILE_TAG_S.

OYAPI icTagSignature OYEXPORT oyProfileTag_GetUse ( oyProfileTag_s tag)

Get the usage signature.

Function oyProfileTag_GetUse

Parameters

References oyOBJECT_PROFILE_TAG_S.

OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_New ( oyObject_s  object)

allocate a new ProfileTag object

Function oyProfileTag_New

References oyOBJECT_OBJECT_S.

Referenced by oyProfile_s::oyProfile_AddDevice(), oyProfileTag_Create(), and oyProfileTag_CreateFromData().

OYAPI int OYEXPORT oyProfileTag_Release ( oyProfileTag_s **  profiletag)

release and possibly deallocate a oyProfileTag_s object

Function oyProfileTag_Release

Parameters
[in,out]profiletagProfileTag struct object

References oyOBJECT_PROFILE_TAG_S.

Referenced by oyProfile_s::oyProfile_GetTagById(), oyProfile_s::oyProfile_GetTagCount(), and oyProfile_s::oyProfile_TagMoveIn().

OYAPI int OYEXPORT oyProfileTag_Set ( oyProfileTag_s tag,
icTagSignature  sig,
icTagTypeSignature  type,
oySTATUS_e  status,
size_t  tag_size,
oyPointer  tag_block 
)

The function is a simple setter for the object elements.

Function oyProfileTag_Set

Parameters
[in,out]tagthe to be manipulated ICC profile object
[in]sigusage signature
[in]typecontent type
[in]statusto be set
[in]tag_sizememory size of tag_block
[in]tag_blockthe block to be moved into the object; The pointer is owned by the object. Its memory should be allocated as with the same allocators as the object.
Returns
0 - success, 1 - error
Version
Oyranos: 0.1.10
Since
2008/01/01 (Oyranos: 0.1.8)
Date
2009/11/06

References oy_, and oyOBJECT_PROFILE_TAG_S.

Referenced by oyProfile_s::oyProfile_AddDevice().

OYAPI int OYEXPORT oyProfileTag_SetCMM ( oyProfileTag_s tag,
const char *  profile_cmm 
)

Set the profile CMM in the tag.

Function oyProfileTag_SetCMM

Parameters

References oyOBJECT_PROFILE_TAG_S.

OYAPI int OYEXPORT oyProfileTag_SetLastCMM ( oyProfileTag_s tag,
const char *  cmm 
)

Set the last processing CMM.

Function oyProfileTag_SetLastCMM

Parameters

References oyOBJECT_PROFILE_TAG_S.

int oyProfileTag_SetOffset ( oyProfileTag_s tag,
size_t  offset 
)

Set the offset of the tag in the profile.

Function oyProfileTag_SetOffset

Parameters

References oyOBJECT_PROFILE_TAG_S.

OYAPI int OYEXPORT oyProfileTag_SetRequiredCMM ( oyProfileTag_s tag,
const char *  cmm 
)

Require a certain CMM.

Function oyProfileTag_SetRequiredCMM

Parameters

References oyOBJECT_PROFILE_TAG_S.

OYAPI void OYEXPORT oyProfileTag_SetSizeCheck ( oyProfileTag_s tag,
size_t  size_check 
)

Set the data check size.

Function oyProfileTag_SetSizeCheck

Parameters

References oyOBJECT_PROFILE_TAG_S.

int oyProfileTag_SetStatus ( oyProfileTag_s tag,
oySTATUS_e  status 
)

Set the status.

Function oyProfileTag_SetStatus

Parameters

References oyOBJECT_PROFILE_TAG_S.

Field Documentation

oyStruct_Copy_f oyProfileTag_s::copy

Copy function.

oyObject_s oyProfileTag_s::oy_

Oyranos internal object.

Features name and hash. Do not change during object life time.

Referenced by oyProfile_s::oyProfile_GetText(), and oyProfileTag_Set().

oyStruct_Release_f oyProfileTag_s::release

Release function.

const oyOBJECT_e oyProfileTag_s::type_

Type of object.

The struct type tells Oyranos how to interprete hidden fields.

Referenced by oyProfile_s::oyProfile_TagMoveIn().