MHEG5  15.3.0
source/classes/inc/mh5program.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
00003  * Copyright © 2004 Ocean Blue Software Ltd
00004  * Copyright © 2000 Koninklijke Philips Electronics N.V
00005  *
00006  * This file is part of a DTVKit Software Component
00007  * You are permitted to copy, modify or distribute this file subject to the terms
00008  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
00009  * 
00010  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
00011  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
00012  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
00013  * 
00014  * If you or your organisation is not a member of DTVKit then you have access
00015  * to this source code outside of the terms of the licence agreement
00016  * and you are expected to delete this and any associated files immediately.
00017  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
00018  *******************************************************************************/
00027 #ifndef _MH5PROGRAM_H
00028 #define _MH5PROGRAM_H
00029 
00030 /*---includes for this file--------------------------------------------------*/
00031 
00032 #include "mh5ingredient.h"
00033 
00034 /*---Constant and macro definitions for public use---------------------------*/
00035 
00036 /*---Enumerations for public use---------------------------------------------*/
00037 
00038 /*---Global type defs for public use-----------------------------------------*/
00039 
00040 /*  struct Resident Program
00041     struct Remote Program
00042     struct MHEG5InterchangedProgram
00043  */
00044 typedef struct MHEG5Program_struct
00045 {
00046    /* Base class */
00047    MHEG5Ingredient ingredient;
00048 
00049    /* Exchanged attributes */
00050    MHEG5String name;
00051    MHEG5Bool initiallyAvailable;
00052    MHEG5Int programConnectionTag;       /* RemoteProgram only */
00053 
00054    /* No internal attributes for this class */
00055 
00056    /* Engine data */
00057    MHEG5GList *parameter;
00058    MHEG5Bool forked;
00059    MHEG5Bool *forkSucceededValue;
00060    void *resultValue;
00061    void *resultCode;
00062    MHEG5ErrorCode (*startFunc)(struct MHEG5Program_struct *);
00063    void (*stopFunc)(struct MHEG5Program_struct *);
00064 } MHEG5Program;
00065 
00066 
00067 /*---Global variable declarations for public use-----------------------------*/
00068 
00069 /*---Global Function prototypes for public use-------------------------------*/
00070 
00081 void MHEG5residentProgramInit(MHEG5Program *program);
00082 
00083 
00091 void MHEG5residentProgramFree(MHEG5Program *program);
00092 
00093 
00099 void MHEG5remoteProgramInit(MHEG5Program *program);
00100 
00101 
00109 void MHEG5remoteProgramFree(MHEG5Program *program);
00110 
00111 
00117 void MHEG5interchangedProgramInit(MHEG5Program *program);
00118 
00119 
00127 void MHEG5interchangedProgramFree(MHEG5Program *program);
00128 
00129 /*
00130     Internal behaviours
00131  */
00132 void MHEG5programPrepare(MHEG5Program *program);
00133 MHEG5ErrorCode MHEG5programActivate(MHEG5Program *program);
00134 void MHEG5programDeactivate(MHEG5Program *program);
00135 void MHEG5programDestruct(MHEG5Program *program);
00136 void MHEG5programFree(MHEG5Program *program);
00137 
00138 /*
00139     Actions
00140  */
00141 MHEG5ErrorCode MHEG5call(MHEG5Root *target, MHEG5GList *params);
00142 MHEG5ErrorCode MHEG5fork(MHEG5Root *target, MHEG5GList *params);
00143 
00144 /*
00145    Implemented in Presentable Class
00146    void MHEG5stop(MHEG5Root *target, MHEG5GList *params);
00147  */
00148 
00149 /*
00150    Debug
00151  */
00152 #ifdef MH5PRINTOUT
00153 
00159 void MHEG5programPrint(MHEG5Program *program, char *out);
00160 #endif
00161 
00162 #endif /*_MH5PROGRAM_H*/
 All Data Structures Files Functions Variables Typedefs Defines