MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
mh5fileorm.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  * Copyright © 2000 Koninklijke Philips Electronics N.V
5  *
6  * This file is part of a DTVKit Software Component
7  * You are permitted to copy, modify or distribute this file subject to the terms
8  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
9  *
10  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
11  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
12  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * If you or your organisation is not a member of DTVKit then you have access
15  * to this source code outside of the terms of the licence agreement
16  * and you are expected to delete this and any associated files immediately.
17  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
18  *******************************************************************************/
26 #ifndef _MH5FORM_H_
27 #define _MH5FORM_H_
28 
29 /*---includes for this file--------------------------------------------------*/
30 #include "mh5base.h"
31 #include "mh5root.h"
32 #include "fs_types.h"
33 #include "mh5gate.h"
34 
35 /*---Constant and macro definitions for public use---------------------------*/
36 
37 /* File Request Priority types and masks */
38 #define FRP_CACHE_DEFAULT 0x007F
39 #define FRP_CACHE_MASK 0x00FF
40 #define FRP_APPLICATION 0x0100
41 #define FRP_SCENE 0x0200
42 #define FRP_GROUP 0x0300
43 #define FRP_EXISTS 0x0400
44 #define FRP_VERIFY 0x0800
45 #define FRP_HASH 0x1000
46 #define FRP_CERT 0x2000
47 #define FRP_SERVER 0x3000
48 #define FRP_DEFER_SERV 0x4000
49 #define FRP_IN_APP 0x8000
50 
51 /*---Enumerations for public use---------------------------------------------*/
52 
53 /*---Global type defs for public use-----------------------------------------*/
54 typedef enum
55 {
56  MHEG5_FILE_ORM_RESET_SCENE_OBJECTS,
57  MHEG5_FILE_ORM_RESET_ALL_OBJECTS,
58  MHEG5_FILE_ORM_RESET_ALL
59 } MHEG5FileOrmResetMode;
60 
61 typedef void (*F_CB_Good)( void *userData, S_CONTENT *content );
62 typedef void (*F_CB_Fail)( void *userData );
63 typedef void (*F_CB_Post)(void *userData, MHEG5String responseData, MHEG5Int responseCode);
64 typedef void (*F_CB_CiMsg)(void *userData, MHEG5String output, MHEG5Bool success);
65 
66 
67 /*---Global variable declarations for public use-----------------------------*/
68 
69 /*---Global Function prototypes for public use-------------------------------*/
70 
75 void MHEG5FileOrmInit(void);
76 
77 
88 void MHEG5FileOrmReset(MHEG5FileOrmResetMode resetMode);
89 
90 
103 BOOLEAN MHEG5FileOrmIsReset(MHEG5FileOrmResetMode *resetMode);
104 
105 
113 BOOLEAN MHEG5FileOrmProcess(void);
114 
115 
121 void MHEG5FileOrmClear( void *orm_ref );
122 
123 
139 void* MHEG5FileOrmGet( MHEG5String name, U16BIT priority, void *userData,
140  F_CB_Good cbGood, F_CB_Fail cbFail );
141 
157 void* MHEG5FileOrmRetrieve( E_FS_ORIGIN origin, S_STRING location, S_STRING name,
158  U16BIT priority, void *userData, F_CB_Good cbGood, F_CB_Fail cbFail);
159 
160 #ifdef COMMON_INTERFACE
161 
171 MHEG5Bool MHEG5FileOrmSendCiMessage(MHEG5String input, F_CB_CiMsg callback, void *userData);
172 #endif /*COMMON_INTERFACE*/
173 
174 #ifdef INCLUDE_IC
175 
187 MHEG5Bool MHEG5FileOrmReturnData(MHEG5String url, MHEG5String data, F_CB_Post callback, void *userData);
188 
189 #endif /* INCLUDE_IC */
190 
191 
200 
208 void MHEG5ciFileAcknowledge(BOOLEAN fileOK, U8BIT *pFileData, U32BIT length);
209 
210 #endif /*_MH5FORM_H*/
Basis MHEG5 data types.
Definition: mh5base.h:82
void MHEG5ciFileAcknowledge(BOOLEAN fileOK, U8BIT *pFileData, U32BIT length)
Process the FileAcknowledge message sent from the CI module.
BOOLEAN MHEG5FileOrmIsReset(MHEG5FileOrmResetMode *resetMode)
Tell whether the ORM module is currently being reset. If it is, the function also returns the current...
Definition: mh5fileorm.c:712
void * MHEG5FileOrmRetrieve(E_FS_ORIGIN origin, S_STRING location, S_STRING name, U16BIT priority, void *userData, F_CB_Good cbGood, F_CB_Fail cbFail)
Retrieve of a file. The file will be loaded and one of the callback functions called when request is ...
Definition: mh5fileorm.c:1290
Definition: dtvstring.h:28
Definition: fs_types.h:52
void * MHEG5FileOrmGet(MHEG5String name, U16BIT priority, void *userData, F_CB_Good cbGood, F_CB_Fail cbFail)
Get a file. The file will be loaded and one of the callback functions called when request is resolved...
Definition: mh5fileorm.c:1179
BOOLEAN MHEG5FileOrmProcess(void)
Check for any file requests that have arrived since this function was last called. For each arrived file the callback will be called. The function may have to be called more than once in case a file the arrived affects other files as well.
Definition: mh5fileorm.c:830
void MHEG5FileOrmReset(MHEG5FileOrmResetMode resetMode)
Reset the ORM module. This function supports two modes:
Definition: mh5fileorm.c:595
File System types.
void MHEG5FileOrmClear(void *orm_ref)
Aborts a request for file.
Definition: mh5fileorm.c:979
Implementation of Root class Description Root class of all MHEG-5 classes. Base class None Subclasses...
void MHEG5FileOrmPreloadHint(MHEG5String name)
Provide a preload hint to DSM-CC that the specified file may be required in the future. DSM-CC could (but is not required to) acquire the file into cache.
Definition: mh5fileorm.c:1554
Implement Functions to support Service Gateways. Functions for standarizing several GroupIDs like +DS...
void MHEG5FileOrmInit(void)
Initialise the file ORM module.
Definition: mh5fileorm.c:576