DSMCC  15.3.1
source/dscore/src/sectionFilter.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 © 2001 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  *******************************************************************************/
00025 #ifndef _SECTIONFILTER_H_
00026 #define _SECTIONFILTER_H_
00027 
00028 
00029 /*--------------------------------  Includes  --------------------------------*/
00030 
00031 #include "clDsmSystem.h"
00032 
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00038 
00039 /*-----------------------------  Exported Macros  ----------------------------*/
00040 
00041 #define SF_MAGIC    0xE5D072A3
00042 
00043 
00044 /*------------------------------  Exported Types  ----------------------------*/
00045 
00046 /* -- Internal section filter types */
00047 
00048 typedef enum {
00049     SFK_NONE = 0,
00050     SFK_DSI,
00051     SFK_DII,
00052     SFK_DII_NEXT,
00053     SFK_DDB,
00054     SFK_STREAM_DESCR
00055 } SectionFilterKind_t, *pSectionFilterKind_t;
00056 
00057 
00058 typedef enum {
00059     SFA_INITIAL = 0,
00060     SFA_PENDING,
00061     SFA_COMMITTED,
00062     SFA_ABORTED
00063 } SfAddStatus_t, *pSfAddStatus_t;
00064 
00065 
00066 typedef struct _SectionFilterInfo_t SectionFilterInfo_t, *pSectionFilterInfo_t;
00067 
00068 struct _SectionFilterInfo_t
00069 {
00070    clDsmSFilter_t          filter;
00071 
00072    U32BIT                  handle;
00073 
00074    SectionFilterKind_t     targetKind;
00075 
00076    SfAddStatus_t           status;
00077 
00078    /* -- Handle of relevant OC */
00079    /* -- NB. Duplicate of target handle when targetKind is SFK_DSI */
00080    pObjectCarousel_t   pObjCarousel;
00081 
00082    U16BIT      serviceId;
00083 
00084    /* -- carouselId, moduleId or transactionId */
00085    U32BIT      targetId;
00086 
00087    /* -- hObjectCarousel, hModule or hDataCarousel */
00088    MemHandle   hTarget;
00089 
00090    /* -- Timer management */
00091    clDsmTimerManagement_t  tms;
00092 
00093    pSectionFilterInfo_t nextBlock;
00094 
00095    /* -- Following fields are never required simultaneously */
00096    union {
00097      MemHandle  hPendingSiQueryRef; /* -- Use when SFA_PENDING */
00098      void*      filterHandle;       /* -- Use when SFA_COMMITTED */
00099    } u;
00100 };
00101 
00102 
00103 /*------------------------------  Exported Data  -----------------------------*/
00104 
00105 
00106 /*---------------------------  Exported Prototypes  --------------------------*/
00107 
00108 clDsmErr_t createSectionFilterHeap( pclDsmInstData_t idp,
00109     /*O*/ void* *pSectionFilterHeap, U32BIT *pHeapSize );
00110 
00111 void resetSectionFilterHeap( pclDsmInstData_t idp );
00112 
00113 clDsmErr_t sectionFilterStart( pclDsmInstData_t idp, pObjectCarousel_t pOC,
00114     /*I*/ SectionFilterKind_t sfKind, MemHandle hSfTarget,
00115           clDsmSFPriority_t sfPriority, U16BIT service_id,
00116     /*O*/ pSectionFilterInfo_t *pSectionFilter );
00117 
00118 clDsmErr_t sectionFilterUpdatePriority( pclDsmInstData_t idp,
00119     /*I*/ pSectionFilterInfo_t pSF, clDsmSFPriority_t newSfPriority,
00120           BOOLEAN latchHighest );
00121 
00122 clDsmErr_t sectionFilterCommit( pclDsmInstData_t idp,
00123     /*I*/ pSectionFilterInfo_t pSectionFilter );
00124 
00125 void sectionFilterStop( pclDsmInstData_t idp,
00126     /*IO*/ pSectionFilterInfo_t *pSectionFilter );
00127 
00128 void sectionFilterAbortDependants( pclDsmInstData_t idp,
00129     /*I*/ pSectionFilterInfo_t pSectionFilter );
00130 
00131 pSectionFilterInfo_t sectionFilterRetrieve( pclDsmInstData_t idp, U32BIT handle );
00132 
00133 /*----------------------------------------------------------------------------*/
00134 
00135 #ifdef __cplusplus
00136 }
00137 #endif
00138 #endif /* _SECTIONFILTER_H_ */
 All Data Structures Files Functions Typedefs