HBBTV  22.11.0
hbbtv_sif_service.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_SIF_SERVICE_H
29 
30 #define _HBBTV_SIF_SERVICE_H
31 
32 
33 #include "techtype.h"
34 #include "hbbtv_types.h"
35 #include "hbbtv_sif_types.h"
36 
37 
38 /*---Constant and macro definitions for public use-----------------------------*/
39 
40 /*---Enumerations for public use-----------------------------------------------*/
41 
42 typedef enum
43 {
44  /* These come from 8bit service type field in Service Descriptor Table,
45  * and should be used for field 'service_type' */
46  SDT_TYPE_TV = 0x01,
47  SDT_TYPE_RADIO = 0x02,
48  SDT_TYPE_AVC_RADIO = 0x0a,
49  SDT_TYPE_DATA = 0x0c,
50  SDT_TYPE_MPEG2_HD = 0x11,
51  SDT_TYPE_AVC_SD_TV = 0x16,
52  SDT_TYPE_HD_TV = 0x19,
53 } E_HBBTV_SDT_SERVICE_TYPE;
54 
55 
56 /*---Global type defs for public use-------------------------------------------*/
57 
58 typedef struct
59 {
60  U16BIT hours;
61  U8BIT minutes;
62  U8BIT seconds;
63 } S_HBBTV_TIME;
64 
65 typedef struct
66 {
67  void *dvb_user_data; /* Available for DVB stack - not used by the HbbTV engine */
68 
69  /* Event name, from the EIT short_event_descriptor */
70  S_HBBTV_STRING event_name;
71 
72  /* Event description, from the EIT short_event_descriptor */
73  S_HBBTV_STRING short_description;
74 
75  /* Event parental rating, from the EIT parental_rating_descriptor
76  formatted as it is in parental_rating_descriptor*/
77  U32BIT parental_rating;
78 
79  /* Event start date, in Modified Julian Date format - as per EIT field */
80  U32BIT start_date;
81 
82  /* Event start time, from the EIT start_time field*/
83  S_HBBTV_TIME start_time;
84 
85  /* Event duration, from the EIT duration field,
86  as formatted in the EIT*/
87  S_HBBTV_TIME duration;
88 
93  BOOLEAN use_crid;
94 
95  /* Event identifier */
96  U16BIT event_id;
97 
98  /* Full programme CRID */
99  S_HBBTV_STRING crid;
100 
101  /* Event description, from the EIT extended_event_descriptor */
102  S_HBBTV_STRING long_description;
103 
107  U8BIT audio_type;
108 
113 
119 
125 
130  BOOLEAN is_hd;
131 
136  U8BIT num_genres;
137 
144 
150  BOOLEAN has_recording;
151 
159  U32BIT recording_id;
160 
168  U32BIT timer_id;
169 
171 
172 typedef struct
173 {
174  U32BIT service_index;
175 
176  /* Service name, from the SDT service_descriptor */
177  S_HBBTV_STRING service_name;
178 
179  /* Service type, from the SDT service_descriptor or BAT service_list_descriptor */
180  U16BIT service_type;
181 
182  /* Allocated LCN for service */
183  U16BIT service_lcn;
184 
190  S32BIT nid;
191 
195  BOOLEAN hidden;
197 
198 
199 /*---Global Function prototypes for public use---------------------------------*/
200 
206 U8BIT HBBTV_GetDemuxPath(void);
207 
219 E_HBBTV_ERR HBBTV_GetEventDetails(S32BIT service_index, BOOLEAN porf,
220  S_HBBTV_EVENT_DETAILS *details);
221 
227 
236 E_HBBTV_ERR HBBTV_GetLCNLocator(U32BIT lcn, S_HBBTV_DVB_LOCATOR *p_dvb_locator);
237 
248 E_HBBTV_ERR HBBTV_GetNetworkID(U32BIT lcn, U16BIT *nid);
249 
262 E_HBBTV_ERR HBBTV_GetMajorChannel(U32BIT lcn, U16BIT *major_channel);
263 
276 E_HBBTV_ERR HBBTV_ObtainComponentList(S_HBBTV_DVB_LOCATOR *locator, E_HBBTV_COMPONENT_TYPE type,
277  U32BIT *num_ptr, S_HBBTV_COMPONENT_DETAILS **list_ptr);
278 
285 void HBBTV_ReleaseComponentList(U32BIT num, S_HBBTV_COMPONENT_DETAILS *list_ptr);
286 
298 E_HBBTV_ERR HBBTV_ObtainEventList(U32BIT service_index,
299  U32BIT *num_ptr, S_HBBTV_EVENT_DETAILS **list_ptr);
300 
307 void HBBTV_ReleaseEventList(U32BIT num, S_HBBTV_EVENT_DETAILS *list_ptr);
308 
319 E_HBBTV_ERR HBBTV_ObtainServiceList(U32BIT *num_ptr, S_HBBTV_SERVICE_DETAILS **list_ptr);
320 
327 void HBBTV_ReleaseServiceList(U32BIT num, S_HBBTV_SERVICE_DETAILS *list_ptr);
328 
339 E_HBBTV_ERR HBBTV_GetServiceDetails(U16BIT service_lcn, S_HBBTV_SERVICE_DETAILS *details);
340 
347 
362 U8BIT* HBBTV_GetEventSIDescriptorData(S_HBBTV_DVB_LOCATOR *dvb_locator, U16BIT event_id,
363  U8BIT desc_tag_id, S32BIT ext_desc_tag_id, U16BIT *desc_len);
364 
370 void HBBTV_ReleaseEventSIDescriptorData(U8BIT *desc_data, U16BIT desc_len);
371 
380 BOOLEAN HBBTV_GetServiceLocked(U16BIT service_lcn);
381 
382 #endif /* _HBBTV_SIF_SERVICE_H */
Definition: hbbtv_types.h:159
BOOLEAN is_multilingual
Definition: hbbtv_sif_service.h:112
BOOLEAN is_hd
Definition: hbbtv_sif_service.h:130
BOOLEAN HBBTV_GetServiceLocked(U16BIT service_lcn)
Retrieves the locked status of the specified service. The correct implementation of this function is ...
E_HBBTV_ERR HBBTV_GetMajorChannel(U32BIT lcn, U16BIT *major_channel)
Retrieves a service Major Channel number. The correct implementation of this function is not mandator...
E_HBBTV_ERR HBBTV_ObtainEventList(U32BIT service_index, U32BIT *num_ptr, S_HBBTV_EVENT_DETAILS **list_ptr)
Definition of general purpose types.
E_HBBTV_ERR HBBTV_GetLCNLocator(U32BIT lcn, S_HBBTV_DVB_LOCATOR *p_dvb_locator)
Retrieves the DVB locator information for a given LCN.
BOOLEAN has_recording
Definition: hbbtv_sif_service.h:150
void HBBTV_ReleaseServiceList(U32BIT num, S_HBBTV_SERVICE_DETAILS *list_ptr)
Releases data allocated by HBBTV_ObtainServiceList (e.g. String data). Always called immediately afte...
U8BIT num_genres
Definition: hbbtv_sif_service.h:136
BOOLEAN hidden
Definition: hbbtv_sif_service.h:195
U8BIT HBBTV_GetDemuxPath(void)
Retrieve demux resource reference to be used by the DSMCC to collect broadcast carousel data from pla...
E_HBBTV_ERR HBBTV_ObtainServiceList(U32BIT *num_ptr, S_HBBTV_SERVICE_DETAILS **list_ptr)
Retrieves Service list information. Provided HBBTV_OK is returned, the HbbTV engine will call HBBTV_R...
U32BIT recording_id
Definition: hbbtv_sif_service.h:159
E_HBBTV_ERR HBBTV_ObtainComponentList(S_HBBTV_DVB_LOCATOR *locator, E_HBBTV_COMPONENT_TYPE type, U32BIT *num_ptr, S_HBBTV_COMPONENT_DETAILS **list_ptr)
Retrieves the list of components available for a service. Provided HBBTV_OK is returned, the HbbTV engine will call HBBTV_ReleaseComponentList to release allocated data on the same task and immediately after it has copied the data.
E_HBBTV_ERR HBBTV_GetServiceDetails(U16BIT service_lcn, S_HBBTV_SERVICE_DETAILS *details)
Retrieves information about the indicated service. Provided HBBTV_OK is returned, the HbbTV engine wi...
Definition: hbbtv_sif_types.h:64
void HBBTV_ReleaseEventList(U32BIT num, S_HBBTV_EVENT_DETAILS *list_ptr)
Release data allocated by HBBTV_ObtainEventList(e.g. String data). Always called immediately after th...
void HBBTV_ReleaseComponentList(U32BIT num, S_HBBTV_COMPONENT_DETAILS *list_ptr)
Releases data allocated by HBBTV_ObtainComponentList (e.g. String data). Always called immediately af...
System Interface, common types.
S32BIT nid
Definition: hbbtv_sif_service.h:190
void HBBTV_ReleaseEventDetails(S_HBBTV_EVENT_DETAILS *details)
Releases data allocated by HBBTV_GetEventDetails (e.g. String data).
E_HBBTV_ERR HBBTV_GetEventDetails(S32BIT service_index, BOOLEAN porf, S_HBBTV_EVENT_DETAILS *details)
Retrieves information about the present or following event on a service.
S_HBBTV_STRING * audio_language_array
Definition: hbbtv_sif_service.h:124
System Wide Global Technical Data Type Definitions.
Definition: hbbtv_types.h:167
S_HBBTV_STRING * genre_array
Definition: hbbtv_sif_service.h:143
E_HBBTV_ERR HBBTV_GetNetworkID(U32BIT lcn, U16BIT *nid)
Retrieves a service Network ID. The correct implementation of this function is not mandatory for HbbT...
U32BIT timer_id
Definition: hbbtv_sif_service.h:168
Definition: hbbtv_sif_service.h:58
U8BIT * HBBTV_GetEventSIDescriptorData(S_HBBTV_DVB_LOCATOR *dvb_locator, U16BIT event_id, U8BIT desc_tag_id, S32BIT ext_desc_tag_id, U16BIT *desc_len)
Retrieves raw SI descriptor data with the defined descriptor tag id, and optionally the extended desc...
Definition: hbbtv_sif_service.h:172
U8BIT audio_type
Definition: hbbtv_sif_service.h:107
BOOLEAN use_crid
Definition: hbbtv_sif_service.h:93
U8BIT num_audio_languages
Definition: hbbtv_sif_service.h:118
void HBBTV_ReleaseEventSIDescriptorData(U8BIT *desc_data, U16BIT desc_len)
Frees event SI descriptor data returned through a call to HBBTV_GetEventSIDescriptorData.
void HBBTV_ReleaseServiceDetails(S_HBBTV_SERVICE_DETAILS *details)
Releases data allocated by HBBTV_ReleaseServiceDetails (e.g. String data). Always called immediately ...
Definition: hbbtv_sif_service.h:65