![]() |
MHEG5
22.3.0
|
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"
Classes | |
struct | HfsMapping |
struct | HfsTable |
Macros | |
#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. More... | |
void | MHEG5ClearHybridFileSystem (void) |
Clear the hybrid file system and restore the default mapping // -> DSM://. More... | |
void | MHEG5PushHybridFileSystem (void) |
Push a copy of the current hybrid file system into the stack. More... | |
void | MHEG5PopHybridFileSystem (void) |
Clear the current hybrid file system and pop a stored hybrid file system from the stack. More... | |
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. More... | |
void * | MHEG5GetHybridFileSystemMapping (MHEG5String *reference) |
Return mapping from the hybrid file system given path name. The mapping must be released using MHEG5ReleaseHybridFileSystemMapping. More... | |
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. More... | |
void | MHEG5InitMappingIter (MHEG5MappingIter_t *iter, void *mapping) |
Initialise hybrid filesystem mapping iterator. More... | |
MHEG5String | MHEG5GetNextReference (MHEG5String *ref, MHEG5MappingIter_t *iter) |
Return next reference from mapping iterator. More... | |
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. More... | |
Functions relating to Hybrid file system.
void MHEG5ClearHybridFileSystem | ( | void | ) |
Clear the hybrid file system and restore the default mapping // -> DSM://.
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.
reference | Reference to match. The reference should be a full path (including source). |
void* MHEG5GetHybridFileSystemMapping | ( | MHEG5String * | reference | ) |
Return mapping from the hybrid file system given path name. The mapping must be released using MHEG5ReleaseHybridFileSystemMapping.
reference | Reference to match. The reference must start with "//". |
MHEG5String MHEG5GetNextReference | ( | MHEG5String * | ref, |
MHEG5MappingIter_t * | iter | ||
) |
Return next reference from mapping iterator.
reference | Reference to match. The reference must start with "//". |
iter | Pointer to mapping iterator |
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 MHEG5InitMappingIter | ( | MHEG5MappingIter_t * | iter, |
void * | mapping | ||
) |
Initialise hybrid filesystem mapping iterator.
iter | Pointer to iterator to initialise |
mapping | Mapping to be used by iterator |
void MHEG5PopHybridFileSystem | ( | void | ) |
Clear the current hybrid file system and pop a stored hybrid file system from the stack.
void MHEG5PushHybridFileSystem | ( | void | ) |
Push a copy of the current hybrid file system into the stack.
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.
mapping | Handle to mapping to release |
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.