MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
Macros | Enumerations | Functions
mh5gate.h File Reference

Implement Functions to support Service Gateways. Functions for standarizing several GroupIDs like +DSM:// +~/ +DSM:/ +CI:/ +etc. More...

#include "mh5base.h"

Go to the source code of this file.

Macros

#define ORIGIN_MAX   ORIGIN_ERROR
 

Enumerations

enum  E_FS_ORIGIN {
  ORIGIN_DSM, ORIGIN_CI, ORIGIN_HYBRID, ORIGIN_HTTP,
  ORIGIN_HTTPS, ORIGIN_DVB, ORIGIN_REC, ORIGIN_ERROR
}
 

Functions

MHEG5Int MHEG5FullOriginLength (E_FS_ORIGIN origin)
 Get length for origin (e.g. "DSM://" is 6) More...
 
MHEG5Bool MHEG5ResolveOrigin (MHEG5String *ref, E_FS_ORIGIN *pOrigin, MHEG5Int *offset)
 Resolve the origin of a reference. 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 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. 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 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...
 
MHEG5Bool MHEG5sameGroup (MH5GroupPtr gptr, MH5GroupRef gref)
 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. More...
 
void MHEG5setWorkingDir (MHEG5String source)
 Set the working directory for the current application. This is used to resolve relative paths. More...
 

Detailed Description

Implement Functions to support Service Gateways. Functions for standarizing several GroupIDs like +DSM:// +~/ +DSM:/ +CI:/ +etc.

Date
22/02/2002
Author
iwillis

Function Documentation

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.

Parameters
inRefRelative group ID to convert.
Returns
Absolute group ID reference

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.

Parameters
inRefRelative group ID to convert.
Returns
Absolute group ID reference
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.

Parameters
inRefRelative group ID to convert.
pOriginOrigin of reference
Returns
Absolute group ID reference
Parameters
inRefRelative group ID to convert.
pOriginPointer to origin of reference
Returns
Absolute group ID 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.

Parameters
originOrigin of reference
pathlocation or path.
namefile name.
Returns
Absolute URL (or group ID) reference
Parameters
originOrigin of reference
pathlocation or path.
fnamefile name.
Returns
Allocated absolute URL (or group ID) reference
MHEG5Int MHEG5FullOriginLength ( E_FS_ORIGIN  origin)

Get length for origin (e.g. "DSM://" is 6)

Parameters
originreference origin
Returns
Length of origin
MHEG5Bool MHEG5ResolveOrigin ( MHEG5String ref,
E_FS_ORIGIN *  orig,
MHEG5Int *  offset 
)

Resolve the origin of a reference.

Parameters
refInput reference
pOriginPointer to origin of reference
offsetPointer to offset in input after origin
Returns
MHEG5TRUE if successful, MHEG5FALSE otherwise

Resolve the origin of a reference.

Parameters
refInput reference
origSource of reference
offsetOffset in input after orig
Returns
MHEG5TRUE if successful, MHEG5FALSE otherwise
MHEG5Bool MHEG5sameGroup ( MH5GroupPtr  gptr,
MH5GroupRef  gref 
)

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.

Parameters
gptrFirst group pointer to compare (absolute)
grefSecond group ref to compare (absolute or relative)
Returns
MHEG5FALSE - The two references refer to different group MHEG5TRUE - The two references refer to the same group.

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.

Parameters
gid1First group ID to compare (absolute)
gid2Second group ID to compare (absolute or relative)
Returns
MHEG5FALSE - The two references refer to different group IDs. MHEG5TRUE - The two references refer to the same group IDs.
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.

Parameters
gid1First group ID to compare
gid2Second group ID to compare
Returns
MHEG5FALSE - The two references refer to different group IDs. MHEG5TRUE - The two references refer to the same group IDs.
void MHEG5setWorkingDir ( MHEG5String  app_dir)

Set the working directory for the current application. This is used to resolve relative paths.

Parameters
sourceApplication name of new application. This must be an absolute path.
Returns
void
Parameters
app_dirApplication name of new application. This must be an absolute path.
Returns
void