oyProfileTag_s Struct Reference
Description: C source code API documentation for the Oyranos project.
Keywords: Oyranos,Color Management,Color Management,ICC,CMS,C,doxygen,API,documentation

| Oyranos Color Management System API - Version 0.9.6

Public Member Functions | Data Fields
oyProfileTag_s Struct Reference
Color » ICC Profile APIs

A profile constituting element. More...

`#include <oyProfileTag_s.h>`

Inheritance diagram for oyProfileTag_s:
Collaboration diagram for oyProfileTag_s:

## Public Member Functions
OYAPI oyProfileTag_s *OYEXPORT | oyProfileTag_New (oyObject_s object)
| allocate a new ProfileTag object More...
| oyProfileTag_Copy
| 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, 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_s * | oyProfileTag_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...
| oyStruct_RegisterStaticMessageFunc
| register a function for verbosity More...
| oyStruct_GetInfo
| 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...
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

## ◆ oyProfileTag_Copy()

oyProfileTag_Copy

Copy or Reference a ProfileTag object.

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

Parameters

  [in] | profiletag | ProfileTag struct object
  | object | NULL - means reference, the optional object triggers a real copy

## ◆ oyProfileTag_Create()

OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_Create | ( | oyStructList_s * | list,
|  | icTagSignature | tag_use,
|  | icTagTypeSignature | tag_type,
|  | uint32_t | version,
|  | 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] | list | a list of arguments
  [in] | tag_type | type to create
  [in] | version | version as supported
  [in] | object | the user object for the tag creation

Returns
  a profile tag

Version
  Oyranos: 0.9.6

Date
  2015/01/26

Since
  2008/01/08 (Oyranos: 0.1.8)

## ◆ oyProfileTag_CreateFromData()

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] | sig | usage signature
  [in] | type | content type
  [in] | status | to be set
  [in] | tag_size | memory size of tag_block
  [in] | tag_block | the to be copied memory
  [in] | object | the 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().

## ◆ oyProfileTag_CreateFromText()

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] | text | a string
  [in] | tag_type | type to create, e.g. icSigTextDescriptionType or icSigTextType
  [in] | tag_usage | signature, e.g. icSigCopyrightTag
  [in] | object | the 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 oyNAME_NAME, oyStructList_s::oyStructList_MoveIn(), and oyStructList_s::oyStructList_New().

## ◆ oyProfileTag_Get()

oyStructList_s * oyProfileTag_Get | ( | oyProfileTag_s * | tag | ) |

Function oyProfileTag_Get

Parameters

  [in] | tag | the 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_PROFILE_TAG_S, and oyQUERY_PROFILE_TAG_TYPE_READ.

## ◆ oyProfileTag_GetBlock()

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] | tag | the tag to read
  [out] | tag_block | the raw data owned by the user; on success the block if it has a size; else undefined; optional
  [out] | tag_size | the data size; on success the size returned in tag_block else undefined
  [in] | allocateFunc | the 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.

## ◆ oyProfileTag_GetCMM()

OYAPI const char *OYEXPORT oyProfileTag_GetCMM | ( | oyProfileTag_s * | tag | ) |

Get the profile cmm of the tag.

Function oyProfileTag_GetCMM

Parameters

  [in,out] | tag | the tag to read

Returns
  cmm string

Version
  Oyranos: 0.5.0

Since
  2012/09/05 (Oyranos: 0.5.0)

Date
  2012/09/05

References oyOBJECT_PROFILE_TAG_S.

## ◆ oyProfileTag_GetLastCMM()

OYAPI const char *OYEXPORT oyProfileTag_GetLastCMM | ( | oyProfileTag_s * | tag | ) |

Get the last processing cmm of the tag.

Function oyProfileTag_GetLastCMM

Parameters

  [in,out] | tag | the tag to read

Returns
  cmm string

Version
  Oyranos: 0.5.0

Since
  2012/09/05 (Oyranos: 0.5.0)

Date
  2012/09/05

References oyOBJECT_PROFILE_TAG_S.

## ◆ oyProfileTag_GetOffset()

size_t oyProfileTag_GetOffset | ( | oyProfileTag_s * | tag | ) |

Get the offset of the tag in the profile.

Function oyProfileTag_GetOffset

Parameters

  [in] | tag | the 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.

## ◆ oyProfileTag_GetRequiredCMM()

OYAPI const char *OYEXPORT oyProfileTag_GetRequiredCMM | ( | oyProfileTag_s * | tag | ) |

Get the certainly selected CMM.

Function oyProfileTag_GetRequiredCMM

Parameters

  [in,out] | tag | the tag to read

Returns
  cmm string

Version
  Oyranos: 0.5.0

Since
  2012/09/05 (Oyranos: 0.5.0)

Date
  2012/09/05

References oyOBJECT_PROFILE_TAG_S.

## ◆ oyProfileTag_GetSize()

OYAPI size_t OYEXPORT oyProfileTag_GetSize | ( | oyProfileTag_s * | tag | ) |

Get the data size.

Function oyProfileTag_GetSize

Parameters

  [in] | tag | the 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.

## ◆ oyProfileTag_GetSizeCheck()

OYAPI size_t OYEXPORT oyProfileTag_GetSizeCheck | ( | oyProfileTag_s * | tag | ) |

Get the data check size.

Function oyProfileTag_GetSizeCheck

Parameters

  [in] | tag | the 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.

## ◆ oyProfileTag_GetStatus()

oySTATUS_e oyProfileTag_GetStatus | ( | oyProfileTag_s * | tag | ) |

Get the status.

Function oyProfileTag_GetStatus

Parameters

  [in] | tag | the tag to read

Returns
  status

Version
  Oyranos: 0.5.0

Since
  2012/09/05 (Oyranos: 0.5.0)

Date
  2012/09/05

## ◆ oyProfileTag_GetText()

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

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] | tag | the tag to read
  [out] | n | the number of returned strings
  [in] | language | 2 byte language code, or "" for current
  [in] | country | 2 byte country code
  [out] | tag_size | the processed tag size
  [in] | allocateFunc | the 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

## ◆ oyProfileTag_GetType()

OYAPI icTagTypeSignature OYEXPORT oyProfileTag_GetType | ( | oyProfileTag_s * | tag | ) |

Get the type signature.

Function oyProfileTag_GetType

Parameters

  [in,out] | tag | the tag to read

Returns
  type signature

Version
  Oyranos: 0.5.0

Since
  2012/09/24 (Oyranos: 0.5.0)

Date
  2012/09/24

References oyOBJECT_PROFILE_TAG_S.

## ◆ oyProfileTag_GetUse()

OYAPI icTagSignature OYEXPORT oyProfileTag_GetUse | ( | oyProfileTag_s * | tag | ) |

Get the usage signature.

Function oyProfileTag_GetUse

Parameters

  [in,out] | tag | the tag to read

Returns
  use signature

Version
  Oyranos: 0.5.0

Since
  2012/09/05 (Oyranos: 0.5.0)

Date
  2012/09/05

References oyOBJECT_PROFILE_TAG_S.

## ◆ oyProfileTag_New()

OYAPI oyProfileTag_s *OYEXPORT oyProfileTag_New | ( | oyObject_s | object | ) |

allocate a new ProfileTag object

Function oyProfileTag_New

References oyOBJECT_OBJECT_S.

Referenced by oyProfileTag_CreateFromData().

## ◆ oyProfileTag_Release()

OYAPI int OYEXPORT oyProfileTag_Release | ( | oyProfileTag_s ** | profiletag | ) |

release and possibly deallocate a oyProfileTag_s object

Function oyProfileTag_Release

Parameters

  [in,out] | profiletag | ProfileTag struct object

References oyOBJECT_PROFILE_TAG_S.

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

## ◆ oyProfileTag_Set()

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] | tag | the to be manipulated ICC profile object
  [in] | sig | usage signature
  [in] | type | content type
  [in] | status | to be set
  [in] | tag_size | memory size of tag_block
  [in] | tag_block | the 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.

## ◆ oyProfileTag_SetCMM()

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

Set the profile CMM in the tag.

Function oyProfileTag_SetCMM

Parameters

  [in,out] | tag | the tag to read
  [in] | profile_cmm | new cmm, 4 bytes

Returns
  0 - success, >= 1 - error

Version
  Oyranos: 0.5.0

Since
  2012/09/05 (Oyranos: 0.5.0)

Date
  2012/09/05

References oyOBJECT_PROFILE_TAG_S.

## ◆ oyProfileTag_SetLastCMM()

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

Set the last processing CMM.

Function oyProfileTag_SetLastCMM

Parameters

  [in,out] | tag | the tag to read
  [in] | cmm | CMM, 4 bytes

Returns
  0 - success, >= 1 - error

Version
  Oyranos: 0.5.0

Since
  2012/09/05 (Oyranos: 0.5.0)

Date
  2012/09/05

References oyOBJECT_PROFILE_TAG_S.

## ◆ oyProfileTag_SetOffset()

int oyProfileTag_SetOffset | ( | oyProfileTag_s * | tag,
|  | size_t | offset
| ) |  |

Set the offset of the tag in the profile.

Function oyProfileTag_SetOffset

Parameters

  [in,out] | tag | the tag to read
  [in] | offset | new offset

Returns
  0 - success, >= 1 - error

Version
  Oyranos: 0.5.0

Since
  2012/09/05 (Oyranos: 0.5.0)

Date
  2012/09/05

References oyOBJECT_PROFILE_TAG_S.

## ◆ oyProfileTag_SetRequiredCMM()

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

Require a certain CMM.

Function oyProfileTag_SetRequiredCMM

Parameters

  [in,out] | tag | the tag to read
  [in] | cmm | CMM, 4 bytes

Returns
  0 - success, >= 1 - error

Version
  Oyranos: 0.5.0

Since
  2012/09/05 (Oyranos: 0.5.0)

Date
  2012/09/05

References oyOBJECT_PROFILE_TAG_S.

## ◆ oyProfileTag_SetSizeCheck()

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.

## ◆ oyProfileTag_SetStatus()

int oyProfileTag_SetStatus | ( | oyProfileTag_s * | tag,
|  | oySTATUS_e | status
| ) |  |

Set the status.

Function oyProfileTag_SetStatus

Parameters

  [in,out] | tag | the tag to read
  [in] | status | new status

Returns
  0 - success, >= 1 - error

Version
  Oyranos: 0.5.0

Since
  2012/09/05 (Oyranos: 0.5.0)

Date
  2012/09/05

References oyOBJECT_PROFILE_TAG_S.

## Field Documentation

## ◆ copy

oyStruct_Copy_f oyProfileTag_s::copy

Copy function.

## ◆ oy_

oyObject_s oyProfileTag_s::oy_

Oyranos internal object.

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

Referenced by oyProfileTag_Set().

## ◆ release

oyStruct_Release_f oyProfileTag_s::release

Release function.

## ◆ type_

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().