MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
mh5program.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  *******************************************************************************/
27 #ifndef _MH5PROGRAM_H
28 #define _MH5PROGRAM_H
29 
30 /*---includes for this file--------------------------------------------------*/
31 
32 #include "mh5ingredient.h"
33 
34 /*---Constant and macro definitions for public use---------------------------*/
35 
36 /*---Enumerations for public use---------------------------------------------*/
37 
38 /*---Global type defs for public use-----------------------------------------*/
39 
40 /* struct Resident Program
41  struct Remote Program
42  struct MHEG5InterchangedProgram
43  */
44 typedef struct MHEG5Program_struct
45 {
46  /* Base class */
47  MHEG5Ingredient ingredient;
48 
49  /* Exchanged attributes */
50  MHEG5String name;
51  MHEG5Bool initiallyAvailable;
52  MHEG5Int programConnectionTag; /* RemoteProgram only */
53 
54  /* No internal attributes for this class */
55 
56  /* Engine data */
57  MHEG5GList *parameter;
58  MHEG5Bool forked;
59  MHEG5Bool *forkSucceededValue;
60  void *resultValue;
61  void *resultCode;
62  MHEG5ErrorCode (*startFunc)(struct MHEG5Program_struct *);
63  void (*stopFunc)(struct MHEG5Program_struct *);
64 } MHEG5Program;
65 
66 
67 /*---Global variable declarations for public use-----------------------------*/
68 
69 /*---Global Function prototypes for public use-------------------------------*/
70 
82 
83 
92 
93 
100 
101 
109 void MHEG5remoteProgramFree(MHEG5Program *program);
110 
111 
118 
119 
128 
129 /*
130  Internal behaviours
131  */
132 void MHEG5programPrepare(MHEG5Program *program);
133 MHEG5ErrorCode MHEG5programActivate(MHEG5Program *program);
134 void MHEG5programDeactivate(MHEG5Program *program);
135 void MHEG5programDestruct(MHEG5Program *program);
136 void MHEG5programFree(MHEG5Program *program);
137 
138 /*
139  Actions
140  */
141 MHEG5ErrorCode MHEG5call(MHEG5Root *target, MHEG5GList *params);
142 MHEG5ErrorCode MHEG5fork(MHEG5Root *target, MHEG5GList *params);
143 
144 /*
145  Implemented in Presentable Class
146  void MHEG5stop(MHEG5Root *target, MHEG5GList *params);
147  */
148 
149 /*
150  Debug
151  */
152 #ifdef MH5PRINTOUT
153 
159 void MHEG5programPrint(MHEG5Program *program, char *out);
160 #endif
161 
162 #endif /*_MH5PROGRAM_H*/
void MHEG5programFree(MHEG5Program *program)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5program.c:121
Implementation of the Ingredient class.
void MHEG5residentProgramFree(MHEG5Program *program)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5program.c:152
Definition: mh5base.h:82
void MHEG5remoteProgramInit(MHEG5Program *program)
Initialise a remoteProgram object with default values.
Definition: mh5program.c:164
Definition: mh5ingredient.h:63
Definition: mh5base.h:169
void MHEG5interchangedProgramInit(MHEG5Program *program)
Initialise a interchangedProgram object with default values.
Definition: mh5program.c:190
void MHEG5remoteProgramFree(MHEG5Program *program)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5program.c:178
Definition: mh5program.h:44
Definition: mh5root.h:43
void MHEG5interchangedProgramFree(MHEG5Program *program)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5program.c:204
void MHEG5residentProgramInit(MHEG5Program *program)
<Function description>="">
Definition: mh5program.c:138