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

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"

Typedefs

typedef enum source_enum source_t

Enumerations

enum  source_enum {
  SOURCE_DSM, SOURCE_CI, SOURCE_HTTP, SOURCE_HTTPS,
  SOURCE_HYBRID, SOURCE_MAX
}

Functions

MHEG5String MHEG5convertGID (MHEG5String *in)
 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.
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.
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.
void MHEG5setWorkingDir (MHEG5String app_dir)
 Set the working directory for the current application. This is used to resolve relative paths.

Detailed Description

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

Date:
01/02/2002
Author:
R.Freeman

Function Documentation

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.

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

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
 All Data Structures Files Functions Variables Typedefs Defines