MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
mh5gate.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  * Copyright © 2000 Koninklijke Philips Electronics N.V
5  *
6  * This file is part of a DTVKit Software Component
7  * You are permitted to copy, modify or distribute this file subject to the terms
8  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
9  *
10  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
11  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
12  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * If you or your organisation is not a member of DTVKit then you have access
15  * to this source code outside of the terms of the licence agreement
16  * and you are expected to delete this and any associated files immediately.
17  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
18  *******************************************************************************/
32 #ifndef _MH5GATE_H
33 #define _MH5GATE_H
34 
35 /*---includes for this file--------------------------------------------------*/
36 
37 #include "mh5base.h"
38 
39 /*---Constant and macro definitions for public use---------------------------*/
40 
41 #define ORIGIN_MAX ORIGIN_ERROR
42 
43 /*---Enumerations for public use---------------------------------------------*/
44 
45 /* Enumerated type to tell where the origin of a file is (i.e. the part before
46  * "://")
47  */
48 typedef enum
49 {
50  ORIGIN_DSM, /* DSM-CC file system (DSM://) */
51  ORIGIN_CI, /* CI file system (CI://) */
52  ORIGIN_HYBRID, /* Hybrid file system (hybrid://) */
53  ORIGIN_HTTP, /* HTTP file system (http://) */
54  ORIGIN_HTTPS, /* HTTPS file system (https://) */
55  ORIGIN_DVB, /* DAVIC URL format (dvb://) */
56  ORIGIN_REC, /* UK-DTT URL inherritance format (rec://) */
57  ORIGIN_ERROR /* Unknown origin - last in list */
58 } E_FS_ORIGIN;
59 
60 /*---Global type defs for public use-----------------------------------------*/
61 
62 /*---Global variable declarations for public use-----------------------------*/
63 
64 /*---Global Function prototypes for public use-------------------------------*/
65 
71 MHEG5Int MHEG5FullOriginLength(E_FS_ORIGIN origin);
72 
80 MHEG5Bool MHEG5ResolveOrigin(MHEG5String *ref, E_FS_ORIGIN *pOrigin, MHEG5Int *offset);
81 
89 MHEG5String MHEG5convertGIDGetOrigin( MHEG5String *inRef, E_FS_ORIGIN *pOrigin );
90 
98 
107 MHEG5String MHEG5CreateUrl( E_FS_ORIGIN origin, S_STRING path, S_STRING name );
108 
119 MHEG5Bool MHEG5sameGroups(MH5GroupRef gref1, MH5GroupRef gref2);
120 
121 
133 MHEG5Bool MHEG5sameGroup(MH5GroupPtr gptr, MH5GroupRef gref);
134 
142 void MHEG5setWorkingDir(MHEG5String source);
143 
144 
145 #endif /*_MH5GATE_H*/
Basis MHEG5 data types.
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.
Definition: mh5gate.c:517
MHEG5Bool MHEG5ResolveOrigin(MHEG5String *ref, E_FS_ORIGIN *pOrigin, MHEG5Int *offset)
Resolve the origin of a reference.
Definition: mh5gate.c:208
Definition: mh5base.h:82
MHEG5Int MHEG5FullOriginLength(E_FS_ORIGIN origin)
Get length for origin (e.g. "DSM://" is 6)
Definition: mh5gate.c:192
Definition: mh5group.h:47
Definition: dtvstring.h:28
Definition: mh5base.h:97
MHEG5Bool MHEG5sameGroups(MH5GroupRef gref1, MH5GroupRef gref2)
Compares two group ID strings to see whether they both reference the same group. Relative group ID st...
Definition: mh5gate.c:533
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...
Definition: mh5gate.c:282
void MHEG5setWorkingDir(MHEG5String source)
Set the working directory for the current application. This is used to resolve relative paths...
Definition: mh5gate.c:583
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...
Definition: mh5gate.c:444
MHEG5String MHEG5convertGID(MHEG5String *inRef)
Convert a group ID from a relative reference to an absolute reference. See UK1.05 section 8...
Definition: mh5gate.c:269