MHEG5  18.9.0
MHEG5 Documentation
asn1_createInteractible.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 "mh5root.h"
36 #include "mh5interactible.h"
37 #include "asn1_createExtras.h"
39 
40 /*---constant definitions for this file--------------------------------------*/
41 
42 
43 /*---local typedef structs for this file-------------------------------------*/
44 
45 /*---local (static) variable declarations for this file----------------------*/
46 
47 /*---local function definitions----------------------------------------------*/
48 
49 /*---global function definitions---------------------------------------------*/
50 
60  MHEG5Interactible *interactible)
61 {
62  asnErr errVal = 0;
63  fpa1_syntaxList *currItem;
64 
65  DPL5((">> asn1_decodeInteractible(%X,%X)\n", listPtr, interactible));
66 
67  assert(interactible);
68  if (listPtr == NULL)
69  {
70  DPL5(("<< asn1_decodeInteractible() Returned early\n"));
71  return 1;
72  }
73 
74  currItem = listPtr->children;
75 
76  /* defaults */
77  interactible->engineResp = MHEG5TRUE;
78 
79  /* searches current set of tags for local tags */
80  while (currItem != NULL)
81  {
82  /* most objects will have more than one local tag */
83  switch (currItem->tag)
84  {
85  case ENGRESP:
86  interactible->engineResp = (currItem->data.boolData == 0) ? MHEG5FALSE : MHEG5TRUE;
87  break;
88  case HIGHREFCOL:
89  errVal |= asn1_decodeColour(currItem, &interactible->highlightRefColour);
90  break;
91  default:
92  break;
93  }
94  currItem = currItem->next;
95  }
96 
97 #if (DPLEVEL >= 2)
98  if (errVal != 0)
99  {
100  DPL2(("WARNING:[ASN.1] asn1_decodeInteractible() Returns errVal = %d\n", errVal));
101  }
102 #endif /* DPLEVEL >= 2 */
103 
104  DPL5(("<< asn1_decodeInteractible() Returns %d\n", errVal));
105 
106  return errVal;
107 }
108 
asnErr asn1_decodeColour(fpa1_syntaxList *listPtr, MHEG5Colour *colour)
Decodes Colour class. Refer to MHEG5 Specification (ISO/IEC 13522-2:1996), Appendix A...
Basis MHEG5 data types.
Miscellaneous functions for decoding ASN.1 types.
Implement the MHEG5 Interactible Class. Defines functionality associated with an interaction behaviou...
Contains functions/structure used to do MHEG-5 ASN.1 syntax parsing.
Typedefs, macros used by all of parser. These may be duplicated elsewhere.
struct fpa1_syntaxItem * children
Definition: fpa1_syn.h:53
syntaxItemData data
Definition: fpa1_syn.h:57
#define DPL5(x)
Definition: glue_debug.h:167
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 HIGHREFCOL
Definition: vpa1_tgs.h:98
Implementation of Root class Description Root class of all MHEG-5 classes. Base class None Subclasses...
MHEG5Bool boolData
Definition: fpa1_syn.h:44
#define DPL2(x)
Definition: glue_debug.h:185
#define MHEG5TRUE
Definition: mh5base.h:49
int asnErr
Definition: asn1_sys.h:41
#define ENGRESP
Definition: vpa1_tgs.h:150
asnErr asn1_decodeInteractible(fpa1_syntaxList *listPtr, MHEG5Interactible *interactible)
Decodes interactible class. Refer to MHEG5 Specification (ISO/IEC 13522-2:1996), Appendix A...
struct fpa1_syntaxItem * next
Definition: fpa1_syn.h:52
#define MHEG5FALSE
Definition: mh5base.h:48
MHEG5Colour highlightRefColour