HbbTv  17.9.0
Open source HBBTV engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
hbbtv_types.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2014 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 _HBBTV_TYPES_H
29 
30 #define _HBBTV_TYPES_H
31 
32 /*---Constant and macro definitions for public use-----------------------------*/
33 
34 /*---Enumerations for public use-----------------------------------------------*/
35 typedef enum
36 {
37  // Requested operation completed successfully
38  HBBTV_OK = 0,
39 
40  // Function call had no effect
41  HBBTV_IGNORED_REQUEST,
42 
43  // When specified object (e.g. file) was not found
44  HBBTV_ERR_OBJECT_NOT_FOUND,
45 
46  // One or more of the parameters passed was invalid
47  HBBTV_ERR_BAD_PARAMETER,
48 
49  // Memory allocation failure or mutex/semaphore failure
50  HBBTV_ERR_ALLOCATING_MEMORY,
51 
52  // The HbbTV module has not been opened
53  HBBTV_ERR_COMP_NOT_OPEN,
54 
55  // The HbbTV module has already been opened
56  HBBTV_ERR_COMP_ALREADY_OPEN,
57 
58  // The HbbTV module has not been started
59  HBBTV_ERR_COMP_NOT_STARTED,
60 
61  // The HbbTV module has already been started
62  HBBTV_ERR_COMP_ALREADY_STARTED,
63 
64  // The internal Queue is full
65  HBBTV_ERR_QUEUE_FULL,
66 
67  // An error internal to the HbbTV module has occurred.
68  HBBTV_ERR_INTERNAL,
69 
70  // An error due to failure to create system resource (e.g task, queue, semaphore or mutex)
71  HBBTV_ERR_SYSTEM_RESOURCE,
72 
73  // An error that does not fit any other error code occurred
74  HBBTV_ERR_OTHER,
75 } E_HBBTV_ERR;
76 
77 typedef enum
78 {
79  HBBTV_VIDEO_ASPECT_RATIO_16x9,
80  HBBTV_VIDEO_ASPECT_RATIO_4x3
81 } E_HBBTV_ASPECT_RATIO;
82 
87 typedef enum
88 {
89  HBBTV_VK_INVALID = 0,
90  HBBTV_VK_RED = 403,
91  HBBTV_VK_GREEN = 404,
92  HBBTV_VK_YELLOW = 405,
93  HBBTV_VK_BLUE = 406,
94  HBBTV_VK_UP = 38,
95  HBBTV_VK_DOWN = 40,
96  HBBTV_VK_LEFT = 37,
97  HBBTV_VK_RIGHT = 39,
98  HBBTV_VK_ENTER = 13,
99  HBBTV_VK_BACK = 461,
100  HBBTV_VK_0 = 48,
101  HBBTV_VK_1 = 49,
102  HBBTV_VK_2 = 50,
103  HBBTV_VK_3 = 51,
104  HBBTV_VK_4 = 52,
105  HBBTV_VK_5 = 53,
106  HBBTV_VK_6 = 54,
107  HBBTV_VK_7 = 55,
108  HBBTV_VK_8 = 56,
109  HBBTV_VK_9 = 57,
110  HBBTV_VK_STOP = 413,
111  HBBTV_VK_PLAY = 415,
112  HBBTV_VK_PAUSE = 19,
113  HBBTV_VK_FAST_FWD = 417,
114  HBBTV_VK_REWIND = 412,
115  HBBTV_VK_INFO = 457,
116  HBBTV_VK_TELETEXT = 459,
117 
118  /*
119  * The following keys are not mandatory for HbbTV 1.2.1
120  */
121  HBBTV_VK_RECORD = 416,
122  HBBTV_VK_PAGE_UP = 33,
123  HBBTV_VK_PAGE_DOWN = 34,
124  HBBTV_VK_A = 65,
125  HBBTV_VK_B = 66,
126  HBBTV_VK_C = 67,
127  HBBTV_VK_D = 68,
128  HBBTV_VK_E = 69,
129  HBBTV_VK_F = 70,
130  HBBTV_VK_G = 71,
131  HBBTV_VK_H = 72,
132  HBBTV_VK_I = 73,
133  HBBTV_VK_J = 74,
134  HBBTV_VK_K = 75,
135  HBBTV_VK_L = 76,
136  HBBTV_VK_M = 77,
137  HBBTV_VK_N = 78,
138  HBBTV_VK_O = 79,
139  HBBTV_VK_P = 80,
140  HBBTV_VK_Q = 81,
141  HBBTV_VK_R = 82,
142  HBBTV_VK_S = 83,
143  HBBTV_VK_T = 84,
144  HBBTV_VK_U = 85,
145  HBBTV_VK_V = 86,
146  HBBTV_VK_W = 87,
147  HBBTV_VK_X = 88,
148  HBBTV_VK_Y = 89,
149  HBBTV_VK_Z = 90,
150  HBBTV_VK_PREV = 424,
151  HBBTV_VK_NEXT = 425,
152  HBBTV_VK_GUIDE = 458,
153  HBBTV_VK_SUBTITLE = 460,
154  HBBTV_VK_MENU = 462
155 } E_HBBTV_KEY;
156 
157 /*---Global type defs for public use-------------------------------------------*/
158 
159 typedef struct
160 {
161  U16BIT original_network_id;
162  U16BIT transport_stream_id;
163  U16BIT service_id;
165 
166 
167 typedef struct
168 {
169  U32BIT zlen;
170  U8BIT *zptr;
172 
173 typedef struct
174 {
175  S32BIT left;
176  S32BIT top;
177  U32BIT width;
178  U32BIT height;
179 } S_HBBTV_RECT;
180 
181 typedef struct
182 {
183  S16BIT left;
184  S16BIT top;
185  S16BIT right;
186  S16BIT bottom;
188 
189 typedef struct
190 {
195 
200 
205 
210 
215 
220 
224  BOOLEAN pvr_enabled;
225 
230 
236 
243 typedef E_HBBTV_ERR (*F_HBBTV_OBTAIN_ALL_GENRES)(S_HBBTV_STRING **genre_list, U32BIT *num);
244 
252 typedef E_HBBTV_ERR (*F_HBBTV_OBTAIN_SERVICE_GENRES)(U16BIT freesat_id, S_HBBTV_STRING **genre_list, U32BIT *num);
253 
260 typedef void (*F_HBBTV_FREE_GENRE_LIST)(S_HBBTV_STRING *genre_list, U32BIT num);
261 
265 typedef struct
266 {
267  F_HBBTV_OBTAIN_ALL_GENRES obtain_all_genres;
268  F_HBBTV_OBTAIN_SERVICE_GENRES obtain_service_genres;
269  F_HBBTV_FREE_GENRE_LIST free_genre_list;
271 
272 
273 /*---Global Function prototypes for public use---------------------------------*/
274 
275 #endif /* _HBBTV_TYPES_H */
Definition: hbbtv_types.h:159
E_HBBTV_KEY
Key codes.
Definition: hbbtv_types.h:87
S_HBBTV_STRING sw_version
Definition: hbbtv_types.h:214
Definition: hbbtv_types.h:189
BOOLEAN voice_control_available
Definition: hbbtv_types.h:234
S_HBBTV_STRING device_id
Definition: hbbtv_types.h:194
S_HBBTV_STRING hw_version
Definition: hbbtv_types.h:219
Definition: hbbtv_types.h:173
E_HBBTV_ERR(* F_HBBTV_OBTAIN_ALL_GENRES)(S_HBBTV_STRING **genre_list, U32BIT *num)
Function used by the HbbTV engine to retrieve the list of all the available genres.
Definition: hbbtv_types.h:243
BOOLEAN pvr_enabled
Definition: hbbtv_types.h:224
S_HBBTV_STRING family_name
Definition: hbbtv_types.h:209
E_HBBTV_ERR(* F_HBBTV_OBTAIN_SERVICE_GENRES)(U16BIT freesat_id, S_HBBTV_STRING **genre_list, U32BIT *num)
Function used by the HbbTV engine to retrieve the list of the genres associated with a service...
Definition: hbbtv_types.h:252
Structure containing function pointers used by the HbbTV engine to retrieve Freesat specific data...
Definition: hbbtv_types.h:265
Definition: hbbtv_types.h:167
S_HBBTV_STRING model_name
Definition: hbbtv_types.h:204
BOOLEAN speech_desc_available
Definition: hbbtv_types.h:229
S_HBBTV_STRING vendor_name
Definition: hbbtv_types.h:199
Definition: hbbtv_types.h:181
void(* F_HBBTV_FREE_GENRE_LIST)(S_HBBTV_STRING *genre_list, U32BIT num)
Function used by the HbbTV engine to free the list of strings returned by F_HBBTV_OBTAIN_ALL_GENRES a...
Definition: hbbtv_types.h:260