MHEG5  15.3.0
source/core/src/mh5hfs.c File Reference

Functions relating to Hybrid file system. More...

#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "mh5profile.h"
#include "mh5hfs.h"
#include "mh5gate.h"
#include "mh5memory.h"
#include "techtype.h"
#include "glue_debug.h"

Data Structures

struct  HfsMapping
struct  HfsTable

Defines

#define PRINT(x)
#define MAX_HFS_TABLES   6

Typedefs

typedef struct HfsMapping HfsMapping
typedef struct HfsTable HfsTable

Functions

void MHEG5InitialiseHybridFileSystem (void)
 Initialise the hybrid file system. The hybrid file system is a set of mappings from a "path" string (not including source, which is implicitly the string "hybrid:") to a list of paths.
void MHEG5ClearHybridFileSystem (void)
 Clear the hybrid file system and restore the default mapping // -> DSM://.
void MHEG5PushHybridFileSystem (void)
 Push a copy of the current hybrid file system into the stack.
void MHEG5PopHybridFileSystem (void)
 Clear the current hybrid file system and pop a stored hybrid file system from the stack.
void MHEG5SetHybridFileSystem (MHEG5String *pathName, MHEG5String *mappingList)
 Set mapping list in the hybrid file system. This function sets, clears or modifies the list of mappings associated with a path in the hybrid file system.
void * MHEG5GetHybridFileSystemMapping (MHEG5String *reference)
 Return mapping from the hybrid file system given path name. The mapping must be released using MHEG5ReleaseHybridFileSystemMapping.
void MHEG5ReleaseHybridFileSystemMapping (void *handle)
 Release mapping returned from the hybrid file system. The mapping must be have been returned by a call to the function MHEG5GetHybridFileSystemMapping.
void MHEG5InitMappingIter (MHEG5MappingIter_t *iter, void *mapping)
 Initialise hybrid filesystem mapping iterator.
MHEG5String MHEG5GetNextReference (MHEG5String *ref, MHEG5MappingIter_t *iter)
 Return next reference from mapping iterator.
MHEG5String MHEG5GetFirstDsmReference (MHEG5String *reference)
 Return first reference with DSM:// source. This is a convenience function that converts a hybrid:// reference to a DSM:// reference (if any), and saves the trouble of finding a mapping, initialising an iterator and checking each reference. This function also accepts DSM:// references, in which case it simply copies the input. It also handles other (even invalid) references, in which case it returns the empty string as output.

Detailed Description

Functions relating to Hybrid file system.

Date:
22/09/2009
Author:
Omri Barel

Function Documentation

void MHEG5ClearHybridFileSystem ( void  )

Clear the hybrid file system and restore the default mapping // -> DSM://.

Returns:
Nothing

Return first reference with DSM:// source. This is a convenience function that converts a hybrid:// reference to a DSM:// reference (if any), and saves the trouble of finding a mapping, initialising an iterator and checking each reference. This function also accepts DSM:// references, in which case it simply copies the input. It also handles other (even invalid) references, in which case it returns the empty string as output.

Parameters:
referenceReference to match. The reference should be a full path (including source).
Returns:
The first DSM:// reference or an empty string

Return mapping from the hybrid file system given path name. The mapping must be released using MHEG5ReleaseHybridFileSystemMapping.

Parameters:
referenceReference to match. The reference must start with "//".
Returns:
Handle to mapping if successful, NULL otherwise

Return next reference from mapping iterator.

Parameters:
referenceReference to match. The reference must start with "//".
iterPointer to mapping iterator
Returns:
Next reference or an empty string if no more references. The string must not be destoyed using MHEG5stringDestruct. The string must not be used after the mapping is released.

Initialise the hybrid file system. The hybrid file system is a set of mappings from a "path" string (not including source, which is implicitly the string "hybrid:") to a list of paths.

Returns:
Nothing
void MHEG5InitMappingIter ( MHEG5MappingIter_t iter,
void *  mapping 
)

Initialise hybrid filesystem mapping iterator.

Parameters:
iterPointer to iterator to initialise
mappingMapping to be used by iterator
Returns:
Nothing
void MHEG5PopHybridFileSystem ( void  )

Clear the current hybrid file system and pop a stored hybrid file system from the stack.

Returns:
Nothing
void MHEG5PushHybridFileSystem ( void  )

Push a copy of the current hybrid file system into the stack.

Returns:
Nothing
void MHEG5ReleaseHybridFileSystemMapping ( void *  handle)

Release mapping returned from the hybrid file system. The mapping must be have been returned by a call to the function MHEG5GetHybridFileSystemMapping.

Parameters:
mappingHandle to mapping to release
Returns:
Nothing
void MHEG5SetHybridFileSystem ( MHEG5String pathName,
MHEG5String mappingList 
)

Set mapping list in the hybrid file system. This function sets, clears or modifies the list of mappings associated with a path in the hybrid file system.

Returns:
Nothing
 All Data Structures Files Functions Variables Typedefs Defines