MHEG5  18.9.0
MHEG5 Documentation
Macros | Typedefs | Enumerations | Functions
mh5fileorm.h File Reference

File interface functions to DSMCC component. More...

#include "mh5base.h"
#include "mh5root.h"
#include "fs_types.h"
#include "mh5gate.h"

Go to the source code of this file.

Macros

#define FRP_CACHE_DEFAULT   0x007F
 
#define FRP_CACHE_MASK   0x00FF
 
#define FRP_APPLICATION   0x0100
 
#define FRP_SCENE   0x0200
 
#define FRP_GROUP   0x0300
 
#define FRP_EXISTS   0x0400
 
#define FRP_VERIFY   0x0800
 
#define FRP_HASH   0x1000
 
#define FRP_CERT   0x2000
 
#define FRP_SERVER   0x3000
 
#define FRP_DEFER_SERV   0x4000
 
#define FRP_IN_APP   0x8000
 

Typedefs

typedef void(* F_CB_Good) (void *userData, S_CONTENT *content)
 
typedef void(* F_CB_Fail) (void *userData)
 
typedef void(* F_CB_Post) (void *userData, MHEG5String responseData, MHEG5Int responseCode)
 
typedef void(* F_CB_CiMsg) (void *userData, MHEG5String output, MHEG5Bool success)
 

Enumerations

enum  MHEG5FileOrmResetMode { MHEG5_FILE_ORM_RESET_SCENE_OBJECTS, MHEG5_FILE_ORM_RESET_ALL_OBJECTS, MHEG5_FILE_ORM_RESET_ALL }
 

Functions

void MHEG5FileOrmInit (void)
 Initialise the file ORM module. More...
 
void MHEG5FileOrmReset (MHEG5FileOrmResetMode resetMode)
 Reset the ORM module. This function supports two modes: More...
 
BOOLEAN MHEG5FileOrmIsReset (MHEG5FileOrmResetMode *resetMode)
 Tell whether the ORM module is currently being reset. If it is, the function also returns the current reset mode. This information is required in order to decide whether to generate an EngineEvent when a file load fails. If a file cannot be loaded (doesn't exist, timeout) then an event is required, but if a file load "fails" because the ORM module is being reset, then no event should be generated. resetMode is an optional parameter, and it can also be NULL. More...
 
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. More...
 
void MHEG5FileOrmClear (void *orm_ref)
 Aborts a request for file. More...
 
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. When file system acceleration is available, this may retrieve the file from NVM cache. More...
 
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 resolved. This is intended to be used by the File System Acceleration code. More...
 
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. More...
 
void MHEG5ciFileAcknowledge (BOOLEAN fileOK, U8BIT *pFileData, U32BIT length)
 Process the FileAcknowledge message sent from the CI module. More...
 

Detailed Description

File interface functions to DSMCC component.

Date
17/01/2002
Author
R.Freeman

Definition in file mh5fileorm.h.

Macro Definition Documentation

#define FRP_APPLICATION   0x0100

Definition at line 40 of file mh5fileorm.h.

#define FRP_CACHE_DEFAULT   0x007F

Definition at line 38 of file mh5fileorm.h.

#define FRP_CACHE_MASK   0x00FF

Definition at line 39 of file mh5fileorm.h.

#define FRP_CERT   0x2000

Definition at line 46 of file mh5fileorm.h.

#define FRP_DEFER_SERV   0x4000

Definition at line 48 of file mh5fileorm.h.

#define FRP_EXISTS   0x0400

Definition at line 43 of file mh5fileorm.h.

#define FRP_GROUP   0x0300

Definition at line 42 of file mh5fileorm.h.

#define FRP_HASH   0x1000

Definition at line 45 of file mh5fileorm.h.

#define FRP_IN_APP   0x8000

Definition at line 49 of file mh5fileorm.h.

#define FRP_SCENE   0x0200

Definition at line 41 of file mh5fileorm.h.

#define FRP_SERVER   0x3000

Definition at line 47 of file mh5fileorm.h.

#define FRP_VERIFY   0x0800

Definition at line 44 of file mh5fileorm.h.

Typedef Documentation

typedef void(* F_CB_CiMsg) (void *userData, MHEG5String output, MHEG5Bool success)

Definition at line 64 of file mh5fileorm.h.

typedef void(* F_CB_Fail) (void *userData)

Definition at line 62 of file mh5fileorm.h.

typedef void(* F_CB_Good) (void *userData, S_CONTENT *content)

Definition at line 61 of file mh5fileorm.h.

typedef void(* F_CB_Post) (void *userData, MHEG5String responseData, MHEG5Int responseCode)

Definition at line 63 of file mh5fileorm.h.

Enumeration Type Documentation

Enumerator
MHEG5_FILE_ORM_RESET_SCENE_OBJECTS 
MHEG5_FILE_ORM_RESET_ALL_OBJECTS 
MHEG5_FILE_ORM_RESET_ALL 

Definition at line 54 of file mh5fileorm.h.

Function Documentation

void MHEG5ciFileAcknowledge ( BOOLEAN  fileOK,
U8BIT pFileData,
U32BIT  length 
)

Process the FileAcknowledge message sent from the CI module.

Parameters
fileOKFileOK field of the FileAcknowledge message
pFileDataPointer to file data in the FileAcknowledge message
lengthNumber of bytes in the file data
Returns
void
void MHEG5FileOrmClear ( void *  orm_ref)

Aborts a request for file.

Parameters
orm_refFile Orm handle returned by MHEG5FileOrmGet()
Returns
None.

Aborts a request for file.

Parameters
orm_refHandle given back by MHEG5FileOrmGet
Returns
None.

Definition at line 979 of file mh5fileorm.c.

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. When file system acceleration is available, this may retrieve the file from NVM cache.

Parameters
nameName of file to retrieve. This will be expanded using the rules specified by the UK1 profile.
priorityCache priority with which to fetch the object.
userDataUser data to be returned in callback functions.
cbGoodPointer to callback function that will be called when the file is retreived.
cbFailPointer to callback function that will be called when the file cannot be retrieved.
Returns
void* - the FileOrm request handle

Definition at line 1179 of file mh5fileorm.c.

void MHEG5FileOrmInit ( void  )

Initialise the file ORM module.

Returns
void
always returns 1

Definition at line 576 of file mh5fileorm.c.

BOOLEAN MHEG5FileOrmIsReset ( MHEG5FileOrmResetMode resetMode)

Tell whether the ORM module is currently being reset. If it is, the function also returns the current reset mode. This information is required in order to decide whether to generate an EngineEvent when a file load fails. If a file cannot be loaded (doesn't exist, timeout) then an event is required, but if a file load "fails" because the ORM module is being reset, then no event should be generated. resetMode is an optional parameter, and it can also be NULL.

Parameters
resetModeReset mode (if return value is TRUE)
Returns
TRUE if the ORM module is being reset, FALSE otherwise

Definition at line 712 of file mh5fileorm.c.

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.

Parameters
nameName of file to preload
Returns
void

Definition at line 1554 of file mh5fileorm.c.

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.

Returns
void
TRUE if the function should be called again, FALSE otherwise

Definition at line 830 of file mh5fileorm.c.

void MHEG5FileOrmReset ( MHEG5FileOrmResetMode  resetMode)

Reset the ORM module. This function supports two modes:

  • In "objects" mode, only outstanding file requests that are related to MHEG-5 objects are cancelled.
  • In "all" mode, every outstanding file request is cleared. This includes file requests to certificates and access files.
    Parameters
    resetModeReset mode
    Returns
    None.

Definition at line 595 of file mh5fileorm.c.

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 resolved. This is intended to be used by the File System Acceleration code.

Parameters
originOrigin of file to retrieve.
locationPath location of file to retrieve.
nameName of file to retrieve.
priorityCache priority with which to fetch the object.
userDataUser data to be returned in callback functions.
cbGoodPointer to callback function that will be called when the file is retreived.
cbFailPointer to callback function that will be called when the file cannot be retrieved.
Returns
void* - the FileOrm request handle

Definition at line 1290 of file mh5fileorm.c.