DSMCC  15.3.1
source/dsiq/inc/dsiq.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  *
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  *******************************************************************************/
00024 #ifndef _DSIQ_H_
00025 #define _DSIQ_H_
00026 
00027 #include "cldsmtypes.h"
00028 #include "dmxtypes.h"
00029 #include "stdfuncs.h"
00030 #include "siqfuncs.h"
00031 #include "dsm_debug.h"
00032 
00033 #define UNKNOWN_AIT_TYPE   0x7FFF
00034 #define UNKNOWN_AIT_VERS   0x7F
00035 
00036 typedef enum {
00037    SIQ_ERROR,
00038    SIQ_IGNORE,
00039    SIQ_UPDATE
00040 } E_SIQ_STATUS;
00041 
00042 /*------------------- Functions supplied to SIQ at setup ---------------------*/
00043 
00058 typedef int (*F_DvpRequestPmt)( void* pmtref, U16BIT serviceId, U16BIT pmtpid );
00059 
00066 typedef void (*F_DvpCancelPmt)( void* pmtref, U16BIT serviceId );
00067 
00068 
00069 /*---------------- Setup structure for SIQ initialisation --------------------*/
00070 
00071 typedef struct
00072 {
00073    /* First five functions here are manditory */
00074    F_MemAlloc           memAlloc;
00075    F_MemFree            memFree;
00076 
00077    F_DvpRequestPmt      dvpRequestPmt;
00078    F_DvpCancelPmt       dvpCancelPmt;
00079    void*                pmtref;
00080 
00081    F_PmtParseInit       parsePmtInit;
00082    F_ParseDataBcastId   parseDataBroadcastId;
00083    F_PmtParseDone       parsePmtDone;
00084 
00085    /* notifyAitInfo is optional and may be set to NULL */
00086    F_NotifyAitInfo      notifyAitInfo;
00087 
00088    /* errPrintf and dbgPrintf functions are only used in a debug build.
00089     * These are optional and may be set to NULL */
00090    F_Printf             errPrintf;
00091    F_Printf             dbgPrintf;
00092 
00093    /* dbgState controls type of debug output for dbgPrintf
00094     * For valid debug filter states see above */
00095    U32BIT               dbgState;
00096 
00097 } S_SiqSetup;
00098 
00099 
00100 typedef struct s_SiqCachePat  *H_SiqCachePat;
00101 typedef struct s_SiqCachePmt  *H_SiqCachePmt;
00102 typedef struct s_SiqPmtTable  *H_SiqPmtTable;
00103 
00104 /*----------------------- Functions that configure SIQ -----------------------*/
00105 
00111 H_SiqInstance SIQ_CreateInstance( S_SiqSetup* pSetup );
00112 
00118 void SIQ_DestroyInstance( H_SiqInstance siq );
00119 
00128 void SIQ_SetDebugConfig( H_SiqInstance siq,  F_Printf errPrintf,
00129                          F_Printf dbgPrintf, U32BIT dbgState );
00130 
00137 void SIQ_SetDebugState( H_SiqInstance siq, U32BIT dbgState );
00138 
00145 void SIQ_SetDsmInstance( H_SiqInstance siq, clDsmInstHandle_t dsm );
00146 
00147 
00148 /*------------------ Functions that update SIQ from DVB ----------------------*/
00149 
00158 void SIQ_UpdatePat( H_SiqInstance siq, U8BIT* dptr );
00159 
00168 void SIQ_TransportChanged( H_SiqInstance siq, U16BIT origNetworkId, U16BIT transportId );
00169 
00180 E_SIQ_STATUS SIQ_RequirePmt( H_SiqInstance siq, U8BIT *pmt,
00181    U16BIT *pSid, U8BIT *pVer );
00182 
00192 void SIQ_ServiceRemoved( H_SiqInstance siq, U16BIT serviceId );
00193 
00204 H_SiqPmtTable SIQ_ParsePmt( H_SiqInstance siq, U8BIT *pmt );
00205 
00219 void SIQ_ProcessPmt( H_SiqInstance siq, H_SiqPmtTable hNewTable,
00220    U16BIT serviceId, U8BIT version );
00221 
00228 void SIQ_CacheClearPmt( H_SiqInstance siq, U16BIT serviceId );
00229 
00230 
00231 /*----------------- Functions provided to DSM-CC component -------------------*/
00232 
00239 clDsmErr_t SIQ_RequestQueryStart( H_SiqInstance siq, pclDsmSIQuery_t pQuery,
00240    clDsmSIQueryRef_t clDsmSIQueryRef, void* clDsmSIUserData,
00241    clDsmSIQueryResult_t *pResult );
00242 
00249 void SIQ_RequestQueryStop(  H_SiqInstance siq,
00250    void* queryHandle, clDsmSIQueryRef_t clDsmSIQueryRef );
00251 
00260 clDsmErr_t SIQ_ServiceInfoChangeSubscribe( H_SiqInstance siq, U16BIT serviceId );
00261 
00270 void SIQ_ServiceInfoChangeUnsubscribe( H_SiqInstance siq, U16BIT serviceId );
00271 
00272 #endif /*_DSIQ_H_*/
00273 
 All Data Structures Files Functions Typedefs