HbbTv  17.9.0
Open source HBBTV engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
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  U8BIT usage;
68  U8BIT media_type;
69  S_HBBTV_STRING url;
70  U32BIT available_start_time;
71  U32BIT available_stop_time;
72  BOOLEAN available_now;
74 
75 typedef struct
76 {
77  void *dvb_user_data; /* Available for DVB stack - not used by the HbbTV engine */
78 
79  /* Event name, from the EIT short_event_descriptor */
80  S_HBBTV_STRING event_name;
81 
82  /* Event description, from the EIT short_event_descriptor */
83  S_HBBTV_STRING short_description;
84 
85  /* Event parental rating, from the EIT parental_rating_descriptor
86  formatted as it is in parental_rating_descriptor*/
87  U32BIT parental_rating;
88 
89  /* Event start date, in Modified Julian Date format - as per EIT field */
90  U32BIT start_date;
91 
92  /* Event start time, from the EIT start_time field*/
93  S_HBBTV_TIME start_time;
94 
95  /* Event duration, from the EIT duration field,
96  as formatted in the EIT*/
97  S_HBBTV_TIME duration;
98 
103  BOOLEAN use_crid;
104 
105  /* Event identifier */
106  U16BIT event_id;
107 
108  /* Full programme CRID */
109  S_HBBTV_STRING crid;
110 
111  /* Event description, from the EIT extended_event_descriptor */
112  S_HBBTV_STRING long_description;
113 
118  U8BIT audio_type;
119 
125 
133 
141 
146  BOOLEAN is_hd;
147 
154 
161 
168  U8BIT num_genres;
169 
178 
184  BOOLEAN has_guidance;
185 
193 
202 
210 
219 
228 
235 
243 
251 
259 
267 
273  BOOLEAN has_recording;
274 
282  U32BIT recording_id;
283 
291  U32BIT timer_id;
292 
294 
295 typedef struct
296 {
297  U32BIT service_index;
298 
299  /* Service name, from the SDT service_descriptor */
300  S_HBBTV_STRING service_name;
301 
308 
309  /* Service type, from the SDT service_descriptor or BAT service_list_descriptor */
310  U16BIT service_type;
311 
312  /* Allocated LCN for service */
313  U16BIT service_lcn;
314 
320  S32BIT nid;
321 
327  BOOLEAN hidden;
328 
335 
340  U16BIT fsid;
342 
343 
344 /*---Global Function prototypes for public use---------------------------------*/
345 
351 U8BIT HBBTV_GetDemuxPath(void);
352 
364 E_HBBTV_ERR HBBTV_GetEventDetails(S32BIT service_index, BOOLEAN porf,
365  S_HBBTV_EVENT_DETAILS *details);
366 
372 
381 E_HBBTV_ERR HBBTV_GetLCNLocator(U32BIT lcn, S_HBBTV_DVB_LOCATOR *p_dvb_locator);
382 
393 E_HBBTV_ERR HBBTV_GetNetworkID(U32BIT lcn, U16BIT *nid);
394 
407 E_HBBTV_ERR HBBTV_GetMajorChannel(U32BIT lcn, U16BIT *major_channel);
408 
421 E_HBBTV_ERR HBBTV_ObtainComponentList(S_HBBTV_DVB_LOCATOR *locator, E_HBBTV_COMPONENT_TYPE type,
422  U32BIT *num_ptr, S_HBBTV_COMPONENT_DETAILS **list_ptr);
423 
430 void HBBTV_ReleaseComponentList(U32BIT num, S_HBBTV_COMPONENT_DETAILS *list_ptr);
431 
443 E_HBBTV_ERR HBBTV_ObtainEventList(U32BIT service_index,
444  U32BIT *num_ptr, S_HBBTV_EVENT_DETAILS **list_ptr);
445 
452 void HBBTV_ReleaseEventList(U32BIT num, S_HBBTV_EVENT_DETAILS *list_ptr);
453 
464 E_HBBTV_ERR HBBTV_ObtainServiceList(U32BIT *num_ptr, S_HBBTV_SERVICE_DETAILS **list_ptr);
465 
472 void HBBTV_ReleaseServiceList(U32BIT num, S_HBBTV_SERVICE_DETAILS *list_ptr);
473 
484 E_HBBTV_ERR HBBTV_GetServiceDetails(U16BIT service_lcn, S_HBBTV_SERVICE_DETAILS *details);
485 
492 
507 U8BIT* HBBTV_GetEventSIDescriptorData(S_HBBTV_DVB_LOCATOR *dvb_locator, U16BIT event_id,
508  U8BIT desc_tag_id, S32BIT ext_desc_tag_id, U16BIT *desc_len);
509 
515 void HBBTV_ReleaseEventSIDescriptorData(U8BIT *desc_data, U16BIT desc_len);
516 
525 BOOLEAN HBBTV_GetServiceLocked(U16BIT service_lcn);
526 
535 BOOLEAN HBBTV_GetServiceRunning(U16BIT service_lcn);
536 
537 #endif /* _HBBTV_SIF_SERVICE_H */
Definition: hbbtv_types.h:159
BOOLEAN has_sign_language
Definition: hbbtv_sif_service.h:160
U8BIT audio_type
Definition: hbbtv_sif_service.h:118
BOOLEAN use_crid
Definition: hbbtv_sif_service.h:103
Definition: hbbtv_sif_service.h:65
BOOLEAN HBBTV_GetServiceLocked(U16BIT service_lcn)
Retrieves the locked status of the specified service. The correct implementation of this function is ...
BOOLEAN hidden
Definition: hbbtv_sif_service.h:327
U8BIT num_media_assets
Definition: hbbtv_sif_service.h:209
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...
S_HBBTV_STRING * recommendation_crid_array
Definition: hbbtv_sif_service.h:266
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.
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 HBBTV_GetDemuxPath(void)
Retrieve demux resource reference to be used by the DSMCC to collect broadcast carousel data from pla...
S_HBBTV_STRING * genre_array
Definition: hbbtv_sif_service.h:177
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 timer_id
Definition: hbbtv_sif_service.h:291
BOOLEAN is_multilingual
Definition: hbbtv_sif_service.h:124
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.
S_HBBTV_STRING * series_crid_array
Definition: hbbtv_sif_service.h:250
BOOLEAN has_audio_description
Definition: hbbtv_sif_service.h:153
U8BIT num_audio_languages
Definition: hbbtv_sif_service.h:132
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.
U32BIT recording_id
Definition: hbbtv_sif_service.h:282
S_HBBTV_STRING service_short_name
Definition: hbbtv_sif_service.h:307
U8BIT num_genres
Definition: hbbtv_sif_service.h:168
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.
U16BIT opal_service_type
Definition: hbbtv_sif_service.h:334
S_HBBTV_STRING * guidance_string_array
Definition: hbbtv_sif_service.h:201
S_HBBTV_STRING promotional_content
Definition: hbbtv_sif_service.h:227
BOOLEAN has_recording
Definition: hbbtv_sif_service.h:273
System Wide Global Technical Data Type Definitions.
Definition: hbbtv_types.h:167
S32BIT nid
Definition: hbbtv_sif_service.h:320
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...
BOOLEAN has_hd_simulcast
Definition: hbbtv_sif_service.h:234
BOOLEAN has_guidance
Definition: hbbtv_sif_service.h:184
U8BIT num_series_crids
Definition: hbbtv_sif_service.h:242
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:295
S_HBBTV_MEDIA_ASSET * media_asset_array
Definition: hbbtv_sif_service.h:218
U8BIT num_recommendation_crids
Definition: hbbtv_sif_service.h:258
void HBBTV_ReleaseEventSIDescriptorData(U8BIT *desc_data, U16BIT desc_len)
Frees event SI descriptor data returned through a call to HBBTV_GetEventSIDescriptorData.
BOOLEAN HBBTV_GetServiceRunning(U16BIT service_lcn)
Retrieves the running status flag of the specified service as broadcast in the SDT or EIT...
void HBBTV_ReleaseServiceDetails(S_HBBTV_SERVICE_DETAILS *details)
Releases data allocated by HBBTV_ReleaseServiceDetails (e.g. String data). Always called immediately ...
BOOLEAN is_hd
Definition: hbbtv_sif_service.h:146
U8BIT num_guidance_strings
Definition: hbbtv_sif_service.h:192
Definition: hbbtv_sif_service.h:75
U16BIT fsid
Definition: hbbtv_sif_service.h:340
S_HBBTV_STRING * audio_language_array
Definition: hbbtv_sif_service.h:140