| Oyranos Colour Management System API

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

Public Member Functions | Data Fields
oyProfileTag_s Struct Reference
Profile API

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...
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_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_GetText (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags)
| get a text dump More...

## Data Fields

oyStruct_Copy_f | copy
oyStruct_Release_f | release
Data Fields inherited from oyStruct_s
oyStruct_Copy_f | copy
oyStruct_Release_f | release

## 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] | profiletag | ProfileTag struct object
  | object | NULL - 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] | list | a list of arguments
  [in] | tag_type | type to create
  [in] | version | version as supported
  [in,out] | required_cmm | in: CMM to create the tag; out: used CMM
  [in] | object | the 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, and oyProfileTag_New().

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

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, 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] | 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_CMM_API3_S, and oyOBJECT_PROFILE_TAG_S.

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

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.

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.

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.

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.

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.

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.

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

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] | 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.1.8

Since
  2008/01/03 (Oyranos: 0.1.8)

Date
  2008/06/19

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

  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.

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.

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] | profiletag | ProfileTag 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] | 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 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

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

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.

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.

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.

OYAPI void OYEXPORT oyProfileTag_SetSizeCheck | ( | oyProfileTag_s * | tag,
|  | size_t | size_check
| ) |  |

Set the data check size.

Function oyProfileTag_SetSizeCheck

Parameters

  | in/out] | tag the tag to read
  [in] | check | size

Version
  Oyranos: 0.5.0

Since
  2012/09/24 (Oyranos: 0.5.0)

Date
  2012/09/24

References oyOBJECT_PROFILE_TAG_S.

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

oyStruct_Copy_f oyProfileTag_s::copy

copy function

oyStruct_Release_f oyProfileTag_s::release

release function