Wasabi ExpressPlay SDK for Embedded Systems
1.10
Main Page
Modules
Data Structures
Files
File List
Globals
Client
ThirdParty
Sushi
Source
Core
Interface
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
{
57
SHI_ATTRIBUTE_TYPE_UNKNOWN
,
58
SHI_ATTRIBUTE_TYPE_INTEGER
,
59
SHI_ATTRIBUTE_TYPE_FLOAT
,
60
SHI_ATTRIBUTE_TYPE_STRING
,
61
SHI_ATTRIBUTE_TYPE_DATE
,
62
SHI_ATTRIBUTE_TYPE_RESOURCE
,
63
SHI_ATTRIBUTE_TYPE_LIST
,
64
SHI_ATTRIBUTE_TYPE_BYTE_ARRAY
65
}
SHI_AttributeType
;
66
71
typedef
struct
{
72
const
char
*
mime_type
;
73
const
char
*
language
;
74
SHI_ByteArray
payload
;
75
}
SHI_Resource
;
76
82
typedef
union
{
83
const
char
*
string
;
84
SHI_Int32
integer
;
85
SHI_Float
floatv
;
86
SHI_DateTime
date
;
87
SHI_ByteArray
byte_array
;
88
SHI_Resource
resource
;
89
}
SHI_AttributeValue
;
90
91
/*----------------------------------------------------------------------
92
| interfaces
93
+---------------------------------------------------------------------*/
94
#if defined(__cplusplus)
95
extern
"C"
{
96
#endif
97
110
typedef
struct
SHI_Attribute
SHI_Attribute
;
111
123
SHI_PUBLIC_API
124
SHI_Result
125
SHI_Attribute_Release
(
SHI_Attribute
*
self
);
126
134
SHI_PUBLIC_API
135
const
char
*
136
SHI_Attribute_GetName
(
SHI_Attribute
*
self
);
137
144
SHI_PUBLIC_API
145
SHI_AttributeType
146
SHI_Attribute_GetType
(
SHI_Attribute
*
self
);
147
157
SHI_PUBLIC_API
158
SHI_Flags
159
SHI_Attribute_GetFlags
(
SHI_Attribute
*
self
);
160
172
SHI_PUBLIC_API
173
SHI_Result
174
SHI_Attribute_GetValue
(
SHI_Attribute
*
self
,
SHI_AttributeValue
* value);
175
184
SHI_PUBLIC_API
185
SHI_Cardinal
186
SHI_Attribute_GetChildCount
(
SHI_Attribute
*
self
);
187
199
SHI_PUBLIC_API
200
SHI_Result
201
SHI_Attribute_GetChildByName
(
SHI_Attribute
*
self
,
202
const
char
* name,
203
SHI_Attribute
** child);
204
216
SHI_PUBLIC_API
217
SHI_Result
218
SHI_Attribute_GetChildByIndex
(
SHI_Attribute
*
self
,
219
SHI_Ordinal
indx,
220
SHI_Attribute
** child);
221
223
#if defined(__cplusplus)
224
}
225
#endif
226
227
#endif
/* _SHI_ATTRIBUTES_H_ */