Implement Functions to support Service Gateways. Functions for standarizing several GroupIDs like +DSM:// +~/ +DSM:/ +CI:/ +etc. More...
#include <string.h>
#include "mh5base.h"
#include "mh5memory.h"
#include "mh5application.h"
#include "mh5debug.h"
#include "mh5profile.h"
#include "mh5gate.h"
Functions | |
MHEG5Int | MHEG5FullOriginLength (E_FS_ORIGIN origin) |
Get length for origin (e.g. "DSM://" is 6) More... | |
MHEG5Bool | MHEG5ResolveOrigin (MHEG5String *ref, E_FS_ORIGIN *orig, MHEG5Int *offset) |
Resolve the orig of a reference. More... | |
MHEG5String | MHEG5convertGID (MHEG5String *inRef) |
Convert a group ID from a relative reference to an absolute reference. See UK1.05 section 8.3.2 for the rules used for conversion. See UK1.06 section 9.17.2 for maximum length of fully resolved path. More... | |
MHEG5String | MHEG5convertGIDGetOrigin (MHEG5String *inRef, E_FS_ORIGIN *pOrigin) |
Convert a group ID from a relative reference to an absolute reference. See UK1.05 section 8.3.2 for the rules used for conversion. More... | |
MHEG5String | MHEG5CreateUrl (E_FS_ORIGIN origin, S_STRING path, S_STRING name) |
Convert a group ID from a relative reference to an absolute reference. See UK1.05 section 8.3.2 for the rules used for conversion. More... | |
MHEG5Bool | MHEG5sameGroup (MH5GroupPtr gptr, MH5GroupRef gref) |
Compares two group ID strings to see whether they both reference the same group. The first string is an absolute GID, the second can be a relative group ID and will be converted to absolute prior to the comparison, so two different references that resolve to reference the same group ID produces a True return value. More... | |
MHEG5Bool | MHEG5sameGroups (MH5GroupRef gref1, MH5GroupRef gref2) |
Compares two group ID strings to see whether they both reference the same group. Relative group ID strings are converted to absolute prior to the comparison, so two different references that resolve to reference the same group ID produces a True return value. More... | |
void | MHEG5setWorkingDir (MHEG5String app_dir) |
Set the working directory for the current application. This is used to resolve relative paths. More... | |
Implement Functions to support Service Gateways. Functions for standarizing several GroupIDs like +DSM:// +~/ +DSM:/ +CI:/ +etc.
MHEG5String MHEG5convertGID | ( | MHEG5String * | inRef | ) |
Convert a group ID from a relative reference to an absolute reference. See UK1.05 section 8.3.2 for the rules used for conversion. See UK1.06 section 9.17.2 for maximum length of fully resolved path.
Convert a group ID from a relative reference to an absolute reference. See UK1.05 section 8.3.2 for the rules used for conversion.
inRef | Relative group ID to convert. |
MHEG5String MHEG5convertGIDGetOrigin | ( | MHEG5String * | inRef, |
E_FS_ORIGIN * | pOrigin | ||
) |
Convert a group ID from a relative reference to an absolute reference. See UK1.05 section 8.3.2 for the rules used for conversion.
inRef | Relative group ID to convert. |
pOrigin | Pointer to origin of reference |
MHEG5String MHEG5CreateUrl | ( | E_FS_ORIGIN | origin, |
S_STRING | path, | ||
S_STRING | name | ||
) |
Convert a group ID from a relative reference to an absolute reference. See UK1.05 section 8.3.2 for the rules used for conversion.
origin | Origin of reference |
path | location or path. |
fname | file name. |
MHEG5Int MHEG5FullOriginLength | ( | E_FS_ORIGIN | origin | ) |
Get length for origin (e.g. "DSM://" is 6)
origin | reference origin |
MHEG5Bool MHEG5ResolveOrigin | ( | MHEG5String * | ref, |
E_FS_ORIGIN * | orig, | ||
MHEG5Int * | offset | ||
) |
Resolve the orig of a reference.
Resolve the origin of a reference.
ref | Input reference |
orig | Source of reference |
offset | Offset in input after orig |
MHEG5Bool MHEG5sameGroup | ( | MH5GroupPtr | gptr, |
MH5GroupRef | gref | ||
) |
Compares two group ID strings to see whether they both reference the same group. The first string is an absolute GID, the second can be a relative group ID and will be converted to absolute prior to the comparison, so two different references that resolve to reference the same group ID produces a True return value.
Compares group ptr with group ref to see whether they both reference the same group. The first is pointer to group, the second can be a relative group name and will be converted to absolute prior to the comparison, so two different references that resolve to reference the same group name produces a True return value.
gid1 | First group ID to compare (absolute) |
gid2 | Second group ID to compare (absolute or relative) |
MHEG5Bool MHEG5sameGroups | ( | MH5GroupRef | gref1, |
MH5GroupRef | gref2 | ||
) |
Compares two group ID strings to see whether they both reference the same group. Relative group ID strings are converted to absolute prior to the comparison, so two different references that resolve to reference the same group ID produces a True return value.
gid1 | First group ID to compare |
gid2 | Second group ID to compare |
void MHEG5setWorkingDir | ( | MHEG5String | app_dir | ) |
Set the working directory for the current application. This is used to resolve relative paths.
app_dir | Application name of new application. This must be an absolute path. |