MHEG5  18.9.0
MHEG5 Documentation
mh5variable.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  * Copyright © 2000 Koninklijke Philips Electronics N.V
5  *
6  * This file is part of a DTVKit Software Component
7  * You are permitted to copy, modify or distribute this file subject to the terms
8  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
9  *
10  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
11  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
12  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * If you or your organisation is not a member of DTVKit then you have access
15  * to this source code outside of the terms of the licence agreement
16  * and you are expected to delete this and any associated files immediately.
17  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
18  *******************************************************************************/
32 #ifndef _MH5VARIABLE_H
33 #define _MH5VARIABLE_H
34 
35 /*---includes for this file--------------------------------------------------*/
36 #include "mh5ingredient.h"
37 
38 /*---Constant and macro definitions for public use---------------------------*/
39 
40 /*---Enumerations for public use---------------------------------------------*/
41 
42 /*---Global type defs for public use-----------------------------------------*/
43 typedef struct
44 {
45  /* Base class */
47 
48  /* Exchanged attributes (from Variable class) */
50 
51  /* Internal attributes (from Variable class) */
54 
55 
56 typedef struct
57 {
58  /* Base class */
60 
61  /* Exchanged attributes (from Variable class) */
63 
64  /* Internal attributes (from Variable class) */
67 
68 
69 typedef struct
70 {
71  /* Base class */
73 
74  /* Exchanged attributes (from Variable class) */
76 
77  /* Internal attributes (from Variable class) */
80 
81 
82 typedef struct
83 {
84  /* Base class */
86 
87  /* Exchanged attributes (from Variable class) */
90 
91  /* Internal attributes (from Variable class) */
95 
96 
97 typedef struct
98 {
99  /* Base class */
101 
102  /* Exchanged attributes (from Variable class) */
104 
105  /* Internal attributes (from Variable class) */
108 
109 /*---Global variable declarations for public use-----------------------------*/
110 
111 /*---Global Function prototypes for public use-------------------------------*/
112 
124 
125 
133 
134 
143 
144 
151 
152 
160 
161 
170 
171 
178 
179 
187  MHEG5OctetStringVariable *variable);
188 
189 
198 
200 
207 
215  MHEG5ObjectRefVariable *variable);
216 
217 
226 
227 
234 
235 
243 
244 
253 
255 
258 
259 /*
260  Internal behaviours
261  */
262 void MHEG5variablePrepare(MHEG5Ingredient *variable);
263 void MHEG5variableActivate(MHEG5Ingredient *variable);
265 void MHEG5variableDestruct(MHEG5Ingredient *variable);
266 
267 /*
268  Actions
269  */
272 MHEG5ErrorCode MHEG5add(MHEG5Root *target, MHEG5GList *params);
278 
279 /*
280  Store/Read Persistant helper functions
281  */
282 /*
283  Store the value of the Variable in the Buffer and Return number of Bytes used.
284  Return -1 for failure
285  */
286 MHEG5Int MHEG5variableStore(MHEG5Ingredient *v, void *buf, MHEG5Int bufLen);
287 
288 /*
289  Set the Variable to the Buffer values and Return the Number of Bytes read.
290  Return -1 for failure
291  */
292 MHEG5Int MHEG5variableRead(MHEG5Ingredient *v, char *buf, MHEG5Int max_size);
293 
294 /*
295  Debug
296  */
297 #ifdef MH5PRINTOUT
298 
305 void MHEG5variablePrint(MHEG5Ingredient *variable, char *out);
306 
314 void MHEG5booleanVariablePrint(MHEG5BooleanVariable *v, char *out);
315 
323 void MHEG5integerVariablePrint(MHEG5IntegerVariable *v, char *out);
324 
332 void MHEG5stringVariablePrint(MHEG5OctetStringVariable *v, char *out);
333 
341 void MHEG5oRefVariablePrint(MHEG5ObjectRefVariable *v, char *out);
342 
350 void MHEG5cRefVariablePrint(MHEG5ContentVariable *v, char *out);
351 
352 #endif /* MH5PRINTOUT */
353 
354 
355 #endif /*_MH5VARIABLE_H*/
MHEG5Ingredient ingredient
Definition: mh5variable.h:85
MHEG5Ingredient ingredient
Definition: mh5variable.h:100
MHEG5ErrorCode MHEG5subtract(MHEG5Root *target, MHEG5GList *params)
Subtract Value from Target Variable. Target variable is the first operand of the infix operation...
Definition: mh5variable.c:1145
MHEG5Ingredient ingredient
Definition: mh5variable.h:59
MHEG5Int MHEG5variableStore(MHEG5Ingredient *v, void *buf, MHEG5Int bufLen)
This functions stores the value of a variable in the persistant storage. Implementation of the StoreP...
Definition: mh5variable.c:1437
void MHEG5contentVariableFree(MHEG5ContentVariable *variable)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5variable.c:622
Implementation of the Ingredient class.
void MHEG5octetStringVariablePrepare(MHEG5OctetStringVariable *variable)
Sets all internal attributes for the specified object to their default values.
Definition: mh5variable.c:458
void MHEG5contentVariablePrepare(MHEG5ContentVariable *variable)
Sets all internal attributes for the specified object to their default values.
Definition: mh5variable.c:606
void MHEG5contentVariableDestruct(MHEG5ContentVariable *variable)
Definition: mh5variable.c:631
void MHEG5booleanVariablePrepare(MHEG5BooleanVariable *variable)
Sets all internal attributes for the specified object to their default values.
Definition: mh5variable.c:376
void MHEG5variableDestruct(MHEG5Ingredient *variable)
Destruct a variable object.
Definition: mh5variable.c:720
void MHEG5contentVariableInit(MHEG5ContentVariable *variable)
Initialise a contentVariable object with default values.
Definition: mh5variable.c:593
MHEG5String contentData
Definition: mh5variable.h:106
void MHEG5octetStringVariableFree(MHEG5OctetStringVariable *variable)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5variable.c:474
MHEG5Int MHEG5variableRead(MHEG5Ingredient *v, char *buf, MHEG5Int max_size)
This functions reads the value of a variable from the persistant storage. Implementation of the ReadP...
Definition: mh5variable.c:1509
MHEG5Bool originalValue
Definition: mh5variable.h:49
void MHEG5objRefStoreValue(MHEG5ObjectRefVariable *objRef, MH5GroupRef ref, MHEG5Int id)
Definition: mh5variable.c:503
void MHEG5objectRefVariableInit(MHEG5ObjectRefVariable *variable)
Initialise an objectRefVariable object with default values.
Definition: mh5variable.c:496
MHEG5ErrorCode MHEG5multiply(MHEG5Root *target, MHEG5GList *params)
Multiplies Target Variable by Value. Target variable is the first operand of the infix operation...
Definition: mh5variable.c:1183
MHEG5String originalContentData
Definition: mh5variable.h:103
MHEG5ErrorCode MHEG5divide(MHEG5Root *target, MHEG5GList *params)
Divides Target Variable by Value. Target variable is the first operand of the infix operation...
Definition: mh5variable.c:1218
void MHEG5booleanVariableInit(MHEG5BooleanVariable *variable)
<Function description>="">
Definition: mh5variable.c:363
long MHEG5Int
Definition: mh5base.h:73
void MHEG5objectRefVariablePrepare(MHEG5ObjectRefVariable *variable)
Sets all internal attributes for the specified object to their default values.
Definition: mh5variable.c:560
void MHEG5integerVariableInit(MHEG5IntegerVariable *variable)
Initialise a integerVariable object with default values.
Definition: mh5variable.c:404
void MHEG5integerVariablePrepare(MHEG5IntegerVariable *variable)
Sets all internal attributes for the specified object to their default values.
Definition: mh5variable.c:417
MHEG5ErrorCode MHEG5add(MHEG5Root *target, MHEG5GList *params)
Add Target Variable to Value. Target variable is the first operand of the infix operation. Result is stored in Target Variable. Implementation of the Add (Value) action of the IntegerVariable class.
Definition: mh5variable.c:1107
void MHEG5variableActivate(MHEG5Ingredient *variable)
Apply the activation behaviour of the Variable class. Apply the activation behaviour of the variable ...
Definition: mh5variable.c:665
void MHEG5variableDeactivate(MHEG5Ingredient *variable)
Apply the deactivation behaviour of the variable class. As this class has no own deactivation behavio...
Definition: mh5variable.c:708
void MHEG5objRefStoreString(MHEG5ObjectRefVariable *objRef, MHEG5String ref, MHEG5Int id)
Definition: mh5variable.c:529
short MHEG5Bool
Definition: mh5base.h:71
MHEG5ErrorCode
Definition: mh5base.h:222
MHEG5ErrorCode MHEG5testVariable(MHEG5Root *target, MHEG5GList *params)
This action tests variables agains each other or against values Implementation of the TestVariable (T...
Definition: mh5variable.c:923
MHEG5String originalValue
Definition: mh5variable.h:75
MH5GroupRef originalValueGid
Definition: mh5variable.h:88
void MHEG5octetStringVariableInit(MHEG5OctetStringVariable *variable)
Initialise an octetStringVariable object with default values.
Definition: mh5variable.c:445
MHEG5ErrorCode MHEG5setVariable(MHEG5Root *target, MHEG5GList *params)
Set the Value attribute of the Target object to NewVariableValue. Implementation of the SetVariable (...
Definition: mh5variable.c:761
void MHEG5integerVariableFree(MHEG5IntegerVariable *variable)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5variable.c:433
MHEG5Ingredient ingredient
Definition: mh5variable.h:46
MHEG5Int originalValue
Definition: mh5variable.h:62
void MHEG5variablePrepare(MHEG5Ingredient *variable)
Apply the preparation behaviour of the variable class Apply the preparation behaviour of the variable...
Definition: mh5variable.c:653
void MHEG5objectRefVariableFree(MHEG5ObjectRefVariable *variable)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5variable.c:576
MHEG5ErrorCode MHEG5modulo(MHEG5Root *target, MHEG5GList *params)
Returns the remainder modulo Value of Target - as defined by usual integer arithmetic rules...
Definition: mh5variable.c:1262
void MHEG5octetStringVariableDestruct(MHEG5OctetStringVariable *variable)
Definition: mh5variable.c:483
MHEG5String valueGrp
Definition: mh5variable.h:93
void MHEG5booleanVariableFree(MHEG5BooleanVariable *variable)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5variable.c:392
MHEG5ErrorCode MHEG5append(MHEG5Root *target, MHEG5GList *params)
Appends AppendValue to Target Variable. Target variable is the first operand of the infix operation...
Definition: mh5variable.c:1306
MHEG5Ingredient ingredient
Definition: mh5variable.h:72