MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
mh5application.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 _MH5APPLICATION_H
32 #define _MH5APPLICATION_H
33 
34 /*---includes for this file--------------------------------------------------*/
35 #include "mh5group.h"
36 
37 /*---Constant and macro definitions for public use---------------------------*/
38 
39 /*---Enumerations for public use---------------------------------------------*/
40 
41 /*---Global type defs for public use-----------------------------------------*/
42 /*
43  Display Stack
44  */
45 typedef struct sMHEG5DisplayStackItem
46 {
47  MHEG5Root *item;
48  struct sMHEG5DisplayStackItem *next;
49  struct sMHEG5DisplayStackItem *prev;
51 
52 
53 /*
54  Applicatin Object
55  */
56 typedef struct
57 {
58  /* Base class */
59  MHEG5Group group;
60 
61  /* Exchanged attributes */
62  MHEG5ActionList onSpawnCloseDown;
63  MHEG5ActionList onRestart;
64  MHEG5Int characterSet;
65  MHEG5Colour backgroundColour;
66  MHEG5Colour textColour;
67  MHEG5FontBody fontBody;
68  MHEG5String fontAttributes;
69  MHEG5Int bitmapContentHook;
70  MHEG5Int streamContentHook;
71  MHEG5Int textContentHook;
72  MHEG5Int lineArtContentHook;
73  MHEG5Int interchangedProgramContentHook;
74  MHEG5Colour buttonRefColour;
75  MHEG5Colour highlightRefColour;
76  MHEG5Colour sliderRefColour;
77  MHEG5Colour originalDesktopColour;
78 
79  /* Internal attributes */
80  MHEG5Int lockCount;
81  MHEG5DisplayStackItem *displayStackTop;
82  MHEG5DisplayStackItem *displayStackBottom;
83  MHEG5Bool streamContinuanceFlag; /* See UK1.05 section 6.3.4 */
84  MHEG5Colour desktopColour;
86 
87 /*---Global variable declarations for public use-----------------------------*/
88 
89 /*---Global Function prototypes for public use-------------------------------*/
90 
97 #ifdef MH5PRINTOUT
98 
105 void MHEG5fontBodyPrint(MHEG5FontBody fontBody, char *out);
106 
113 void MHEG5applicationPrint(MHEG5Application *application, char *out);
114 
115 #endif /* MH5PRINTOUT */
116 
117 
118 
119 /*
120  Access to current Application
121  */
123 
124 
125 /* Clear the application stack */
126 void MHEG5applicationStackClear(BOOLEAN isNdt);
127 #ifndef CI_PLUS_ONLY
128 void MHEG5applicationCarouselUnload( void *carousel, BOOLEAN isNdt );
129 void MHEG5applicationNDTcarouselAttach( void *carousel );
130 #endif
131 
132 
152 MHEG5ErrorCode MHEG5applicationBootup( char *app_name, BOOLEAN single );
153 
158 void MHEG5applicationBootAbort( void );
159 
160 /*
161  Access the display Stack
162  */
163 void MHEG5displayStackAdd(MHEG5Root *visible, MHEG5Bool atTop);
164 MHEG5Bool MHEG5displayStackDelete(MHEG5Root *visible);
165 void MHEG5displayStackToTop(MHEG5Root *visible);
166 void MHEG5displayStackToBottom(MHEG5Root *visible);
167 void MHEG5displayStackPutBefore(MHEG5Root *target, MHEG5Root *refVisible);
168 void MHEG5displayStackPutBehind(MHEG5Root *target, MHEG5Root *refVisible);
173 
179 void MHEG5applicationInit(MHEG5Application *application);
180 
181 
189 void MHEG5applicationFree(MHEG5Application *application);
190 
191 /*
192  Internal behaviours
193  */
194 void MHEG5applicationPrepare(MHEG5Application *application);
195 void MHEG5applicationDestruct(MHEG5Application *application);
198 
199 /*
200  Actions
201  */
202 MHEG5ErrorCode MHEG5storePersistent(MHEG5Root *target, MHEG5GList *params);
203 MHEG5ErrorCode MHEG5readPersistent(MHEG5Root *target, MHEG5GList *params);
204 MHEG5ErrorCode MHEG5launch(MHEG5Root *target, MHEG5GList *params);
205 MHEG5ErrorCode MHEG5spawn(MHEG5Root *target, MHEG5GList *params);
206 MHEG5ErrorCode MHEG5quit(MHEG5Root *target, MHEG5GList *params);
207 MHEG5ErrorCode MHEG5lockScreen(MHEG5Root *target, MHEG5GList *params);
208 MHEG5ErrorCode MHEG5unlockScreen(MHEG5Root *target, MHEG5GList *params);
209 MHEG5ErrorCode MHEG5getEngineSupport(MHEG5Root *target, MHEG5GList *params);
210 MHEG5ErrorCode MHEG5setDesktopColour(MHEG5Root *target, MHEG5GList *params);
211 
212 #ifndef MHEG5PROFILE_UK1_06
213 MHEG5ErrorCode MHEG5openConnection(MHEG5Root *target, MHEG5GList *params);
214 MHEG5ErrorCode MHEG5closeConnection(MHEG5Root *target, MHEG5GList *params);
215 #endif
217 /*
218  Engine behaviours
219  */
220 void MHEG5quitApp(void);
221 
230  MHEG5Group *group);
231 
238 
239 /* For CI interface */
240 void MHEG5applicationPush(MHEG5String groupid);
241 
242 
243 #endif /*_MH5APPLICATION_H*/
void MHEG5applicationInit(MHEG5Application *application)
Initialise an application object with default values.
Definition: mh5application.c:1098
void MHEG5displayStackPutBehind(MHEG5Root *target, MHEG5Root *refVisible)
Put a Visible exactly below another Visible in the display stack.
Definition: mh5application.c:1027
Definition: mh5action.h:199
void MHEG5displayStackToBottom(MHEG5Root *visible)
Move a visible to the Bottom of the display stack.
Definition: mh5application.c:934
void MHEG5applicationBootAbort(void)
Aborts launch of Boot Application.
Definition: mh5application.c:1989
void MHEG5displayStackAdd(MHEG5Root *visible, MHEG5Bool atTop)
This function adds a visible to the display stack. The parameter atTop defines if the Visible is adde...
Definition: mh5application.c:781
MHEG5ErrorCode MHEG5applicationBootup(char *app_name, BOOLEAN single)
Launches Boot Application according to name rules: This function will authenticate and resolve a file...
Definition: mh5application.c:1889
MHEG5ErrorCode MHEG5openConnection(MHEG5Root *target, MHEG5GList *params)
Impelemtation of the OpenConnection (OpenSucceeded, Protocol, Address, ConnectionTag) action of the a...
Definition: mh5application.c:2328
void MHEG5applicationFree(MHEG5Application *application)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5application.c:1128
Definition: mh5application.h:45
Definition: mh5base.h:82
Definition: mh5group.h:47
MHEG5ErrorCode MHEG5getEngineSupport(MHEG5Root *target, MHEG5GList *params)
Implementation of the GetEngineSupport action of the application class GetEngineSupport (Feature...
Definition: mh5application.c:2392
Definition: mh5application.h:56
MHEG5ErrorCode MHEG5unlockScreen(MHEG5Root *target, MHEG5GList *params)
Impelemtation of the UnlockScreen action of the application class This action may refresh the display...
Definition: mh5application.c:2297
void MHEG5applicationPrepare(MHEG5Application *application)
Apply the group preparation behaviour.
Definition: mh5application.c:1161
Implementation of the Group class Description Defines the structure and behaviour of objects used as ...
void MHEG5applicationClearGroupTargets(MHEG5Application *application, MHEG5Group *group)
Clear targets of actions if they are ingredients of the given group.
Definition: mh5application.c:2006
void MHEG5ActivateCurrentApplication(void)
Apply the group activation behaviour.
Definition: mh5application.c:1311
MHEG5DisplayStackItem * MHEG5displayStackBottom(void)
This function returns a pointer to the DisplayStackItem at the Bottom of the Stack.
Definition: mh5application.c:724
void MHEG5displayStackPutBefore(MHEG5Root *target, MHEG5Root *refVisible)
Put a Visible exactly in front of another Visible in the display stack.
Definition: mh5application.c:953
void MHEG5quitApp(void)
Close an application because of the Quit Application Event defined by DTG.
Definition: mh5application.c:2163
MHEG5ErrorCode MHEG5closeConnection(MHEG5Root *target, MHEG5GList *params)
Impelemtation of the CloseConnection(ConnectionTag) action of the application class |NOT IMPLEMENTED...
Definition: mh5application.c:2343
MHEG5ErrorCode MHEG5storePersistent(MHEG5Root *target, MHEG5GList *params)
Implementation of the StorePersistent (StoreSucceeded, InVariables, OutFileName) action from the appl...
Definition: mh5application.c:1373
Definition: mh5base.h:240
Definition: mh5base.h:169
MHEG5ErrorCode MHEG5setDesktopColour(MHEG5Root *target, MHEG5GList *params)
Impelemtation of the SetDesktopColour action of the application class This action may refresh the dis...
Definition: mh5application.c:2451
MHEG5ErrorCode MHEG5readPersistent(MHEG5Root *target, MHEG5GList *params)
Implementation of the ReadPersistent (ReadSucceded, OutVariables, InFileName) action from the applica...
Definition: mh5application.c:1546
void MHEG5applicationDestruct(MHEG5Application *application)
Destruct an application object. This function destructs all parts of an application object...
Definition: mh5application.c:1268
MHEG5DisplayStackItem * MHEG5displayStackPrevVisible(MHEG5Root *visible)
This function returns a pointer to the previous item in the display stack. The input parameter is a V...
Definition: mh5application.c:755
void MHEG5displayStackToTop(MHEG5Root *visible)
Move a Visible to the Top of the display stack.
Definition: mh5application.c:916
Definition: mh5base.h:147
MHEG5ErrorCode MHEG5quit(MHEG5Root *target, MHEG5GList *params)
Implementation of the Quit action from the application class Close an application and restart the pre...
Definition: mh5application.c:2145
void MHEG5applicationResolveTargets(MHEG5Application *application)
Resolve unresolved targets of actions in the application.
Definition: mh5application.c:2038
MHEG5ErrorCode MHEG5spawn(MHEG5Root *target, MHEG5GList *params)
Implementation of the Spawn action from the application class +Execute the OnSpawnCloseDown Action of...
Definition: mh5application.c:2108
Definition: mh5root.h:43
MHEG5ErrorCode MHEG5lockScreen(MHEG5Root *target, MHEG5GList *params)
Implementation of the LockScreen action of the application class Freeze the display screen and preven...
Definition: mh5application.c:2263
MHEG5Root * MHEG5displayStackGetVisible(MHEG5DisplayStackItem *item)
This function returns the visible at a specific display stack positon.
Definition: mh5application.c:712
void MHEG5applicationDeactivate(MHEG5Application *application)
Apply the application deactivation behaviour +Apply the CloseConnection action to all opened auxiliar...
Definition: mh5application.c:1344
MHEG5DisplayStackItem * MHEG5displayStackPrev(MHEG5DisplayStackItem *item)
This function returns a pointer to the previous item in the display stack. The input parameter is a D...
Definition: mh5application.c:741
MHEG5Bool MHEG5displayStackDelete(MHEG5Root *visible)
This function removes the reference to a visible object from the display stack.
Definition: mh5application.c:864
MHEG5Application * MHEG5getCurrentApplication(void)
<Function description>="">
Definition: mh5application.c:492