MHEG5  18.9.0
MHEG5 Documentation
asn1_createHypertext.c
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  *******************************************************************************/
27 /*---includes for this file--------------------------------------------------*/
28 #include <stdio.h>
29 #include "vpa1_sys.h"
30 #include "vpa1_tgs.h"
31 #include "fpa1_syn.h"
32 #include "asn1_sys.h"
33 
34 #include "mh5base.h"
35 #include "mh5hypertext.h"
36 #include "asn1_createExtras.h"
38 #include "asn1_createText.h"
39 #include "asn1_createHypertext.h"
40 
41 /*---constant definitions for this file--------------------------------------*/
42 
43 
44 /*---local typedef structs for this file-------------------------------------*/
45 
46 /*---local (static) variable declarations for this file----------------------*/
47 
48 /*---local function definitions----------------------------------------------*/
49 
50 /*---global function definitions---------------------------------------------*/
51 
60 {
61  MHEG5Hypertext *hypertext;
62 
63  DPL5((">> asn1_createHypertext(%X)\n", listPtr));
64 
65  assert(listPtr);
66 
67  hypertext = (MHEG5Hypertext *)MHEG5getMem( sizeof(MHEG5Hypertext));
68  if (hypertext != NULL)
69  {
70  memset(hypertext, 0, sizeof(MHEG5Hypertext));
72  /* No local tags */
73 
74  /* decode inherited tags */
75  if ((asn1_decodeText(listPtr, &hypertext->text) != ASN_NO_ERROR) ||
76  (asn1_decodeInteractible(listPtr, &hypertext->interactible) != ASN_NO_ERROR))
77  {
78  #if (DPLEVEL >= 2)
79  DPL2(("WARNING:[ASN.1] asn1_createHypertext() Fails\n"));
80  #endif /* DPLEVEL >= 2 */
81  MHEG5freeMem( hypertext );
82  hypertext = NULL;
83  }
84  }
85 
86  DPL5(("<< asn1_createHypertext() %X\n", hypertext));
87  return (MHEG5Ingredient *)hypertext;
88 }
89 
MHEG5Visible visible
Definition: mh5text.h:62
Basis MHEG5 data types.
MHEG5Interactible interactible
Definition: mh5hypertext.h:49
Implement the MHEG5 Hypertext Class. The HyperText class is a subclass of the Text class...
Functions to create a MHEG5hHpertext from a MHEG5 script (in the form of a list of fpa1_syntaxList st...
Miscellaneous functions for decoding ASN.1 types.
Contains functions/structure used to do MHEG-5 ASN.1 syntax parsing.
#define MHEG5getMem
Definition: glue_memory.h:93
MHEG5Final clazz
Definition: mh5root.h:55
Typedefs, macros used by all of parser. These may be duplicated elsewhere.
#define ASN_NO_ERROR
Definition: asn1_sys.h:36
asnErr asn1_decodeInteractible(fpa1_syntaxList *listPtr, MHEG5Interactible *interactible)
Decodes interactible class. Refer to MHEG5 Specification (ISO/IEC 13522-2:1996), Appendix A...
MHEG5Ingredient * asn1_createHypertext(fpa1_syntaxList *listPtr)
Decodes Hypertext class. Refer to MHEG5 Specification (ISO/IEC 13522-2:1996), Appendix A...
#define DPL5(x)
Definition: glue_debug.h:167
Functions to create a MHEG5Text from a MHEG5 script (in the form of a list of fpa1_syntaxList structu...
typedefs etc for the whole object creation section.
Contains macros for MHEG-5 ASN.1 tags and structures.
Functions to create a MHEG5Interactible from a MHEG5 script (in the form of a list of fpa1_syntaxList...
#define MHEG5freeMem
Definition: glue_memory.h:94
MHEG5Text text
Definition: mh5hypertext.h:48
#define DPL2(x)
Definition: glue_debug.h:185
MHEG5Ingredient ingredient
Definition: mh5visible.h:49
asnErr asn1_decodeText(fpa1_syntaxList *listPtr, MHEG5Text *text)
Decodes Text class. Refer to MHEG5 Specification (ISO/IEC 13522-2:1996), Appendix A...