DSMCC
15.3.1
|
00001 /******************************************************************************* 00002 * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org) 00003 * Copyright © 2013 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 _DSM_CLIENT_H 00025 #define _DSM_CLIENT_H 00026 00027 00028 #include "fs_types.h" 00029 #include "dsm_types.h" 00030 00031 00032 /*---Constant and macro definitions for public use-----------------------------*/ 00033 00034 /* 00035 * Defines for 'loadflags' parameter in DSMCC_ClientLoadObject function 00036 */ 00037 #define LOAD_FLAGS_DEFAULT 0x0000007F 00038 00039 /* LOAD_FLAGS_CACHE_PRIORITY_MASK is mask bits that specify cache priority 00040 * With these bits set to zero, the object is loaded from the stream. 00041 */ 00042 #define LOAD_FLAGS_CACHE_PRIORITY_MASK 0x000000FF 00043 #define LOAD_FLAGS_REQUEST_FROM_STREAM 0x00000000 00044 00045 /* When LOAD_FLAGS_REQUEST_EXISTANCE_BIT is set, content data is NOT provided 00046 * and only E_FsStatus value is relevant on the return 00047 */ 00048 #define LOAD_FLAGS_REQUEST_EXISTANCE_BIT 0x00000400 00049 00050 /* For stream object type, and LOAD_FLAGS_REQUEST_DEFERRED_SERVICE_BIT set, 00051 * the content data is S_DvbLocator of the deferred service for that stream 00052 * Note: ignored if LOAD_FLAGS_REQUEST_EVENT_LIST_BIT is set and stream has events 00053 */ 00054 #define LOAD_FLAGS_REQUEST_DEFERRED_SERVICE_BIT 0x00004000 00055 00056 /* For stream object type (with events), and LOAD_FLAGS_REQUEST_EVENT_LIST_BIT set, 00057 * the content data is a comma separated list of events on that stream 00058 */ 00059 #define LOAD_FLAGS_REQUEST_EVENT_LIST_BIT 0x00008000 00060 00061 /* LOAD_FLAGS_REQUEST_DIR_FILE_LIST_BIT is depreciated, as this is the default. 00062 * For a directory object type, the content data is given as a comma separated list 00063 * of names for each entry in the directory. 00064 * Note: LOAD_FLAGS_REQUEST_DIRECTORY_LIST_BIT modifies this behaviour 00065 * and LOAD_FLAGS_REQUEST_SERVICE_CONTEXT_BIT overrides it. 00066 */ 00067 #define LOAD_FLAGS_REQUEST_DIR_FILE_LIST_BIT 0x00000000 00068 00069 /* For a directory object type, LOAD_FLAGS_REQUEST_DIRECTORY_LIST_BIT specifies that 00070 * each entry in the directory list should start with a byte that gives its type/kind, 00071 * followed by the name and then a separating comma or null or last entry. 00072 * For the type/kind byte see values in E_DsmObjectType. 00073 * The size of this content data is does not include the terminating null byte. 00074 * Note: ignored if LOAD_FLAGS_REQUEST_SERVICE_CONTEXT_BIT is set! 00075 */ 00076 #define LOAD_FLAGS_REQUEST_DIRECTORY_LIST_BIT 0x00040000 00077 00078 /* For a directory object type, and LOAD_FLAGS_REQUEST_SERVICE_CONTEXT_BIT set, 00079 * the content data points to service context data for service ID 00080 * Service ID value must be given in content 'user_data' field. 00081 */ 00082 #define LOAD_FLAGS_REQUEST_SERVICE_CONTEXT_BIT 0x00080000 00083 00084 /*---Enumerations for public use-----------------------------------------------*/ 00085 00086 typedef enum { 00087 OBJECT_TYPE_UNKNOWN = 0x30, /* ascii '0' */ 00088 OBJECT_TYPE_FILE, 00089 OBJECT_TYPE_DIRECTORY, 00090 OBJECT_TYPE_ROOT_DIR, 00091 OBJECT_TYPE_STREAM, 00092 OBJECT_TYPE_STREAM_WITH_EVENTS 00093 } E_DsmObjectType; 00094 00095 00096 /*---Global type defs for public use-------------------------------------------*/ 00097 00098 typedef F_FS_CALLBACK F_DSM_CBLOAD; 00099 00110 typedef void (*F_DSM_EVENT)( void* userData, U8BIT* name, 00111 U32BIT dataLen, U8BIT* dataPtr ); 00112 00113 00114 /*---Global Function prototypes for public use---------------------------------*/ 00115 00116 00152 E_FsStatus DSMCC_ClientLoadObject( H_DsmControl dsmctrl, 00153 U8BIT *path, U32BIT flags, 00154 F_DSM_CBLOAD cb_func, S_CONTENT *pContent ); 00155 00163 void DSMCC_ClientPreloadHint( H_DsmControl dsmctrl, U8BIT *path ); 00164 00186 E_FsStatus DSMCC_ClientEventSubscribeName( H_DsmControl dsmctrl, 00187 FS_HANDLE streamObject, U8BIT *eventName, 00188 F_DSM_EVENT cb_func, void *userData, 00189 H_DsmEvent *pEventHandle ); 00190 00208 E_FsStatus DSMCC_ClientEventSubscribeId( H_DsmControl dsmctrl, 00209 U16BIT associationTag, U16BIT eventId, 00210 F_DSM_EVENT cb_func, void* userData, 00211 H_DsmEvent *pEventHandle ); 00212 00219 void DSMCC_ClientEventUnsubscribe(H_DsmControl dsmctrl, H_DsmEvent event); 00220 00231 BOOLEAN DSMCC_ClientLoadFileGroups( H_DsmControl dsmctrl, H_ObjCarousel hOC, 00232 U16BIT* total, S_CarouselInfoFileGroup **pGroups ); 00233 00242 void DSMCC_ClientUnloadFileGroups( H_DsmControl dsmctrl, H_ObjCarousel hOC, 00243 S_CarouselInfoFileGroup *groups ); 00244 00245 00246 00247 00248 #endif /* _VGR_DSMCLIENT_H */ 00249