DSMCC  17.9.0
 All Data Structures Files Functions Typedefs
dsm_client.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2013 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
24 #ifndef _DSM_CLIENT_H
25 #define _DSM_CLIENT_H
26 
27 
28 #include "fs_types.h"
29 #include "dsm_types.h"
30 
31 
32 /*---Constant and macro definitions for public use-----------------------------*/
33 
34 /*
35  * Defines for 'loadflags' parameter in DSMCC_ClientLoadObject function
36  */
37 #define LOAD_FLAGS_DEFAULT 0x0000007F
38 
39 /* LOAD_FLAGS_CACHE_PRIORITY_MASK is mask bits that specify cache priority
40  * With these bits set to zero, the object is loaded from the stream.
41  */
42 #define LOAD_FLAGS_CACHE_PRIORITY_MASK 0x000000FF
43 #define LOAD_FLAGS_REQUEST_FROM_STREAM 0x00000000
44 
45 /* When LOAD_FLAGS_REQUEST_FILE_ONLY_BIT is set, the load request will only
46  * succeed for objects with OBJECT_TYPE_FILE
47  */
48 #define LOAD_FLAGS_REQUEST_FILE_ONLY_BIT 0x00000100
49 
50 /* When LOAD_FLAGS_REQUEST_EXISTANCE_BIT is set, content data is NOT provided
51  * and only E_FsStatus value is relevant on the return
52  */
53 #define LOAD_FLAGS_REQUEST_EXISTANCE_BIT 0x00000400
54 
55 /* For stream object type (with events), and LOAD_FLAGS_REQUEST_STREAM_OBJ_XML_BIT set,
56  * but without LOAD_FLAGS_REQUEST_EVENT_LIST_BIT being set,
57  * the content data is XML format as defined by 'TS 102 809' v1.2.1, section 8.2
58  */
59 #define LOAD_FLAGS_REQUEST_STREAM_OBJ_XML_BIT 0x00002000
60 
61 /* For stream object type, and LOAD_FLAGS_REQUEST_DEFERRED_SERVICE_BIT set,
62  * the content data is S_DvbLocator of the deferred service for that stream
63  * Note: ignored if LOAD_FLAGS_REQUEST_EVENT_LIST_BIT is set and stream has events
64  */
65 #define LOAD_FLAGS_REQUEST_DEFERRED_SERVICE_BIT 0x00004000
66 
67 /* For stream object type (with events), and LOAD_FLAGS_REQUEST_EVENT_LIST_BIT set,
68  * the content data is a comma separated list of events on that stream
69  */
70 #define LOAD_FLAGS_REQUEST_EVENT_LIST_BIT 0x00008000
71 
72 /* LOAD_FLAGS_REQUEST_DIR_FILE_LIST_BIT is depreciated, as this is the default.
73  * For a directory object type, the content data is given as a comma separated list
74  * of names for each entry in the directory.
75  * Note: LOAD_FLAGS_REQUEST_DIRECTORY_LIST_BIT modifies this behaviour
76  * and LOAD_FLAGS_REQUEST_SERVICE_CONTEXT_BIT overrides it.
77  */
78 #define LOAD_FLAGS_REQUEST_DIR_FILE_LIST_BIT 0x00000000
79 
80 /* For a directory object type, LOAD_FLAGS_REQUEST_DIRECTORY_LIST_BIT specifies that
81  * each entry in the directory list should start with a byte that gives its type/kind,
82  * followed by the name and then a separating comma or null or last entry.
83  * For the type/kind byte see values in E_DsmObjectType.
84  * The size of this content data is does not include the terminating null byte.
85  * Note: ignored if LOAD_FLAGS_REQUEST_SERVICE_CONTEXT_BIT is set!
86  */
87 #define LOAD_FLAGS_REQUEST_DIRECTORY_LIST_BIT 0x00040000
88 
89 /* For a directory object type, and LOAD_FLAGS_REQUEST_SERVICE_CONTEXT_BIT set,
90  * the content data points to service context data for service ID
91  * Service ID value must be given in content 'user_data' field.
92  */
93 #define LOAD_FLAGS_REQUEST_SERVICE_CONTEXT_BIT 0x00080000
94 
95 /*---Enumerations for public use-----------------------------------------------*/
96 
97 typedef enum
98 {
99  OBJECT_TYPE_UNKNOWN = 0x30, /* ascii '0' */
100  OBJECT_TYPE_FILE,
101  OBJECT_TYPE_DIRECTORY,
102  OBJECT_TYPE_ROOT_DIR,
103  OBJECT_TYPE_STREAM,
104  OBJECT_TYPE_STREAM_WITH_EVENTS
105 } E_DsmObjectType;
106 
107 
108 /*---Global type defs for public use-------------------------------------------*/
109 
110 typedef F_FS_CALLBACK F_DSM_CBLOAD;
111 
122 typedef void (*F_DSM_EVENT)( void *userData, U8BIT *name,
123  U32BIT dataLen, U8BIT *dataPtr );
124 
130 typedef void (*F_DSM_TYPE)( void *userData, E_DsmObjectType type );
131 
132 /*---Global Function prototypes for public use---------------------------------*/
133 
134 
170 E_FsStatus DSMCC_ClientLoadObject( H_DsmControl dsmctrl,
171  U8BIT *path, U32BIT flags,
172  F_DSM_CBLOAD cb_func, S_CONTENT *pContent );
173 
184 E_FsStatus DSMCC_ClientObjectType( H_DsmControl dsmctrl, U8BIT *path,
185  F_DSM_TYPE cbfunc, void *userData, E_DsmObjectType *pType );
186 
194 void DSMCC_ClientPreloadHint( H_DsmControl dsmctrl, U8BIT *path );
195 
217 E_FsStatus DSMCC_ClientEventSubscribeName( H_DsmControl dsmctrl,
218  FS_HANDLE streamObject, U8BIT *eventName,
219  F_DSM_EVENT cb_func, void *userData,
220  H_DsmEvent *pEventHandle );
221 
239 E_FsStatus DSMCC_ClientEventSubscribeId( H_DsmControl dsmctrl,
240  U16BIT associationTag, U16BIT eventId,
241  F_DSM_EVENT cb_func, void *userData,
242  H_DsmEvent *pEventHandle );
243 
250 void DSMCC_ClientEventUnsubscribe(H_DsmControl dsmctrl, H_DsmEvent event);
251 
262 BOOLEAN DSMCC_ClientLoadFileGroups( H_DsmControl dsmctrl, H_ObjCarousel hOC,
263  U16BIT *total, S_CarouselInfoFileGroup **pGroups );
264 
273 void DSMCC_ClientUnloadFileGroups( H_DsmControl dsmctrl, H_ObjCarousel hOC,
274  S_CarouselInfoFileGroup *groups );
275 
276 
277 
278 
279 #endif /* _VGR_DSMCLIENT_H */
280 
BOOLEAN DSMCC_ClientLoadFileGroups(H_DsmControl dsmctrl, H_ObjCarousel hOC, U16BIT *total, S_CarouselInfoFileGroup **pGroups)
Client request to retrieve MHEG5 File system acceleration file groups The client must release the arr...
Definition: dsm_client.c:934
E_FsStatus DSMCC_ClientObjectType(H_DsmControl dsmctrl, U8BIT *path, F_DSM_TYPE cbfunc, void *userData, E_DsmObjectType *pType)
Request object type for given path. This may be executed synchronously or asynchronously - see commen...
Definition: dsm_client.c:725
File System types.
void(* F_DSM_EVENT)(void *userData, U8BIT *name, U32BIT dataLen, U8BIT *dataPtr)
Callback function to notify that a DSM-CC stream event has triggered The event name is given...
Definition: dsm_client.h:122
E_FsStatus DSMCC_ClientEventSubscribeId(H_DsmControl dsmctrl, U16BIT associationTag, U16BIT eventId, F_DSM_EVENT cb_func, void *userData, H_DsmEvent *pEventHandle)
Client request to subscribe to DSMCC Stream Event, specified by event ID and association tag of strea...
Definition: dsm_client.c:878
DSM-CC types used for client control.
void(* F_DSM_TYPE)(void *userData, E_DsmObjectType type)
Callback function to notify client of result for request of object type.
Definition: dsm_client.h:130
void DSMCC_ClientUnloadFileGroups(H_DsmControl dsmctrl, H_ObjCarousel hOC, S_CarouselInfoFileGroup *groups)
Client request to release file group data returned from DSMCC_ClientLoadFileGroups.
Definition: dsm_client.c:967
void(* F_FS_CALLBACK)(E_FsStatus result, S_CONTENT *pContent)
Callback function to notify client of result for a file system load request. This is intented for asy...
Definition: fs_types.h:61
void DSMCC_ClientPreloadHint(H_DsmControl dsmctrl, U8BIT *path)
Provide a hint that the specified file may be required in the future. If possible this should be load...
Definition: dsm_client.c:792
void DSMCC_ClientEventUnsubscribe(H_DsmControl dsmctrl, H_DsmEvent event)
Client request to UN-subscribe to DSMCC Stream Event.
Definition: dsm_client.c:915
E_FsStatus DSMCC_ClientLoadObject(H_DsmControl dsmctrl, U8BIT *path, U32BIT flags, F_DSM_CBLOAD cb_func, S_CONTENT *pContent)
Perform a file load request which is executed synchronously or asynchronously. See load flags above f...
Definition: dsm_client.c:624
E_FsStatus DSMCC_ClientEventSubscribeName(H_DsmControl dsmctrl, FS_HANDLE streamObject, U8BIT *eventName, F_DSM_EVENT cb_func, void *userData, H_DsmEvent *pEventHandle)
Client request to subscribe to DSMCC Stream Event, specified by name. DSMCC notifies when the named s...
Definition: dsm_client.c:829