DVBCore  20.3.0
DVBCore Documentation
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  } u;
251 
252  U8BIT pat_version;
253  BOOLEAN sdt_received;
254  BOOLEAN sdt_version_changed;
255  U8BIT sdt_version;
256  ADB_PMT_VERSION_REC *pmt_version_list;
257  BOOLEAN has_fta_desc;
258  BOOLEAN do_not_scramble;
259  ADB_STRING *def_authority;
260  BOOLEAN searched;
261  BOOLEAN available;
263 
264 //--------------------------------------------------------
265 // Database structures - service, event and stream records
266 
267 typedef struct adb_audio_stream_data
268 {
269  U32BIT lang_code;
270  ADB_AUDIO_TYPE type;
271  E_STB_DP_AUDIO_MODE mode;
273 
275 {
276  U32BIT lang_code;
277  ADB_SUBTITLE_TYPE type;
278  U16BIT composition_page;
279  U16BIT ancillary_page;
281 
282 typedef struct adb_ttext_stream_data
283 {
284  U32BIT lang_code;
285  U8BIT type;
286  U8BIT magazine;
287  U8BIT page;
289 
290 typedef union adb_stream_data
291 {
292  ADB_AUDIO_STREAM_DATA audio;
293  ADB_SUBTITLE_STREAM_DATA subtitle;
294  ADB_TTEXT_STREAM_DATA ttext;
296 
297 typedef struct adb_stream_rec
298 {
299  struct adb_stream_rec *next;
300  ADB_STREAM_TYPE type;
301  U8BIT *tag_array;
302  U8BIT num_tags;
303  U16BIT pid;
304  BOOLEAN in_use;
305  ADB_STREAM_DATA data;
306  BOOLEAN has_ca_descriptor;
308 
309 typedef struct adb_event_desc
310 {
311  U8BIT *desc_data;
312  struct adb_event_desc *next;
314 
315 typedef struct adb_event_rec
316 {
317  struct adb_event_rec *next;
318  void *dba_rec;
319 
320  U16BIT event_id;
321  U32DHMS start;
322  U32DHMS duration;
323  U8BIT running_status;
324  BOOLEAN free_to_air;
325  U8BIT version;
326 
327  /* Keep values parsed from the content management descriptor that are used by DVBCore */
328  BOOLEAN has_content_management_desc;
329  BOOLEAN do_not_scramble;
330 
331  ADB_EVENT_DESC *desc_list_head;
332  ADB_EVENT_DESC *desc_list_tail;
333 } ADB_EVENT_REC;
334 
335 typedef struct adb_alt_serv_rec
336 {
337  struct adb_alt_serv_rec *next;
338  U16BIT onet_id;
339  U16BIT tran_id;
340  U16BIT serv_id;
341  U8BIT link_type;
343 
344 typedef enum
345 {
346  ICON_TYPE_PNG,
347  ICON_TYPE_JPEG
348 } E_ICON_TYPE;
349 
350 typedef struct adb_icon_image
351 {
352  struct adb_icon_image *next;
353  U8BIT icon_id;
354  BOOLEAN position_defined;
355  E_ICON_COORD_SYSTEM coord_system;
356  U16BIT x_pos;
357  U16BIT y_pos;
358  U16BIT width;
359  U16BIT height;
360  E_ICON_TYPE icon_type;
361  E_ICON_TRANSPORT_MODE transport_mode;
362  U8BIT *icon_url;
363  U32BIT data_len;
364  U8BIT *icon_data;
365  void (*destroy_func)(void *);
366  void *dsm_handle;
368 
369 typedef struct adb_rct_link_info
370 {
371  struct adb_rct_link_info *next;
372  BOOLEAN is_group_trailer;
373  U8BIT *uri_string;
374  BOOLEAN can_use_default_icon;
375  U8BIT icon_id;
376  ADB_STRING *promo_text[ACFG_NUM_DB_LANGUAGES];
377  ADB_STRING *event_name;
379 
380 typedef struct
381 {
382  U8BIT type;
383  U8BIT mode;
384  ADB_STRING *text;
386 
387 typedef struct adb_service_rec
388 {
389  LINK_LIST_PTR_BLK ptrs;
390  void *dba_rec;
391 
392  ADB_TRANSPORT_REC *transport;
393  ADB_SERVICE_TYPE serv_type;
394  U16BIT serv_id;
395  U16BIT serv_lcn;
396  U16BIT allocated_lcn;
397  U16BIT old_allocated_lcn;
398  ADB_STRING *name_str;
399  ADB_STRING *provider_str;
400  ADB_STRING *short_name_str;
401  ADB_STRING *short_name_array[ACFG_NUM_DB_LANGUAGES];
402  ADB_STRING *name_array[ACFG_NUM_DB_LANGUAGES][ADB_NUM_SERV_NAME_IDS];
403  ADB_STRING *provider_array[ACFG_NUM_DB_LANGUAGES];
404  ADB_GUIDANCE_DESC guidance[ACFG_NUM_DB_LANGUAGES];
405  ADB_STREAM_REC *stream_list;
406  ADB_ALT_SERV_REC *alt_serv_list;
407  U8BIT fav_groups;
408  BOOLEAN deleted;
409 
410  BOOLEAN sched_disabled;
411  BOOLEAN now_next_disabled;
412 
413  BOOLEAN eit_now_next_avail;
414  ADB_EVENT_REC *now_event;
415  ADB_EVENT_REC *next_event;
416 
417  BOOLEAN eit_sched_avail;
418  U16BIT num_events_in_schedule;
419  ADB_EVENT_REC *event_schedule;
420 
421  BOOLEAN pmt_received;
422 
423  U16BIT pcr_pid;
424  U16BIT video_pid;
425  U16BIT audio_pid;
426  U16BIT ad_pid;
427  U16BIT ttext_pid;
428  U8BIT ttext_mag;
429  U8BIT ttext_page;
430  U16BIT subtitle_pid;
431  U16BIT subtitle_cpage;
432  U16BIT subtitle_apage;
433  ADB_STREAM_TYPE video_type;
434  ADB_STREAM_TYPE audio_type;
435 
436  BOOLEAN reqd_audio_valid;
437  U32BIT reqd_audio_lang_code;
438  ADB_AUDIO_TYPE reqd_audio_type;
439  ADB_STREAM_TYPE reqd_stream_type;
440  U16BIT reqd_audio_pid;
441  BOOLEAN reqd_subtitle_valid;
442  U32BIT reqd_subtitle_lang_code;
443  ADB_SUBTITLE_TYPE reqd_subtitle_type;
444  BOOLEAN reqd_ttext_valid;
445  U32BIT reqd_ttext_lang_code;
446  ADB_TELETEXT_TYPE reqd_ttext_type;
447 
448  BOOLEAN found; /* Used during service search */
449  U8BIT running_status;
450  BOOLEAN not_running;
451  BOOLEAN unavailable;
452  BOOLEAN new_service;
453  BOOLEAN locked;
454  BOOLEAN hidden;
455  BOOLEAN selectable;
456  BOOLEAN lcn_editable;
457  BOOLEAN scrambled;
458 
459  BOOLEAN has_fta_desc;
460  BOOLEAN do_not_scramble;
461  U8BIT content_protection_level;
462 
463  SI_TARGET_REGION_DESC *target_region_list;
464 
465  ADB_STRING *def_authority;
466 
467  U16BIT rct_pid;
468  ADB_RCT_LINK_INFO *rct_link_list;
469  ADB_IMAGE_ICON *icon_list;
470 
471 #ifdef COMMON_INTERFACE
472  BOOLEAN sdt_received;
473  U8BIT *ci_protection_desc;
474  U32BIT ci_prot_last_update;
475 #endif
476  U8BIT *pmt_data;
477  U16BIT pmt_data_len;
478  U16BIT pmt_pid;
479  SI_LINKAGE_DESC_ENTRY *last_linkage_entry;
480  SI_LINKAGE_DESC_ENTRY *linkage_desc_list;
481  U16BIT num_linkage_entries;
482  SI_LCN_DESC *hd_lcn_desc;
483 
484  BOOLEAN has_ca_descriptor;
485 
486  /* Freesat specific values */
487  U16BIT freesat_id;
488  U16BIT region_id;
489 
490  U16BIT bat_pid;
491  U16BIT eit_pf_pid;
492  U16BIT eit_pf_plus_pid;
493  U16BIT eit_sched_pid;
494  U16BIT nit_pid;
495  U16BIT sdt_pid;
496  U16BIT tdt_pid;
497  U16BIT tot_pid;
498 #ifdef INTEGRATE_HBBTV
499  U16BIT ait_pid;
500 #endif
502 
503 
504 //--------------------------------------------------------
505 // Database structures - crid records
506 
507 typedef struct adb_crid_record
508 {
509  LINK_LIST_PTR_BLK ptrs;
510  void *dba_rec;
511 
512  U16BIT eit_date; /* The date the CRID was last seen in the EITs */
513  BOOLEAN series_flag; /* The CRID represents a series */
514  BOOLEAN recommended_flag; /* The CRID represents a recommended programme or series */
515  BOOLEAN do_not_delete; /* TRUE if any recordings created from this CRID are to be locked */
516  U32DHMS date_time; /* Date to be used when searching for a split event */
517  U16BIT serv_id; /* Service to be used when searching for a split event */
518  ADB_STRING *name_str; /* Programme name for series/recommendations */
519  ADB_STRING *crid_str; /* CRID string */
520 } ADB_CRID_REC;
521 
522 
523 //--------------------------------------------------------
524 // Database structures - favourite lists
525 
526 typedef struct adb_favserv_rec
527 {
528  LINK_LIST_PTR_BLK ptrs; /* prev/next service in favourite list */
529  void *dba_rec;
530 
531  ADB_SERVICE_REC *serv_ptr;
532  U8BIT list_id; /* Id of the fav list this service is in */
533  U16BIT index; /* Defines the position of this service in the list */
535 
536 typedef struct adb_favlist_rec
537 {
538  LINK_LIST_PTR_BLK ptrs; /* List of favourite lists */
539  void *dba_rec;
540 
541  U8BIT list_id; /* Unique id for a list */
542  U8BIT index; /* Defines the position of this list in the favourite lists */
543  U32BIT user_data; /* User defined value stored with the list */
544  ADB_STRING *name;
545  LINK_LIST_HEADER serv_list; /* List of service in this favourite list */
547 
548 //--------------------------------------------------------
549 // Database structures - timers
550 
551 typedef struct
552 {
553  BOOLEAN change_service;
554  U16BIT service_id;
555  U16BIT transport_id;
556  U16BIT orig_net_id;
557  BOOLEAN ramp_volume;
558 } ADB_ALARM_REC;
559 
560 typedef struct
561 {
562  U32DHMS duration;
563  BOOLEAN event_triggered;
564  U16BIT event_id;
565  U16BIT service_id;
566  U16BIT transport_id;
567  U16BIT orig_net_id;
568  U8BIT prog_crid[TMR_PVR_CRID_LEN_MAX];
569  U8BIT other_crid[TMR_PVR_CRID_LEN_MAX];
570  U16BIT disk_id;
571  BOOLEAN recommendation;
572  U16BIT notify_time;
573  BOOLEAN notified;
574  U8BIT path;
575  U32BIT recording_handle;
576  U8BIT additional_info[TMR_PVR_ADDINFO_LEN_MAX];
577  BOOLEAN has_start_padding;
578  S32BIT start_padding;
579  BOOLEAN has_end_padding;
580  S32BIT end_padding;
581  BOOLEAN do_not_delete;
582  BOOLEAN programme_started;
583  BOOLEAN programme_finished;
585 
586 typedef struct
587 {
588  LINK_LIST_PTR_BLK ptrs;
589  void *dba_rec;
590 
591  U32BIT handle;
592  E_TIMER_TYPE type;
593  U32DHMS start_time;
594  U8BIT name[TMR_MAX_NAME_LENGTH];
595  E_TIMER_FREQ frequency;
596 
597  BOOLEAN expired;
598  BOOLEAN starting;
599  BOOLEAN started;
600  BOOLEAN selected;
601  BOOLEAN missed;
602  union
603  {
604  ADB_ALARM_REC alarm;
605  ADB_PVR_RECORD_REC record;
606  } u;
607 } ADB_TIMER_REC;
608 
609 #ifdef COMMON_INTERFACE
610 typedef struct
611 {
612  LINK_LIST_PTR_BLK ptrs;
613  void *dba_rec;
614 
615  U32BIT cicam_identifier;
616  U32BIT timer_handle;
617 } ADB_CICAM_TIMER_REC;
618 #endif
619 
620 /* Internal structure used to pass events to an application.
621  * The application handles these as void* handles */
622 typedef struct s_event
623 {
624  void *serv_ptr;
625  U16BIT event_id;
626 } S_EVENT;
627 
628 
629 //---Global Function prototypes for public use---------------------------------
630 
634 void DBDEF_Initialise(void);
635 
639 void DBDEF_RequestAccess(void);
640 
644 void DBDEF_ReleaseAccess(void);
645 
646 BOOLEAN DBDEF_LoadDatabase(U8BIT *db_pathname);
647 void DBDEF_DeleteAllRecords(void);
648 BOOLEAN DBDEF_SaveDatabase(void);
649 
650 void DBDEF_DeleteRecordsForTunerType(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite);
651 
657 
659 void DBDEF_DeleteImageIcons(ADB_IMAGE_ICON *icon_list);
660 
664 void DBDEF_SortServicesByLcn(void);
665 
666 BOOLEAN DBDEF_AllocateLcns(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN assign_lcns);
667 BOOLEAN DBDEF_AllocateLcnsDefault(E_STB_DP_SIGNAL_TYPE tuner_type);
668 #ifdef COUNTRY_UK
669 BOOLEAN DBDEF_AllocateLcnsUK(E_STB_DP_SIGNAL_TYPE tuner_type);
670 #endif
671 #ifdef COUNTRY_FINLAND
672 BOOLEAN DBDEF_AllocateLcnsFinland(E_STB_DP_SIGNAL_TYPE tuner_type);
673 #endif
674 #ifdef COUNTRY_IRELAND
675 BOOLEAN DBDEF_AllocateLcnsIreland(E_STB_DP_SIGNAL_TYPE tuner_type);
676 #endif
677 
682 U16BIT DBDEF_GetNumLNBs(void);
683 
690 ADB_LNB_REC* DBDEF_AddLNB(E_STB_DP_LNB_TYPE type, ADB_STRING *name);
691 
698 BOOLEAN DBDEF_SetLNBPower(ADB_LNB_REC *lnb, E_STB_DP_LNB_POWER power);
699 
706 BOOLEAN DBDEF_SetLNB22k(ADB_LNB_REC *lnb, BOOLEAN is_22k);
707 
714 BOOLEAN DBDEF_SetLNB12V(ADB_LNB_REC *lnb, BOOLEAN is_12v);
715 
722 BOOLEAN DBDEF_SetLNBPulsePosition(ADB_LNB_REC *lnb, BOOLEAN is_pulse_posn);
723 
730 BOOLEAN DBDEF_SetLNBDiSEqCPosition(ADB_LNB_REC *lnb, BOOLEAN is_diseqc_posn);
731 
738 BOOLEAN DBDEF_SetLNBDiSEqCTone(ADB_LNB_REC *lnb, E_STB_DP_DISEQC_TONE diseqc_tone);
739 
746 BOOLEAN DBDEF_SetLNBCSwitch(ADB_LNB_REC *lnb, E_STB_DP_DISEQC_CSWITCH cswitch);
747 
754 BOOLEAN DBDEF_SetLNBUSwitch(ADB_LNB_REC *lnb, U8BIT uswitch);
755 
762 BOOLEAN DBDEF_SetLNBSmatv(ADB_LNB_REC *lnb, BOOLEAN is_smatv);
763 
770 BOOLEAN DBDEF_SetLNBRepeats(ADB_LNB_REC *lnb, U8BIT repeats);
771 
779 BOOLEAN DBDEF_SetLNBUnicable(ADB_LNB_REC *lnb, U32BIT inter_freq, U8BIT chan);
780 
788 
793 U16BIT DBDEF_GetNumSatellites(void);
794 
804 ADB_SATELLITE_REC* DBDEF_AddSatelliteRec(ADB_STRING *name_str, U16BIT dish_pos, U16BIT long_pos,
805  BOOLEAN east_west, ADB_LNB_REC *associated_lnb);
806 
814 
819 U16BIT DBDEF_GetNumLNBBands(void);
820 
827 ADB_LNB_BAND_REC* DBDEF_AddLNBBandRec(S_STB_DP_LNB_BAND *band_parameters, ADB_LNB_REC *associated_lnb);
828 
836 
842 
847 U16BIT DBDEF_GetNumNetworks(void);
848 
855 ADB_NETWORK_REC* DBDEF_AddNetworkRec(U16BIT net_id, ADB_SATELLITE_REC *satellite);
856 
862 
868 void DBDEF_SetNetworkName(ADB_NETWORK_REC *n_ptr, U8BIT *name);
869 
876 ADB_NETWORK_REC* DBDEF_FindNetworkRec(U16BIT net_id, ADB_SATELLITE_REC *satellite);
877 
885 
890 U16BIT DBDEF_GetNumTransports(void);
891 
899 
907 ADB_TRANSPORT_REC* DBDEF_AddTerrestrialTransportRec(U32BIT freq_hz, U8BIT plp_id,
908  ADB_NETWORK_REC *network);
909 ADB_TRANSPORT_REC* DBDEF_FindTerrestrialTransportRec(U32BIT freq_hz, U8BIT plp_id);
910 
918 ADB_TRANSPORT_REC* DBDEF_AddCableTransportRec(U32BIT freq_hz, U32BIT symbol_rate,
919  ADB_NETWORK_REC *network);
920 ADB_TRANSPORT_REC* DBDEF_FindCableTransportRec(U32BIT freq_hz, U32BIT symbol_rate);
921 
922 void DBDEF_SetCableTransportSymbolRate(ADB_TRANSPORT_REC *t_ptr, U16BIT symbol_rate);
923 void DBDEF_SetCableTransportMode(ADB_TRANSPORT_REC *t_ptr, E_STB_DP_CMODE cmode);
924 
935 ADB_TRANSPORT_REC* DBDEF_AddSatTransportRec(U32BIT freq_hz, U16BIT symbol_rate,
936  E_STB_DP_POLARITY polarity, BOOLEAN dvb_s2, E_STB_DP_MODULATION modulation,
937  ADB_NETWORK_REC *network);
938 
947 ADB_TRANSPORT_REC* DBDEF_FindSatTransportRec(U32BIT freq_hz, U16BIT symbol_rate,
948  E_STB_DP_POLARITY polarity, BOOLEAN dvb_s2, E_STB_DP_MODULATION modulation, void *satellite);
949 
950 #ifdef COMMON_INTERFACE
951 
956 ADB_TRANSPORT_REC* DBDEF_AddVirtualTransportRec(ADB_NETWORK_REC *network);
957 #endif
958 
969 void DBDEF_SetSatTransportTuningParams(ADB_TRANSPORT_REC *t_ptr, U32BIT freq_hz,
970  U16BIT symbol_rate, E_STB_DP_POLARITY polarity, BOOLEAN dvb_s2, E_STB_DP_MODULATION modulation,
971  ADB_NETWORK_REC *network);
972 
982  U32BIT onet_id, U32BIT tran_id);
983 
989 void DBDEF_SetTransportTransportId(ADB_TRANSPORT_REC *t_ptr, U16BIT tran_id);
990 
996 void DBDEF_SetTransportOrigNetworkId(ADB_TRANSPORT_REC *t_ptr, U16BIT orig_net_id);
997 
1005 void DBDEF_GetTransportAdditionalFrequencies(ADB_TRANSPORT_REC *t_ptr, U8BIT *num_freqs, U32BIT **freqs);
1006 
1012 
1014 
1019 U16BIT DBDEF_GetNumServices(void);
1020 
1028 
1036 
1044 ADB_SERVICE_REC* DBDEF_AddServiceRec(U16BIT serv_id, ADB_TRANSPORT_REC *t_ptr);
1045 
1054 
1062 BOOLEAN DBDEF_SetServiceName(ADB_SERVICE_REC *s_ptr, U8BIT *name);
1063 
1071 BOOLEAN DBDEF_SetServiceShortName(ADB_SERVICE_REC *s_ptr, U8BIT *name);
1072 
1080 BOOLEAN DBDEF_SetServiceProviderName(ADB_SERVICE_REC *s_ptr, U8BIT *name);
1081 
1088 BOOLEAN DBDEF_SetServiceType(ADB_SERVICE_REC *s_ptr, ADB_SERVICE_TYPE serv_type);
1089 
1095 
1103 
1110 ADB_SERVICE_REC* DBDEF_FindServiceRec(U16BIT serv_id, ADB_TRANSPORT_REC *t_ptr);
1111 
1121 ADB_SERVICE_REC* DBDEF_FindServiceRecByIds(ADB_SERVICE_REC *servp, U32BIT net_id, U32BIT onet_id,
1122  U32BIT tran_id, U32BIT serv_id);
1123 
1132 ADB_SERVICE_REC* DBDEF_FindServiceRecByLcn(U16BIT lcn, ADB_TRANSPORT_REC *t_ptr, BOOLEAN allocated_lcn);
1133 
1141 
1142 U16BIT DBDEF_GetReqdAudioPid(ADB_SERVICE_REC *s_ptr, E_STB_DP_AUDIO_MODE *audio_mode, ADB_STREAM_TYPE *audio_type);
1143 U16BIT DBDEF_GetReqdADPid(ADB_SERVICE_REC *s_ptr, E_STB_DP_AUDIO_MODE *ad_mode, ADB_STREAM_TYPE *ad_type,
1144  BOOLEAN *broadcast_mix);
1145 E_STREAM_MATCH_TYPE DBDEF_GetReqdTtextPid(ADB_SERVICE_REC *s_ptr, BOOLEAN for_subtitles, U16BIT *pid_ptr,
1146  U8BIT *magazine, U8BIT *page);
1147 E_STREAM_MATCH_TYPE DBDEF_GetReqdSubtitleParams(ADB_SERVICE_REC *s_ptr, U16BIT *pid_ptr,
1148  U16BIT *cpage_ptr, U16BIT *apage_ptr);
1149 U16BIT DBDEF_GetReqdVideoPid(ADB_SERVICE_REC *s_ptr, ADB_STREAM_TYPE *video_type);
1150 
1159 ADB_STRING* DBDEF_GetServiceName(ADB_SERVICE_REC *s_ptr, BOOLEAN short_name, BOOLEAN pref_name);
1160 
1167 
1173 void DBDEF_SetServiceDeletedFlag(ADB_SERVICE_REC *s_ptr, BOOLEAN deleted);
1174 
1181 U16BIT DBDEF_GetNumDeletedServices(E_STB_DP_SIGNAL_TYPE tuner_type);
1182 
1191 U16BIT DBDEF_GetDeletedServiceList(E_STB_DP_SIGNAL_TYPE tuner_type, void ***slist_ptr);
1192 
1193 BOOLEAN DBDEF_AddAnalogService(void);
1194 void DBDEF_SetAnalogServiceName(ADB_SERVICE_REC *s_ptr, U8BIT *new_name, U8BIT new_len);
1195 void DBDEF_SetServicePmtPid(ADB_SERVICE_REC *s_ptr, U16BIT pmt_pid);
1197 
1203 void DBDEF_SetServiceFavGroups(ADB_SERVICE_REC *s_ptr, U8BIT groups);
1204 
1212 
1221 ADB_EVENT_DESC* DBDEF_FindEventDescriptor(ADB_EVENT_DESC *start_desc, U8BIT desc_tag,
1222  U32BIT private_data_specifier);
1223 
1230 U8BIT* DBDEF_GetEventName(ADB_EVENT_REC *e_ptr);
1231 
1239 
1247 
1255 
1267 U8BIT* DBDEF_GetEventGuidance(ADB_EVENT_REC *e_ptr, ADB_SERVICE_REC *s_ptr, U8BIT *type, U8BIT *mode);
1268 
1277 U8BIT* DBDEF_GetServiceGuidanceData(ADB_SERVICE_REC *s_ptr, U8BIT *type, U8BIT *mode);
1278 
1286 
1293 
1300 
1314 BOOLEAN DBDEF_GetEventHDLinkageInfo(ADB_EVENT_REC *e_ptr, BOOLEAN verify_event, BOOLEAN only_simulcast,
1315  ADB_SERVICE_REC **hd_serv_ptr, ADB_EVENT_REC **hd_event_ptr);
1316 
1326 
1333 
1340 ADB_EVENT_CONTENT DBDEF_GetEventGenre(ADB_EVENT_REC *e_ptr, ADB_SERVICE_REC *s_ptr);
1341 
1348 U8BIT* DBDEF_GetEventContentData(ADB_EVENT_REC *e_ptr, U8BIT *p_len);
1349 
1360 U8BIT* DBDEF_GetEventCrid(ADB_SERVICE_REC *serv_ptr, ADB_EVENT_REC *e_ptr, U8BIT crid_type, U8BIT index);
1361 
1369 U8BIT DBDEF_NumberOfCridsOfType(ADB_EVENT_REC *e_ptr, U8BIT crid_type);
1370 
1378 U8BIT* DBDEF_GetFullCrid(ADB_SERVICE_REC *serv_ptr, U8BIT *event_str);
1379 
1387 
1393 
1394 void DBDEF_SetTunedNetwork(U8BIT path, ADB_NETWORK_REC *n_ptr);
1396 
1397 void DBDEF_SetTunedTransport(U8BIT path, ADB_TRANSPORT_REC *t_ptr);
1399 void DBDEF_SetTunedService(U8BIT path, ADB_SERVICE_REC *s_ptr);
1401 
1402 void DBDEF_SetTextLang(U8BIT *lang_ids);
1403 U8BIT* DBDEF_GetTextLang(void);
1404 void DBDEF_SetSecondaryTextLang(U8BIT *lang_ids);
1405 U8BIT* DBDEF_GetSecondaryTextLang(void);
1406 void DBDEF_SetAudioLang(U8BIT *lang_ids);
1407 U8BIT* DBDEF_GetAudioLang(void);
1408 U8BIT* DBDEF_GetSecondaryAudioLang(void);
1409 void DBDEF_SetSecondaryAudioLang(U8BIT *lang_ids);
1410 
1419 void DBDEF_TidyDatabaseAfterSearch(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite,
1420  BOOLEAN search_completed, BOOLEAN manual);
1421 
1422 void DBDEF_TidyDatabaseNordig(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN search_completed, BOOLEAN manual);
1423 void DBDEF_TidyDatabaseUK(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN search_completed, BOOLEAN manual);
1424 void DBDEF_TidyDatabaseSatUK(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN search_completed, BOOLEAN manual);
1425 void DBDEF_TidyDatabaseDefault(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN search_completed, BOOLEAN manual);
1426 
1434 void DBDEF_RemoveEmptyTransports(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite);
1435 
1436 void DBDEF_DeleteLinkageDescripterArray(SI_LINKAGE_DESC_ENTRY *list_ptr);
1437 
1445 ADB_CRID_REC* DBDEF_AddCridRecord(U8BIT *crid, BOOLEAN series, BOOLEAN recommended);
1446 
1452 void DBDEF_SetCridDateTime(ADB_CRID_REC *c_ptr, U32DHMS date_time);
1453 
1459 void DBDEF_SetCridService(ADB_CRID_REC *c_ptr, U16BIT serv_id);
1460 
1466 void DBDEF_SetCridProgrammeName(ADB_CRID_REC *c_ptr, U8BIT *prog_name);
1467 
1473 void DBDEF_SetCridDoNotDelete(ADB_CRID_REC *c_ptr, BOOLEAN do_not_delete);
1474 
1480 
1486 
1491 U16BIT DBDEF_GetNumCridRecords(void);
1492 
1500 
1506 BOOLEAN DBDEF_IsValidCridRecord(ADB_CRID_REC *c_ptr);
1507 
1512 U16BIT DBDEF_GetNumFavouriteLists(void);
1513 
1527 ADB_FAVLIST_REC* DBDEF_AddFavouriteList(U8BIT list_id, U8BIT *name, U32BIT user_data, S16BIT index);
1528 
1535 
1542 
1548 void DBDEF_SetFavouriteListUserData(ADB_FAVLIST_REC *fav_list, U32BIT user_data);
1549 
1557 void DBDEF_MoveFavouriteListTo(ADB_FAVLIST_REC *fav_list, S16BIT index);
1558 
1564 
1571 
1581  ADB_SERVICE_REC *serv_ptr, S16BIT index);
1582 
1590 
1598  ADB_FAVSERV_REC *fav_serv);
1599 
1607  ADB_FAVSERV_REC *fav_serv);
1608 
1618  S16BIT index);
1619 
1626 
1632 
1639 void DBDEF_SetFavouriteListName(ADB_FAVLIST_REC *f_ptr, U8BIT *name);
1640 
1651 BOOLEAN DBDEF_ServiceForTunerType(ADB_SERVICE_REC *s_ptr, E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite);
1652 
1663 BOOLEAN DBDEF_TransportForTunerType(ADB_TRANSPORT_REC *t_ptr, E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite);
1664 
1670 ADB_TIMER_REC* DBDEF_AddTimerRec(BOOLEAN store_in_nvm);
1671 
1677 ADB_TIMER_REC* DBDEF_FindTimerRec(U32BIT handle);
1678 
1686 
1691 void DBDEF_SortTimers(BOOLEAN date_time_order);
1692 
1697 void DBDEF_DeleteTimerRec(ADB_TIMER_REC *timer);
1698 
1702 U16BIT DBDEF_GetNumProfiles(void);
1703 
1711 U16BIT DBDEF_GetProfileList(void ***profile_list, U16BIT *active_profile);
1712 
1718 void DBDEF_ReleaseProfileList(void **profile_list, U16BIT num_profiles);
1719 
1725 BOOLEAN DBDEF_IsActiveProfile(ADB_NETWORK_REC *profile);
1726 
1731 ADB_PROFILE_TYPE DBDEF_GetCurrentProfileType(void);
1732 
1737 void DBDEF_SelectBroadcastProfile(void);
1738 
1744 void DBDEF_PushBroadcastProfile(void);
1745 
1746 #ifdef COMMON_INTERFACE
1747 
1754 void DBDEF_SelectCIPlusProfile(U16BIT onet_id, U32BIT cicam_id);
1755 
1762 void DBDEF_PushCIPlusProfile(U16BIT onet_id, U32BIT cicam_id);
1763 #endif
1764 
1768 void DBDEF_PopProfile(void);
1769 
1776 BOOLEAN DBDEF_ServiceInProfile(ADB_SERVICE_REC *s_ptr);
1777 
1785 
1792 BOOLEAN DBDEF_NetworkInProfile(ADB_NETWORK_REC *n_ptr);
1793 
1794 #ifdef COMMON_INTERFACE
1795 ADB_NETWORK_REC* DBDEF_FindNetworkForCIPlusProfile(U16BIT cicam_onet_id, U32BIT cicam_identifier);
1796 ADB_NETWORK_REC* DBDEF_FindNetworkForCIPlusModule(U32BIT module);
1797 
1802 ADB_NETWORK_REC *DBDEF_GetCurrentCIPlusProfile(void);
1803 
1810 ADB_CICAM_TIMER_REC* DBDEF_AddCicamTimer(U32BIT cicam_id, U32BIT timer_handle);
1811 
1816 void DBDEF_DeleteCicamTimerRec(ADB_CICAM_TIMER_REC *cicam_timer_ptr);
1817 
1824 ADB_CICAM_TIMER_REC* DBDEF_GetNextCicamTimerRec(ADB_CICAM_TIMER_REC *cicam_timer_ptr);
1825 
1831 ADB_CICAM_TIMER_REC* DBDEF_FindCicamTimer(U32BIT cicam_id);
1832 
1838 ADB_CICAM_TIMER_REC* DBDEF_FindCicamTimerByHandle(U32BIT handle);
1839 
1840 #endif
1841 
1848 
1849 #ifdef DEBUG_PRINT_DATABASE
1850 void DBDEF_PrintAllRecords(void);
1851 #endif
1852 
1861 ADB_STRING* DBDEF_MakeString(U32BIT lang_code, U8BIT *str_ptr, U16BIT nbytes);
1862 
1869 
1879 
1884 void DBDEF_ReleaseString(ADB_STRING *string);
1885 
1886 #endif // _AP_DBDEF_H
1887 
1888 //*****************************************************************************
1889 // End of file
1890 //*****************************************************************************
1891 
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:6586
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:2732
void DBDEF_SetAudioLang(U8BIT *lang_ids)
sets current audio lang
Definition: ap_dbdef.c:8187
U16BIT DBDEF_GetNumServices(void)
Returns the total number of services.
Definition: ap_dbdef.c:5506
void DBDEF_SetTunedNetwork(U8BIT path, ADB_NETWORK_REC *n_ptr)
sets the currently tuned network
Definition: ap_dbdef.c:7996
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:3440
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:5408
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:10348
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:3948
U16BIT DBDEF_GetNumProfiles(void)
Returns the number of network profiles.
Definition: ap_dbdef.c:9988
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:9007
void DBDEF_SortTimers(BOOLEAN date_time_order)
Sorts timer list into date/time or alphabetical order.
Definition: ap_dbdef.c:9946
void DBDEF_SetNetworkName(ADB_NETWORK_REC *n_ptr, U8BIT *name)
Set or change the name of the given network.
Definition: ap_dbdef.c:4708
BOOLEAN DBDEF_SetLNBUnicable(ADB_LNB_REC *lnb, U32BIT inter_freq, U8BIT chan)
Sets the LNB Unicable settings.
Definition: ap_dbdef.c:4311
void DBDEF_ReleaseProfileList(void **profile_list, U16BIT num_profiles)
Frees a profile list returned by DBDEF_GetProfileList.
Definition: ap_dbdef.c:10104
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:6083
void DBDEF_DeleteNetworkRec(ADB_NETWORK_REC *n_ptr)
Deletes specified network record.
Definition: ap_dbdef.c:4696
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:3406
U8BIT * DBDEF_GetSecondaryTextLang(void)
returns array of secondary text langs
Definition: ap_dbdef.c:8169
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:8793
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:8920
ADB_NETWORK_REC * DBDEF_GetTunedNetwork(U8BIT path)
gets the currently tuned network
Definition: ap_dbdef.c:8015
void DBDEF_SetServicePmtPid(ADB_SERVICE_REC *s_ptr, U16BIT pmt_pid)
Updates the pmt pid.
Definition: ap_dbdef.c:6959
U8BIT * DBDEF_GetAudioLang(void)
returns current audio lang
Definition: ap_dbdef.c:8223
void DBDEF_SetTextLang(U8BIT *lang_ids)
sets current text lang
Definition: ap_dbdef.c:8115
ADB_TRANSPORT_REC * DBDEF_GetTunedTransport(U8BIT path)
gets the currently tuned transport
Definition: ap_dbdef.c:8053
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:9922
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:6404
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:10312
void DBDEF_SetServiceDeletedFlag(ADB_SERVICE_REC *s_ptr, BOOLEAN deleted)
Marks whether a service is deleted or not.
Definition: ap_dbdef.c:6721
BOOLEAN DBDEF_SetLNB12V(ADB_LNB_REC *lnb, BOOLEAN is_12v)
Sets the LNB 12V setting.
Definition: ap_dbdef.c:4110
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:2918
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:5271
Application configuration.
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:9833
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:5598
ADB_TIMER_REC * DBDEF_FindTimerRec(U32BIT handle)
Returns the timer record with the given timer handle.
Definition: ap_dbdef.c:9899
void DBDEF_RequestAccess(void)
Requests access to the app's database.
Definition: ap_dbdef.c:235
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:5566
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:2055
void DBDEF_DeleteRCTLinks(ADB_RCT_LINK_INFO *links)
Frees the given list of RCT links.
Definition: ap_dbdef.c:3815
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:259
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:4587
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:10186
void DBDEF_SetCridService(ADB_CRID_REC *c_ptr, U16BIT serv_id)
Sets the service ID in the crid record.
Definition: ap_dbdef.c:8863
Structure representing the component information as found in the EIT component_descriptor.
Definition: ap_dbacc.h:238
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:9529
BOOLEAN DBDEF_SetLNBSmatv(ADB_LNB_REC *lnb, BOOLEAN is_smatv)
Sets the LNB SMATV setting.
Definition: ap_dbdef.c:4260
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:6119
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:10276
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:6531
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:9805
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:9775
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:6825
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:3700
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:9639
void DBDEF_DeleteAllServicesFromFavouriteList(ADB_FAVLIST_REC *fav_list)
Delete the all services from the given favourite list.
Definition: ap_dbdef.c:9673
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:4469
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:4378
U8BIT * DBDEF_GetTextLang(void)
returns array of current text langs
Definition: ap_dbdef.c:8133
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:9501
void DBDEF_ClearTableVersionHistory(ADB_TRANSPORT_REC *t_ptr)
Clears the version histories stored in the transport records.
Definition: ap_dbdef.c:5479
U16BIT DBDEF_GetNumSatellites(void)
Returns the number of satellite records in the database.
Definition: ap_dbdef.c:4362
ADB_NETWORK_REC * DBDEF_FindOrAddPrivateNetwork(void *satellite)
Find or add a private network, assigning an unused private network ID.
Definition: ap_dbdef.c:10603
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:5535
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:5040
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:2003
Application timer functions and defines.
U16BIT DBDEF_GetNumTransports(void)
Returns the number of transports in ther service database.
Definition: ap_dbdef.c:4829
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:8845
void DBDEF_DeleteLNBBandRec(ADB_LNB_BAND_REC *band_ptr)
Deletes an LNB band record from the database.
Definition: ap_dbdef.c:4611
void DBDEF_SetFavouriteListUserData(ADB_FAVLIST_REC *fav_list, U32BIT user_data)
Saves the given user data with a favourite list.
Definition: ap_dbdef.c:9263
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:5170
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:8332
BOOLEAN DBDEF_SetLNBDiSEqCPosition(ADB_LNB_REC *lnb, BOOLEAN is_diseqc_posn)
Sets the LNB DiSEqC position setting.
Definition: ap_dbdef.c:4160
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:4800
void DBDEF_SetSecondaryAudioLang(U8BIT *lang_ids)
sets the secondary audio lang
Definition: ap_dbdef.c:8205
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:2302
void DBDEF_DeleteStreamList(ADB_STREAM_REC *slist)
Deletes all records in a service stream list.
Definition: ap_dbdef.c:1941
U16BIT DBDEF_GetNumLNBBands(void)
Returns the number of LNB band records in the database.
Definition: ap_dbdef.c:4493
BOOLEAN DBDEF_SetServiceProviderName(ADB_SERVICE_REC *s_ptr, U8BIT *name)
Set or change the name of a service's provider.
Definition: ap_dbdef.c:5910
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:6472
void DBDEF_SetFavouriteListName(ADB_FAVLIST_REC *f_ptr, U8BIT *name)
Set or change the name of the given favourite list.
Definition: ap_dbdef.c:9706
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:8656
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:2879
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:9283
U8BIT DBDEF_GetEventParentalAge(ADB_EVENT_REC *e_ptr)
Returns the parental age value for the given event.
Definition: ap_dbdef.c:2938
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:3363
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:3587
void DBDEF_SetTransportTransportId(ADB_TRANSPORT_REC *t_ptr, U16BIT tran_id)
Sets the transport ID of the given transport.
Definition: ap_dbdef.c:5368
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:8562
U16BIT DBDEF_GetServicePmtPid(ADB_SERVICE_REC *s_ptr)
gets the PMT PID associated with the service
Definition: ap_dbdef.c:6980
BOOLEAN DBDEF_SetServiceName(ADB_SERVICE_REC *s_ptr, U8BIT *name)
Set or change the name of a service.
Definition: ap_dbdef.c:5783
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:5102
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:1588
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:9061
BOOLEAN DBDEF_SetLNB22k(ADB_LNB_REC *lnb, BOOLEAN is_22k)
Sets the LNB 22k setting.
Definition: ap_dbdef.c:4085
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:8982
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:9581
void DBDEF_ReleaseString(ADB_STRING *string)
Releases an ADB_STRING.
Definition: ap_dbdef.c:3983
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:3649
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:1967
ADB_SERVICE_REC * DBDEF_GetTunedService(U8BIT path)
Returns the currently tuned service on the given path.
Definition: ap_dbdef.c:8084
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:3515
void DBDEF_SortServicesByLcn(void)
Sort the full service list into ascending logical channel number order.
Definition: ap_dbdef.c:7017
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:4338
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:3298
void DBDEF_DeleteImageIcons(ADB_IMAGE_ICON *icon_list)
Frees given list of image icons and any associated memory.
Definition: ap_dbdef.c:3849
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:6298
BOOLEAN DBDEF_SetLNBPulsePosition(ADB_LNB_REC *lnb, BOOLEAN is_pulse_posn)
Sets the LNB pulse position setting.
Definition: ap_dbdef.c:4135
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:8745
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:5314
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:7038
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:2984
BOOLEAN DBDEF_SetLNBPower(ADB_LNB_REC *lnb, E_STB_DP_LNB_POWER power)
Sets the LNB power setting.
Definition: ap_dbdef.c:4060
void DBDEF_DeleteTimerRec(ADB_TIMER_REC *timer)
Deletes the given timer from the database.
Definition: ap_dbdef.c:9966
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:3890
void DBDEF_DeleteEventList(ADB_EVENT_REC *elist)
Deletes all events in the given list.
Definition: ap_dbdef.c:3754
void DBDEF_Initialise(void)
Initialises the database, preparing for it to be accessed.
Definition: ap_dbdef.c:201
void DBDEF_PopProfile(void)
Restores a previously pushed profile.
Definition: ap_dbdef.c:10253
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:1881
U16BIT DBDEF_GetNumLNBs(void)
Returns the number of LNB records in the database.
Definition: ap_dbdef.c:3999
System Wide Global Technical Data Type Definitions.
ADB_PROFILE_TYPE DBDEF_GetCurrentProfileType(void)
Returns the current profile type.
Definition: ap_dbdef.c:10163
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:2503
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:4874
U16BIT DBDEF_NumStreamsInList(ADB_STREAM_REC *slist)
Returns the number of stream records in the given list.
Definition: ap_dbdef.c:1860
void DBDEF_DeleteAltServList(ADB_ALT_SERV_REC *aslist)
Deletes all records in a service alternate service list.
Definition: ap_dbdef.c:3797
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:4285
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:6218
void DBDEF_ReleaseAccess(void)
Releases access to the app's database.
Definition: ap_dbdef.c:245
U16BIT DBDEF_GetNumCridRecords(void)
Returns the number of CRID records in the database.
Definition: ap_dbdef.c:8969
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:4644
U16BIT DBDEF_GetProfileList(void ***profile_list, U16BIT *active_profile)
Gets a list of the available network profiles.
Definition: ap_dbdef.c:10031
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:4982
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:4952
BOOLEAN DBDEF_SetLNBCSwitch(ADB_LNB_REC *lnb, E_STB_DP_DISEQC_CSWITCH cswitch)
Sets the LNB committed switch setting.
Definition: ap_dbdef.c:4210
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:8881
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:4012
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:8256
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:6903
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:9554
void DBDEF_SetTunedTransport(U8BIT path, ADB_TRANSPORT_REC *t_ptr)
sets the currently tuned transport
Definition: ap_dbdef.c:8034
void DBDEF_DeleteCridRecord(ADB_CRID_REC *c_ptr)
Deletes the given CRID record from the database.
Definition: ap_dbdef.c:8939
ADB_STRING * DBDEF_GetServiceProviderName(ADB_SERVICE_REC *s_ptr)
Returns a pointer to the service provider name.
Definition: ap_dbdef.c:6682
void DBDEF_SetServiceFavGroups(ADB_SERVICE_REC *s_ptr, U8BIT groups)
Sets the favourite groups for a service.
Definition: ap_dbdef.c:7001
U16BIT DBDEF_GetNumServicesInFavouriteList(ADB_FAVLIST_REC *fav_list)
Returns the number of services in the given favourite list.
Definition: ap_dbdef.c:9389
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:6352
void DBDEF_SetSecondaryTextLang(U8BIT *lang_ids)
sets secondary text lang
Definition: ap_dbdef.c:8151
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:4842
ADB_NETWORK_REC * DBDEF_FindNetworkRec(U16BIT net_id, ADB_SATELLITE_REC *satellite)
Finds the network with the given network ID.
Definition: ap_dbdef.c:4772
void DBDEF_DeleteFavouriteList(ADB_FAVLIST_REC *fav_list)
Deletes the given favourite list.
Definition: ap_dbdef.c:9339
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:4506
void DBDEF_DeleteTransportRec(ADB_TRANSPORT_REC *t_ptr)
Deletes the given transport from the service database.
Definition: ap_dbdef.c:5431
ADB_STRING * DBDEF_CopyString(ADB_STRING *src_str)
Creates a copy of the given ADB_STRING.
Definition: ap_dbdef.c:3922
void DBDEF_SaveServiceEventSchedule(ADB_SERVICE_REC *s_ptr)
Saves the event schedule of a service to the service database.
Definition: ap_dbdef.c:5994
U16BIT DBDEF_GetNumFavouriteLists(void)
Returns the number of favourite lists.
Definition: ap_dbdef.c:9041
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:6252
void DBDEF_SelectBroadcastProfile(void)
Sets the broadcast profile type for for all network, transport and service record accesses...
Definition: ap_dbdef.c:10174
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:8474
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:9404
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:6737
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:5387
void DBDEF_DeleteAllRecords(void)
Deletes all records in the database.
Definition: ap_dbdef.c:1486
U16BIT DBDEF_GetDeletedServiceList(E_STB_DP_SIGNAL_TYPE tuner_type, void ***slist_ptr)
Definition: ap_dbdef.c:6772
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:3042
BOOLEAN DBDEF_IsActiveProfile(ADB_NETWORK_REC *profile)
Is the given profile the currently active profile?
Definition: ap_dbdef.c:10122
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:5969
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:5663
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:8903
BOOLEAN DBDEF_SetLNBUSwitch(ADB_LNB_REC *lnb, U8BIT uswitch)
Sets the LNB uncommitted switch setting.
Definition: ap_dbdef.c:4235
Application database access functions.
void DBDEF_DeleteServiceRec(ADB_SERVICE_REC *s_ptr)
Deletes specified service record.
Definition: ap_dbdef.c:1754
ADB_FAVLIST_REC * DBDEF_FindFavouriteList(U8BIT list_id)
Return the favourite list with the given list id.
Definition: ap_dbdef.c:9237
BOOLEAN DBDEF_SetServiceShortName(ADB_SERVICE_REC *s_ptr, U8BIT *name)
Set or change the short name of a service.
Definition: ap_dbdef.c:5850
void DBDEF_SetTunedService(U8BIT path, ADB_SERVICE_REC *s_ptr)
Sets the currently tuned service.
Definition: ap_dbdef.c:8066
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:2175
ADB_FAVLIST_REC * DBDEF_GetNextFavouriteList(ADB_FAVLIST_REC *fav_list)
Returns the favourite list following the given item.
Definition: ap_dbdef.c:9212
BOOLEAN DBDEF_SetLNBDiSEqCTone(ADB_LNB_REC *lnb, E_STB_DP_DISEQC_TONE diseqc_tone)
Sets the LNB DiSEqC tone setting.
Definition: ap_dbdef.c:4185
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:6150
U16BIT DBDEF_GetNumNetworks(void)
Returns the number of networks in ther service database.
Definition: ap_dbdef.c:4631
U8BIT * DBDEF_GetSecondaryAudioLang(void)
returns current secondary audio lang
Definition: ap_dbdef.c:8241