DSMCC
15.3.1
|
00001 /******************************************************************************* 00002 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org) 00003 * Copyright © 2004 Ocean Blue Software Ltd 00004 * Copyright © 2002 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 _DSMOBJECT_H_ 00026 #define _DSMOBJECT_H_ 00027 00028 00029 /*---includes for this file--------------------------------------------------*/ 00030 00031 #include "clDsmSystem.h" 00032 #include "linkList.h" 00033 #include "object.h" 00034 00035 #ifdef __cplusplus 00036 extern "C" { 00037 #endif 00038 00039 00040 /*---Constant and macro definitions for public use---------------------------*/ 00041 00042 00043 #define DSM_OBJECT_MAGIC 0xF1D3B597 00044 00045 #define DSM_OBJECT_VALIDATE( pDsmObject ) \ 00046 (pDsmObject->magic == DSM_OBJECT_MAGIC && pDsmObject->myDsmInst) 00047 00048 #define DSM_OBJECT_CORRECT( pDsmObject, idp ) \ 00049 (pDsmObject->magic == DSM_OBJECT_MAGIC && pDsmObject->myDsmInst == idp) 00050 00051 #define DEFFERED_SERVICE_RECEIVED 0xD0FE 00052 00053 /*---Global type defs for public use-------------------------------------------*/ 00054 00055 typedef struct _clDsmObjectHandle_struct DsmObject_t, *pDsmObject_t; 00056 00057 00058 struct _clDsmObjectHandle_struct { 00059 S_LLObject llData[NUM_LISTS_OBJECT]; 00060 00061 U32BIT magic; 00062 pclDsmInstData_t myDsmInst; 00063 00064 clDsmObjLoadStatus_t status; 00065 00066 clDsmCachingRules_t cachingRules; 00067 00068 clDsmObjectKind_t kind; 00069 00070 pObjectCarousel_t pObjCarousel; 00071 MemHandle hModule; 00072 00073 ObjectDataInfo_t objectInfo; 00074 U32BIT objectDataOffset; 00075 MemSeqRef objectDataSeq; 00076 00077 /* Use of below depends on 'status' */ 00078 union { 00079 MemHandle hLoadRequest; /* non-NULL when (status == OBJ_LOAD_IN_PROGRESS) */ 00080 MemHandle hPendingSiQueryRef; /* non-NULL when (status == OBJ_LOAD_COMPLETED) and getting deferred service */ 00081 } r; 00082 00083 /* Use of below depends on 'kind', and only valid when (status == OBJ_LOAD_COMPLETED) */ 00084 union { 00085 /* deferred service query - temporary held data, while (hPendingSiQueryRef != NULL) */ 00086 struct { 00087 void* userData1; 00088 void* userData2; 00089 } ds; 00090 00091 /* stream object, deferred service */ 00092 struct { 00093 S_DvbLocator multiplex; 00094 U16BIT retrieved; 00095 } so; 00096 00097 /* directory object ...*/ 00098 00099 } data; 00100 }; 00101 00102 /*---Global variable declarations for public use-----------------------------*/ 00103 00104 /*---Global Function prototypes for public use---------------------------------*/ 00105 00106 clDsmErr_t objectCreate( pclDsmInstData_t idp, MemHandle *phObject ); 00107 00108 void objectDestroy( pclDsmInstData_t idp, MemHandle *phObject ); 00109 00110 00111 /*----------------------------------------------------------------------------*/ 00112 #ifdef __cplusplus 00113 } 00114 #endif 00115 #endif /* _DSMOBJECT_H_ */