MHEG5
15.3.0
|
00001 /******************************************************************************* 00002 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org) 00003 * Copyright © 2011 Ocean Blue Software Ltd 00004 * 00005 * This file is part of a DTVKit Software Component 00006 * You are permitted to copy, modify or distribute this file subject to the terms 00007 * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org 00008 * 00009 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 00010 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 00011 * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. 00012 * 00013 * If you or your organisation is not a member of DTVKit then you have access 00014 * to this source code outside of the terms of the licence agreement 00015 * and you are expected to delete this and any associated files immediately. 00016 * Further information on DTVKit, membership and terms can be found at www.dtvkit.org 00017 *******************************************************************************/ 00025 #ifndef _GLUE_QUEUE_H 00026 #define _GLUE_QUEUE_H 00027 00028 #include "mherrors.h" 00029 #include "dvb_misc.h" 00030 #include "mheg5_control.h" 00031 #include "mheg5_keypress.h" 00032 #include "dvbevents.h" 00033 #include "dmxtype.h" 00034 #include "dvblocator.h" 00035 #include "fs_types.h" 00036 #include "dtvstring.h" 00037 #ifndef CI_PLUS_ONLY 00038 #include "dsm_types.h" 00039 #endif 00040 #include "mh5queue.h" 00041 00042 typedef void (*F_QueueNotify)( void ); 00043 00044 typedef enum 00045 { 00046 PRTY_CRITICAL, 00047 PRTY_HIGH, 00048 PRTY_NORMAL, 00049 PRTY_LOW, 00050 PRTY_INVALID 00051 } E_PRIORITY; 00052 00053 typedef enum 00054 { 00055 DT_NONE, 00056 DT_VALUE, 00057 DT_ALLOC, 00058 DT_CONTENT, 00059 DT_D_CONTENT, 00060 DT_F_CONTENT, 00061 DT_S_CONTENT 00062 } E_DATA_TYPE; 00063 00069 typedef void (*F_MSG_PROCESS)( void *data ); 00070 00071 /* MHEG5StartEvent parameters. */ 00072 typedef struct s_StartDsmApp 00073 { 00074 S32BIT serviceIndex; 00075 } S_StartDsmApp; 00076 00077 typedef struct s_keypressevent 00078 { 00079 E_MHEG5_KEY key; 00080 } S_KeyPressEvent; 00081 00082 #ifndef CI_PLUS_ONLY 00083 typedef struct s_DsmccEvent 00084 { 00085 U32BIT id; 00086 H_ObjCarousel hCarousel; 00087 } S_DsmccEvent; 00088 #endif 00090 typedef struct s_CiStart 00091 { 00092 S_STRING name; 00093 U32BIT module_id; 00094 } S_CiStart; 00095 00096 typedef struct s_CiStop 00097 { 00098 U32BIT module_id; 00099 } S_CiStop; 00100 00101 /* MHEG5StopEvent parameters. */ 00102 typedef struct MHEG5StopEventParams_tag 00103 { 00104 U8BIT action; 00105 } MHEG5StopEventParams_t; 00106 00107 /* MHEG5ResetScreenEvent params */ 00108 typedef struct MHEG5ResetResolutionParams_tag 00109 { 00110 U16BIT screenWidth; 00111 U16BIT screenHeight; 00112 E_MhegErr *pResult; 00113 } MHEG5ResetResolutionParams_t; 00114 00115 /* MHEG5TimerEvent parameters. */ 00116 typedef struct MHEG5TimerEventParams_tag 00117 { 00118 BOOLEAN triggered; 00119 void *callerRef; 00120 void *timerHandle; 00121 } MHEG5TimerEventParams_t; 00122 00123 typedef struct s_fileAck 00124 { 00125 S_CONTENT content; 00126 E_FsStatus status; 00127 } S_FileSystemAck; 00128 00129 /* MHEG5CiFileAcknowledgeEvent parameters. */ 00130 typedef struct MHEG5CiFileAcknowledgeEventParams_tag 00131 { 00132 /* structure is same format as S_CONTENT */ 00133 U32BIT fileSize; 00134 U8BIT *pFileData; 00135 F_DESTROY clr_func; 00136 FS_HANDLE clr_hdl; 00137 BOOLEAN fileOK; 00138 } MHEG5CiFileAcknowledgeEventParams_t; 00139 00140 #ifdef INCLUDE_IC 00141 /* MHEG5HttpResponseEvent parameters. */ 00142 typedef struct MHEG5HttpResponseEventParams_tag 00143 { 00144 U32BIT len; 00145 U8BIT *data; 00146 U32BIT requestId; 00147 U32BIT status; 00148 U32BIT code; 00149 U8BIT requestType; 00150 } MHEG5HttpResponseEventParams_t; 00151 00152 #ifdef INCLUDE_ICS 00153 /* MHEG5StreamerEvent parameters. */ 00154 typedef struct MHEG5StreamerEventParams_tag 00155 { 00156 U32BIT requestId; 00157 U32BIT eventType; 00158 U32BIT status; 00159 U32BIT code; 00160 S32BIT triggerId; 00161 } MHEG5StreamerEventParams_t; 00162 #endif /* INCLUDE_ICS */ 00163 00164 #endif /* INCLUDE_IC */ 00165 00166 typedef struct MHEG5FsStorageParams_tag 00167 { 00168 U8BIT blockSize; 00169 U8BIT blocks; 00170 BOOLEAN group; 00171 U16BIT identifier; 00172 } MHEG5FsStorageParams_t; 00173 00174 typedef struct s_dvpeventtype 00175 { 00176 E_DvbEvent eType; 00177 U32BIT eData; 00178 } S_DvpEventType; 00179 00180 #ifdef SURFACE_THRESHOLD 00181 typedef struct MHEG5SurfaceThresholdEventParams_tag 00182 { 00183 S32BIT pixels; 00184 } MHEG5SurfaceThresholdEventParams_t; 00185 #endif 00186 00187 /* Event parameters. */ 00188 typedef struct s_mhg_message 00189 { 00190 F_MSG_PROCESS proc_msg_func; 00191 E_DATA_TYPE data_type; 00192 union 00193 { 00194 S_CONTENT content; 00195 S_STRING string; 00196 S_CiStart ciStart; 00197 S_CiStop ciStop; 00198 S_DvpEventType dvpEvent; 00199 S_KeyPressEvent keypress; 00200 S_FileSystemAck fsAck; 00201 S_StartDsmApp start; 00202 E_ENGINE_EVENT engineEvent; 00203 MHEG5StopEventParams_t stop; 00204 MHEG5TimerEventParams_t timer; 00205 MHEG5CiFileAcknowledgeEventParams_t ciFileAcknowledge; 00206 #ifndef CI_PLUS_ONLY 00207 S_DsmccEvent dsmEvent; 00208 #endif 00209 #ifdef INCLUDE_IC 00210 MHEG5HttpResponseEventParams_t httpResponse; 00211 #ifdef INCLUDE_ICS 00212 MHEG5StreamerEventParams_t streamer; 00213 #endif /* INCLUDE_ICS */ 00214 #endif /* INCLUDE_IC */ 00215 MHEG5ResetResolutionParams_t resetRes; 00216 #ifdef INCLUDE_FREESAT 00217 MHEG5FsStorageParams_t fsStorage; 00218 #endif 00219 #ifdef SURFACE_THRESHOLD 00220 MHEG5SurfaceThresholdEventParams_t surfaceThreshold; 00221 #endif 00222 } data; 00223 } MHEG5eventMessage_t, S_MhegMessage; 00224 00234 E_MhegErr VQ_Open( S_MhegConfig *cfg_params ); 00235 00236 00242 void VQ_Close(void); 00243 00254 E_MhegErr VQ_PutMsg( S_MhegMessage *pMsg, E_PRIORITY priority ); 00255 00256 00265 E_MhegErr VQ_GetMsg( S_MhegMessage *pElem ); 00266 00273 U16BIT VQ_GetSizeFree( E_PRIORITY priority ); 00274 00279 BOOLEAN VQ_EventNeedsProcessing( void ); 00280 00286 void* VQ_RegisterNotify( F_QueueNotify normal_rcvd, F_QueueNotify critical_rcvd, 00287 F_QueueNotify critical_done ); 00288 00293 void VQ_UnRegisterNotify( void *qn ); 00294 00295 #endif /*_GLUE_QUEUE_H*/