HbbTv  17.9.0
Open source HBBTV engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
ait.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2010 Ocean Blue Software Ltd
4  *
5  * This file is part of a DTVKit Software Component
6  * You are permitted to copy, modify or distribute this file subject to the terms
7  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
8  *
9  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
10  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
11  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  * If you or your organisation is not a member of DTVKit then you have access
14  * to this source code outside of the terms of the licence agreement
15  * and you are expected to delete this and any associated files immediately.
16  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
17  *******************************************************************************/
26 /* pre-processor mechanism so multiple inclusions don't cause compilation error*/
27 
28 #ifndef AIT_PARSE_H
29 #define AIT_PARSE_H
30 
31 /*---includes for this file--------------------------------------------------*/
32 #include "hbbtv_types.h"
33 
34 /* compiler library header files */
35 
36 /* third party header files */
37 
38 /*---Constant and macro definitions for public use-----------------------------*/
39 
40 #define AIT_USAGE_TELETEXT 0x01
41 
42 #define AIT_MAX_NUM_PROTOCOLS 2
43 #define AIT_PROTOCOL_OBJECT_CAROUSEL 0x0001
44 #define AIT_PROTOCOL_HTTP 0x0003
45 
46 #define AIT_NOT_VISIBLE_ALL 0x00
47 #define AIT_NOT_VISIBLE_USERS 0x01
48 #define AIT_VISIBLE_ALL 0x03
49 
50 /*---Enumerations for public use-----------------------------------------------*/
51 
52 typedef enum
53 {
54  APP_TYP_MHEG5 = 0x0008,
55  APP_TYP_HBBTV = 0x0010,
56  APP_TYP_XML = 0x8000,
57 } E_AIT_APP_TYPE;
58 
59 typedef enum
60 {
61  XML_TYP_UNKNOWN = 0x00,
62  XML_TYP_OTHER = 0x01,
63  XML_TYP_DVB_HTML = 0x10,
64  XML_TYP_DVB_J = 0x11,
65 } E_AIT_XML_TYPE;
66 
67 typedef enum
68 {
69  APP_CTL_UNKNOWN = 0x00,
70  APP_CTL_AUTOSTART = 0x01,
71  APP_CTL_PRESENT = 0x02,
72  APP_CTL_DESTROY = 0x03,
73  APP_CTL_KILL = 0x04,
74  APP_CTL_PREFETCH = 0x05,
75  APP_CTL_REMOTE = 0x06,
76  APP_CTL_DISABLED = 0x07,
77  APP_CTL_PB_AUTO = 0x08
78 } E_AIT_APP_CONTROL;
79 
80 /*---Global type defs for public use-------------------------------------------*/
81 typedef struct
82 {
83  U32BIT lang_code;
84  U32BIT zlen;
85  U8BIT *zptr;
87 
88 typedef struct
89 {
90  U8BIT num_langs;
91  S_LANG_STRING *names;
93 
94 typedef struct
95 {
96  BOOLEAN remote_connection;
97  U16BIT net_id;
98  U16BIT stream_id;
99  U16BIT service_id;
100  U8BIT component_tag;
102 
103 typedef struct
104 {
105  S_HBBTV_STRING base_url;
106  U8BIT num_extension_urls;
107  S_HBBTV_STRING *extension_urls;
109 
110 typedef struct
111 {
112  U16BIT protocol_id;
113  U8BIT transport_protocol_label;
114  union
115  {
118  } s;
120 
121 typedef struct
122 {
123  U16BIT app_profile;
124  U8BIT version_major;
125  U8BIT version_minor;
126  U8BIT version_micro;
127 } S_APP_PROFILE;
128 
129 typedef struct
130 {
131  U8BIT visibility;
132  U8BIT priority;
133  U8BIT num_labels;
134  U8BIT num_profiles;
135  S_APP_PROFILE *app_profiles;
136  U8BIT *transport_protocol_labels;
137  BOOLEAN service_bound;
138 } S_APP_DESC;
139 
140 typedef struct
141 {
142  U32BIT org_id;
143  U16BIT app_id;
144  U8BIT control_code;
145  U8BIT num_transports;
146  S_TRANSPORT_PROTOCOL_DESC transport_array[AIT_MAX_NUM_PROTOCOLS];
147  S_HBBTV_STRING location;
148  S_APP_NAME_DESC app_name;
149  S_APP_DESC app_desc;
150  U8BIT xml_type;
151  U8BIT xml_version;
152  U8BIT usage_type;
153  U8BIT num_boundaries;
154  S_HBBTV_STRING *boundaries;
156 
157 typedef struct
158 {
159  void *section_data;
160  U16BIT app_type;
161  U8BIT version;
162  U8BIT num_apps;
163  S_AIT_APP_DESC *app_array;
164  BOOLEAN complete;
165 } S_AIT_TABLE;
166 
167 
168 /*---Global Function prototypes for public use---------------------------------*/
169 
170 /*!**************************************************************************
171  * @brief Parse the AIT table
172  ****************************************************************************/
173 S_AIT_TABLE* AIT_ParseTable(U8BIT *data_ptr);
174 void AIT_ClearTable(S_AIT_TABLE *ait_table);
175 
178 S_AIT_APP_DESC* AIT_FindApp(S_AIT_TABLE *ait_table, U32BIT org_id, U16BIT app_id);
179 
180 #endif /* AIT_PARSE_H */
181 
182 /******************************************************************************
183 ** End of file
184 ******************************************************************************/
185 
Definition of general purpose types.
Definition: ait.h:81
Definition: ait.h:129
Definition: ait.h:121
Definition: ait.h:157
Definition: ait.h:94
Definition: ait.h:140
S_AIT_APP_DESC * AIT_TeletextApp(S_AIT_TABLE *ait_table)
Definition: ait.c:1091
Definition: ait.h:88
void AIT_ClearTable(S_AIT_TABLE *ait_table)
Definition: ait.c:976
S_AIT_APP_DESC * AIT_FindApp(S_AIT_TABLE *ait_table, U32BIT org_id, U16BIT app_id)
Definition: ait.c:1126
Definition: hbbtv_types.h:167
Definition: ait.h:110
S_AIT_APP_DESC * AIT_AutoStartApp(S_AIT_TABLE *ait_table)
Definition: ait.c:1056
S_AIT_TABLE * AIT_ParseTable(U8BIT *data_ptr)
Parse the AIT table.
Definition: ait.h:103