MHEG-5  19.3.0
MHEG-5 Documentation
fpa1_but.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 <stdlib.h>
30 
31 #include "vpa1_tgs.h"
32 #include "vpa1_rdf.h"
33 
34 #include "fpa1_but.h"
35 #include "fpa1_set.h"
36 #include "fpa1_syn.h"
37 
38 /*******************
39  * LOCAL TYPEDEFS *
40  ********************/
41 #define BUTTON_SIZE_COMPS 11
42 #define PUSH_BUT_SIZE_COMPS 13
43 #define SWIT_BUT_SIZE_COMPS 14
44 
45 /*******************
46  * LOCAL MACROS *
47  ********************/
48 
49 /*******************
50  * EXPORTED DATA *
51  ********************/
52 
53 /*******************
54  * STATIC DATA *
55  ********************/
56 
57 int buttonSetCompsArr[ 2 * BUTTON_SIZE_COMPS + 1 ]
58  = { 2 * BUTTON_SIZE_COMPS, /* array limit */
59  /* Ingredient */
60  OBJECT_REFERENCE_TYPE, SYN_NEEDED,
61  INITACTIVE, SYN_DEFAULT,
62  CHOOK, SYN_OPTIONAL,
63  OCONTENT, SYN_OPTIONAL,
64  SHARED, SYN_DEFAULT,
65  /* Visible */
66  OBOXSIZE, SYN_NEEDED,
67  OPOSITION, SYN_DEFAULT,
68  OPALREF, SYN_OPTIONAL,
69  /* Interactible */
70  ENGRESP, SYN_DEFAULT,
71  HIGHREFCOL, SYN_OPTIONAL,
72  /* Button */
73  BUTTONREFCOL, SYN_OPTIONAL };
74 
75 int pushButSetCompsArr[ 2 * PUSH_BUT_SIZE_COMPS + 1 ]
76  = { 2 * PUSH_BUT_SIZE_COMPS, /* array limit */
77  /* Ingredient */
78  OBJECT_REFERENCE_TYPE, SYN_NEEDED,
79  INITACTIVE, SYN_DEFAULT,
80  CHOOK, SYN_OPTIONAL,
81  OCONTENT, SYN_OPTIONAL,
82  SHARED, SYN_DEFAULT,
83  /* Visible */
84  OBOXSIZE, SYN_NEEDED,
85  OPOSITION, SYN_DEFAULT,
86  OPALREF, SYN_OPTIONAL,
87  /* Interactible */
88  ENGRESP, SYN_DEFAULT,
89  HIGHREFCOL, SYN_OPTIONAL,
90  /* Button */
91  BUTTONREFCOL, SYN_OPTIONAL,
92  /* PushButton */
93  OLABEL, SYN_OPTIONAL,
94  CHARSET, SYN_OPTIONAL };
95 
96 int switButSetCompsArr[ 2 * SWIT_BUT_SIZE_COMPS + 1 ]
97  = { 2 * SWIT_BUT_SIZE_COMPS, /* array limit */
98  OBJECT_REFERENCE_TYPE, SYN_NEEDED,
99  INITACTIVE, SYN_DEFAULT,
100  CHOOK, SYN_OPTIONAL,
101  OCONTENT, SYN_OPTIONAL,
102  SHARED, SYN_DEFAULT,
103  /* Visible */
104  OBOXSIZE, SYN_NEEDED,
105  OPOSITION, SYN_DEFAULT,
106  OPALREF, SYN_OPTIONAL,
107  /* Interactible */
108  ENGRESP, SYN_DEFAULT,
109  HIGHREFCOL, SYN_OPTIONAL,
110  /* Button */
111  BUTTONREFCOL, SYN_OPTIONAL,
112  /* PushButton */
113  OLABEL, SYN_OPTIONAL,
114  CHARSET, SYN_OPTIONAL,
115  /* SwitchButton */
116  BSTYLE, SYN_NEEDED };
117 
118 /**********************
119  * FUNCTION PROTOTYPES *
120  ***********************/
121 
128 fpa1_syntaxList* fpa1_decodeSwitchButton( vpa1_filePos filePosLimit )
129 {
130  /* SwitchButtonClass a SET - any order */
131  return fpa1_setParse( switButSetCompsArr, filePosLimit );
132 } /* fpa1_decodeSwitchButton () */
133 
140 fpa1_syntaxList* fpa1_decodePushButton( vpa1_filePos filePosLimit )
141 {
142  /* PushButtonClass a SET - any order */
143  return fpa1_setParse( pushButSetCompsArr, filePosLimit );
144 } /* fpa1_decodePushButton () */
145 
152 fpa1_syntaxList* fpa1_decodeButton( vpa1_filePos filePosLimit )
153 {
154  /* ButtonClass a SET - any order */
155  return fpa1_setParse( buttonSetCompsArr, filePosLimit );
156 } /* fpa1_decodeButton () */
157 
fpa1_syntaxList * fpa1_setParse(int *, vpa1_filePos)
Definition: fpa1_set.c:178
fpa1_syntaxList * fpa1_decodeButton(vpa1_filePos filePosLimit)
Definition: fpa1_but.c:152
fpa1_syntaxList * fpa1_decodeSwitchButton(vpa1_filePos filePosLimit)
Definition: fpa1_but.c:128
fpa1_syntaxList * fpa1_decodePushButton(vpa1_filePos filePosLimit)
Definition: fpa1_but.c:140
Contains functions/structure used to do MHEG-5 ASN.1 syntax parsing.
Typedefs for script reading functions.
Contains macros for MHEG-5 ASN.1 tags and structures.
Contains functions to decode MHEG-5 ASN.1 Switch Button, Button, Hotspot, Push Button class component...
Contains functions used to parse MHEG-5 ASN.1 SETs. SETs can have components in any order and as such...