Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
ShiAttributes.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | Sushi - Attributes
4 |
5 | $Id: ShiAttributes.h 7930 2014-06-25 11:05:10Z jebaseelir $
6 | Original author: Gilles Boccon-Gibod
7 |
8 | This software is provided to you pursuant to your agreement
9 | with Intertrust Technologies Corporation ("Intertrust").
10 | This software may be used only in accordance with the terms
11 | of the agreement.
12 |
13 | Copyright (c) 2005-2014 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
21 #ifndef _SHI_ATTRIBUTES_H_
22 #define _SHI_ATTRIBUTES_H_
23 
24 /*----------------------------------------------------------------------
25 | includes
26 +---------------------------------------------------------------------*/
27 #include "ShiResults.h"
28 #include "ShiTypes.h"
29 #include "ShiInterfaces.h"
30 
31 /*----------------------------------------------------------------------
32 | constants
33 +---------------------------------------------------------------------*/
42 #define SHI_ATTRIBUTE_FLAG_VALUE_IS_CRITICAL 1
43 
48 #define SHI_ATTRIBUTE_FLAG_VALUE_IS_HUMAN_READABLE 2
49 
50 /*----------------------------------------------------------------------
51 | types
52 +---------------------------------------------------------------------*/
56 typedef enum {
66 
71 typedef struct {
72  const char* mime_type;
73  const char* language;
75 } SHI_Resource;
76 
82 typedef union {
83  const char* string;
90 
91 /*----------------------------------------------------------------------
92 | interfaces
93 +---------------------------------------------------------------------*/
94 #if defined(__cplusplus)
95 extern "C" {
96 #endif
97 
111 
126 
135 const char*
137 
147 
158 SHI_Flags
160 
175 
187 
202  const char* name,
203  SHI_Attribute** child);
204 
219  SHI_Ordinal indx,
220  SHI_Attribute** child);
221 
223 #if defined(__cplusplus)
224 }
225 #endif
226 
227 #endif /* _SHI_ATTRIBUTES_H_ */
#define SHI_PUBLIC_API
Definition: ShiTypes.h:52
The attribute value is a SHI_Int32.
Definition: ShiAttributes.h:58
SHI_PUBLIC_API const char * SHI_Attribute_GetName(SHI_Attribute *self)
Returns the name of this attribute.
Result codes.
const char * language
Language (RFC 3066)
Definition: ShiAttributes.h:73
Interfaces.
Attribute value.
Definition: ShiAttributes.h:82
SHI_PUBLIC_API SHI_Cardinal SHI_Attribute_GetChildCount(SHI_Attribute *self)
Returns the number of children of this attribute.
struct SHI_Attribute SHI_Attribute
SHI_Attribute objects represent named values that can be arranged in a tree structure.
Definition: ShiAttributes.h:110
SHI_UInt32 SHI_Ordinal
An unsigned integer that represents a position in a sequence (such as an index into a list of element...
Definition: ShiTypes.h:118
Typed resource.
Definition: ShiAttributes.h:71
SHI_Float floatv
A floating-point value.
Definition: ShiAttributes.h:85
SHI_DateTime date
A date.
Definition: ShiAttributes.h:86
The attribute value is a SHI_DateTime.
Definition: ShiAttributes.h:61
SHI_PUBLIC_API SHI_Result SHI_Attribute_GetChildByIndex(SHI_Attribute *self, SHI_Ordinal indx, SHI_Attribute **child)
Gets a child of this attribute by index.
SHI_PUBLIC_API SHI_Result SHI_Attribute_Release(SHI_Attribute *self)
Releases this attribute object.
const char * mime_type
MIME type of the payload data.
Definition: ShiAttributes.h:72
SHI_UInt32 SHI_Cardinal
An unsigned integer used to represent a quantity that can be counted (such as a number of elements in...
Definition: ShiTypes.h:112
signed int SHI_Int32
32-bit (or more) signed integer
Definition: ShiTypes.h:28
SHI_ByteArray payload
Resource payload data.
Definition: ShiAttributes.h:74
SHI_Int32 integer
An integer number.
Definition: ShiAttributes.h:84
float SHI_Float
IEEE float.
Definition: ShiTypes.h:33
const char * string
A character string.
Definition: ShiAttributes.h:83
A date and time.
Definition: ShiTypes.h:128
SHI_Resource resource
A typed resource.
Definition: ShiAttributes.h:88
The attribute value is a const char*.
Definition: ShiAttributes.h:60
The attribute value is a SHI_Float.
Definition: ShiAttributes.h:59
An untyped array of bytes.
Definition: ShiTypes.h:141
The attribute contains a list of attributes.
Definition: ShiAttributes.h:63
SHI_PUBLIC_API SHI_Result SHI_Attribute_GetChildByName(SHI_Attribute *self, const char *name, SHI_Attribute **child)
Gets a child of this attribute by name.
SHI_PUBLIC_API SHI_Flags SHI_Attribute_GetFlags(SHI_Attribute *self)
Returns the flags of this attribute.
SHI_PUBLIC_API SHI_AttributeType SHI_Attribute_GetType(SHI_Attribute *self)
Returns the type of this attribute.
Common data types.
The attribute value type is unknown.
Definition: ShiAttributes.h:57
SHI_UInt32 SHI_Flags
Type used to represent a bit pattern signifying a combination of flags that can be on or off...
Definition: ShiTypes.h:84
int SHI_Result
Signed integer value representing a function or method result (return value).
Definition: ShiTypes.h:74
SHI_PUBLIC_API SHI_Result SHI_Attribute_GetValue(SHI_Attribute *self, SHI_AttributeValue *value)
Gets the value of this attribute.
SHI_ByteArray byte_array
An untyped array of bytes.
Definition: ShiAttributes.h:87
SHI_AttributeType
Attribute type.
Definition: ShiAttributes.h:56
The attribute value is a SHI_ByteArray.
Definition: ShiAttributes.h:64
The attribute value is a SHI_Resource.
Definition: ShiAttributes.h:62