DVBCore  22.11.0
Open Source DVB Engine
ap_dbdef.h
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  *
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  *******************************************************************************/
24 #ifndef _AP_DBDEF_H
25 #define _AP_DBDEF_H
26 
27 #include "techtype.h"
28 #include "stbsiflt.h"
29 #include "stbsitab.h"
30 #include "stbllist.h"
31 #include "ap_cfg.h"
32 #include "ap_tmr.h"
33 #include "ap_dbacc.h"
34 
35 //---Constant and macro definitions for public use-----------------------------
36 
37 #define ADB_LANG_CODE_UNDEF 0x756e64
38 #define ADB_LANG_CODE_QAA 0x716161
39 #define ADB_LANG_CODE_NAR 0x6e6172
40 
41 /* DVB SI descriptor tags */
42 #define LINKAGE_DTAG 0x4a
43 #define SHORT_EVENT_DTAG 0x4d
44 #define EXTENDED_EVENT_DTAG 0x4e
45 #define COMPONENT_DTAG 0x50
46 #define CONTENT_DTAG 0x54
47 #define PARENTAL_RATING_DTAG 0x55
48 #define PRIVATE_DATA_SPEC_DTAG 0x5f
49 #define CONT_ID_DESC_DTAG 0x76
50 #define FTA_CONTENT_DESC_DTAG 0x7e
51 #define EXTENSION_DTAG 0x7f
52 #define USER_DEFINED_DTAG_0x85 0x85
53 #define USER_DEFINED_DTAG_0x89 0x89
54 
55 #define LINK_TYPE_EVENT 0x0d
56 #define LINK_TYPE_EXT_EVENT 0x0e
57 
58 #define INVALID_FREESAT_SERV_ID 0x8000
59 
60 /* Content identifier descriptor CRID types */
61 #define TVA_PROGRAMME_CRID 0x01
62 #define TVA_SERIES_CRID 0x02
63 #define TVA_RECOMMENDATION_CRID 0x03
64 
65 #define UK_PROGRAMME_CRID 0x31
66 #define UK_SERIES_CRID 0x32
67 #define UK_RECOMMENDATION_CRID 0x33
68 
69 //---Enumerations for public use-----------------------------------------------
70 typedef enum
71 {
72  STREAM_MATCH_EXACT,
73  STREAM_MATCH_ASPECT,
74  STREAM_MATCH_LANG,
75  STREAM_MATCH_TYPE,
76  STREAM_MATCH_NOT_ZERO,
77  STREAM_MATCH_NONE
78 } E_STREAM_MATCH_TYPE;
79 
80 //---Global type defs for public use-------------------------------------------
81 
82 // Database structures - strings
83 typedef struct adb_string
84 {
85  U32BIT lang_code;
86  U16BIT nbytes;
87  U8BIT *str_ptr;
88 } ADB_STRING;
89 
90 
91 //--------------------------------------------------
92 // Database structures - satellite records
93 typedef struct adb_lnb_rec
94 {
95  LINK_LIST_PTR_BLK ptrs;
96  void *dba_rec;
97 
98  E_STB_DP_LNB_TYPE type;
99  E_STB_DP_LNB_POWER power;
100  BOOLEAN is_22k;
101  BOOLEAN is_12v;
102  BOOLEAN is_pulse_posn;
103  BOOLEAN is_diseqc_posn;
104  E_STB_DP_DISEQC_TONE diseqc_tone;
105  E_STB_DP_DISEQC_CSWITCH c_switch;
106  U8BIT u_switch; // 0 to 16 inclusive
107  BOOLEAN is_smatv;
108  U8BIT diseqc_repeats; // 0 to 3 inclusive
109  U32BIT unicable_if;
110  U8BIT unicable_chan;
111  ADB_STRING *name;
112 } ADB_LNB_REC;
113 
114 typedef struct adb_bat_version_rec
115 {
116  struct adb_bat_version_rec *next;
117  U16BIT bouquet_id;
118  U8BIT version;
120 
121 typedef struct adb_satellite_rec
122 {
123  LINK_LIST_PTR_BLK ptrs;
124  void *dba_rec;
125 
126  ADB_LNB_REC *lnb;
127  ADB_STRING *name;
128  U16BIT dish_pos;
129  U16BIT long_pos; // 0 to 1800 inclusive
130  BOOLEAN east_west; // 0=West,1=East
131 
132  BOOLEAN has_fta_desc;
133  BOOLEAN do_not_scramble;
134  ADB_STRING *def_authority;
135 
136  ADB_BAT_VERSION_REC *bat_version_list;
138 
139 typedef struct adb_lnb_band_rec
140 {
141  LINK_LIST_PTR_BLK ptrs;
142  void *dba_rec;
143 
144  ADB_LNB_REC *lnb;
145  S_STB_DP_LNB_BAND band_params;
147 
148 
149 //--------------------------------------------------
150 // Database structures - network records
151 typedef struct adb_network_rec
152 {
153  LINK_LIST_PTR_BLK ptrs;
154  void *dba_rec;
155 
156  U16BIT net_id;
157  U8BIT nit_version;
158  BOOLEAN nit_version_changed;
159 
160  ADB_STRING *name_str;
161  ADB_STRING *name_array[ACFG_NUM_DB_LANGUAGES];
162  BOOLEAN has_fta_desc;
163  BOOLEAN do_not_scramble;
164  SI_NIT_TARGET_REGION_NAME_DESC *target_region_name_list;
165  SI_TARGET_REGION_DESC *target_region_list;
166  SI_LINKAGE_DESC_ENTRY *last_linkage_entry;
167  SI_LINKAGE_DESC_ENTRY *linkage_desc_list;
168  U16BIT num_linkage_entries;
169  ADB_STRING *def_authority;
170  ADB_SATELLITE_REC *satellite;
171  ADB_PROFILE_TYPE profile_type;
172 
173 #ifdef COMMON_INTERFACE
174  BOOLEAN module_present;
175  U32BIT module;
176  U16BIT cicam_onet_id;
177  U32BIT cicam_identifier;
178  BOOLEAN op_search_required;
179  U16BIT op_search_date;
180  U16BIT op_search_time;
181  ADB_STRING *profile_name;
185  U8BIT fav_list_id;
186 #endif
188 
189 
190 //--------------------------------------------------
191 // Database structures - transport records
192 typedef struct adb_pmt_version_rec
193 {
194  struct adb_pmt_version_rec *next;
195  U16BIT serv_id;
196  U8BIT version;
198 
199 typedef struct adb_transport_rec
200 {
201  LINK_LIST_PTR_BLK ptrs;
202  void *dba_rec;
203 
204  U16BIT tran_id;
205  U16BIT orig_net_id;
206  U32BIT frequency;
207  ADB_NETWORK_REC *network;
208  E_STB_DP_SIGNAL_TYPE sig_type;
209  U16BIT signal_level_at_search;
210 
211  U8BIT num_additional_frequencies;
212  U32BIT *additional_frequencies;
213 
214  /* The following union is accessed based on sig_type */
215  union
216  {
217  struct _analog_trans_rec
218  {
219  S8BIT freq_offset;
220  E_STB_DP_ANALOG_VIDEO_TYPE vtype;
221  } anal;
222  struct _terr_trans_rec
223  {
224  E_STB_DP_TBWIDTH bwidth;
225  E_STB_DP_TMODE tmode;
226  E_STB_DP_TTYPE terr_type;
227  U8BIT plp_id;
228  S8BIT freq_offset;
229  E_STB_TUNE_TCONST constellation;
230  E_STB_TUNE_THIERARCHY hierarchy;
231  E_STB_TUNE_TCODERATE lp_code_rate;
232  E_STB_TUNE_TCODERATE hp_code_rate;
233  E_STB_TUNE_TGUARDINT guard_int;
234  SI_TARGET_REGION_DESC *target_region_list;
235  } terr;
236  struct _cable_trans_rec
237  {
238  E_STB_DP_CMODE cmode;
239  U16BIT symbol_rate;
240  } cab;
241  struct _sat_trans_rec
242  {
243  U16BIT symbol_rate;
244  E_STB_DP_POLARITY polarity;
245  E_STB_DP_FEC fec_code;
246  E_STB_DP_FEC_TYPE fec_type;
247  BOOLEAN dvb_s2;
248  E_STB_DP_MODULATION modulation;
249  } sat;
250  struct _ip_trans_rec
251  {
252  ADB_STRING *url;
253  } ip;
254  } u;
255 
256  U8BIT pat_version;
257  BOOLEAN sdt_received;
258  BOOLEAN sdt_version_changed;
259  U8BIT sdt_version;
260  ADB_PMT_VERSION_REC *pmt_version_list;
261  BOOLEAN has_fta_desc;
262  BOOLEAN do_not_scramble;
263  ADB_STRING *def_authority;
264  BOOLEAN searched;
265  BOOLEAN available;
267 
268 //--------------------------------------------------------
269 // Database structures - service, event and stream records
270 
271 typedef struct adb_audio_stream_data
272 {
273  U32BIT lang_code;
274  ADB_AUDIO_TYPE type;
275  E_STB_DP_AUDIO_MODE mode;
277 
279 {
280  U32BIT lang_code;
281  ADB_SUBTITLE_TYPE type;
282  U16BIT composition_page;
283  U16BIT ancillary_page;
285 
286 typedef struct adb_ttext_stream_data
287 {
288  U32BIT lang_code;
289  U8BIT type;
290  U8BIT magazine;
291  U8BIT page;
293 
294 typedef union adb_stream_data
295 {
296  ADB_AUDIO_STREAM_DATA audio;
297  ADB_SUBTITLE_STREAM_DATA subtitle;
298  ADB_TTEXT_STREAM_DATA ttext;
300 
302 {
303  U32BIT lang_code;
304  BOOLEAN digital_cc;
305  U8BIT caption_service_number;
306  BOOLEAN easy_reader;
307  BOOLEAN wide_aspect_ratio;
309 
310 typedef struct adb_stream_rec
311 {
312  struct adb_stream_rec *next;
313  ADB_STREAM_TYPE type;
314  U8BIT *tag_array;
315  U8BIT num_tags;
316  U16BIT pid;
317  BOOLEAN in_use;
318  S8BIT cc_in_use;
319  ADB_STREAM_DATA data;
320  BOOLEAN has_ca_descriptor;
321  ADB_CAPTION_SERVICE_DATA *caption_service_array;
322  U8BIT num_caption_services;
324 
325 typedef struct adb_event_desc
326 {
327  U8BIT *desc_data;
328  struct adb_event_desc *next;
330 
331 typedef struct adb_event_rec
332 {
333  struct adb_event_rec *next;
334  void *dba_rec;
335 
336  U16BIT event_id;
337  U32DHMS start;
338  U32DHMS duration;
339  U8BIT running_status;
340  BOOLEAN free_to_air;
341  U8BIT version;
342 
343  /* Keep values parsed from the content management descriptor that are used by DVBCore */
344  BOOLEAN has_content_management_desc;
345  BOOLEAN do_not_scramble;
346 
347  ADB_EVENT_DESC *desc_list_head;
348  ADB_EVENT_DESC *desc_list_tail;
349 } ADB_EVENT_REC;
350 
351 typedef struct adb_alt_serv_rec
352 {
353  struct adb_alt_serv_rec *next;
354  U16BIT onet_id;
355  U16BIT tran_id;
356  U16BIT serv_id;
357  U8BIT link_type;
359 
361 {
362  U8BIT tag;
363  U8BIT content;
364  U8BIT type;
366 
367 typedef enum
368 {
369  ICON_TYPE_PNG,
370  ICON_TYPE_JPEG
371 } E_ICON_TYPE;
372 
373 typedef struct adb_icon_image
374 {
375  struct adb_icon_image *next;
376  U8BIT icon_id;
377  BOOLEAN position_defined;
378  E_ICON_COORD_SYSTEM coord_system;
379  U16BIT x_pos;
380  U16BIT y_pos;
381  U16BIT width;
382  U16BIT height;
383  E_ICON_TYPE icon_type;
384  E_ICON_TRANSPORT_MODE transport_mode;
385  U8BIT *icon_url;
386  U32BIT data_len;
387  U8BIT *icon_data;
388  void (*destroy_func)(void *);
389  void *dsm_handle;
391 
392 typedef struct adb_rct_link_info
393 {
394  struct adb_rct_link_info *next;
395  BOOLEAN is_group_trailer;
396  U8BIT *uri_string;
397  BOOLEAN can_use_default_icon;
398  U8BIT icon_id;
399  ADB_STRING *promo_text[ACFG_NUM_DB_LANGUAGES];
400  ADB_STRING *event_name;
402 
403 typedef struct
404 {
405  U8BIT type;
406  U8BIT mode;
407  ADB_STRING *text;
409 
410 typedef struct adb_service_rec
411 {
412  LINK_LIST_PTR_BLK ptrs;
413  void *dba_rec;
414 
415  ADB_TRANSPORT_REC *transport;
416  ADB_SERVICE_TYPE serv_type;
417  U16BIT serv_id;
418  U16BIT serv_lcn;
419  U16BIT allocated_lcn;
420  U16BIT old_allocated_lcn;
421  ADB_STRING *name_str;
422  ADB_STRING *provider_str;
423  ADB_STRING *short_name_str;
424  ADB_STRING *short_name_array[ACFG_NUM_DB_LANGUAGES];
425  ADB_STRING *name_array[ACFG_NUM_DB_LANGUAGES][ADB_NUM_SERV_NAME_IDS];
426  ADB_STRING *provider_array[ACFG_NUM_DB_LANGUAGES];
427  ADB_GUIDANCE_DESC guidance[ACFG_NUM_DB_LANGUAGES];
428  ADB_STREAM_REC *stream_list;
429  ADB_ALT_SERV_REC *alt_serv_list;
430  U8BIT num_component_desc;
431  ADB_COMPONENT_DESC_REC *component_desc_array;
432  U8BIT fav_groups;
433  BOOLEAN deleted;
434 
435  BOOLEAN sched_disabled;
436  BOOLEAN now_next_disabled;
437 
438  BOOLEAN eit_now_next_avail;
439  ADB_EVENT_REC *now_event;
440  ADB_EVENT_REC *next_event;
441 
442  BOOLEAN eit_sched_avail;
443  U16BIT num_events_in_schedule;
444  ADB_EVENT_REC *event_schedule;
445 
446  BOOLEAN pmt_received;
447 
448  U16BIT pcr_pid;
449  U16BIT video_pid;
450  U16BIT audio_pid;
451  U16BIT ad_pid;
452  U16BIT ttext_pid;
453  U8BIT ttext_mag;
454  U8BIT ttext_page;
455  U16BIT subtitle_pid;
456  U16BIT subtitle_cpage;
457  U16BIT subtitle_apage;
458  U16BIT cc_pid;
459  BOOLEAN digital_cc;
460  U8BIT cc_service_number;
461  ADB_STREAM_TYPE video_type;
462  ADB_STREAM_TYPE audio_type;
463 
464  BOOLEAN reqd_audio_valid;
465  U32BIT reqd_audio_lang_code;
466  ADB_AUDIO_TYPE reqd_audio_type;
467  ADB_STREAM_TYPE reqd_stream_type;
468  U16BIT reqd_audio_pid;
469  BOOLEAN reqd_subtitle_valid;
470  U32BIT reqd_subtitle_lang_code;
471  ADB_SUBTITLE_TYPE reqd_subtitle_type;
472  BOOLEAN reqd_ttext_valid;
473  U32BIT reqd_ttext_lang_code;
474  ADB_TELETEXT_TYPE reqd_ttext_type;
475  BOOLEAN reqd_cc_valid;
476  U32BIT reqd_cc_lang_code;
477  BOOLEAN reqd_cc_digital_cc;
478  U8BIT reqd_cc_caption_service;
479  BOOLEAN reqd_cc_easy_reader;
480  BOOLEAN reqd_cc_wide_aspect_ratio;
481 
482  BOOLEAN found; /* Used during service search */
483  U8BIT running_status;
484  BOOLEAN not_running;
485  BOOLEAN unavailable;
486  BOOLEAN new_service;
487  BOOLEAN locked;
488  BOOLEAN hidden;
489  BOOLEAN selectable;
490  BOOLEAN lcn_editable;
491  BOOLEAN scrambled;
492 
493  BOOLEAN has_fta_desc;
494  BOOLEAN do_not_scramble;
495  U8BIT content_protection_level;
496 
497  SI_TARGET_REGION_DESC *target_region_list;
498 
499  ADB_STRING *def_authority;
500 
501  U16BIT rct_pid;
502  ADB_RCT_LINK_INFO *rct_link_list;
503  ADB_IMAGE_ICON *icon_list;
504 
505 #ifdef COMMON_INTERFACE
506  BOOLEAN sdt_received;
507  U8BIT *ci_protection_desc;
508  U32BIT ci_prot_last_update;
509 #endif
510  U8BIT *pmt_data;
511  U16BIT pmt_data_len;
512  U16BIT pmt_pid;
513  SI_LINKAGE_DESC_ENTRY *last_linkage_entry;
514  SI_LINKAGE_DESC_ENTRY *linkage_desc_list;
515  U16BIT num_linkage_entries;
516  SI_LCN_DESC *hd_lcn_desc;
517 
518  BOOLEAN has_ca_descriptor;
519 
520  /* IP specific fields */
521  ADB_STRING *url;
522  U16BIT port;
523  E_STB_DP_FEC_LAYER fec_layer;
524  S_STB_DP_FEC_LAYER_INFO fec_info;
525 
526  /* Freesat specific values */
527  U16BIT freesat_id;
528  U16BIT region_id;
529 
530  U16BIT bat_pid;
531  U16BIT eit_pf_pid;
532  U16BIT eit_pf_plus_pid;
533  U16BIT eit_sched_pid;
534  U16BIT nit_pid;
535  U16BIT sdt_pid;
536  U16BIT tdt_pid;
537  U16BIT tot_pid;
538 #ifdef INTEGRATE_HBBTV
539  U16BIT ait_pid;
540 #endif
542 
543 
544 //--------------------------------------------------------
545 // Database structures - crid records
546 
547 typedef struct adb_crid_record
548 {
549  LINK_LIST_PTR_BLK ptrs;
550  void *dba_rec;
551 
552  U16BIT eit_date; /* The date the CRID was last seen in the EITs */
553  BOOLEAN series_flag; /* The CRID represents a series */
554  BOOLEAN recommended_flag; /* The CRID represents a recommended programme or series */
555  BOOLEAN do_not_delete; /* TRUE if any recordings created from this CRID are to be locked */
556  U32DHMS date_time; /* Date to be used when searching for a split event */
557  U16BIT serv_id; /* Service to be used when searching for a split event */
558  ADB_STRING *name_str; /* Programme name for series/recommendations */
559  ADB_STRING *crid_str; /* CRID string */
560 } ADB_CRID_REC;
561 
562 
563 //--------------------------------------------------------
564 // Database structures - favourite lists
565 
566 typedef struct adb_favserv_rec
567 {
568  LINK_LIST_PTR_BLK ptrs; /* prev/next service in favourite list */
569  void *dba_rec;
570 
571  ADB_SERVICE_REC *serv_ptr;
572  U8BIT list_id; /* Id of the fav list this service is in */
573  U16BIT index; /* Defines the position of this service in the list */
575 
576 typedef struct adb_favlist_rec
577 {
578  LINK_LIST_PTR_BLK ptrs; /* List of favourite lists */
579  void *dba_rec;
580 
581  U8BIT list_id; /* Unique id for a list */
582  U8BIT index; /* Defines the position of this list in the favourite lists */
583  U32BIT user_data; /* User defined value stored with the list */
584  ADB_STRING *name;
585  LINK_LIST_HEADER serv_list; /* List of service in this favourite list */
587 
588 //--------------------------------------------------------
589 // Database structures - timers
590 
591 typedef struct
592 {
593  BOOLEAN change_service;
594  U16BIT service_id;
595  U16BIT transport_id;
596  U16BIT orig_net_id;
597  BOOLEAN ramp_volume;
598 } ADB_ALARM_REC;
599 
600 typedef struct
601 {
602  U32DHMS duration;
603  BOOLEAN event_triggered;
604  U16BIT event_id;
605  U16BIT service_id;
606  U16BIT transport_id;
607  U16BIT orig_net_id;
608  U8BIT prog_crid[TMR_PVR_CRID_LEN_MAX];
609  U8BIT other_crid[TMR_PVR_CRID_LEN_MAX];
610  U16BIT disk_id;
611  BOOLEAN recommendation;
612  U16BIT notify_time;
613  BOOLEAN notified;
614  U8BIT path;
615  U32BIT recording_handle;
616  U8BIT additional_info[TMR_PVR_ADDINFO_LEN_MAX];
617  BOOLEAN has_start_padding;
618  S32BIT start_padding;
619  BOOLEAN has_end_padding;
620  S32BIT end_padding;
621  BOOLEAN do_not_delete;
622  BOOLEAN programme_started;
623  BOOLEAN programme_finished;
625 
626 typedef struct
627 {
628  LINK_LIST_PTR_BLK ptrs;
629  void *dba_rec;
630 
631  U32BIT handle;
632  E_TIMER_TYPE type;
633  U32DHMS start_time;
634  U8BIT name[TMR_MAX_NAME_LENGTH];
635  E_TIMER_FREQ frequency;
636 
637  BOOLEAN expired;
638  BOOLEAN starting;
639  BOOLEAN started;
640  BOOLEAN selected;
641  BOOLEAN missed;
642  union
643  {
644  ADB_ALARM_REC alarm;
645  ADB_PVR_RECORD_REC record;
646  } u;
647 } ADB_TIMER_REC;
648 
649 #ifdef COMMON_INTERFACE
650 typedef struct
651 {
652  LINK_LIST_PTR_BLK ptrs;
653  void *dba_rec;
654 
655  U32BIT cicam_identifier;
656  U32BIT timer_handle;
657 } ADB_CICAM_TIMER_REC;
658 #endif
659 
660 /* Internal structure used to pass events to an application.
661  * The application handles these as void* handles */
662 typedef struct s_event
663 {
664  void *serv_ptr;
665  U16BIT event_id;
666 } S_EVENT;
667 
668 
669 //---Global Function prototypes for public use---------------------------------
670 
674 void DBDEF_Initialise(void);
675 
679 void DBDEF_RequestAccess(void);
680 
684 void DBDEF_ReleaseAccess(void);
685 
686 BOOLEAN DBDEF_LoadDatabase(U8BIT *db_pathname);
687 void DBDEF_DeleteAllRecords(void);
688 BOOLEAN DBDEF_SaveDatabase(void);
689 
690 void DBDEF_DeleteRecordsForTunerType(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite);
691 
697 
699 void DBDEF_DeleteImageIcons(ADB_IMAGE_ICON *icon_list);
700 
704 void DBDEF_SortServicesByLcn(void);
705 
706 BOOLEAN DBDEF_AllocateLcns(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN assign_lcns);
707 BOOLEAN DBDEF_AllocateLcnsDefault(E_STB_DP_SIGNAL_TYPE tuner_type);
708 #ifdef COUNTRY_UK
709 BOOLEAN DBDEF_AllocateLcnsUK(E_STB_DP_SIGNAL_TYPE tuner_type);
710 #endif
711 #ifdef COUNTRY_FINLAND
712 BOOLEAN DBDEF_AllocateLcnsFinland(E_STB_DP_SIGNAL_TYPE tuner_type);
713 #endif
714 #ifdef COUNTRY_IRELAND
715 BOOLEAN DBDEF_AllocateLcnsIreland(E_STB_DP_SIGNAL_TYPE tuner_type);
716 #endif
717 #ifdef COUNTRY_DENMARK
718 BOOLEAN DBDEF_AllocateLcnsDenmark(E_STB_DP_SIGNAL_TYPE tuner_type);
719 #endif
720 #ifdef COUNTRY_NORWAY
721 BOOLEAN DBDEF_AllocateLcnsNorway(E_STB_DP_SIGNAL_TYPE tuner_type);
722 #endif
723 #ifdef COUNTRY_SWEDEN
724 BOOLEAN DBDEF_AllocateLcnsSweden(E_STB_DP_SIGNAL_TYPE tuner_type);
725 #endif
726 
731 U16BIT DBDEF_GetNumLNBs(void);
732 
739 ADB_LNB_REC* DBDEF_AddLNB(E_STB_DP_LNB_TYPE type, ADB_STRING *name);
740 
747 BOOLEAN DBDEF_SetLNBPower(ADB_LNB_REC *lnb, E_STB_DP_LNB_POWER power);
748 
755 BOOLEAN DBDEF_SetLNB22k(ADB_LNB_REC *lnb, BOOLEAN is_22k);
756 
763 BOOLEAN DBDEF_SetLNB12V(ADB_LNB_REC *lnb, BOOLEAN is_12v);
764 
771 BOOLEAN DBDEF_SetLNBPulsePosition(ADB_LNB_REC *lnb, BOOLEAN is_pulse_posn);
772 
779 BOOLEAN DBDEF_SetLNBDiSEqCPosition(ADB_LNB_REC *lnb, BOOLEAN is_diseqc_posn);
780 
787 BOOLEAN DBDEF_SetLNBDiSEqCTone(ADB_LNB_REC *lnb, E_STB_DP_DISEQC_TONE diseqc_tone);
788 
795 BOOLEAN DBDEF_SetLNBCSwitch(ADB_LNB_REC *lnb, E_STB_DP_DISEQC_CSWITCH cswitch);
796 
803 BOOLEAN DBDEF_SetLNBUSwitch(ADB_LNB_REC *lnb, U8BIT uswitch);
804 
811 BOOLEAN DBDEF_SetLNBSmatv(ADB_LNB_REC *lnb, BOOLEAN is_smatv);
812 
819 BOOLEAN DBDEF_SetLNBRepeats(ADB_LNB_REC *lnb, U8BIT repeats);
820 
828 BOOLEAN DBDEF_SetLNBUnicable(ADB_LNB_REC *lnb, U32BIT inter_freq, U8BIT chan);
829 
837 
842 U16BIT DBDEF_GetNumSatellites(void);
843 
853 ADB_SATELLITE_REC* DBDEF_AddSatelliteRec(ADB_STRING *name_str, U16BIT dish_pos, U16BIT long_pos,
854  BOOLEAN east_west, ADB_LNB_REC *associated_lnb);
855 
863 
868 U16BIT DBDEF_GetNumLNBBands(void);
869 
876 ADB_LNB_BAND_REC* DBDEF_AddLNBBandRec(S_STB_DP_LNB_BAND *band_parameters, ADB_LNB_REC *associated_lnb);
877 
885 
891 
896 U16BIT DBDEF_GetNumNetworks(void);
897 
904 ADB_NETWORK_REC* DBDEF_AddNetworkRec(U16BIT net_id, ADB_SATELLITE_REC *satellite);
905 
911 
917 void DBDEF_SetNetworkName(ADB_NETWORK_REC *n_ptr, U8BIT *name);
918 
925 ADB_NETWORK_REC* DBDEF_FindNetworkRec(U16BIT net_id, ADB_SATELLITE_REC *satellite);
926 
934 
939 U16BIT DBDEF_GetNumTransports(void);
940 
948 
956 ADB_TRANSPORT_REC* DBDEF_AddTerrestrialTransportRec(U32BIT freq_hz, U8BIT plp_id,
957  ADB_NETWORK_REC *network);
958 ADB_TRANSPORT_REC* DBDEF_FindTerrestrialTransportRec(U32BIT freq_hz, U8BIT plp_id);
959 
967 ADB_TRANSPORT_REC* DBDEF_AddCableTransportRec(U32BIT freq_hz, U32BIT symbol_rate,
968  ADB_NETWORK_REC *network);
969 ADB_TRANSPORT_REC* DBDEF_FindCableTransportRec(U32BIT freq_hz, U32BIT symbol_rate);
970 
971 void DBDEF_SetCableTransportSymbolRate(ADB_TRANSPORT_REC *t_ptr, U16BIT symbol_rate);
972 void DBDEF_SetCableTransportMode(ADB_TRANSPORT_REC *t_ptr, E_STB_DP_CMODE cmode);
973 
984 ADB_TRANSPORT_REC* DBDEF_AddSatTransportRec(U32BIT freq_hz, U16BIT symbol_rate,
985  E_STB_DP_POLARITY polarity, BOOLEAN dvb_s2, E_STB_DP_MODULATION modulation,
986  ADB_NETWORK_REC *network);
987 
996 ADB_TRANSPORT_REC* DBDEF_FindSatTransportRec(U32BIT freq_hz, U16BIT symbol_rate,
997  E_STB_DP_POLARITY polarity, BOOLEAN dvb_s2, E_STB_DP_MODULATION modulation, void *satellite);
998 
999 #ifdef COMMON_INTERFACE
1000 
1005 ADB_TRANSPORT_REC* DBDEF_AddVirtualTransportRec(ADB_NETWORK_REC *network);
1006 #endif
1007 
1018 void DBDEF_SetSatTransportTuningParams(ADB_TRANSPORT_REC *t_ptr, U32BIT freq_hz,
1019  U16BIT symbol_rate, E_STB_DP_POLARITY polarity, BOOLEAN dvb_s2, E_STB_DP_MODULATION modulation,
1020  ADB_NETWORK_REC *network);
1021 
1029 ADB_TRANSPORT_REC* DBDEF_AddIPTransportRec(U16BIT onet_id, U16BIT tran_id, U8BIT *url);
1030 
1040  U32BIT onet_id, U32BIT tran_id);
1041 
1047 void DBDEF_SetTransportTransportId(ADB_TRANSPORT_REC *t_ptr, U16BIT tran_id);
1048 
1054 void DBDEF_SetTransportOrigNetworkId(ADB_TRANSPORT_REC *t_ptr, U16BIT orig_net_id);
1055 
1063 void DBDEF_GetTransportAdditionalFrequencies(ADB_TRANSPORT_REC *t_ptr, U8BIT *num_freqs, U32BIT **freqs);
1064 
1070 
1072 
1077 U16BIT DBDEF_GetNumServices(void);
1078 
1086 
1094 
1102 ADB_SERVICE_REC* DBDEF_AddServiceRec(U16BIT serv_id, ADB_TRANSPORT_REC *t_ptr);
1103 
1112 
1120 BOOLEAN DBDEF_SetServiceName(ADB_SERVICE_REC *s_ptr, U8BIT *name);
1121 
1129 BOOLEAN DBDEF_SetServiceShortName(ADB_SERVICE_REC *s_ptr, U8BIT *name);
1130 
1138 BOOLEAN DBDEF_SetServiceProviderName(ADB_SERVICE_REC *s_ptr, U8BIT *name);
1139 
1146 BOOLEAN DBDEF_SetServiceType(ADB_SERVICE_REC *s_ptr, ADB_SERVICE_TYPE serv_type);
1147 
1153 
1161 
1168 ADB_SERVICE_REC* DBDEF_FindServiceRec(U16BIT serv_id, ADB_TRANSPORT_REC *t_ptr);
1169 
1179 ADB_SERVICE_REC* DBDEF_FindServiceRecByIds(ADB_SERVICE_REC *servp, U32BIT net_id, U32BIT onet_id,
1180  U32BIT tran_id, U32BIT serv_id);
1181 
1190 ADB_SERVICE_REC* DBDEF_FindServiceRecByLcn(U16BIT lcn, ADB_TRANSPORT_REC *t_ptr, BOOLEAN allocated_lcn);
1191 
1199 
1200 U16BIT DBDEF_GetReqdAudioPid(ADB_SERVICE_REC *s_ptr, E_STB_DP_AUDIO_MODE *audio_mode, ADB_STREAM_TYPE *audio_type);
1201 U16BIT DBDEF_GetReqdADPid(ADB_SERVICE_REC *s_ptr, E_STB_DP_AUDIO_MODE *ad_mode, ADB_STREAM_TYPE *ad_type,
1202  BOOLEAN *broadcast_mix);
1203 E_STREAM_MATCH_TYPE DBDEF_GetReqdTtextPid(ADB_SERVICE_REC *s_ptr, BOOLEAN for_subtitles, U16BIT *pid_ptr,
1204  U8BIT *magazine, U8BIT *page);
1205 E_STREAM_MATCH_TYPE DBDEF_GetReqdSubtitleParams(ADB_SERVICE_REC *s_ptr, U16BIT *pid_ptr,
1206  U16BIT *cpage_ptr, U16BIT *apage_ptr);
1207 E_STREAM_MATCH_TYPE DBDEF_GetReqdCcParams(ADB_SERVICE_REC *s_ptr, U16BIT *pid_ptr, BOOLEAN *digital_cc,
1208  U8BIT *caption_service_number, S8BIT *cc_index);
1209 U16BIT DBDEF_GetReqdVideoPid(ADB_SERVICE_REC *s_ptr, ADB_STREAM_TYPE *video_type);
1210 
1219 ADB_STRING* DBDEF_GetServiceName(ADB_SERVICE_REC *s_ptr, BOOLEAN short_name, BOOLEAN pref_name);
1220 
1227 
1233 void DBDEF_SetServiceDeletedFlag(ADB_SERVICE_REC *s_ptr, BOOLEAN deleted);
1234 
1241 U16BIT DBDEF_GetNumDeletedServices(E_STB_DP_SIGNAL_TYPE tuner_type);
1242 
1251 U16BIT DBDEF_GetDeletedServiceList(E_STB_DP_SIGNAL_TYPE tuner_type, void ***slist_ptr);
1252 
1259 BOOLEAN DBDEF_SetServiceURL(ADB_SERVICE_REC *s_ptr, U8BIT *url);
1260 
1267 
1273 void DBDEF_SetServicePort(ADB_SERVICE_REC *s_ptr, U16BIT port);
1274 
1281 void DBDEF_SetServiceFecLayer(ADB_SERVICE_REC *s_ptr, E_STB_DP_FEC_LAYER fec_layer, S_STB_DP_FEC_LAYER_INFO *fec_info);
1282 
1289 E_STB_DP_FEC_LAYER DBDEF_GetServiceFecLayer(ADB_SERVICE_REC *s_ptr, S_STB_DP_FEC_LAYER_INFO *fec_info);
1290 
1291 BOOLEAN DBDEF_AddAnalogService(void);
1292 void DBDEF_SetAnalogServiceName(ADB_SERVICE_REC *s_ptr, U8BIT *new_name, U8BIT new_len);
1293 void DBDEF_SetServicePmtPid(ADB_SERVICE_REC *s_ptr, U16BIT pmt_pid);
1295 
1301 void DBDEF_SetServiceFavGroups(ADB_SERVICE_REC *s_ptr, U8BIT groups);
1302 
1310 
1319 ADB_EVENT_DESC* DBDEF_FindEventDescriptor(ADB_EVENT_DESC *start_desc, U8BIT desc_tag,
1320  U32BIT private_data_specifier);
1321 
1328 U8BIT* DBDEF_GetEventName(ADB_EVENT_REC *e_ptr);
1329 
1337 
1345 
1353 
1365 U8BIT* DBDEF_GetEventGuidance(ADB_EVENT_REC *e_ptr, ADB_SERVICE_REC *s_ptr, U8BIT *type, U8BIT *mode);
1366 
1375 U8BIT* DBDEF_GetServiceGuidanceData(ADB_SERVICE_REC *s_ptr, U8BIT *type, U8BIT *mode);
1376 
1384 
1391 
1398 
1412 BOOLEAN DBDEF_GetEventHDLinkageInfo(ADB_EVENT_REC *e_ptr, BOOLEAN verify_event, BOOLEAN only_simulcast,
1413  ADB_SERVICE_REC **hd_serv_ptr, ADB_EVENT_REC **hd_event_ptr);
1414 
1424 
1431 
1438 ADB_EVENT_CONTENT DBDEF_GetEventGenre(ADB_EVENT_REC *e_ptr, ADB_SERVICE_REC *s_ptr);
1439 
1446 U8BIT* DBDEF_GetEventContentData(ADB_EVENT_REC *e_ptr, U8BIT *p_len);
1447 
1458 U8BIT* DBDEF_GetEventCrid(ADB_SERVICE_REC *serv_ptr, ADB_EVENT_REC *e_ptr, U8BIT crid_type, U8BIT index);
1459 
1467 U8BIT DBDEF_NumberOfCridsOfType(ADB_EVENT_REC *e_ptr, U8BIT crid_type);
1468 
1476 U8BIT* DBDEF_GetFullCrid(ADB_SERVICE_REC *serv_ptr, U8BIT *event_str);
1477 
1485 
1491 
1492 void DBDEF_SetTunedNetwork(U8BIT path, ADB_NETWORK_REC *n_ptr);
1494 
1495 void DBDEF_SetTunedTransport(U8BIT path, ADB_TRANSPORT_REC *t_ptr);
1497 void DBDEF_SetTunedService(U8BIT path, ADB_SERVICE_REC *s_ptr);
1499 
1500 void DBDEF_SetTextLang(U8BIT *lang_ids);
1501 U8BIT* DBDEF_GetTextLang(void);
1502 void DBDEF_SetSecondaryTextLang(U8BIT *lang_ids);
1503 U8BIT* DBDEF_GetSecondaryTextLang(void);
1504 void DBDEF_SetAudioLang(U8BIT *lang_ids);
1505 U8BIT* DBDEF_GetAudioLang(void);
1506 U8BIT* DBDEF_GetSecondaryAudioLang(void);
1507 void DBDEF_SetSecondaryAudioLang(U8BIT *lang_ids);
1508 
1517 void DBDEF_TidyDatabaseAfterSearch(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite,
1518  BOOLEAN search_completed, BOOLEAN manual);
1519 
1520 void DBDEF_TidyDatabaseNordig(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN search_completed, BOOLEAN manual);
1521 void DBDEF_TidyDatabaseUK(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN search_completed, BOOLEAN manual);
1522 void DBDEF_TidyDatabaseSatUK(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN search_completed, BOOLEAN manual);
1523 void DBDEF_TidyDatabaseDefault(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN search_completed, BOOLEAN manual);
1524 
1532 void DBDEF_RemoveEmptyTransports(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite);
1533 
1534 void DBDEF_DeleteLinkageDescripterArray(SI_LINKAGE_DESC_ENTRY *list_ptr);
1535 
1543 ADB_CRID_REC* DBDEF_AddCridRecord(U8BIT *crid, BOOLEAN series, BOOLEAN recommended);
1544 
1550 void DBDEF_SetCridDateTime(ADB_CRID_REC *c_ptr, U32DHMS date_time);
1551 
1557 void DBDEF_SetCridService(ADB_CRID_REC *c_ptr, U16BIT serv_id);
1558 
1564 void DBDEF_SetCridProgrammeName(ADB_CRID_REC *c_ptr, U8BIT *prog_name);
1565 
1571 void DBDEF_SetCridDoNotDelete(ADB_CRID_REC *c_ptr, BOOLEAN do_not_delete);
1572 
1578 
1584 
1589 U16BIT DBDEF_GetNumCridRecords(void);
1590 
1598 
1604 BOOLEAN DBDEF_IsValidCridRecord(ADB_CRID_REC *c_ptr);
1605 
1610 U16BIT DBDEF_GetNumFavouriteLists(void);
1611 
1625 ADB_FAVLIST_REC* DBDEF_AddFavouriteList(U8BIT list_id, U8BIT *name, U32BIT user_data, S16BIT index);
1626 
1633 
1640 
1646 void DBDEF_SetFavouriteListUserData(ADB_FAVLIST_REC *fav_list, U32BIT user_data);
1647 
1655 void DBDEF_MoveFavouriteListTo(ADB_FAVLIST_REC *fav_list, S16BIT index);
1656 
1662 
1669 
1679  ADB_SERVICE_REC *serv_ptr, S16BIT index);
1680 
1688 
1696  ADB_FAVSERV_REC *fav_serv);
1697 
1705  ADB_FAVSERV_REC *fav_serv);
1706 
1716  S16BIT index);
1717 
1724 
1730 
1737 void DBDEF_SetFavouriteListName(ADB_FAVLIST_REC *f_ptr, U8BIT *name);
1738 
1749 BOOLEAN DBDEF_ServiceForTunerType(ADB_SERVICE_REC *s_ptr, E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite);
1750 
1761 BOOLEAN DBDEF_TransportForTunerType(ADB_TRANSPORT_REC *t_ptr, E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite);
1762 
1768 ADB_TIMER_REC* DBDEF_AddTimerRec(BOOLEAN store_in_nvm);
1769 
1775 ADB_TIMER_REC* DBDEF_FindTimerRec(U32BIT handle);
1776 
1784 
1789 void DBDEF_SortTimers(BOOLEAN date_time_order);
1790 
1795 void DBDEF_DeleteTimerRec(ADB_TIMER_REC *timer);
1796 
1800 U16BIT DBDEF_GetNumProfiles(void);
1801 
1809 U16BIT DBDEF_GetProfileList(void ***profile_list, U16BIT *active_profile);
1810 
1816 void DBDEF_ReleaseProfileList(void **profile_list, U16BIT num_profiles);
1817 
1823 BOOLEAN DBDEF_IsActiveProfile(ADB_NETWORK_REC *profile);
1824 
1829 ADB_PROFILE_TYPE DBDEF_GetCurrentProfileType(void);
1830 
1835 void DBDEF_SelectBroadcastProfile(void);
1836 
1842 void DBDEF_PushBroadcastProfile(void);
1843 
1844 #ifdef COMMON_INTERFACE
1845 
1852 void DBDEF_SelectCIPlusProfile(U16BIT onet_id, U32BIT cicam_id);
1853 
1860 void DBDEF_PushCIPlusProfile(U16BIT onet_id, U32BIT cicam_id);
1861 #endif
1862 
1866 void DBDEF_PopProfile(void);
1867 
1874 BOOLEAN DBDEF_ServiceInProfile(ADB_SERVICE_REC *s_ptr);
1875 
1883 
1890 BOOLEAN DBDEF_NetworkInProfile(ADB_NETWORK_REC *n_ptr);
1891 
1892 #ifdef COMMON_INTERFACE
1893 ADB_NETWORK_REC* DBDEF_FindNetworkForCIPlusProfile(U16BIT cicam_onet_id, U32BIT cicam_identifier);
1894 ADB_NETWORK_REC* DBDEF_FindNetworkForCIPlusModule(U32BIT module);
1895 
1900 ADB_NETWORK_REC* DBDEF_GetCurrentCIPlusProfile(void);
1901 
1908 ADB_CICAM_TIMER_REC* DBDEF_AddCicamTimer(U32BIT cicam_id, U32BIT timer_handle);
1909 
1914 void DBDEF_DeleteCicamTimerRec(ADB_CICAM_TIMER_REC *cicam_timer_ptr);
1915 
1922 ADB_CICAM_TIMER_REC* DBDEF_GetNextCicamTimerRec(ADB_CICAM_TIMER_REC *cicam_timer_ptr);
1923 
1929 ADB_CICAM_TIMER_REC* DBDEF_FindCicamTimer(U32BIT cicam_id);
1930 
1936 ADB_CICAM_TIMER_REC* DBDEF_FindCicamTimerByHandle(U32BIT handle);
1937 
1938 #endif
1939 
1946 
1947 #ifdef DEBUG_PRINT_DATABASE
1948 void DBDEF_PrintAllRecords(void);
1949 #endif
1950 
1959 ADB_STRING* DBDEF_MakeString(U32BIT lang_code, U8BIT *str_ptr, U16BIT nbytes);
1960 
1967 
1977 
1982 void DBDEF_ReleaseString(ADB_STRING *string);
1983 
1984 #endif // _AP_DBDEF_H
1985 
1986 //*****************************************************************************
1987 // End of file
1988 //*****************************************************************************
1989 
Definition: ap_dbacc.h:250
ADB_STRING * DBDEF_GetServiceName(ADB_SERVICE_REC *s_ptr, BOOLEAN short_name, BOOLEAN pref_name)
Returns a pointer to the service name, taking into account perferred names and short names...
Definition: ap_dbdef.c:6811
U8BIT * DBDEF_GetEventGuidance(ADB_EVENT_REC *e_ptr, ADB_SERVICE_REC *s_ptr, U8BIT *type, U8BIT *mode)
Returns the guidance text for an event, either from the event itself or the event's service...
Definition: ap_dbdef.c:2800
void DBDEF_SetAudioLang(U8BIT *lang_ids)
sets current audio lang
Definition: ap_dbdef.c:8382
U16BIT DBDEF_GetNumServices(void)
Returns the total number of services.
Definition: ap_dbdef.c:5646
void DBDEF_SetTunedNetwork(U8BIT path, ADB_NETWORK_REC *n_ptr)
sets the currently tuned network
Definition: ap_dbdef.c:8191
ADB_EVENT_CONTENT DBDEF_GetEventGenre(ADB_EVENT_REC *e_ptr, ADB_SERVICE_REC *s_ptr)
Returns the genre of an event.
Definition: ap_dbdef.c:3508
void DBDEF_GetTransportAdditionalFrequencies(ADB_TRANSPORT_REC *t_ptr, U8BIT *num_freqs, U32BIT **freqs)
Returns the additional frequencies associated with a transport. The returned array should not be modi...
Definition: ap_dbdef.c:5540
Definition: ap_dbdef.h:576
BOOLEAN DBDEF_NetworkInProfile(ADB_NETWORK_REC *n_ptr)
Checks whether the given network is valid for the current profile. There may be multiple CI+ profiles...
Definition: ap_dbdef.c:10543
Definition: ap_dbdef.h:286
ADB_STRING * DBDEF_ConcatSIString(ADB_STRING *str1, SI_STRING_DESC *str2)
Concatenates an SI_STRING_DESC string to the end of an ADB_STRING string, removing any terminating '\...
Definition: ap_dbdef.c:4016
void DBDEF_SetServicePort(ADB_SERVICE_REC *s_ptr, U16BIT port)
Set the port for a service.
Definition: ap_dbdef.c:7130
U16BIT DBDEF_GetNumProfiles(void)
Returns the number of network profiles.
Definition: ap_dbdef.c:10182
BOOLEAN DBDEF_IsValidCridRecord(ADB_CRID_REC *c_ptr)
Checks whether the given crid record is in the list of valid crid records.
Definition: ap_dbdef.c:9202
Definition: stbdpc.h:314
Definition: ap_dbdef.h:310
void DBDEF_SortTimers(BOOLEAN date_time_order)
Sorts timer list into date/time or alphabetical order.
Definition: ap_dbdef.c:10140
void DBDEF_SetNetworkName(ADB_NETWORK_REC *n_ptr, U8BIT *name)
Set or change the name of the given network.
Definition: ap_dbdef.c:4776
BOOLEAN DBDEF_SetLNBUnicable(ADB_LNB_REC *lnb, U32BIT inter_freq, U8BIT chan)
Sets the LNB Unicable settings.
Definition: ap_dbdef.c:4379
void DBDEF_ReleaseProfileList(void **profile_list, U16BIT num_profiles)
Frees a profile list returned by DBDEF_GetProfileList.
Definition: ap_dbdef.c:10298
ADB_SERVICE_REC * DBDEF_GetNextServiceOnTransport(ADB_SERVICE_REC *s_ptr, ADB_TRANSPORT_REC *t_ptr)
Find the next service following the given service that's on the given transport.
Definition: ap_dbdef.c:6245
void DBDEF_DeleteNetworkRec(ADB_NETWORK_REC *n_ptr)
Deletes specified network record.
Definition: ap_dbdef.c:4764
U8BIT * DBDEF_GetEventContentData(ADB_EVENT_REC *e_ptr, U8BIT *p_len)
Returns the level 1 and 2 values for all content identifiers for the given event. ...
Definition: ap_dbdef.c:3474
U8BIT * DBDEF_GetSecondaryTextLang(void)
returns array of secondary text langs
Definition: ap_dbdef.c:8364
ADB_CRID_REC * DBDEF_AddCridRecord(U8BIT *crid, BOOLEAN series, BOOLEAN recommended)
Creates a CRID record and adds it to the database.
Definition: ap_dbdef.c:8988
void DBDEF_UpdateCridEitDate(ADB_CRID_REC *c_ptr)
Updates the stored EIT date of this CRID with the current GMT date.
Definition: ap_dbdef.c:9115
ADB_NETWORK_REC * DBDEF_GetTunedNetwork(U8BIT path)
gets the currently tuned network
Definition: ap_dbdef.c:8210
void DBDEF_SetServicePmtPid(ADB_SERVICE_REC *s_ptr, U16BIT pmt_pid)
Updates the pmt pid.
Definition: ap_dbdef.c:7338
U8BIT * DBDEF_GetAudioLang(void)
returns current audio lang
Definition: ap_dbdef.c:8418
Definition: ap_dbdef.h:626
void DBDEF_SetTextLang(U8BIT *lang_ids)
sets current text lang
Definition: ap_dbdef.c:8310
ADB_TRANSPORT_REC * DBDEF_GetTunedTransport(U8BIT path)
gets the currently tuned transport
Definition: ap_dbdef.c:8248
ADB_TIMER_REC * DBDEF_GetNextTimerRec(ADB_TIMER_REC *timer_ptr)
Returns the next timer record after the one given. If the argument is NULL then the first record is r...
Definition: ap_dbdef.c:10116
E_STREAM_MATCH_TYPE DBDEF_GetReqdTtextPid(ADB_SERVICE_REC *s_ptr, BOOLEAN for_subtitles, U16BIT *pid_ptr, U8BIT *magazine, U8BIT *page)
Gets the appropriate teletext pid - looks first for the params matching exactly the required teletext...
Definition: ap_dbdef.c:6566
Definition: ap_dbdef.h:294
BOOLEAN DBDEF_TransportInProfile(ADB_TRANSPORT_REC *t_ptr)
Checks whether the given transport is valid for the current profile. There may be multiple CI+ profil...
Definition: ap_dbdef.c:10507
void DBDEF_SetServiceDeletedFlag(ADB_SERVICE_REC *s_ptr, BOOLEAN deleted)
Marks whether a service is deleted or not.
Definition: ap_dbdef.c:6946
BOOLEAN DBDEF_SetLNB12V(ADB_LNB_REC *lnb, BOOLEAN is_12v)
Sets the LNB 12V setting.
Definition: ap_dbdef.c:4178
Definition: stbsitab.h:432
Definition: stbsitab.h:135
U8BIT * DBDEF_GetServiceGuidance(ADB_SERVICE_REC *s_ptr)
Returns the guidance text for the service, as a UTF-8 string. The returned string should be freed usi...
Definition: ap_dbdef.c:2986
void DBDEF_SetSatTransportTuningParams(ADB_TRANSPORT_REC *t_ptr, U32BIT freq_hz, U16BIT symbol_rate, E_STB_DP_POLARITY polarity, BOOLEAN dvb_s2, E_STB_DP_MODULATION modulation, ADB_NETWORK_REC *network)
Sets the tuning parameters for an existing satellite transport.
Definition: ap_dbdef.c:5340
Application configuration.
Definition: ap_dbdef.h:600
ADB_TIMER_REC * DBDEF_AddTimerRec(BOOLEAN store_in_nvm)
Creates a new timer record in the database, assigning it a unique handle.
Definition: ap_dbdef.c:10027
ADB_TRANSPORT_REC * DBDEF_AddIPTransportRec(U16BIT onet_id, U16BIT tran_id, U8BIT *url)
Adds an IP transport record.
Definition: ap_dbdef.c:5382
ADB_SERVICE_REC * DBDEF_AddServiceRec(U16BIT serv_id, ADB_TRANSPORT_REC *t_ptr)
Adds a new service record to the service database with the given service ID and parent transport...
Definition: ap_dbdef.c:5738
Definition: ap_dbdef.h:192
ADB_TIMER_REC * DBDEF_FindTimerRec(U32BIT handle)
Returns the timer record with the given timer handle.
Definition: ap_dbdef.c:10093
void DBDEF_RequestAccess(void)
Requests access to the app's database.
Definition: ap_dbdef.c:234
ADB_SERVICE_REC * DBDEF_GetPrevServiceRec(ADB_SERVICE_REC *s_ptr)
Returns the service before the one given. If NULL is passed then the last service in the list is retu...
Definition: ap_dbdef.c:5706
U8BIT * DBDEF_GetEventName(ADB_EVENT_REC *e_ptr)
Returns the name of the event as a UTF-8 string in the currently selected language. The returned string should be freed using STB_ReleaseUnicodeString.
Definition: ap_dbdef.c:2123
void DBDEF_DeleteRCTLinks(ADB_RCT_LINK_INFO *links)
Frees the given list of RCT links.
Definition: ap_dbdef.c:3883
Definition: ap_dbdef.h:151
BOOLEAN DBDEF_LoadDatabase(U8BIT *db_pathname)
Loads the service database from non-volatile storage and creates the RAM version of this data that wi...
Definition: ap_dbdef.c:258
ADB_LNB_BAND_REC * DBDEF_GetNextLNBBandRec(ADB_LNB_BAND_REC *band_ptr)
Returns the next LNB band record after the one given. If the argument is NULL then the first record i...
Definition: ap_dbdef.c:4655
void DBDEF_PushBroadcastProfile(void)
Saves the current profile and any related data so that it can restored using DBDEF_PopProfile(), and sets the broadcast profile type for for all network, transport and service record accesses.
Definition: ap_dbdef.c:10381
void DBDEF_SetCridService(ADB_CRID_REC *c_ptr, U16BIT serv_id)
Sets the service ID in the crid record.
Definition: ap_dbdef.c:9058
Structure representing the component information as found in the EIT component_descriptor.
Definition: ap_dbacc.h:242
Definition: ap_dbdef.h:547
ADB_FAVSERV_REC * DBDEF_GetNextServiceFromFavouriteList(ADB_FAVLIST_REC *fav_list, ADB_FAVSERV_REC *fav_serv)
Returns the next favourite list service record.
Definition: ap_dbdef.c:9724
BOOLEAN DBDEF_SetLNBSmatv(ADB_LNB_REC *lnb, BOOLEAN is_smatv)
Sets the LNB SMATV setting.
Definition: ap_dbdef.c:4328
ADB_SERVICE_REC * DBDEF_FindServiceRec(U16BIT serv_id, ADB_TRANSPORT_REC *t_ptr)
Search for the service with the given service ID on the given transport.
Definition: ap_dbdef.c:6281
BOOLEAN DBDEF_ServiceInProfile(ADB_SERVICE_REC *s_ptr)
Checks whether the given service is valid for the current profile. There may be multiple CI+ profiles...
Definition: ap_dbdef.c:10471
U16BIT DBDEF_GetReqdVideoPid(ADB_SERVICE_REC *s_ptr, ADB_STREAM_TYPE *video_type)
Returns the video pid and type that should be used for the given service from the list of video strea...
Definition: ap_dbdef.c:6756
BOOLEAN DBDEF_TransportForTunerType(ADB_TRANSPORT_REC *t_ptr, E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite)
Checks whether the given transport is a terrestrial, cable or satellite transport, and optionally check whether it's on a particular satellite.
Definition: ap_dbdef.c:9999
BOOLEAN DBDEF_ServiceForTunerType(ADB_SERVICE_REC *s_ptr, E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite)
Checks whether the given service is a terrestrial, cable or satellite service, and optionally check w...
Definition: ap_dbdef.c:9969
BOOLEAN DBDEF_AddAnalogService(void)
Adds an analogue service, transport and, if necessary, network to the database based on the current t...
Definition: ap_dbdef.c:7204
U8BIT * DBDEF_GetServiceDefaultAuthority(ADB_SERVICE_REC *s_ptr)
Returns a copy of the default authority CRID string for the given service. This string will be return...
Definition: ap_dbdef.c:3768
void DBDEF_DeleteServiceFromFavouriteList(ADB_FAVLIST_REC *fav_list, ADB_FAVSERV_REC *fav_serv)
Delete the given service from the given favourite list.
Definition: ap_dbdef.c:9834
void DBDEF_DeleteAllServicesFromFavouriteList(ADB_FAVLIST_REC *fav_list)
Delete the all services from the given favourite list.
Definition: ap_dbdef.c:9868
ADB_SATELLITE_REC * DBDEF_GetNextSatelliteRec(ADB_SATELLITE_REC *sat_ptr)
Returns the next satellite record after the one given. If the argument is NULL then the first record ...
Definition: ap_dbdef.c:4537
ADB_SATELLITE_REC * DBDEF_AddSatelliteRec(ADB_STRING *name_str, U16BIT dish_pos, U16BIT long_pos, BOOLEAN east_west, ADB_LNB_REC *associated_lnb)
Add a satellite record to the database.
Definition: ap_dbdef.c:4446
Definition: stbdpc.h:308
U8BIT * DBDEF_GetTextLang(void)
returns array of current text langs
Definition: ap_dbdef.c:8328
ADB_FAVSERV_REC * DBDEF_FindServiceInFavouriteList(ADB_FAVLIST_REC *fav_list, void *serv_ptr)
Returns the ADB_FAVSERV_REC from the given favourite list for the given service.
Definition: ap_dbdef.c:9696
Definition: ap_dbdef.h:271
void DBDEF_ClearTableVersionHistory(ADB_TRANSPORT_REC *t_ptr)
Clears the version histories stored in the transport records.
Definition: ap_dbdef.c:5619
U16BIT DBDEF_GetNumSatellites(void)
Returns the number of satellite records in the database.
Definition: ap_dbdef.c:4430
Definition: ap_dbdef.h:360
ADB_NETWORK_REC * DBDEF_FindOrAddPrivateNetwork(void *satellite)
Find or add a private network, assigning an unused private network ID.
Definition: ap_dbdef.c:10798
ADB_SERVICE_REC * DBDEF_GetNextServiceRec(ADB_SERVICE_REC *s_ptr)
Returns the service after the one given. If NULL is passed then the first service in the list is retu...
Definition: ap_dbdef.c:5675
ADB_TRANSPORT_REC * DBDEF_FindCableTransportRec(U32BIT freq_hz, U32BIT symbol_rate)
Find the cable transport record in the database matching the given params.
Definition: ap_dbdef.c:5108
ADB_EVENT_DESC * DBDEF_FindEventDescriptor(ADB_EVENT_DESC *start_desc, U8BIT desc_tag, U32BIT private_data_specifier)
Searches a descriptor list for the first descriptor with the given descriptor tag.
Definition: ap_dbdef.c:2071
Application timer functions and defines.
U16BIT DBDEF_GetNumTransports(void)
Returns the number of transports in ther service database.
Definition: ap_dbdef.c:4897
void DBDEF_SetServiceFecLayer(ADB_SERVICE_REC *s_ptr, E_STB_DP_FEC_LAYER fec_layer, S_STB_DP_FEC_LAYER_INFO *fec_info)
Set the port for a service.
Definition: ap_dbdef.c:7146
void DBDEF_SetCridDateTime(ADB_CRID_REC *c_ptr, U32DHMS date_time)
Sets the date and time fields in the crid record.
Definition: ap_dbdef.c:9040
void DBDEF_DeleteLNBBandRec(ADB_LNB_BAND_REC *band_ptr)
Deletes an LNB band record from the database.
Definition: ap_dbdef.c:4679
void DBDEF_SetFavouriteListUserData(ADB_FAVLIST_REC *fav_list, U32BIT user_data)
Saves the given user data with a favourite list.
Definition: ap_dbdef.c:9458
ADB_TRANSPORT_REC * DBDEF_FindSatTransportRec(U32BIT freq_hz, U16BIT symbol_rate, E_STB_DP_POLARITY polarity, BOOLEAN dvb_s2, E_STB_DP_MODULATION modulation, void *satellite)
Find the satellite transport record in the database matching the given params.
Definition: ap_dbdef.c:5238
Definition: ap_dbdef.h:331
void DBDEF_TidyDatabaseNordig(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN search_completed, BOOLEAN manual)
Iterates through all the services following a search search to see whether any need to be deleted bas...
Definition: ap_dbdef.c:8527
BOOLEAN DBDEF_SetLNBDiSEqCPosition(ADB_LNB_REC *lnb, BOOLEAN is_diseqc_posn)
Sets the LNB DiSEqC position setting.
Definition: ap_dbdef.c:4228
ADB_NETWORK_REC * DBDEF_GetNextNetworkRec(ADB_NETWORK_REC *n_ptr)
Returns the network following the one given. If the argument is NULL then the first network will be r...
Definition: ap_dbdef.c:4868
void DBDEF_SetSecondaryAudioLang(U8BIT *lang_ids)
sets the secondary audio lang
Definition: ap_dbdef.c:8400
U8BIT * DBDEF_GetEventExtendedDescription(ADB_EVENT_REC *e_ptr)
Returns the extended event description text of the event as a UTF-8 string. The returned string shoul...
Definition: ap_dbdef.c:2370
void DBDEF_DeleteStreamList(ADB_STREAM_REC *slist)
Deletes all records in a service stream list.
Definition: ap_dbdef.c:2004
U16BIT DBDEF_GetNumLNBBands(void)
Returns the number of LNB band records in the database.
Definition: ap_dbdef.c:4561
BOOLEAN DBDEF_SetServiceProviderName(ADB_SERVICE_REC *s_ptr, U8BIT *name)
Set or change the name of a service's provider.
Definition: ap_dbdef.c:6072
E_STREAM_MATCH_TYPE DBDEF_GetReqdSubtitleParams(ADB_SERVICE_REC *s_ptr, U16BIT *pid_ptr, U16BIT *cpage_ptr, U16BIT *apage_ptr)
Gets the appropriate subtitle pid and page ids - looks first for the params matching exactly the requ...
Definition: ap_dbdef.c:6634
void DBDEF_SetFavouriteListName(ADB_FAVLIST_REC *f_ptr, U8BIT *name)
Set or change the name of the given favourite list.
Definition: ap_dbdef.c:9901
void DBDEF_TidyDatabaseDefault(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN search_completed, BOOLEAN manual)
Iterates through all the services following a search search to see whether any need to be deleted bas...
Definition: ap_dbdef.c:8851
E_STB_DP_FEC_LAYER DBDEF_GetServiceFecLayer(ADB_SERVICE_REC *s_ptr, S_STB_DP_FEC_LAYER_INFO *fec_info)
Set the port for a service.
Definition: ap_dbdef.c:7174
U8BIT * DBDEF_GetServiceGuidanceData(ADB_SERVICE_REC *s_ptr, U8BIT *type, U8BIT *mode)
Returns the guidance text for the service, as a UTF-8 string. The returned string should be freed usi...
Definition: ap_dbdef.c:2947
void DBDEF_MoveFavouriteListTo(ADB_FAVLIST_REC *fav_list, S16BIT index)
Changes the order of the favourite lists by moving the given list to the given position.
Definition: ap_dbdef.c:9478
U8BIT DBDEF_GetEventParentalAge(ADB_EVENT_REC *e_ptr)
Returns the parental age value for the given event.
Definition: ap_dbdef.c:3006
BOOLEAN DBDEF_GetEventSubtitlesAvailFlag(ADB_EVENT_REC *e_ptr)
Returns whether DVB subtitles are signalled as being available for the given event.
Definition: ap_dbdef.c:3431
U8BIT DBDEF_NumberOfCridsOfType(ADB_EVENT_REC *e_ptr, U8BIT crid_type)
Returns the number of CRIDs of the given type for the event.
Definition: ap_dbdef.c:3655
ADB_STRING * DBDEF_GetServiceURL(ADB_SERVICE_REC *s_ptr)
Gets the URL for an IP service.
Definition: ap_dbdef.c:7107
Definition: ap_dbdef.h:325
Definition: ap_dbdef.h:139
void DBDEF_SetTransportTransportId(ADB_TRANSPORT_REC *t_ptr, U16BIT tran_id)
Sets the transport ID of the given transport.
Definition: ap_dbdef.c:5500
Definition: ap_dbdef.h:278
void DBDEF_TidyDatabaseSatUK(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN search_completed, BOOLEAN manual)
Iterates through all the services following a search search to see whether any need to be deleted bas...
Definition: ap_dbdef.c:8757
U16BIT DBDEF_GetServicePmtPid(ADB_SERVICE_REC *s_ptr)
gets the PMT PID associated with the service
Definition: ap_dbdef.c:7359
BOOLEAN DBDEF_SetServiceName(ADB_SERVICE_REC *s_ptr, U8BIT *name)
Set or change the name of a service.
Definition: ap_dbdef.c:5945
Definition: ap_dbdef.h:591
ADB_TRANSPORT_REC * DBDEF_AddSatTransportRec(U32BIT freq_hz, U16BIT symbol_rate, E_STB_DP_POLARITY polarity, BOOLEAN dvb_s2, E_STB_DP_MODULATION modulation, ADB_NETWORK_REC *network)
Adds a satellite transport record with the given frequency, symbol rate and polarity.
Definition: ap_dbdef.c:5170
Definition: ap_dbdef.h:373
void DBDEF_DeleteRecordsForTunerType(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite)
Deletes all network, transport and services records for the given tuner type.
Definition: ap_dbdef.c:1633
Definition: ap_dbdef.h:403
ADB_FAVLIST_REC * DBDEF_AddFavouriteList(U8BIT list_id, U8BIT *name, U32BIT user_data, S16BIT index)
Creates a new favourite list and adds it to the list of favourite lists. Creation of the new list wil...
Definition: ap_dbdef.c:9256
BOOLEAN DBDEF_SetLNB22k(ADB_LNB_REC *lnb, BOOLEAN is_22k)
Sets the LNB 22k setting.
Definition: ap_dbdef.c:4153
ADB_CRID_REC * DBDEF_GetNextCridRecord(ADB_CRID_REC *c_ptr)
Returns the next CRID record after the one specified. If the record specified is NULL then the first ...
Definition: ap_dbdef.c:9177
BOOLEAN DBDEF_SetServiceURL(ADB_SERVICE_REC *s_ptr, U8BIT *url)
Set or change the URL for accessing an IP service.
Definition: ap_dbdef.c:7044
void DBDEF_MoveFavouriteListServiceTo(ADB_FAVLIST_REC *fav_list, ADB_FAVSERV_REC *fav_serv, S16BIT index)
Changes the order of the services in the favourite list by moving the given service to the given posi...
Definition: ap_dbdef.c:9776
void DBDEF_ReleaseString(ADB_STRING *string)
Releases an ADB_STRING.
Definition: ap_dbdef.c:4051
Header file - Function prototypes for linked lists.
Header file - macros and function prototypes for public use.
U8BIT * DBDEF_GetFullCrid(ADB_SERVICE_REC *serv_ptr, U8BIT *event_str)
Returns the full CRID for the given CRID string The returned string should be freed using STB_AppFree...
Definition: ap_dbdef.c:3717
ADB_EVENT_REC * DBDEF_FindScheduleEventById(ADB_SERVICE_REC *s_ptr, U16BIT event_id)
Find an event for a service from its event_id.
Definition: ap_dbdef.c:2035
Definition: ap_dbdef.h:301
ADB_SERVICE_REC * DBDEF_GetTunedService(U8BIT path)
Returns the currently tuned service on the given path.
Definition: ap_dbdef.c:8279
Definition: ap_dbdef.h:410
U8BIT * DBDEF_GetEventCrid(ADB_SERVICE_REC *serv_ptr, ADB_EVENT_REC *e_ptr, U8BIT crid_type, U8BIT index)
Returns the full CRID of the type given for the given event.
Definition: ap_dbdef.c:3583
void DBDEF_SortServicesByLcn(void)
Sort the full service list into ascending logical channel number order.
Definition: ap_dbdef.c:7396
ADB_LNB_REC * DBDEF_GetNextLNBRec(ADB_LNB_REC *lnb_ptr)
Returns the next LNB record after the one given. If the argument is NULL then the first record is ret...
Definition: ap_dbdef.c:4406
U8BIT DBDEF_GetEventComponentList(ADB_EVENT_REC *e_ptr, ADB_EVENT_COMPONENT_INFO **component_list)
Retrieves a list of components associated with the specified event, as described by component descrip...
Definition: ap_dbdef.c:3366
void DBDEF_DeleteImageIcons(ADB_IMAGE_ICON *icon_list)
Frees given list of image icons and any associated memory.
Definition: ap_dbdef.c:3917
U16BIT DBDEF_GetReqdAudioPid(ADB_SERVICE_REC *s_ptr, E_STB_DP_AUDIO_MODE *audio_mode, ADB_STREAM_TYPE *audio_type)
Gets the appropriate audio pid - looks first for the pid matching exactly the required audio settings...
Definition: ap_dbdef.c:6460
BOOLEAN DBDEF_SetLNBPulsePosition(ADB_LNB_REC *lnb, BOOLEAN is_pulse_posn)
Sets the LNB pulse position setting.
Definition: ap_dbdef.c:4203
void DBDEF_RemoveEmptyTransports(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite)
Delete all transport records that don't have any services.
Definition: ap_dbdef.c:8940
ADB_TRANSPORT_REC * DBDEF_FindTransportRecByIds(ADB_TRANSPORT_REC *transp, U32BIT net_id, U32BIT onet_id, U32BIT tran_id)
Find a transport record matching the given set of IDs, starting from the given transport.
Definition: ap_dbdef.c:5446
BOOLEAN DBDEF_AllocateLcns(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN assign_lcns)
allocates lcns - expects allocated lcn for all services to be 0
Definition: ap_dbdef.c:7417
BOOLEAN DBDEF_GetEventAudioDescriptionFlag(ADB_EVENT_REC *e_ptr)
Returns whether audio description is signalled as being available for the given event.
Definition: ap_dbdef.c:3052
BOOLEAN DBDEF_SetLNBPower(ADB_LNB_REC *lnb, E_STB_DP_LNB_POWER power)
Sets the LNB power setting.
Definition: ap_dbdef.c:4128
void DBDEF_DeleteTimerRec(ADB_TIMER_REC *timer)
Deletes the given timer from the database.
Definition: ap_dbdef.c:10160
ADB_STRING * DBDEF_MakeString(U32BIT lang_code, U8BIT *str_ptr, U16BIT nbytes)
Creates an ADB_STRING, copying the given data into it. If the string passed in is NULL or the number ...
Definition: ap_dbdef.c:3958
void DBDEF_DeleteEventList(ADB_EVENT_REC *elist)
Deletes all events in the given list.
Definition: ap_dbdef.c:3822
void DBDEF_Initialise(void)
Initialises the database, preparing for it to be accessed.
Definition: ap_dbdef.c:200
void DBDEF_PopProfile(void)
Restores a previously pushed profile.
Definition: ap_dbdef.c:10448
Definition: stbsitab.h:178
Definition: ap_dbdef.h:121
Definition: stbsitab.h:141
ADB_STREAM_REC * DBDEF_CopyStreamList(ADB_STREAM_REC *slist)
Creates a copy of a stream list, allocating new memory as required.
Definition: ap_dbdef.c:1928
U16BIT DBDEF_GetNumLNBs(void)
Returns the number of LNB records in the database.
Definition: ap_dbdef.c:4067
System Wide Global Technical Data Type Definitions.
ADB_PROFILE_TYPE DBDEF_GetCurrentProfileType(void)
Returns the current profile type.
Definition: ap_dbdef.c:10358
ADB_EVENT_ITEMIZED_INFO * DBDEF_GetEventItemizedDescription(ADB_EVENT_REC *e_ptr, U16BIT *num_items_ptr)
Returns the items of extended event descriptor as item descriptor and item itself.
Definition: ap_dbdef.c:2571
ADB_TRANSPORT_REC * DBDEF_AddTerrestrialTransportRec(U32BIT freq_hz, U8BIT plp_id, ADB_NETWORK_REC *network)
Adds a terrestrial transport record with the given frequency and PLP id.
Definition: ap_dbdef.c:4942
Definition: ap_dbdef.h:93
U16BIT DBDEF_NumStreamsInList(ADB_STREAM_REC *slist)
Returns the number of stream records in the given list.
Definition: ap_dbdef.c:1907
Definition: ap_dbdef.h:566
void DBDEF_DeleteAltServList(ADB_ALT_SERV_REC *aslist)
Deletes all records in a service alternate service list.
Definition: ap_dbdef.c:3865
BOOLEAN DBDEF_SetLNBRepeats(ADB_LNB_REC *lnb, U8BIT repeats)
Sets the LNB message repeat setting in the range 0 to 3.
Definition: ap_dbdef.c:4353
E_STREAM_MATCH_TYPE DBDEF_GetReqdCcParams(ADB_SERVICE_REC *s_ptr, U16BIT *pid_ptr, BOOLEAN *digital_cc, U8BIT *caption_service_number, S8BIT *cc_index)
Gets the appropriate caption service - looks first for the params matching exactly the required subti...
Definition: ap_dbdef.c:6697
ADB_SERVICE_REC * DBDEF_FindServiceRecByLcn(U16BIT lcn, ADB_TRANSPORT_REC *t_ptr, BOOLEAN allocated_lcn)
Find the service with the given LCN, and optionally on the given transport.
Definition: ap_dbdef.c:6380
void DBDEF_ReleaseAccess(void)
Releases access to the app's database.
Definition: ap_dbdef.c:244
U16BIT DBDEF_GetNumCridRecords(void)
Returns the number of CRID records in the database.
Definition: ap_dbdef.c:9164
ADB_NETWORK_REC * DBDEF_AddNetworkRec(U16BIT net_id, ADB_SATELLITE_REC *satellite)
Adds a new network record to the database with the given network ID.
Definition: ap_dbdef.c:4712
U16BIT DBDEF_GetProfileList(void ***profile_list, U16BIT *active_profile)
Gets a list of the available network profiles.
Definition: ap_dbdef.c:10225
ADB_TRANSPORT_REC * DBDEF_AddCableTransportRec(U32BIT freq_hz, U32BIT symbol_rate, ADB_NETWORK_REC *network)
Adds a cable transport record with the given frequency and symbol rate.
Definition: ap_dbdef.c:5050
ADB_TRANSPORT_REC * DBDEF_FindTerrestrialTransportRec(U32BIT freq_hz, U8BIT plp_id)
Find the terrestrial transport record in the database matching the given params.
Definition: ap_dbdef.c:5020
BOOLEAN DBDEF_SetLNBCSwitch(ADB_LNB_REC *lnb, E_STB_DP_DISEQC_CSWITCH cswitch)
Sets the LNB committed switch setting.
Definition: ap_dbdef.c:4278
void DBDEF_SetCridProgrammeName(ADB_CRID_REC *c_ptr, U8BIT *prog_name)
Sets the programme name field of the given CRID record.
Definition: ap_dbdef.c:9076
ADB_LNB_REC * DBDEF_AddLNB(E_STB_DP_LNB_TYPE type, ADB_STRING *name)
Add an LNB record to the database.
Definition: ap_dbdef.c:4080
void DBDEF_TidyDatabaseAfterSearch(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite, BOOLEAN search_completed, BOOLEAN manual)
Calls any country and tuner type specific function to tidy up the database following a search...
Definition: ap_dbdef.c:8451
void DBDEF_SetAnalogServiceName(ADB_SERVICE_REC *s_ptr, U8BIT *new_name, U8BIT new_len)
Updates analog service names - ASSUMES NORMAL ASCII CODED.
Definition: ap_dbdef.c:7282
ADB_FAVSERV_REC * DBDEF_GetPrevServiceFromFavouriteList(ADB_FAVLIST_REC *fav_list, ADB_FAVSERV_REC *fav_serv)
Returns the previous favourite list service record.
Definition: ap_dbdef.c:9749
void DBDEF_SetTunedTransport(U8BIT path, ADB_TRANSPORT_REC *t_ptr)
sets the currently tuned transport
Definition: ap_dbdef.c:8229
void DBDEF_DeleteCridRecord(ADB_CRID_REC *c_ptr)
Deletes the given CRID record from the database.
Definition: ap_dbdef.c:9134
Definition: ap_dbdef.h:83
ADB_STRING * DBDEF_GetServiceProviderName(ADB_SERVICE_REC *s_ptr)
Returns a pointer to the service provider name.
Definition: ap_dbdef.c:6907
void DBDEF_SetServiceFavGroups(ADB_SERVICE_REC *s_ptr, U8BIT groups)
Sets the favourite groups for a service.
Definition: ap_dbdef.c:7380
U16BIT DBDEF_GetNumServicesInFavouriteList(ADB_FAVLIST_REC *fav_list)
Returns the number of services in the given favourite list.
Definition: ap_dbdef.c:9584
U16BIT DBDEF_GetReqdADPid(ADB_SERVICE_REC *s_ptr, E_STB_DP_AUDIO_MODE *ad_mode, ADB_STREAM_TYPE *ad_type, BOOLEAN *broadcast_mix)
Gets the appropriate audio description pid - looks first for the pid matching exactly the required au...
Definition: ap_dbdef.c:6514
void DBDEF_SetSecondaryTextLang(U8BIT *lang_ids)
sets secondary text lang
Definition: ap_dbdef.c:8346
Definition: ap_dbdef.h:114
ADB_TRANSPORT_REC * DBDEF_GetNextTransportRec(ADB_TRANSPORT_REC *t_ptr)
Returns the transport following the one given. If the argument is NULL then the first transport will ...
Definition: ap_dbdef.c:4910
ADB_NETWORK_REC * DBDEF_FindNetworkRec(U16BIT net_id, ADB_SATELLITE_REC *satellite)
Finds the network with the given network ID.
Definition: ap_dbdef.c:4840
void DBDEF_DeleteFavouriteList(ADB_FAVLIST_REC *fav_list)
Deletes the given favourite list.
Definition: ap_dbdef.c:9534
ADB_LNB_BAND_REC * DBDEF_AddLNBBandRec(S_STB_DP_LNB_BAND *band_parameters, ADB_LNB_REC *associated_lnb)
Add an LNB band record to the database.
Definition: ap_dbdef.c:4574
void DBDEF_DeleteTransportRec(ADB_TRANSPORT_REC *t_ptr)
Deletes the given transport from the service database.
Definition: ap_dbdef.c:5563
ADB_STRING * DBDEF_CopyString(ADB_STRING *src_str)
Creates a copy of the given ADB_STRING.
Definition: ap_dbdef.c:3990
Definition: ap_dbdef.h:351
void DBDEF_SaveServiceEventSchedule(ADB_SERVICE_REC *s_ptr)
Saves the event schedule of a service to the service database.
Definition: ap_dbdef.c:6156
U16BIT DBDEF_GetNumFavouriteLists(void)
Returns the number of favourite lists.
Definition: ap_dbdef.c:9236
ADB_SERVICE_REC * DBDEF_FindServiceRecByFreesatId(ADB_SERVICE_REC *servp, U16BIT freesat_id)
Search for a service with the given Freesat ID.
Definition: ap_dbdef.c:6414
void DBDEF_SelectBroadcastProfile(void)
Sets the broadcast profile type for for all network, transport and service record accesses...
Definition: ap_dbdef.c:10369
Definition: stbsitab.h:540
void DBDEF_TidyDatabaseUK(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN search_completed, BOOLEAN manual)
Iterates through all the services following a search search to see whether any need to be deleted bas...
Definition: ap_dbdef.c:8669
ADB_FAVSERV_REC * DBDEF_AddServiceToFavouriteList(ADB_FAVLIST_REC *fav_list, ADB_SERVICE_REC *serv_ptr, S16BIT index)
Adds a new service to the given favourite list at the given position.
Definition: ap_dbdef.c:9599
U16BIT DBDEF_GetNumDeletedServices(E_STB_DP_SIGNAL_TYPE tuner_type)
Returns the number of services that are marked as deleted for the given tuner type.
Definition: ap_dbdef.c:6962
void DBDEF_SetTransportOrigNetworkId(ADB_TRANSPORT_REC *t_ptr, U16BIT orig_net_id)
Sets the original network ID of the given transport.
Definition: ap_dbdef.c:5519
void DBDEF_DeleteAllRecords(void)
Deletes all records in the database.
Definition: ap_dbdef.c:1531
U16BIT DBDEF_GetDeletedServiceList(E_STB_DP_SIGNAL_TYPE tuner_type, void ***slist_ptr)
Definition: ap_dbdef.c:6997
BOOLEAN DBDEF_GetEventHDLinkageInfo(ADB_EVENT_REC *e_ptr, BOOLEAN verify_event, BOOLEAN only_simulcast, ADB_SERVICE_REC **hd_serv_ptr, ADB_EVENT_REC **hd_event_ptr)
Returns whether there's an HD event linked to the SD event and returns the info for it...
Definition: ap_dbdef.c:3110
BOOLEAN DBDEF_IsActiveProfile(ADB_NETWORK_REC *profile)
Is the given profile the currently active profile?
Definition: ap_dbdef.c:10316
Definition: stbllist.h:45
BOOLEAN DBDEF_SetServiceType(ADB_SERVICE_REC *s_ptr, ADB_SERVICE_TYPE serv_type)
Sets the service type for the given service record.
Definition: ap_dbdef.c:6131
ADB_SERVICE_REC * DBDEF_CopyServiceRec(ADB_SERVICE_REC *orig_serv)
Creates a copy of the given service, copying the service's attributes, e.g. service name...
Definition: ap_dbdef.c:5804
void DBDEF_SetCridDoNotDelete(ADB_CRID_REC *c_ptr, BOOLEAN do_not_delete)
Sets the do not delete flag in the crid record.
Definition: ap_dbdef.c:9098
BOOLEAN DBDEF_SetLNBUSwitch(ADB_LNB_REC *lnb, U8BIT uswitch)
Sets the LNB uncommitted switch setting.
Definition: ap_dbdef.c:4303
Application database access functions.
Definition: ap_dbdef.h:662
void DBDEF_DeleteServiceRec(ADB_SERVICE_REC *s_ptr)
Deletes specified service record.
Definition: ap_dbdef.c:1791
ADB_FAVLIST_REC * DBDEF_FindFavouriteList(U8BIT list_id)
Return the favourite list with the given list id.
Definition: ap_dbdef.c:9432
BOOLEAN DBDEF_SetServiceShortName(ADB_SERVICE_REC *s_ptr, U8BIT *name)
Set or change the short name of a service.
Definition: ap_dbdef.c:6012
void DBDEF_SetTunedService(U8BIT path, ADB_SERVICE_REC *s_ptr)
Sets the currently tuned service.
Definition: ap_dbdef.c:8261
U8BIT * DBDEF_GetEventDescription(ADB_EVENT_REC *e_ptr)
Returns the short event description text of the event as a UTF-8 string. The returned string should b...
Definition: ap_dbdef.c:2243
ADB_FAVLIST_REC * DBDEF_GetNextFavouriteList(ADB_FAVLIST_REC *fav_list)
Returns the favourite list following the given item.
Definition: ap_dbdef.c:9407
Definition: stbllist.h:38
Definition: ap_dbdef.h:199
BOOLEAN DBDEF_SetLNBDiSEqCTone(ADB_LNB_REC *lnb, E_STB_DP_DISEQC_TONE diseqc_tone)
Sets the LNB DiSEqC tone setting.
Definition: ap_dbdef.c:4253
Header file - macros and function prototypes for public use.
ADB_SERVICE_REC * DBDEF_FindServiceRecByIds(ADB_SERVICE_REC *servp, U32BIT net_id, U32BIT onet_id, U32BIT tran_id, U32BIT serv_id)
Search for a service with the given IDs.
Definition: ap_dbdef.c:6312
U16BIT DBDEF_GetNumNetworks(void)
Returns the number of networks in ther service database.
Definition: ap_dbdef.c:4699
U8BIT * DBDEF_GetSecondaryAudioLang(void)
returns current secondary audio lang
Definition: ap_dbdef.c:8436