MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
mh5group.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  *******************************************************************************/
31 #ifndef _MH5GROUP_H
32 #define _MH5GROUP_H
33 
34 /*---includes for this file--------------------------------------------------*/
35 
36 #include "mh5action.h"
37 #include "mh5ingredient.h"
38 
39 /*---Constant and macro definitions for public use---------------------------*/
40 #define GRP_HASH_TABLE_SIZE 251
41 /*#define GROUP_MAGIC_NUM 0x970db5f0*/
42 
43 /*---Enumerations for public use---------------------------------------------*/
44 
45 /*---Global type defs for public use-----------------------------------------*/
46 
47 typedef struct sMHEG5Group
48 {
49  /* Base classe */
50  MHEG5Root root;
51 
52  /* Exchanged attributes */
53  MHEG5String groupName;
54  MH5GroupId group_id;
55  /*U32BIT magic;*/
56  /*MHEG5Int standardID[2]; *
57  * MHEG5Int standardVersion;*/
58  MHEG5String objectInformation;
59  MHEG5ActionList onStartUp;
60  MHEG5ActionList onCloseDown;
61  MHEG5Int originalCachePriority;
62  MHEG5Ingredient *itemHead;
63  MHEG5Ingredient *itemTail;
64  MHEG5Ingredient *hashIngred[256];
65 
66  /* Internal attributes */
67  MHEG5Int cachePriority;
68 
69  /* Engine data */
70  unsigned long startTime;
71 } MHEG5Group;
72 
73 /*---Global variable declarations for public use-----------------------------*/
74 
75 /*---Global Function prototypes for public use-------------------------------*/
76 #ifdef MH5PRINTOUT
77 
83 void MHEG5groupPrint(MHEG5Group *group, char *out);
84 
85 #endif /* MH5PRINTOUT */
86 
93 void MHEG5groupAddItem(MHEG5Group *group, MHEG5Ingredient *item);
94 
101 void MHEG5groupDelItem(MHEG5Group *group, MHEG5Ingredient *item);
102 
103 /*
104  Constructor
105  */
111 void MHEG5groupInit(MHEG5Group *group);
112 
113 
121 void MHEG5groupFree(MHEG5Group *group);
122 
123 
124 /*
125  Internal behaviours
126  */
138 void MHEG5groupPrepare(MHEG5Group *group);
139 
140 
150 void MHEG5groupDestruct(MHEG5Group *group);
151 
152 
166 void MHEG5groupActivate(MHEG5Group *group);
167 
168 
181 void MHEG5groupDeactivate(MHEG5Group *group);
182 
183 /*
184  Actions
185  */
201 MHEG5ErrorCode MHEG5setCachePriority(MHEG5Root *target, MHEG5GList *params);
202 
249 MHEG5ErrorCode MHEG5setTimer(MHEG5Root *target, MHEG5GList *params);
250 
255 void MH5_GroupInit(void);
256 
257 #ifdef SURFACE_THRESHOLD
258 
263 void MHEG5groupDestroySurfaces(MHEG5Int pixels);
264 #endif /* SURFACE_THRESHOLD */
265 
266 #endif /*_MH5GROUP_H*/
Definition: mh5action.h:199
void MHEG5groupDestruct(MHEG5Group *group)
Implementation of the Destruction behaviour Destruction.
Definition: mh5group.c:497
Implementation of the Ingredient class.
Definition: mh5base.h:82
void MHEG5groupInit(MHEG5Group *group)
Initialise an Group object with default Values.
Definition: mh5group.c:285
Definition: mh5group.h:47
Definition: mh5ingredient.h:63
void MHEG5groupDeactivate(MHEG5Group *group)
Implementation of the Deactivation behaviour Deactivation If group is not active, ignore behaviour...
Definition: mh5group.c:802
void MHEG5groupFree(MHEG5Group *group)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5group.c:315
void MH5_GroupInit(void)
This function initialises Group Timers.
Definition: mh5group.c:93
void MHEG5groupPrepare(MHEG5Group *group)
Implementation of the Preparation behaviour Preparation.
Definition: mh5group.c:349
Manage elementary actions Manage a table of all actions and call a specific action which is defined b...
Definition: mh5base.h:169
void MHEG5groupDelItem(MHEG5Group *group, MHEG5Ingredient *item)
Delete Item from the List.
Definition: mh5group.c:235
void MHEG5groupAddItem(MHEG5Group *group, MHEG5Ingredient *item)
Add an Item to the List.
Definition: mh5group.c:205
MHEG5ErrorCode MHEG5setTimer(MHEG5Root *target, MHEG5GList *params)
This actions sets a new Timer which results in a TimerFired event when the given time is reached...
Definition: mh5group.c:1070
Definition: mh5root.h:43
MHEG5ErrorCode MHEG5setCachePriority(MHEG5Root *target, MHEG5GList *params)
Implementation of the SetCachePriority action SetCachePriority (NewCachePriority) Set the GroupCacheP...
Definition: mh5group.c:937
void MHEG5groupActivate(MHEG5Group *group)
Implementation of the Activation behaviour Activation.
Definition: mh5group.c:672