59 #define CI_PROTECTION_DESC_TIME_LIMIT (7 * 24 * 60 * 60) 61 #define ADB_FAV_SERVICE_LIST_TYPE (ADB_SERVICE_LIST_FAV_GROUP_A | ADB_SERVICE_LIST_FAV_GROUP_B | \ 62 ADB_SERVICE_LIST_FAV_GROUP_C | ADB_SERVICE_LIST_FAV_GROUP_D) 64 #define FULL_SI_LINKAGE_TYPE 0x04 65 #define EPG_SERVICE_LINKAGE_TYPE 0x02 66 #define NORDIG_SIMULCAST_TYPE 0x82 71 #define DBG_DBACC(X) STB_SPDebugWrite X 87 ADB_AUDIO_TYPE audio_type;
88 ADB_SUBTITLE_TYPE subt_type;
89 ADB_STREAM_TYPE stream_type;
90 E_STB_DP_AUDIO_MODE audio_mode;
94 U16BIT composition_page;
95 U16BIT ancillary_page;
97 U8BIT num_tag_entries;
100 BOOLEAN has_ca_descriptor;
101 U8BIT component_type;
111 static BOOLEAN EventAtTime(
ADB_EVENT_REC *event_ptr, U32DHMS time);
112 static U8BIT* CopyString(
ADB_STRING *str_desc, BOOLEAN to_unicode);
114 static U8BIT* ExtractShortName(
ADB_STRING *str_desc);
130 static BOOLEAN CheckServiceInListType(
ADB_SERVICE_REC *s_ptr, U32BIT list_type, BOOLEAN inc_hidden,
131 BOOLEAN ignore_selectable);
133 static void GetServiceList(U32BIT list_type,
void ***slist_ptr, U16BIT *num_entries_ptr,
134 BOOLEAN show_hidden, BOOLEAN ignore_selectable);
136 static U8BIT* GetServiceNameByLangAndPrefId(
ADB_SERVICE_REC *s_ptr, U8BIT lang, U8BIT pref_name_id, BOOLEAN short_name);
141 static BOOLEAN GetServiceUnavailFlag(
void *s_ptr);
142 static BOOLEAN GetServiceNewFlag(
void *s_ptr);
145 static U8BIT* GetNetworkName(
ADB_NETWORK_REC *n_ptr, BOOLEAN short_name);
146 static U8BIT* GetNetworkNameByLang(
ADB_NETWORK_REC *n_ptr, U8BIT lang, BOOLEAN short_name);
147 static U8BIT* GetDefaultNetworkName(
ADB_NETWORK_REC *n_ptr, BOOLEAN short_name);
154 static U8BIT* GetEventCridType(
void *serv_ptr,
void *event_ptr, U8BIT crid_type, U8BIT index);
155 static U8BIT NumberOfCridsOfType(
S_EVENT *event_ptr, U8BIT crid_type);
157 static BOOLEAN IsStreamOfType(
ADB_STREAM_REC *stream_ptr, ADB_STREAM_LIST_TYPE stream_list_type);
158 static BOOLEAN HasNordigSimulcastService(
void *serv_ptr);
189 BOOLEAN retune, BOOLEAN manual_search)
214 while (s_ptr != NULL)
219 s_ptr->new_service = FALSE;
225 s_ptr->unavailable = TRUE;
234 while (t_ptr != NULL)
242 t_ptr->searched = FALSE;
247 t_ptr->available = FALSE;
255 if (satellite != NULL)
259 ver_rec = sat_ptr->bat_version_list;
260 while (ver_rec != NULL)
262 sat_ptr->bat_version_list = ver_rec->next;
264 ver_rec = sat_ptr->bat_version_list;
284 BOOLEAN search_completed, BOOLEAN clear_new_flags, BOOLEAN manual_search)
298 while (s_ptr != NULL)
300 s_ptr->new_service = FALSE;
302 if (s_ptr->unavailable)
307 if ((t_ptr = s_ptr->transport) != NULL)
309 if (!t_ptr->searched)
311 s_ptr->unavailable = FALSE;
317 s_ptr->unavailable = FALSE;
422 if (nptr->target_region_name_list != NULL)
425 nptr->target_region_name_list = NULL;
428 if (nptr->target_region_list != NULL)
431 nptr->target_region_list = NULL;
440 if ((tptr->sig_type == SIGNAL_COFDM) && (tptr->u.terr.target_region_list != NULL))
443 tptr->u.terr.target_region_list = NULL;
452 if (sptr->target_region_list != NULL)
455 sptr->target_region_list = NULL;
458 if (sptr->hd_lcn_desc != NULL)
461 sptr->hd_lcn_desc = NULL;
484 if (path != INVALID_RES_ID)
533 while (s_ptr != NULL)
564 #ifdef DEBUG_PRINT_DATABASE 568 void ADB_PrintDatabase(
void)
570 FUNCTION_START(ADB_PrintDatabase);
573 DBDEF_PrintAllRecords();
576 FUNCTION_FINISH(ADB_PrintDatabase);
592 if (name_list != NULL)
594 for (i = 0; i < num_names; i++)
639 name_str = settings->name;
655 else if (name != NULL)
706 settings->type = lnb->type;
707 settings->power = lnb->power;
708 settings->is_12v = lnb->is_12v;
709 settings->is_22k = lnb->is_22k;
710 settings->is_pulse_posn = lnb->is_pulse_posn;
711 settings->is_diseqc_posn = lnb->is_diseqc_posn;
712 settings->diseqc_tone = lnb->diseqc_tone;
713 settings->c_switch = lnb->c_switch;
714 settings->u_switch = lnb->u_switch;
715 settings->is_smatv = lnb->is_smatv;
716 settings->diseqc_repeats = lnb->diseqc_repeats;
717 settings->unicable_if = lnb->unicable_if;
718 settings->unicable_chan = lnb->unicable_chan;
719 settings->name = lnb->name->str_ptr;
810 if (band_ptr != NULL)
838 if (band_ptr != NULL)
872 while (band_ptr != NULL)
876 if (band_ptr->lnb == lnb_ptr)
881 band_ptr = next_band_ptr;
918 void*
ADB_AddSatellite(U8BIT *name_str, U16BIT dish_pos, U16BIT long_pos, BOOLEAN east_west,
971 if ((sat_ptr != NULL) && (sat->name != NULL))
973 name = sat->name->str_ptr;
1000 if (sat_ptr != NULL)
1027 if (sat_ptr != NULL)
1044 return (U16BIT)long_pos;
1058 if (sat_ptr != NULL)
1080 U16BIT num_networks;
1090 return(num_networks);
1117 for (i = 0; ((i < num_entries) && (n_ptr != NULL)); i++)
1119 nlist[i] = (
void *)n_ptr;
1131 *num_entries_ptr = num_entries;
1163 U8BIT **names_array;
1172 if (names_array != NULL)
1174 for (i = 0; i < num_entries; i++)
1176 names_array[i] = GetNetworkName((
ADB_NETWORK_REC *)(nlist[i]), short_names);
1187 return(names_array);
1209 if (nid_array != NULL)
1211 for (i = 0; i < num_entries; i++)
1263 name_str = GetNetworkNameByLang((
ADB_NETWORK_REC *)n_ptr, lang, FALSE);
1298 U8BIT num_countries;
1313 while (nptr != NULL)
1315 tptr = nptr->target_region_name_list;
1316 while (tptr != NULL)
1321 if (*code_array != NULL)
1323 for (i = 0; (i < num_countries) && !code_found; i++)
1325 if ((*code_array)[i] == tptr->country_code)
1334 new_array = (U32BIT *)
STB_AppGetMemory((num_countries + 1) *
sizeof(U32BIT));
1335 if (new_array != NULL)
1337 memcpy(new_array, *code_array, num_countries *
sizeof(U32BIT));
1341 *code_array = new_array;
1343 if (*code_array != NULL)
1345 (*code_array)[num_countries] = tptr->country_code;
1360 return(num_countries);
1391 while (nptr != NULL)
1393 tptr = nptr->target_region_name_list;
1394 while (tptr != NULL)
1396 if ((tptr->country_code == country_code) && (tptr->num_names > 0) &&
1397 (tptr->name_array != NULL))
1401 for (i = 0; i < tptr->num_names; i++)
1404 if (tptr->name_array[i].region_depth == 1)
1409 if (*code_array != NULL)
1411 for (j = 0; (j < num_regions) && !code_found; j++)
1413 if ((*code_array)[j] == tptr->name_array[i].primary_region_code)
1423 new_names = (U8BIT **)
STB_AppGetMemory((num_regions + 1) *
sizeof(U8BIT *));
1424 if ((new_codes != NULL) && (new_names != NULL))
1426 memcpy(new_codes, *code_array, num_regions *
sizeof(U8BIT));
1429 memcpy(new_names, *name_array, num_regions *
sizeof(U8BIT *));
1433 *code_array = new_codes;
1434 *name_array = (
void *)new_names;
1436 if ((*code_array != NULL) && (*name_array != NULL))
1438 (*code_array)[num_regions] = tptr->name_array[i].primary_region_code;
1439 (*name_array)[num_regions] = CopySIString(tptr->name_array[i].region_name);
1457 return(num_regions);
1472 U8BIT **code_array, U8BIT ***name_array)
1491 while (nptr != NULL)
1493 tptr = nptr->target_region_name_list;
1494 while (tptr != NULL)
1496 if ((tptr->country_code == country_code) && (tptr->num_names > 0) &&
1497 (tptr->name_array != NULL))
1501 for (i = 0; i < tptr->num_names; i++)
1504 if ((tptr->name_array[i].region_depth == 2) &&
1505 (tptr->name_array[i].primary_region_code = primary_region))
1510 if (*code_array != NULL)
1512 for (j = 0; (j < num_regions) && !code_found; j++)
1514 if ((*code_array)[j] == tptr->name_array[i].secondary_region_code)
1524 new_names = (U8BIT **)
STB_AppGetMemory((num_regions + 1) *
sizeof(U8BIT *));
1525 if ((new_codes != NULL) && (new_names != NULL))
1527 memcpy(new_codes, *code_array, num_regions *
sizeof(U8BIT));
1530 memcpy(new_names, *name_array, num_regions *
sizeof(U8BIT *));
1534 *code_array = new_codes;
1535 *name_array = (
void *)new_names;
1537 if ((*code_array != NULL) && (*name_array != NULL))
1539 (*code_array)[num_regions] = tptr->name_array[i].secondary_region_code;
1540 (*name_array)[num_regions] = CopySIString(tptr->name_array[i].region_name);
1558 return(num_regions);
1574 U8BIT secondary_region, U16BIT **code_array, U8BIT ***name_array)
1593 while (nptr != NULL)
1595 tptr = nptr->target_region_name_list;
1596 while (tptr != NULL)
1598 if ((tptr->country_code == country_code) && (tptr->num_names > 0) &&
1599 (tptr->name_array != NULL))
1603 for (i = 0; i < tptr->num_names; i++)
1606 if ((tptr->name_array[i].region_depth == 3) &&
1607 (tptr->name_array[i].primary_region_code = primary_region) &&
1608 (tptr->name_array[i].secondary_region_code = secondary_region))
1613 if (*code_array != NULL)
1615 for (j = 0; (j < num_regions) && !code_found; j++)
1617 if ((*code_array)[j] == tptr->name_array[i].tertiary_region_code)
1626 new_codes = (U16BIT *)
STB_AppGetMemory((num_regions + 1) *
sizeof(U16BIT));
1627 new_names = (U8BIT **)
STB_AppGetMemory((num_regions + 1) *
sizeof(U8BIT *));
1628 if ((new_codes != NULL) && (new_names != NULL))
1630 memcpy(new_codes, *code_array, num_regions *
sizeof(U16BIT));
1633 memcpy(new_names, *name_array, num_regions *
sizeof(U8BIT *));
1637 *code_array = new_codes;
1638 *name_array = (
void *)new_names;
1640 if ((*code_array != NULL) && (*name_array != NULL))
1642 (*code_array)[num_regions] = tptr->name_array[i].tertiary_region_code;
1643 (*name_array)[num_regions] = CopySIString(tptr->name_array[i].region_name);
1661 return(num_regions);
1712 U16BIT *num_entries_ptr)
1715 U16BIT max_no_entries;
1723 *num_entries_ptr = 0;
1734 for (i = 0; ((i < max_no_entries) && (t_ptr != NULL)); i++)
1736 if ((tuner_type == SIGNAL_NONE) || (t_ptr->sig_type == tuner_type))
1738 tlist[num_entries] = (
void *)t_ptr;
1747 *num_entries_ptr = num_entries;
1767 U16BIT max_no_entries;
1784 for (i = 0; ((i < max_no_entries) && (t_ptr != NULL)); i++)
1787 if ((t_ptr->network != NULL) && (t_ptr->network == n_ptr))
1789 tlist[num_entries] = (
void *)t_ptr;
1795 if (num_entries == 0)
1805 *num_entries_ptr = num_entries;
1818 U16BIT num_transports;
1828 return(num_transports);
1840 USE_UNWANTED_PARAM(num_transports);
1859 U8BIT **names_array;
1868 if (names_array != NULL)
1870 for (i = 0; i < num_entries; i++)
1883 return(names_array);
1905 if (tid_array != NULL)
1907 for (i = 0; i < num_entries; i++)
1935 U32BIT *tuned_signal_strength_array;
1943 tuned_signal_strength_array =
STB_AppGetMemory(num_entries *
sizeof(U32BIT));
1944 if (tuned_signal_strength_array != NULL)
1946 for (i = 0; i < num_entries; i++)
1948 tuned_signal_strength_array[i] = (U32BIT)GetTransportTunedStrength((
ADB_TRANSPORT_REC *)(tlist[i]));
1955 tuned_signal_strength_array = NULL;
1960 return(tuned_signal_strength_array);
1974 U32BIT *orig_network_array;
1983 if (orig_network_array != NULL)
1985 for (i = 0; i < num_entries; i++)
1987 orig_network_array[i] = (U32BIT)GetTransportOriginalNetworkId((
ADB_TRANSPORT_REC *)(tlist[i]));
1994 orig_network_array = NULL;
1999 return(orig_network_array);
2021 if (freq_array != NULL)
2023 for (i = 0; i < num_entries; i++)
2055 U32BIT *bwidth_array;
2064 if (bwidth_array != NULL)
2066 for (i = 0; i < num_entries; i++)
2075 bwidth_array = NULL;
2080 return(bwidth_array);
2096 U32BIT *offset_array;
2105 if (offset_array != NULL)
2107 for (i = 0; i < num_entries; i++)
2116 offset_array = NULL;
2121 return(offset_array);
2137 U8BIT **constellation_array;
2146 if (constellation_array != NULL)
2148 for (i = 0; i < num_entries; i++)
2150 constellation_array[i] = GetTransportConstellationString((
ADB_TRANSPORT_REC *)(tlist[i]));
2157 constellation_array = NULL;
2161 return(constellation_array);
2177 U8BIT **hierarchy_array;
2186 if (hierarchy_array != NULL)
2188 for (i = 0; i < num_entries; i++)
2190 hierarchy_array[i] = GetTransportHierarchyString((
ADB_TRANSPORT_REC *)(tlist[i]));
2197 hierarchy_array = NULL;
2202 return(hierarchy_array);
2263 trans_ptr->searched = TRUE;
2264 trans_ptr->signal_level_at_search = 0;
2279 E_STB_DP_SIGNAL_TYPE stype;
2290 stype = SIGNAL_NONE;
2307 U8BIT *name_str_ptr;
2317 return(name_str_ptr);
2347 U8BIT tuned_signal_strength;
2357 return(tuned_signal_strength);
2367 U8BIT tuned_signal_quality;
2377 return(tuned_signal_quality);
2387 U16BIT orig_network_id;
2397 return(orig_network_id);
2418 n_ptr = trans->network;
2475 E_STB_DP_TMODE mode;
2480 mode = MODE_COFDM_UNDEFINED;
2487 if (trans->sig_type == SIGNAL_COFDM)
2489 mode = trans->u.terr.tmode;
2526 E_STB_TUNE_TCONST constellation;
2531 constellation = TUNE_TCONST_UNDEFINED;
2538 if (trans->sig_type == SIGNAL_COFDM)
2540 constellation = trans->u.terr.constellation;
2547 return(constellation);
2557 E_STB_TUNE_THIERARCHY hierarchy;
2562 hierarchy = TUNE_THIERARCHY_UNDEFINED;
2569 if (trans->sig_type == SIGNAL_COFDM)
2571 hierarchy = trans->u.terr.hierarchy;
2588 E_STB_TUNE_TCODERATE coderate;
2593 coderate = TUNE_TCODERATE_UNDEFINED;
2600 if (trans->sig_type == SIGNAL_COFDM)
2602 coderate = trans->u.terr.lp_code_rate;
2619 E_STB_TUNE_TCODERATE coderate;
2624 coderate = TUNE_TCODERATE_UNDEFINED;
2631 if (trans->sig_type == SIGNAL_COFDM)
2633 coderate = trans->u.terr.hp_code_rate;
2650 E_STB_TUNE_TGUARDINT guard_int;
2655 guard_int = TUNE_TGUARDINT_UNDEFINED;
2662 if (trans->sig_type == SIGNAL_COFDM)
2664 guard_int = trans->u.terr.guard_int;
2681 E_STB_DP_CMODE mode;
2686 mode = MODE_QAM_AUTO;
2693 if (trans->sig_type == SIGNAL_QAM)
2695 mode = trans->u.cab.cmode;
2724 if (trans->sig_type == SIGNAL_QAM)
2726 sym_rate = (U16BIT)trans->u.cab.symbol_rate;
2755 if (trans->sig_type == SIGNAL_QPSK)
2757 sym_rate = (U16BIT)trans->u.sat.symbol_rate;
2777 E_STB_DP_TMODE *mode, E_STB_DP_TBWIDTH *bwidth, U8BIT *plp_id)
2789 *terr_type = trans_rec->u.terr.terr_type;
2790 *freq_hz = trans_rec->frequency;
2791 *mode = trans_rec->u.terr.tmode;
2792 *bwidth = trans_rec->u.terr.bwidth;
2794 if (trans_rec->u.terr.terr_type == TERR_TYPE_DVBT2)
2796 *plp_id = trans_rec->u.terr.plp_id;
2805 *terr_type = TERR_TYPE_UNKNOWN;
2807 *mode = MODE_COFDM_UNDEFINED;
2808 *bwidth = TBWIDTH_8MHZ;
2825 E_STB_DP_ANALOG_VIDEO_TYPE *vtype)
2841 *vtype = ANLG_VIDEO_PAL_I;
2869 *freq_hz = trans_rec->frequency;
2870 *mode = trans_rec->u.cab.cmode;
2871 *symrate = (U16BIT)trans_rec->u.cab.symbol_rate;
2876 *mode = MODE_QAM_AUTO;
2896 U16BIT *symrate, E_STB_DP_FEC *fec, BOOLEAN *dvb_s2, E_STB_DP_MODULATION *modulation)
2908 *freq_hz = trans_rec->frequency;
2909 *polarity = trans_rec->u.sat.polarity;
2910 *symrate = trans_rec->u.sat.symbol_rate;
2911 *fec = trans_rec->u.sat.fec_code;
2912 *dvb_s2 = trans_rec->u.sat.dvb_s2;
2913 *modulation = trans_rec->u.sat.modulation;
2918 *polarity = POLARITY_HORIZONTAL;
2920 *fec = FEC_AUTOMATIC;
2922 *modulation = MOD_QPSK;
2950 sat_ptr = n_ptr->satellite;
3035 BOOLEAN ADB_AddAnalogService(
void)
3039 FUNCTION_START(ADB_AddAnalogService);
3045 FUNCTION_FINISH(ADB_AddAnalogService);
3064 SI_DELIVERY_SYS_DESC_TYPE dsd_type;
3071 if (service_id != 0 && service_id != ADB_INVALID_DVB_ID &&
3078 case SI_DEL_SYS_DESC_TYPE_TERR:
3080 if (dsd->terr.is_t2)
3082 if ((dsd->terr.u.t2.num_cells > 0) &&
3083 (dsd->terr.u.t2.cell[0].num_freqs > 0))
3101 case SI_DEL_SYS_DESC_TYPE_CABLE:
3104 dsd->cable.symbol_rate)) == NULL)
3111 case SI_DEL_SYS_DESC_TYPE_SAT:
3114 dsd->sat.polarity, dsd->sat.dvb_s2, dsd->sat.modulation, NULL)) == NULL)
3117 dsd->sat.polarity, dsd->sat.dvb_s2, dsd->sat.modulation, NULL);
3133 t_ptr->tran_id, service_id);
3141 s_ptr->hidden = TRUE;
3144 s_ptr->selectable = FALSE;
3145 DBA_SetFieldValue(s_ptr->dba_rec, DBA_FIELD_SERV_SELECTABLE, s_ptr->selectable);
3147 s_ptr->serv_type = ADB_SERVICE_TYPE_DSD;
3160 return((
void *)s_ptr);
3212 if ((list_type & ADB_SERVICE_LIST_FAV_LIST) != 0)
3222 while (s_ptr != NULL)
3224 if (CheckServiceInListType(s_ptr, list_type, inc_hidden, FALSE) == TRUE)
3253 GetServiceList(list_type, slist_ptr, num_entries_ptr, FALSE, FALSE);
3271 BOOLEAN ignore_selectable)
3275 GetServiceList(list_type, slist_ptr, num_entries_ptr, TRUE, ignore_selectable);
3288 U16BIT num_services;
3298 return(num_services);
3311 U16BIT num_services;
3321 return(num_services);
3335 U16BIT max_no_entries;
3352 for (i = 0; ((i < max_no_entries) && (s_ptr != NULL)); i++)
3354 if (s_ptr->transport == t_ptr)
3356 slist[num_entries] = (
void *)s_ptr;
3362 if (num_entries == 0)
3372 *num_entries_ptr = num_entries;
3391 U16BIT max_no_entries;
3409 for (i = 0; ((i < max_no_entries) && (s_ptr != NULL)); i++)
3411 t_ptr = s_ptr->transport;
3414 if (t_ptr->network == n_ptr)
3416 slist[num_entries] = (
void *)s_ptr;
3423 if (num_entries == 0)
3433 *num_entries_ptr = num_entries;
3451 U16BIT max_no_entries;
3468 for (i = 0; ((i < max_no_entries) && (s_ptr != NULL)); i++)
3470 if (s_ptr->unavailable == TRUE)
3472 slist[num_entries] = (
void *)s_ptr;
3478 if (num_entries == 0)
3488 *num_entries_ptr = num_entries;
3506 U16BIT max_no_entries;
3523 for (i = 0; ((i < max_no_entries) && (s_ptr != NULL)); i++)
3527 slist[num_entries] = (
void *)s_ptr;
3533 if (num_entries == 0)
3543 *num_entries_ptr = num_entries;
3560 USE_UNWANTED_PARAM(num_servs);
3579 void ***locked_slist_ptr, U16BIT *locked_num_entries_ptr)
3582 U16BIT new_num_entries;
3593 new_num_entries = 0;
3594 if (new_slist != NULL)
3596 for (i = 0; i < num_entries; i++)
3603 new_slist[new_num_entries] = (
void *)s_ptr;
3610 if (new_num_entries == 0)
3617 *locked_slist_ptr = new_slist;
3618 *locked_num_entries_ptr = new_num_entries;
3643 for (i = 0; i < num_entries - 1; i++)
3645 for (j = i + 1; j < num_entries; j++)
3662 slist[i] = slist[j];
3688 while (!retval && (s_ptr != NULL))
3690 if (s_ptr == serv_ptr)
3715 E_STB_DP_SIGNAL_TYPE result;
3720 result = SIGNAL_NONE;
3727 result = t_ptr->sig_type;
3728 switch (t_ptr->sig_type)
3732 *is_sig2 = t_ptr->u.sat.dvb_s2;
3737 *is_sig2 = (t_ptr->u.terr.terr_type == TERR_TYPE_DVBT2)? TRUE : FALSE;
3782 if ((list_type & ADB_SERVICE_LIST_FAV_LIST) != 0)
3792 s_ptr = fav_serv->serv_ptr;
3801 while (s_ptr != NULL)
3803 if (CheckServiceInListType(s_ptr, list_type, FALSE, FALSE) == TRUE)
3807 if (HasNordigSimulcastService(s_ptr) == FALSE)
3818 if ((list_type & ADB_SERVICE_LIST_FAV_LIST) != 0)
3822 s_ptr = fav_serv->serv_ptr;
3839 return((
void *)s_ptr);
3865 if ((list_type & ADB_SERVICE_LIST_FAV_LIST) != 0)
3875 s_ptr = fav_serv->serv_ptr;
3884 while (s_ptr != NULL)
3886 if (CheckServiceInListType(s_ptr, list_type, FALSE, FALSE) == TRUE)
3890 if (HasNordigSimulcastService(s_ptr) == FALSE)
3901 if ((list_type & ADB_SERVICE_LIST_FAV_LIST) != 0)
3905 s_ptr = fav_serv->serv_ptr;
3922 return((
void *)s_ptr);
3949 if ((list_type & ADB_SERVICE_LIST_FAV_LIST) != 0)
3955 s_ptr = fav_serv->serv_ptr;
3964 while (s_ptr != NULL)
3969 if ((s_ptr->allocated_lcn == lcn) &&
3970 ((list_type == ADB_SERVICE_LIST_ALL) || (list_type == s_ptr->serv_type) ||
3971 ((list_type & ADB_FAV_SERVICE_LIST_TYPE) != 0) ||
3972 ((list_type == ADB_SERVICE_LIST_TV) && ((s_ptr->serv_type == ADB_SERVICE_TYPE_AVC_SD_TV) ||
3973 (s_ptr->serv_type == ADB_SERVICE_TYPE_HD_TV) ||
3974 (s_ptr->serv_type == ADB_SERVICE_TYPE_MPEG2_HD) ||
3975 (s_ptr->serv_type == ADB_SERVICE_TYPE_UHD_TV))) ||
3976 ((list_type == ADB_SERVICE_LIST_RADIO) && (s_ptr->serv_type == ADB_SERVICE_TYPE_AVC_RADIO))))
3978 if (HasNordigSimulcastService(s_ptr) == FALSE)
3984 else if (s_ptr->allocated_lcn == lcn)
3989 if ((list_type & ADB_SERVICE_LIST_FAV_LIST) != 0)
3993 s_ptr = fav_serv->serv_ptr;
4007 if (CheckServiceInListType(s_ptr, list_type, TRUE, show_unselectable) == FALSE)
4016 return((
void *)s_ptr);
4033 last_valid_s_ptr = NULL;
4038 while (s_ptr != NULL)
4040 if (CheckServiceInListType(s_ptr, list_type, FALSE, FALSE) == TRUE)
4042 last_valid_s_ptr = s_ptr;
4043 if (s_ptr->allocated_lcn <= lcn)
4056 s_ptr = last_valid_s_ptr;
4061 return((
void *)s_ptr);
4085 return((
void *)s_ptr);
4102 if ((slist_ptr == NULL) || (num_entries == 0) || (lcn == 0))
4109 for (i = 0; i < num_entries; i++)
4112 if (s_ptr->allocated_lcn == lcn)
4140 if ((slist_ptr == NULL) || (num_entries == 0) || (lcn == 0))
4147 for (i = num_entries - 1; i > 0; i--)
4150 if (s_ptr->allocated_lcn <= lcn)
4176 if ((slist_ptr == NULL) || (num_entries == 0) || (s_ptr == NULL))
4182 for (i = 0; i < num_entries; i++)
4184 if (s_ptr == slist_ptr[i])
4208 U8BIT **names_array;
4217 if (names_array != NULL)
4219 for (i = 0; i < num_entries; i++)
4222 if (name_str != NULL)
4225 name_str->lang_code);
4229 names_array[i] = NULL;
4242 return(names_array);
4257 U8BIT **names_array;
4266 if (names_array != NULL)
4268 for (i = 0; i < num_entries; i++)
4271 if (name_str != NULL)
4273 names_array[i] = ExtractShortName(name_str);
4277 names_array[i] = NULL;
4290 return(names_array);
4312 if (lcn_array != NULL)
4314 for (i = 0; i < num_entries; i++)
4350 if (lcn_array != NULL)
4352 for (i = 0; i < num_entries; i++)
4384 U32BIT* ADB_GetServiceListSIDs(
void **slist, U16BIT num_entries)
4389 FUNCTION_START(ADB_GetServiceListSIDs);
4395 if (sid_array != NULL)
4397 for (i = 0; i < num_entries; i++)
4408 FUNCTION_FINISH(ADB_GetServiceListSIDs);
4425 U32BIT *unavail_array;
4434 if (unavail_array != NULL)
4436 for (i = 0; i < num_entries; i++)
4438 unavail_array[i] = (U32BIT)GetServiceUnavailFlag((
ADB_SERVICE_REC *)(slist[i]));
4445 unavail_array = NULL;
4450 return(unavail_array);
4474 if (new_array != NULL)
4476 for (i = 0; i < num_entries; i++)
4478 new_array[i] = (U32BIT)GetServiceNewFlag((
ADB_SERVICE_REC *)(slist[i]));
4508 FUNCTION_START(ADB_GetServiceListlockedFlag);
4514 if (lock_array != NULL)
4516 for (i = 0; i != num_entries; i++)
4528 FUNCTION_FINISH(ADB_GetServiceListlockedFlag);
4544 U32BIT *scrambled_array;
4553 if (scrambled_array != NULL)
4555 for (i = 0; i < num_entries; i++)
4557 scrambled_array[i] = (U32BIT)(((
ADB_SERVICE_REC *)slist[i])->scrambled);
4564 scrambled_array = NULL;
4569 return(scrambled_array);
4592 if (hd_array != NULL)
4594 for (i = 0; i < num_entries; i++)
4596 if ((((
ADB_SERVICE_REC *)slist[i])->serv_type == ADB_SERVICE_TYPE_HD_TV) ||
4597 (((
ADB_SERVICE_REC *)slist[i])->serv_type == ADB_SERVICE_TYPE_MPEG2_HD) ||
4598 (((
ADB_SERVICE_REC *)slist[i])->serv_type == ADB_SERVICE_TYPE_UHD_TV))
4637 for (i = 0; i != num_entries; i++)
4641 s_ptr->locked = locked;
4663 U32BIT *hidden_array;
4672 if (hidden_array != NULL)
4674 for (i = 0; i != num_entries; i++)
4683 hidden_array = NULL;
4688 return(hidden_array);
4701 U8BIT **names_array;
4711 if (names_array != NULL)
4713 for (i = 0; i < num_entries; i++)
4716 if (t_ptr == NULL || t_ptr->network == NULL)
4718 names_array[i] = NULL;
4722 names_array[i] = GetNetworkName(t_ptr->network, FALSE);
4735 return(names_array);
4748 U8BIT **names_array;
4758 if (names_array != NULL)
4760 for (i = 0; i < num_entries; i++)
4764 names_array[i] = GetTransportName(t_ptr);
4776 return(names_array);
4789 U32BIT *tp_strength_array;
4799 if (tp_strength_array != NULL)
4801 for (i = 0; i < num_entries; i++)
4806 tp_strength_array[i] = (U32BIT)GetTransportTunedStrength(t_ptr);
4810 tp_strength_array[i] = 0xff;
4818 tp_strength_array = NULL;
4823 return(tp_strength_array);
4877 retval = ExtractShortName(name_str);
4903 name_str = GetServiceNameByLangAndPrefId((
ADB_SERVICE_REC *)s_ptr, lang, pref_name_id, FALSE);
4927 name_str = GetServiceNameByLangAndPrefId((
ADB_SERVICE_REC *)s_ptr, lang, pref_name_id, TRUE);
4995 *trans_id = t_ptr->tran_id;
4996 *onet_id = t_ptr->orig_net_id;
5000 *trans_id = ADB_INVALID_DVB_ID;
5001 *onet_id = ADB_INVALID_DVB_ID;
5025 serv_ptr->sched_disabled = !state;
5026 DBA_SetFieldValue(serv_ptr->dba_rec, DBA_FIELD_SERV_SCHED_DISABLED, serv_ptr->sched_disabled);
5028 if (serv_ptr->sched_disabled && (serv_ptr->event_schedule != NULL))
5031 serv_ptr->event_schedule = NULL;
5032 serv_ptr->num_events_in_schedule = 0;
5084 serv_ptr->now_next_disabled = !state;
5086 serv_ptr->now_next_disabled);
5088 if (serv_ptr->now_next_disabled)
5090 if (serv_ptr->now_event != NULL)
5093 serv_ptr->now_event = NULL;
5096 if (serv_ptr->next_event != NULL)
5099 serv_ptr->next_event = NULL;
5214 ADB_STREAM_TYPE audio_type;
5218 audio_type = ADB_AUDIO_STREAM;
5263 ADB_SERVICE_TYPE serv_type;
5275 if ((serv_type == ADB_SERVICE_TYPE_HD_TV) ||
5276 (serv_type == ADB_SERVICE_TYPE_MPEG2_HD) ||
5277 (serv_type == ADB_SERVICE_TYPE_UHD_TV))
5299 E_STB_DP_AUDIO_MODE audio_mode;
5300 ADB_STREAM_TYPE audio_type;
5327 E_STB_DP_AUDIO_MODE ad_mode;
5328 ADB_STREAM_TYPE ad_type;
5333 *broadcast_mix = FALSE;
5357 E_STB_DP_AUDIO_MODE audio_mode;
5358 ADB_STREAM_TYPE audio_type;
5362 audio_mode = AUDIO_STEREO;
5473 ADB_STREAM_TYPE video_type;
5477 video_type = ADB_VIDEO_STREAM;
5561 name_str = CopyString(((
ADB_SERVICE_REC *)s_ptr)->provider_array[lang], TRUE);
5590 name_str = CopyString(((
ADB_SERVICE_REC *)s_ptr)->provider_str, TRUE);
5606 BOOLEAN unavailable;
5610 unavailable = FALSE;
5619 return(unavailable);
5656 BOOLEAN not_running;
5660 not_running = FALSE;
5669 return(not_running);
5681 BOOLEAN serv_scrambled;
5685 serv_scrambled = FALSE;
5694 return(serv_scrambled);
5704 BOOLEAN has_ca_desc;
5708 has_ca_desc = FALSE;
5717 return(has_ca_desc);
5729 BOOLEAN do_not_scramble;
5733 do_not_scramble = TRUE;
5737 do_not_scramble = FindDoNotScramble(NULL, s_ptr);
5742 return(do_not_scramble);
5784 BOOLEAN new_service = FALSE;
5796 return(new_service);
5807 BOOLEAN locked = FALSE;
5838 locked = serv_ptr->locked;
5841 serv_ptr->locked = FALSE;
5845 serv_ptr->locked = TRUE;
5871 serv_ptr->locked = locked;
5897 if (serv_ptr->freesat_id != INVALID_FREESAT_SERV_ID)
5924 freesat_id = serv_ptr->freesat_id;
5929 freesat_id = INVALID_FREESAT_SERV_ID;
5954 void ADB_SetServiceListTaggedLockedFlag(U32BIT *tag_array,
void **slist, U16BIT num_entries, BOOLEAN locked)
5958 FUNCTION_START(ADB_SetServiceListTaggedLockedFlag);
5960 if ((num_entries > 0) && (slist != NULL))
5962 if (tag_array == NULL)
5971 for (i = 0; i != num_entries; i++)
5973 if (tag_array[i] > 0)
5977 DBA_ServFlgLock(slist[i]);
5981 DBA_ServFlgUnlock(slist[i]);
5983 DBA_CommitService(slist[i]);
5989 FUNCTION_FINISH(ADB_SetServiceListTaggedLockedFlag);
6037 serv_ptr->new_service = FALSE;
6040 t_ptr = serv_ptr->transport;
6118 ASSERT(serv_ptr != NULL);
6119 ASSERT(link_ptr != NULL);
6128 if (s_ptr->rct_link_list == NULL)
6130 s_ptr->rct_link_list = link_ptr;
6135 for (curr_ptr = s_ptr->rct_link_list; curr_ptr->next != NULL; )
6137 curr_ptr = curr_ptr->next;
6140 curr_ptr->next = link_ptr;
6158 ASSERT(serv_ptr != NULL);
6163 if (s_ptr->rct_link_list != NULL)
6166 s_ptr->rct_link_list = NULL;
6190 if (serv_ptr != NULL)
6192 for (l_ptr = ((
ADB_SERVICE_REC *)serv_ptr)->rct_link_list; l_ptr != NULL; l_ptr = l_ptr->next)
6229 if ((s_ptr != NULL) && (s_ptr->rct_link_list != NULL))
6233 for (l_ptr = s_ptr->rct_link_list; l_ptr != NULL; l_ptr = l_ptr->next)
6236 if (new_ptr != NULL)
6240 new_ptr->is_group_trailer = l_ptr->is_group_trailer;
6242 if (l_ptr->uri_string != NULL)
6244 new_ptr->uri_string = (U8BIT *)
STB_AppGetMemory(strlen((
char *)l_ptr->uri_string) + 1);
6245 if (new_ptr->uri_string != NULL)
6247 strncpy((
char *)new_ptr->uri_string, (
char *)l_ptr->uri_string, strlen((
char *)l_ptr->uri_string) + 1);
6249 new_ptr->can_use_default_icon = l_ptr->can_use_default_icon;
6250 new_ptr->icon_id = l_ptr->icon_id;
6252 for (i = 0; i < ACFG_NUM_DB_LANGUAGES; i++)
6254 if (l_ptr->promo_text[i] != NULL)
6260 if (l_ptr->event_name != NULL)
6270 last_link = new_ptr;
6274 last_link->next = new_ptr;
6275 last_link = new_ptr;
6303 if (link_ptr != NULL)
6343 if (link_ptr != NULL)
6349 if (lang_ids != NULL)
6351 for (i = 0; (i < ACFG_MAX_DB_LANG_CODES) &&
6352 (lang_ids[i] != ACFG_INVALID_DB_LANG) && (text == NULL); i++)
6355 link->promo_text[lang_ids[i]]->lang_code);
6362 for (i = 0; i < ACFG_NUM_DB_LANGUAGES; i++)
6364 text = link->promo_text[i]->str_ptr;
6368 link->promo_text[i]->lang_code);
6387 BOOLEAN is_group_trailer;
6391 if (link_ptr != NULL)
6397 is_group_trailer = FALSE;
6402 return(is_group_trailer);
6418 if (link_ptr != NULL)
6423 lptr->event_name->lang_code);
6446 if (link_ptr != NULL)
6478 ASSERT(serv_ptr != NULL);
6479 ASSERT(icon_ptr != NULL);
6487 for (curr_ptr = s_ptr->icon_list, prev_ptr = NULL; (curr_ptr != NULL) && (i_ptr->icon_id != curr_ptr->icon_id); )
6489 prev_ptr = curr_ptr;
6490 curr_ptr = curr_ptr->next;
6493 if (curr_ptr == NULL)
6497 if (s_ptr->icon_list == NULL)
6500 s_ptr->icon_list = i_ptr;
6505 prev_ptr->next = i_ptr;
6514 if ((i_ptr->icon_type != curr_ptr->icon_type) ||
6515 (i_ptr->transport_mode != curr_ptr->transport_mode) ||
6516 ((i_ptr->transport_mode == ICON_TRANS_URL) &&
6519 i_ptr->next = curr_ptr->next;
6521 if (prev_ptr == NULL)
6523 s_ptr->icon_list = i_ptr;
6527 prev_ptr->next = i_ptr;
6531 curr_ptr->next = NULL;
6562 BOOLEAN can_use_default;
6566 can_use_default = FALSE;
6568 if (serv_ptr != NULL)
6574 if (s_ptr->rct_link_list != NULL)
6576 for (link = s_ptr->rct_link_list; (link != NULL) && !can_use_default; link = link->next)
6578 if (link->can_use_default_icon)
6580 can_use_default = TRUE;
6590 return(can_use_default);
6609 U16BIT *x_pos, U16BIT *y_pos, U16BIT *width, U16BIT *height, E_ICON_COORD_SYSTEM *coord_system)
6611 BOOLEAN icon_available;
6619 icon_available = FALSE;
6621 if (serv_ptr != NULL)
6627 if (s_ptr->rct_link_list != NULL)
6631 for (link = s_ptr->rct_link_list; (link != NULL) && (icon_id == 0); link = link->next)
6633 if ((link->icon_id > 0) && (link->icon_id <= 7))
6637 icon_id = link->icon_id;
6645 for (icon_ptr = s_ptr->icon_list; icon_ptr != NULL; icon_ptr = icon_ptr->next)
6647 if (icon_ptr->icon_id == icon_id)
6650 if (icon_ptr->icon_data != NULL)
6652 *icon_data = icon_ptr->icon_data;
6653 *data_size = icon_ptr->data_len;
6655 *pos_valid = icon_ptr->position_defined;
6656 if (icon_ptr->position_defined)
6658 *x_pos = icon_ptr->x_pos;
6659 *y_pos = icon_ptr->y_pos;
6662 *width = icon_ptr->width;
6663 *height = icon_ptr->height;
6664 *coord_system = icon_ptr->coord_system;
6666 icon_available = TRUE;
6679 return(icon_available);
6720 while (alt_serv_rec != NULL)
6722 if (alt_serv_type == alt_serv_rec->link_type)
6725 alt_serv_rec->tran_id, alt_serv_rec->serv_id);
6726 if (alt_serv != NULL)
6731 alt_serv_rec = alt_serv_rec->next;
6747 U16BIT pid, text_pid;
6748 U16BIT cpage, apage;
6749 U8BIT magazine, page;
6750 E_STREAM_MATCH_TYPE dvb_match_type;
6751 E_STREAM_MATCH_TYPE ttx_match_type;
6756 if (serv_ptr != NULL)
6763 if (dvb_match_type != STREAM_MATCH_NONE && dvb_match_type <= ttx_match_type)
6765 subt_info->is_dvb_subt = TRUE;
6766 subt_info->u.subt.cpage = cpage;
6767 subt_info->u.subt.apage = apage;
6769 else if (ttx_match_type != STREAM_MATCH_NONE)
6772 subt_info->is_dvb_subt = FALSE;
6773 subt_info->u.ttxt.magazine = magazine;
6774 subt_info->u.ttxt.page = page;
6793 U16BIT cpage, apage;
6794 E_STREAM_MATCH_TYPE dvb_match_type;
6795 E_STREAM_MATCH_TYPE ttx_match_type;
6797 U8BIT magazine, page;
6803 if (serv_ptr != NULL)
6812 if (dvb_match_type != STREAM_MATCH_NONE)
6816 if (dvb_match_type <= ttx_match_type)
6825 else if (ttx_match_type != STREAM_MATCH_NONE)
6856 while (stream_ptr != NULL)
6858 if (IsStreamOfType(stream_ptr, stream_list_type))
6863 stream_ptr = stream_ptr->next;
6870 return(num_streams);
6882 void ADB_GetStreamList(
void *serv_ptr, ADB_STREAM_LIST_TYPE stream_list_type,
void ***streamlist_ptr,
6883 U16BIT *num_entries_ptr)
6895 U8BIT component_tag;
6905 if (serv_ptr != NULL)
6908 stream_ptr = s_ptr->stream_list;
6909 while (stream_ptr != NULL)
6912 stream_ptr = stream_ptr->next;
6915 if (max_entries > 0)
6918 if (temp_array != NULL)
6920 stream_ptr = s_ptr->stream_list;
6921 for (i = 0; ((i < max_entries) && (stream_ptr != NULL)); i++)
6923 if (IsStreamOfType(stream_ptr, stream_list_type))
6926 if (temp_stream != NULL)
6928 temp_stream->num_tag_entries = 0;
6930 if ((temp_stream->tag_array_ptr != NULL) && (stream_ptr->tag_array != NULL))
6932 for (tag_index = 0; tag_index < stream_ptr->num_tags; tag_index++)
6934 temp_stream->tag_array_ptr[tag_index].tag = stream_ptr->tag_array[tag_index];
6936 temp_stream->num_tag_entries = stream_ptr->num_tags;
6938 temp_stream->pid = stream_ptr->pid;
6939 temp_stream->stream_type = stream_ptr->type;
6940 temp_stream->in_use = stream_ptr->in_use;
6941 temp_stream->has_ca_descriptor = stream_ptr->has_ca_descriptor;
6943 temp_stream->component_type = stream_ptr->component_type;
6946 if ((s_ptr->now_event != NULL) && (temp_stream->tag_array_ptr != NULL))
6948 event_desc = s_ptr->now_event->desc_list_head;
6952 component_tag = event_desc->desc_data[4];
6955 for (tag_index = 0; tag_index != temp_stream->num_tag_entries; tag_index++)
6957 if (temp_stream->tag_array_ptr[tag_index].tag == component_tag)
6959 temp_stream->component_type = event_desc->desc_data[3];
6960 temp_stream->tag_array_ptr[tag_index].content = event_desc->desc_data[2];
6961 temp_stream->tag_array_ptr[tag_index].type = event_desc->desc_data[3];
6966 event_desc = event_desc->next;
6971 if ((temp_stream->stream_type == ADB_AUDIO_STREAM) ||
6972 (temp_stream->stream_type == ADB_AAC_AUDIO_STREAM) ||
6973 (temp_stream->stream_type == ADB_HEAAC_AUDIO_STREAM) ||
6974 (temp_stream->stream_type == ADB_AC3_AUDIO_STREAM) ||
6975 (temp_stream->stream_type == ADB_EAC3_AUDIO_STREAM)
6981 if (stream_list_type != ADB_STREAM_LIST_ALL)
6983 for (j = 0; j < no_entries; j++)
6985 sptr = temp_array[j];
6986 if ((sptr->pid == stream_ptr->pid) &&
6987 (sptr->lang_code == stream_ptr->data.audio.lang_code))
6998 if (temp_stream != NULL)
7000 temp_stream->lang_code = stream_ptr->data.audio.lang_code;
7001 temp_stream->audio_type = stream_ptr->data.audio.type;
7002 temp_stream->audio_mode = stream_ptr->data.audio.mode;
7005 else if (temp_stream->stream_type == ADB_SUBTITLE_STREAM)
7007 temp_stream->lang_code = stream_ptr->data.subtitle.lang_code;
7008 temp_stream->subt_type = stream_ptr->data.subtitle.type;
7009 temp_stream->composition_page = stream_ptr->data.subtitle.composition_page;
7010 temp_stream->ancillary_page = stream_ptr->data.subtitle.ancillary_page;
7012 else if (temp_stream->stream_type == ADB_TTEXT_STREAM)
7014 temp_stream->lang_code = stream_ptr->data.ttext.lang_code;
7015 temp_stream->ttext_type = stream_ptr->data.ttext.type;
7016 temp_stream->ttext_magazine = stream_ptr->data.ttext.magazine;
7017 temp_stream->ttext_page = stream_ptr->data.ttext.page;
7020 if (temp_stream != NULL)
7022 temp_array[no_entries] = temp_stream;
7027 stream_ptr = stream_ptr->next;
7030 if (no_entries == 0)
7039 *num_entries_ptr = no_entries;
7040 *streamlist_ptr = (
void **)temp_array;
7059 if (streamlist_ptr != NULL)
7061 for (i = 0; i < num_entries; i++)
7063 stream = streamlist_ptr[i];
7064 if (stream->tag_array_ptr != NULL)
7085 ADB_STREAM_TYPE stream_type;
7090 if (stream_ptr != NULL)
7092 stream_type = ((
S_STREAM *)stream_ptr)->stream_type;
7096 return(stream_type);
7112 if (stream_ptr != NULL)
7114 num = ((
S_STREAM *)stream_ptr)->num_tag_entries;
7137 if (stream_ptr != NULL)
7141 if ((index < stream->num_tag_entries) && (stream->tag_array_ptr != NULL))
7143 tag = stream->tag_array_ptr[index].tag;
7163 if (stream_ptr != NULL)
7165 pid = ((
S_STREAM *)stream_ptr)->pid;
7184 if (stream_ptr != NULL)
7186 in_use = ((
S_STREAM *)stream_ptr)->in_use;
7200 BOOLEAN has_ca_desc;
7203 has_ca_desc = FALSE;
7204 if (stream_ptr != NULL)
7206 has_ca_desc = ((
S_STREAM *)stream_ptr)->has_ca_descriptor;
7210 return(has_ca_desc);
7224 if (stream_ptr != NULL)
7226 lang_code = ((
S_STREAM *)stream_ptr)->lang_code;
7240 ADB_AUDIO_TYPE type;
7244 if (stream_ptr != NULL)
7246 type = ((
S_STREAM *)stream_ptr)->audio_type;
7260 E_STB_DP_AUDIO_MODE mode = AUDIO_UNDEF;
7264 if (stream_ptr != NULL)
7266 mode = ((
S_STREAM *)stream_ptr)->audio_mode;
7285 if (stream_ptr != NULL)
7287 lang_code = ((
S_STREAM *)stream_ptr)->lang_code;
7302 FUNCTION_START(ADB_GetTtextStream);
7305 if (stream_ptr != NULL)
7307 type = ((
S_STREAM *)stream_ptr)->ttext_type;
7325 if (stream_ptr != NULL)
7327 magazine = ((
S_STREAM *)stream_ptr)->ttext_magazine;
7345 if (stream_ptr != NULL)
7347 page = ((
S_STREAM *)stream_ptr)->ttext_page;
7365 if (stream_ptr != NULL)
7367 lang_code = ((
S_STREAM *)stream_ptr)->lang_code;
7385 if (stream_ptr != NULL)
7387 comp_page = ((
S_STREAM *)stream_ptr)->composition_page;
7405 if (stream_ptr != NULL)
7407 anc_page = ((
S_STREAM *)stream_ptr)->ancillary_page;
7422 U8BIT component_type = 0;
7426 if (stream_ptr != NULL)
7428 component_type = ((
S_STREAM *)stream_ptr)->component_type;
7433 return component_type;
7446 U16BIT content_type;
7453 if (stream_ptr != NULL)
7457 if ((index < stream->num_tag_entries) && (stream->tag_array_ptr != NULL))
7459 content_type = (U16BIT)(stream->tag_array_ptr[index].content << 8) | (U16BIT)stream->tag_array_ptr[index].type;
7465 return(content_type);
7475 ADB_SUBTITLE_TYPE type;
7479 if (stream_ptr != NULL)
7481 type = ((
S_STREAM *)stream_ptr)->subt_type;
7500 if (lang_ids != NULL)
7523 if (lang_ids != NULL)
7545 if (lang_ids != NULL)
7568 if (lang_ids != NULL)
7591 if (v_now_event != NULL)
7593 *v_now_event = NULL;
7595 if (v_next_event != NULL)
7597 *v_next_event = NULL;
7600 if (serv_ptr != NULL)
7607 if (v_now_event != NULL)
7612 if (v_next_event != NULL)
7635 U16BIT *num_entries_ptr)
7638 U16BIT max_no_entries;
7653 if (serv_ptr != NULL)
7661 if (!include_old_events)
7664 if (s_ptr->now_event != NULL)
7669 if (s_ptr->next_event != NULL)
7675 max_no_entries += s_ptr->num_events_in_schedule;
7677 if (max_no_entries > 0)
7682 e_ptr = s_ptr->event_schedule;
7684 if (!include_old_events)
7690 if (s_ptr->now_event != NULL)
7692 tmp_event = CopyEventRec(s_ptr->now_event, s_ptr);
7693 if (tmp_event != NULL)
7695 event_ptr = s_ptr->now_event;
7696 elist[num_entries] = tmp_event;
7701 if (s_ptr->next_event != NULL)
7703 tmp_event = CopyEventRec(s_ptr->next_event, s_ptr);
7704 if (tmp_event != NULL)
7706 event_ptr = s_ptr->next_event;
7707 elist[num_entries] = tmp_event;
7712 if (event_ptr != NULL)
7718 while (e_ptr != NULL)
7720 if (end_time <= e_ptr->start)
7724 e_ptr = e_ptr->next;
7730 for (; (num_entries != max_no_entries) && (e_ptr != NULL); )
7732 tmp_event = CopyEventRec(e_ptr, s_ptr);
7733 if (tmp_event != NULL)
7735 elist[num_entries] = tmp_event;
7738 e_ptr = e_ptr->next;
7751 *num_entries_ptr = num_entries;
7768 void ***elist_ptr, U16BIT *num_entries_ptr)
7771 U16BIT max_no_entries;
7786 if (serv_ptr != NULL)
7794 if (!include_old_events)
7797 if (s_ptr->now_event != NULL)
7802 if (s_ptr->next_event != NULL)
7808 max_no_entries += s_ptr->num_events_in_schedule;
7810 if (max_no_entries > 0)
7815 e_ptr = s_ptr->event_schedule;
7817 if (!include_old_events)
7823 if (s_ptr->now_event != NULL)
7830 tmp_event = CopyEventRec(s_ptr->now_event, s_ptr);
7831 if (tmp_event != NULL)
7833 event_ptr = s_ptr->now_event;
7834 elist[num_entries] = tmp_event;
7840 if (s_ptr->next_event != NULL)
7844 tmp_event = CopyEventRec(s_ptr->next_event, s_ptr);
7845 if (tmp_event != NULL)
7847 event_ptr = s_ptr->next_event;
7848 elist[num_entries] = tmp_event;
7854 if (event_ptr != NULL)
7860 while (e_ptr != NULL)
7862 if (end_time <= e_ptr->start)
7867 e_ptr = e_ptr->next;
7873 for (; (num_entries < max_no_entries) && (e_ptr != NULL); )
7877 tmp_event = CopyEventRec(e_ptr, s_ptr);
7878 if (tmp_event != NULL)
7880 elist[num_entries] = tmp_event;
7885 e_ptr = e_ptr->next;
7898 *num_entries_ptr = num_entries;
7911 if (event_ptr != NULL)
7932 for (i = 0; i < num_entries; i++)
7955 if (serv_ptr != NULL)
7961 if (s_ptr->event_schedule != NULL)
7964 s_ptr->event_schedule = NULL;
7965 s_ptr->num_events_in_schedule = 0;
7969 if (delete_now_next)
7971 if (s_ptr->now_event != NULL)
7974 s_ptr->now_event = NULL;
7977 if (s_ptr->next_event != NULL)
7980 s_ptr->next_event = NULL;
7996 U16BIT num_services;
8004 if ((num_services > 0) && (slist != NULL))
8006 for (index = 0; index < num_services; index++)
8008 if (slist[index] != NULL)
8030 void *event_ptr = NULL;
8034 if (serv_ptr != NULL)
8042 event_ptr = (
void *)CopyEventRec(e_ptr, s_ptr);
8066 S16BIT ext_dtag_id, U16BIT *desc_len)
8069 #ifdef INTEGRATE_HBBTV 8082 #ifdef INTEGRATE_HBBTV 8083 if (serv_ptr != NULL)
8093 event_desc = e_ptr->desc_list_head;
8097 if ((ext_dtag_id < 0) ||
8098 ((event_desc->desc_data[0] == EXTENSION_DTAG) && (event_desc->desc_data[2] == ext_dtag_id)))
8102 num_bytes += event_desc->desc_data[1] + 2;
8105 event_desc = event_desc->next;
8113 *desc_len = num_bytes;
8114 desc_ptr = desc_data;
8116 event_desc = e_ptr->desc_list_head;
8120 if ((ext_dtag_id < 0) ||
8121 ((event_desc->desc_data[0] == EXTENSION_DTAG) && (event_desc->desc_data[2] == ext_dtag_id)))
8124 memcpy(desc_ptr, &event_desc->desc_data[0], event_desc->desc_data[1] + 2);
8125 desc_ptr += event_desc->desc_data[1] + 2;
8128 event_desc = event_desc->next;
8137 USE_UNWANTED_PARAM(serv_ptr);
8138 USE_UNWANTED_PARAM(event_id);
8139 USE_UNWANTED_PARAM(dtag_id);
8140 USE_UNWANTED_PARAM(ext_dtag_id);
8157 if ((desc_data != NULL) && (desc_len > 0))
8176 void *event_ptr = NULL;
8180 if (serv_ptr != NULL)
8186 if (s_ptr->num_events_in_schedule != 0)
8190 for (e_ptr = s_ptr->event_schedule; e_ptr != NULL; e_ptr = e_ptr->next)
8192 if (e_ptr->start >= time)
8194 if (prev_ptr != NULL)
8197 event_ptr = (
void *)CopyEventRec(prev_ptr, s_ptr);
8208 if (s_ptr->now_event != NULL)
8210 e_ptr = s_ptr->now_event;
8212 if (e_ptr->start < time)
8214 event_ptr = (
void *)CopyEventRec(e_ptr, s_ptr);
8217 else if (s_ptr->next_event != NULL)
8219 e_ptr = s_ptr->next_event;
8221 if (e_ptr->start < time)
8223 event_ptr = (
void *)CopyEventRec(e_ptr, s_ptr);
8259 void *event_ptr = NULL;
8263 if (serv_ptr != NULL)
8269 if (s_ptr->num_events_in_schedule != 0)
8273 for (e_ptr = s_ptr->event_schedule; e_ptr != NULL; e_ptr = e_ptr->next)
8275 if (e_ptr->start >= time)
8277 event_ptr = (
void *)CopyEventRec(e_ptr, s_ptr);
8285 if (s_ptr->now_event != NULL)
8287 e_ptr = s_ptr->now_event;
8289 if (e_ptr->start >= time)
8291 event_ptr = (
void *)CopyEventRec(e_ptr, s_ptr);
8294 else if (s_ptr->next_event != NULL)
8296 e_ptr = s_ptr->next_event;
8298 if (e_ptr->start >= time)
8300 event_ptr = (
void *)CopyEventRec(e_ptr, s_ptr);
8323 return ADB_LaterEvent(serv_ptr, DHMS_CREATE(date, hour, min, 0));
8345 if (serv_ptr != NULL)
8354 event_ptr = s_ptr->now_event;
8355 if (event_ptr != NULL)
8360 if( EventAtTime(event_ptr, time) )
8362 retval = CopyEventRec(event_ptr, s_ptr);
8368 event_ptr = s_ptr->next_event;
8369 if (event_ptr != NULL)
8374 if( EventAtTime(event_ptr, time) )
8376 retval = CopyEventRec(event_ptr, s_ptr);
8385 if(end_time <= time)
8409 if (serv_ptr != NULL)
8415 if (s_ptr->num_events_in_schedule != 0)
8418 for(e_ptr = s_ptr->event_schedule; e_ptr != NULL; e_ptr = e_ptr->next)
8420 if ( EventAtTime(e_ptr, time) )
8422 retval = CopyEventRec(e_ptr, s_ptr);
8450 if (event_ptr != NULL)
8457 start = e_ptr->start;
8522 if (event_ptr != NULL)
8529 duration = e_ptr->duration;
8584 if (event_ptr != NULL)
8616 if (event_ptr != NULL)
8643 ADB_EVENT_CONTENT genre;
8647 genre = ADB_EVENT_CONTENT_UNCLASSIFIED;
8649 if (event_ptr != NULL)
8684 if (event_ptr != NULL)
8716 if (event_ptr != NULL)
8749 if (event_ptr != NULL)
8782 if (event_ptr != NULL)
8814 if (event_ptr != NULL)
8850 if (event_ptr != NULL)
8881 event_itemized_info = NULL;
8884 if (event_ptr != NULL)
8899 return(event_itemized_info);
8913 if (event_itemized_info != NULL)
8915 for (i = 0; i < num_of_items; i++)
8946 if (event_ptr != NULL)
8972 U16BIT event_id = 0;
8976 if (event_ptr != NULL)
8978 event_id = ((
S_EVENT *)event_ptr)->event_id;
9000 if (event_ptr != NULL)
9032 if (event_ptr != NULL)
9039 fta = e_ptr->free_to_air;
9060 BOOLEAN do_not_scramble;
9064 do_not_scramble = TRUE;
9066 if (event_ptr != NULL)
9073 do_not_scramble = FindDoNotScramble(e_ptr, ((
S_EVENT *)event_ptr)->serv_ptr);
9081 return(do_not_scramble);
9098 void **hd_serv_ptr,
void **hd_event_ptr)
9103 BOOLEAN event_found;
9107 event_found = FALSE;
9109 if (hd_serv_ptr != NULL)
9111 *hd_serv_ptr = NULL;
9114 if (hd_event_ptr != NULL)
9116 *hd_event_ptr = NULL;
9119 if (event_ptr != NULL)
9128 if (event_found && (hd_event_ptr != NULL))
9130 *hd_event_ptr = (
void *)CopyEventRec(hd_event, hd_service);
9139 return(event_found);
9159 if ((event1_ptr != NULL) && (event2_ptr != NULL))
9167 ((
S_EVENT *)event2_ptr)->event_id);
9170 if ((e1_ptr->start == e2_ptr->start) &&
9171 (e1_ptr->duration == e2_ptr->duration) && (e1_ptr->event_id == e2_ptr->event_id))
9201 crid_str = GetEventCridType(serv_ptr, event_ptr, UK_PROGRAMME_CRID, 0);
9205 crid_str = GetEventCridType(serv_ptr, event_ptr, TVA_PROGRAMME_CRID, 0);
9231 crid_len = strlen((
char *)crid);
9236 crid_ptr = crid + crid_len - 1;
9237 while ((crid_ptr != crid) && !imi_found)
9239 if (*crid_ptr ==
'#')
9243 else if (*crid_ptr ==
'/')
9279 crid_str = GetEventCridType(serv_ptr, event_ptr, UK_PROGRAMME_CRID, 0);
9283 crid_str = GetEventCridType(serv_ptr, event_ptr, TVA_PROGRAMME_CRID, 0);
9290 crid_len = strlen((
char *)crid_str);
9291 crid_ptr = crid_str + crid_len - 1;
9294 while ((crid_ptr != crid_str) && !imi_found)
9296 if (*crid_ptr ==
'#')
9302 else if (*crid_ptr ==
'/')
9305 crid_ptr = crid_str;
9328 U8BIT *crid_str = NULL;
9332 ASSERT(serv_ptr != NULL);
9333 ASSERT(event_str != NULL);
9335 if ((serv_ptr != NULL) && (event_str != NULL))
9363 crid_str = GetEventCridType(serv_ptr, event_ptr, UK_SERIES_CRID, index);
9367 crid_str = GetEventCridType(serv_ptr, event_ptr, TVA_SERIES_CRID, index);
9388 num_crids = NumberOfCridsOfType((
S_EVENT *)event_ptr, UK_SERIES_CRID);
9392 num_crids = NumberOfCridsOfType((
S_EVENT *)event_ptr, TVA_SERIES_CRID);
9413 num_crids = NumberOfCridsOfType((
S_EVENT *)event_ptr, UK_RECOMMENDATION_CRID);
9417 num_crids = NumberOfCridsOfType((
S_EVENT *)event_ptr, TVA_RECOMMENDATION_CRID);
9441 crid_str = GetEventCridType(serv_ptr, event_ptr, UK_RECOMMENDATION_CRID, index);
9445 crid_str = GetEventCridType(serv_ptr, event_ptr, TVA_RECOMMENDATION_CRID, index);
9464 U8BIT num_components;
9470 if (event_ptr != NULL)
9485 return(num_components);
9497 U16BIT auth_str_len;
9502 ASSERT(crid != NULL);
9504 auth_str_len = strlen((
char *)crid);
9506 for (i = 0; i < auth_str_len; i++)
9510 auth_str_len = i + 1;
9516 if (auth_str != NULL)
9518 memcpy(auth_str, crid, auth_str_len);
9519 auth_str[auth_str_len - 1] =
'\0';
9540 U16BIT num_services;
9542 U8BIT *event_prog_crid;
9545 BOOLEAN event_found;
9546 void *found_event_ptr;
9547 U16BIT onet_id, tran_id, serv_id;
9552 found_event_ptr = NULL;
9556 if ((num_services > 0) && (slist != NULL))
9558 event_found = FALSE;
9560 for (si = 0; !event_found && (si < num_services); si++)
9564 if ((num_events > 0) && (elist != NULL))
9569 for (ei = 0; !event_found && (ei < num_events); ei++)
9571 event_ptr = elist[ei];
9577 if (event_prog_crid != NULL)
9582 if ((original_event_ptr != NULL) &&
ADB_IsSameEvent(original_event_ptr, event_ptr))
9588 if (event_ptr != NULL)
9599 *serv_ptr = slist[si];
9619 return(found_event_ptr);
9638 serv_ptr->hidden = hidden;
9656 BOOLEAN hidden = TRUE;
9679 BOOLEAN selectable = FALSE;
9702 BOOLEAN lcn_editable = FALSE;
9715 return(lcn_editable);
9751 if (serv_ptr->allocated_lcn != lcn)
9753 serv_ptr->allocated_lcn = lcn;
9754 DBA_SetFieldValue(serv_ptr->dba_rec, DBA_FIELD_SERV_LCN, serv_ptr->allocated_lcn);
9824 ADB_AUDIO_TYPE audio_type, ADB_STREAM_TYPE stream_type)
9876 ADB_AUDIO_TYPE *audio_type, ADB_STREAM_TYPE *stream_type)
9999 void ADB_SetAnalogServiceName(
void *s_ptr, U8BIT *new_name)
10003 FUNCTION_START(ADB_SetAnalogServiceName);
10006 if (new_name != NULL)
10008 new_len = strlen((
char *)new_name) + 1;
10017 FUNCTION_FINISH(ADB_SetAnalogServiceName);
10052 if (crid_rec == NULL)
10099 while (c_ptr != NULL)
10101 if ((c_ptr->crid_str != NULL) && (c_ptr->crid_str->str_ptr != NULL))
10211 prog_name = CopyString(((
ADB_CRID_REC *)c_ptr)->name_str, TRUE);
10228 FUNCTION_START(ADB_UpdateEitDate);
10237 FUNCTION_FINISH(ADB_UpdateEitDate);
10260 if (!crid_ptr->series_flag && !crid_ptr->recommended_flag)
10402 crid_str = ((
ADB_CRID_REC *)c_ptr)->crid_str->str_ptr;
10454 serv_id = ADB_INVALID_DVB_ID;
10532 BOOLEAN inc_rec_crids, BOOLEAN inc_prog_crids)
10535 U16BIT num_entries, num_crids;
10550 for (i = 0; (i < num_entries) && (c_ptr != NULL); i++)
10552 if (c_ptr->series_flag)
10554 if (inc_series_crids)
10559 else if (c_ptr->recommended_flag)
10568 if (inc_prog_crids)
10585 for (i = 0, j = 0; (i != num_entries) && (c_ptr != NULL); i++)
10587 if (c_ptr->series_flag)
10589 if (inc_series_crids)
10591 clist[j] = (
void *)c_ptr;
10595 else if (c_ptr->recommended_flag)
10599 clist[j] = (
void *)c_ptr;
10605 if (inc_prog_crids)
10607 clist[j] = (
void *)c_ptr;
10621 *clist_ptr = clist;
10622 *num_entries_ptr = num_crids;
10638 USE_UNWANTED_PARAM(num_entries);
10640 if (crid_list != NULL)
10667 if (net_ptr != NULL)
10669 desc_ptr = net_ptr->linkage_desc_list;
10670 while ((desc_ptr != NULL) && (tran_rec == NULL))
10672 if (desc_ptr->link_type == FULL_SI_LINKAGE_TYPE)
10675 desc_ptr->orig_net_id, desc_ptr->tran_id);
10677 desc_ptr = desc_ptr->next;
10703 epg_service = NULL;
10706 if (net_ptr != NULL)
10708 desc_ptr = net_ptr->linkage_desc_list;
10709 while ((desc_ptr != NULL) && (epg_service == NULL))
10711 if (desc_ptr->link_type == EPG_SERVICE_LINKAGE_TYPE)
10714 desc_ptr->orig_net_id, desc_ptr->tran_id, desc_ptr->serv_id);
10716 desc_ptr = desc_ptr->next;
10724 return epg_service;
10766 if (list_id != NULL)
10769 *list_id = fav_list->list_id;
10801 while ((fl_ptr != NULL) && (index > 0))
10807 if (fl_ptr != NULL)
10809 list_id = fl_ptr->list_id;
10838 while ((fl_ptr != NULL) && (fl_ptr->user_data != user_data))
10843 if (fl_ptr != NULL)
10845 list_id = fl_ptr->list_id;
10878 name = CopyString(fav_list->name, TRUE);
10897 BOOLEAN success = TRUE;
10937 user_data = fav_list->user_data;
11120 while ((fav_serv != NULL) && (current_index > 0))
11126 if (fav_serv != NULL)
11190 #ifdef COMMON_INTERFACE 11196 BOOLEAN ADB_GetServiceSDTReceived(
void *s_ptr)
11198 BOOLEAN sdt_received;
11200 FUNCTION_START(ADB_GetServiceSDTReceived);
11210 sdt_received = FALSE;
11215 FUNCTION_FINISH(ADB_GetServiceSDTReceived);
11217 return(sdt_received);
11225 U8BIT* ADB_GetServiceCIProtectionDesc(
void *s_ptr)
11229 FUNCTION_START(ADB_GetServiceCIProtectionDesc);
11244 FUNCTION_FINISH(ADB_GetServiceCIProtectionDesc);
11254 BOOLEAN ADB_HasCIProtectionExpired(
void *s_ptr)
11259 FUNCTION_START(ADB_HasCIProtectionExpired);
11270 if (time_diff >= CI_PROTECTION_DESC_TIME_LIMIT)
11279 FUNCTION_FINISH(ADB_HasCIProtectionExpired);
11305 pmt_data = serv_ptr->pmt_data;
11306 *data_len = serv_ptr->pmt_data_len;
11327 U16BIT pmt_pid = 0;
11347 U16BIT ait_pid = 0;
11351 #ifdef INTEGRATE_HBBTV 11356 USE_UNWANTED_PARAM(s_ptr);
11375 U16BIT num_profiles;
11385 return(num_profiles);
11409 ADB_PROFILE_TYPE type = ADB_PROFILE_TYPE_BROADCAST;
11413 if (profile != NULL)
11433 ADB_SERVICE_LIST_TYPE list_type;
11434 #ifdef COMMON_INTERFACE 11440 list_type = ADB_SERVICE_LIST_ALL;
11442 #ifdef COMMON_INTERFACE 11444 n_ptr = DBDEF_GetCurrentCIPlusProfile();
11447 if (n_ptr->fav_list_id != 0)
11449 list_type = ADB_LIST_TYPE_FROM_FAVLIST(n_ptr->fav_list_id);
11460 #ifdef COMMON_INTERFACE 11466 void* ADB_FindProfileForModule(U32BIT module)
11470 FUNCTION_START(ADB_FindProfileForModule);
11473 profile = DBDEF_FindNetworkForCIPlusModule(module);
11476 FUNCTION_FINISH(ADB_FindProfileForModule);
11486 BOOLEAN ADB_DeleteProfile(
void *profile)
11493 FUNCTION_START(ADB_DeleteProfile);
11497 if (profile != NULL)
11503 if (n_ptr->profile_type == ADB_PROFILE_TYPE_CIPLUS)
11508 DBDEF_PushCIPlusProfile(n_ptr->cicam_onet_id, n_ptr->cicam_identifier);
11513 if (n_ptr->fav_list_id != 0)
11523 while (t_ptr != NULL)
11526 if (t_ptr->network == n_ptr)
11531 t_ptr = next_t_ptr;
11548 FUNCTION_FINISH(ADB_DeleteProfile);
11559 U8BIT* ADB_GetProfileName(
void *profile)
11563 FUNCTION_START(ADB_GetProfileName);
11565 if (profile != NULL)
11576 FUNCTION_FINISH(ADB_GetProfileName);
11587 void ADB_MarkCIModulePresent(U16BIT cicam_onet_id, U32BIT cicam_id)
11591 FUNCTION_START(ADB_MarkCIModulePresent);
11595 if ((n_ptr = DBDEF_FindNetworkForCIPlusProfile(cicam_onet_id, cicam_id)) != NULL)
11597 n_ptr->module_present = TRUE;
11601 FUNCTION_FINISH(ADB_MarkCIModulePresent);
11609 void ADB_MarkCIModuleNotPresent(U32BIT module)
11613 FUNCTION_START(ADB_MarkCIModuleNotPresent);
11616 n_ptr = DBDEF_FindNetworkForCIPlusModule(module);
11619 n_ptr->module_present = FALSE;
11623 FUNCTION_FINISH(ADB_MarkCIModuleNotPresent);
11631 BOOLEAN ADB_GetProfileModulePresent(
void *profile)
11636 FUNCTION_START(ADB_GetProfileModulePresent);
11638 if (profile != NULL)
11644 if (n_ptr->profile_type == ADB_PROFILE_TYPE_CIPLUS)
11646 present = n_ptr->module_present;
11660 FUNCTION_FINISH(ADB_GetProfileModulePresent);
11670 U32BIT ADB_GetProfileModule(
void *profile)
11675 FUNCTION_START(ADB_GetProfileModule);
11679 if (profile != NULL)
11685 if (n_ptr->profile_type == ADB_PROFILE_TYPE_CIPLUS)
11687 module = n_ptr->module;
11693 FUNCTION_FINISH(ADB_GetProfileModule);
11705 BOOLEAN ADB_GetProfileCAMInfo(
void *profile, U16BIT *cicam_onet_id, U32BIT *cicam_id)
11710 FUNCTION_START(ADB_GetProfileCAMInfo);
11714 if (profile != NULL)
11720 if (n_ptr->profile_type == ADB_PROFILE_TYPE_CIPLUS)
11722 *cicam_onet_id = n_ptr->cicam_onet_id;
11723 *cicam_id = n_ptr->cicam_identifier;
11730 FUNCTION_FINISH(ADB_GetProfileCAMInfo);
11744 BOOLEAN ADB_SetProfileSearchRequired(
void *profile, BOOLEAN search_required, U16BIT date,
11745 U8BIT hour, U8BIT min)
11750 FUNCTION_START(ADB_SetProfileSearchRequired);
11754 if (profile != NULL)
11760 if (n_ptr->profile_type == ADB_PROFILE_TYPE_CIPLUS)
11762 n_ptr->op_search_required = search_required;
11763 DBA_SetFieldValue(n_ptr->dba_rec, DBA_FIELD_OPERATOR_SEARCH, (U32BIT)search_required);
11765 n_ptr->op_search_date = date;
11766 DBA_SetFieldValue(n_ptr->dba_rec, DBA_FIELD_OP_SEARCH_DATE, (U32BIT)n_ptr->op_search_date);
11768 n_ptr->op_search_time = (hour * 60) + min;
11769 DBA_SetFieldValue(n_ptr->dba_rec, DBA_FIELD_OP_SEARCH_TIME, (U32BIT)n_ptr->op_search_time);
11777 FUNCTION_FINISH(ADB_SetProfileSearchRequired);
11787 BOOLEAN ADB_GetProfileSearchRequired(
void *profile)
11792 FUNCTION_START(ADB_GetProfileSearchRequired);
11796 if (profile != NULL)
11802 if (n_ptr->profile_type == ADB_PROFILE_TYPE_CIPLUS)
11806 if (n_ptr->op_search_required && ((n_ptr->op_search_date == 0) ||
11807 !
STB_GCIsFutureDateTime(n_ptr->op_search_date, n_ptr->op_search_time / 60, n_ptr->op_search_time % 60, 0)))
11816 FUNCTION_FINISH(ADB_GetProfileSearchRequired);
11829 BOOLEAN ADB_GetProfileSearchDateTime(
void *profile, U16BIT *date, U8BIT *hours, U8BIT *mins)
11834 FUNCTION_START(ADB_GetProfileSearchDateTime);
11838 if (profile != NULL)
11844 if ((n_ptr->profile_type == ADB_PROFILE_TYPE_CIPLUS) && n_ptr->op_search_required &&
11845 (n_ptr->op_search_date != 0))
11847 *date = n_ptr->op_search_date;
11848 *hours = n_ptr->op_search_time / 60;
11849 *mins = n_ptr->op_search_time % 60;
11856 FUNCTION_FINISH(ADB_GetProfileSearchDateTime);
11866 void ADB_SetProfileSearchTimer(U32BIT cicam_id, U32BIT timer_handle)
11868 ADB_CICAM_TIMER_REC *t;
11870 FUNCTION_START(ADB_SetProfileSearchTimer);
11874 t = DBDEF_FindCicamTimer(cicam_id);
11877 DBDEF_DeleteCicamTimerRec(t);
11880 if (timer_handle != INVALID_TIMER_HANDLE)
11882 DBDEF_AddCicamTimer(cicam_id, timer_handle);
11887 FUNCTION_FINISH(ADB_SetProfileSearchTimer);
11895 U32BIT ADB_GetProfileSearchTimer(
void *profile)
11897 U32BIT timer_handle;
11899 ADB_CICAM_TIMER_REC *t;
11901 FUNCTION_START(ADB_GetProfileSearchTimer);
11903 timer_handle = INVALID_TIMER_HANDLE;
11905 if (profile != NULL)
11911 if (n_ptr->profile_type == ADB_PROFILE_TYPE_CIPLUS)
11913 t = DBDEF_FindCicamTimer(n_ptr->cicam_identifier);
11916 timer_handle = t->timer_handle;
11923 FUNCTION_FINISH(ADB_GetProfileSearchTimer);
11925 return(timer_handle);
11932 void ADB_DeleteCicamTimerbyHandle(U32BIT timer_handle)
11934 ADB_CICAM_TIMER_REC *t;
11936 FUNCTION_START(ADB_DeleteCicamTimerbyHandle);
11938 if (timer_handle != INVALID_TIMER_HANDLE)
11942 t = DBDEF_FindCicamTimerByHandle(timer_handle);
11945 DBDEF_DeleteCicamTimerRec(t);
11951 FUNCTION_FINISH(ADB_DeleteCicamTimerbyHandle);
11966 static U8BIT* GetEventCridType(
void *serv_ptr,
void *event_ptr, U8BIT crid_type, U8BIT index)
11971 FUNCTION_START(GetEventCridType);
11973 ASSERT(serv_ptr != NULL);
11974 ASSERT(event_ptr != NULL);
11978 if ((serv_ptr != NULL) && (event_ptr != NULL))
11991 FUNCTION_FINISH(GetEventCridType);
12002 static U8BIT NumberOfCridsOfType(
S_EVENT *event_ptr, U8BIT crid_type)
12007 FUNCTION_START(NumberOfCridsOfType);
12009 ASSERT(event_ptr != NULL);
12013 if (event_ptr != NULL)
12026 FUNCTION_FINISH(NumberOfCridsOfType);
12028 return(crids_found);
12037 static BOOLEAN IsStreamOfType(
ADB_STREAM_REC *stream_ptr, ADB_STREAM_LIST_TYPE stream_list_type)
12041 FUNCTION_START(IsStreamOfType);
12045 if ((stream_list_type == ADB_STREAM_LIST_ALL) ||
12046 (((stream_list_type & ADB_VIDEO_LIST_STREAM) != 0) &&
12047 ((stream_ptr->type == ADB_VIDEO_STREAM) ||
12048 (stream_ptr->type == ADB_H264_VIDEO_STREAM) ||
12049 (stream_ptr->type == ADB_H265_VIDEO_STREAM)
12051 (((stream_list_type & ADB_AUDIO_LIST_STREAM) != 0) &&
12052 ((stream_ptr->type == ADB_AUDIO_STREAM) ||
12053 (stream_ptr->type == ADB_AAC_AUDIO_STREAM) ||
12054 (stream_ptr->type == ADB_HEAAC_AUDIO_STREAM) ||
12055 (stream_ptr->type == ADB_AC3_AUDIO_STREAM) ||
12056 (stream_ptr->type == ADB_EAC3_AUDIO_STREAM)
12058 (((stream_list_type & ADB_TTEXT_LIST_STREAM) != 0) && (stream_ptr->type == ADB_TTEXT_STREAM)) ||
12059 (((stream_list_type & ADB_TTEXT_SUBT_LIST_STREAM) != 0) && (stream_ptr->type == ADB_TTEXT_STREAM) &&
12060 ((stream_ptr->data.ttext.type == ADB_TELETEXT_TYPE_SUBTITLE) ||
12061 (stream_ptr->data.ttext.type == ADB_TELETEXT_TYPE_SUBTITLE_HARD_HEARING))) ||
12062 (((stream_list_type & ADB_SUBTITLE_LIST_STREAM) != 0) && (stream_ptr->type == ADB_SUBTITLE_STREAM)) ||
12063 (((stream_list_type & ADB_DATA_LIST_STREAM) != 0) && (stream_ptr->type == ADB_DATA_STREAM)))
12068 FUNCTION_FINISH(IsStreamOfType);
12080 switch (audio_stream_type)
12082 case ADB_AAC_AUDIO_STREAM:
12083 return AUDIO_CODEC_AAC;
12085 case ADB_HEAAC_AUDIO_STREAM:
12086 return AUDIO_CODEC_HEAAC;
12088 case ADB_AC3_AUDIO_STREAM:
12089 return AUDIO_CODEC_AC3;
12091 case ADB_EAC3_AUDIO_STREAM:
12092 return AUDIO_CODEC_EAC3;
12094 case ADB_AUDIO_STREAM:
12095 return AUDIO_CODEC_MP2;
12100 return AUDIO_CODEC_AUTO;
12110 switch (video_stream_type)
12112 case ADB_H264_VIDEO_STREAM:
12113 return VIDEO_CODEC_H264;
12115 case ADB_VIDEO_STREAM:
12116 return VIDEO_CODEC_MPEG2;
12118 case ADB_H265_VIDEO_STREAM:
12119 return VIDEO_CODEC_H265;
12124 return VIDEO_CODEC_AUTO;
12134 void *service_ptr = NULL;
12138 if (event_ptr != NULL)
12140 service_ptr = ((
S_EVENT *)event_ptr)->serv_ptr;
12145 return service_ptr;
12162 static BOOLEAN EventAtTime(
ADB_EVENT_REC *event_ptr, U32DHMS time)
12164 BOOLEAN value = FALSE;
12165 U32DHMS start_time, end_time;
12167 start_time = event_ptr->start;
12168 if (start_time <= time)
12171 if (end_time > time)
12185 static U8BIT* CopyString(
ADB_STRING *str_desc, BOOLEAN to_unicode)
12188 U8BIT *copied_string;
12190 FUNCTION_START(CopyString);
12192 copied_string = NULL;
12193 if (str_desc != NULL)
12198 str_desc->lang_code);
12202 str_len = (U16BIT)str_desc->nbytes;
12204 if (copied_string != NULL)
12206 memcpy(copied_string, str_desc->str_ptr, str_len);
12211 FUNCTION_FINISH(CopyString);
12212 return(copied_string);
12218 U8BIT *copied_string;
12220 FUNCTION_START(CopySIString);
12222 copied_string = NULL;
12223 if (str_desc != NULL)
12225 str_len = str_desc->nbytes;
12227 if (copied_string != NULL)
12229 memcpy(copied_string, str_desc->str_ptr, str_len);
12233 FUNCTION_FINISH(CopySIString);
12234 return(copied_string);
12250 static U8BIT* ExtractShortName(
ADB_STRING *str_desc)
12253 U16BIT full_name_len;
12255 U16BIT short_name_len;
12256 BOOLEAN copy_state;
12264 FUNCTION_START(ExtractShortName);
12267 if (str_desc != NULL)
12270 str_desc->lang_code);
12272 if (ucode_name != NULL)
12282 copy_state = FALSE;
12283 short_name_len = 0;
12284 for (i = 0; i < full_name_len; i++)
12286 ucode_char = (ucode_name[rd_id] << 8) | ucode_name[rd_id + 1];
12287 if ((ucode_char == 0x0086) || (ucode_char == 0xe086))
12291 else if ((ucode_char == 0x0087) || (ucode_char == 0xe087))
12293 copy_state = FALSE;
12297 if (copy_state == TRUE)
12299 ucode_name[wr_id] = ucode_name[rd_id];
12300 ucode_name[wr_id + 1] = ucode_name[rd_id + 1];
12308 if (short_name_len != 0)
12312 ucode_name[wr_id] = 0x00;
12313 ucode_name[wr_id + 1] = 0x00;
12323 FUNCTION_FINISH(ExtractShortName);
12324 return(short_name);
12344 FUNCTION_START(GetTransportName);
12353 name_str = CopyString(&str, TRUE);
12356 FUNCTION_FINISH(GetTransportName);
12375 FUNCTION_START(GetTransportTid);
12380 tid_value = t_ptr->tran_id;
12383 FUNCTION_FINISH(GetTransportTid);
12400 U8BIT tuned_signal_strength;
12402 FUNCTION_START(GetTransportTunedStrength);
12404 tuned_signal_strength = 0;
12407 if (t_ptr->signal_level_at_search != BAD_SIGNAL_STATUS)
12409 tuned_signal_strength = GET_SIGNAL_STRENGTH(t_ptr->signal_level_at_search);
12413 FUNCTION_FINISH(GetTransportTunedStrength);
12414 return(tuned_signal_strength);
12430 U8BIT tuned_signal_quality;
12432 FUNCTION_START(GetTransportTunedQuality);
12434 tuned_signal_quality = 0;
12437 if (t_ptr->signal_level_at_search != BAD_SIGNAL_STATUS)
12439 tuned_signal_quality = GET_SIGNAL_QUALITY(t_ptr->signal_level_at_search);
12443 FUNCTION_FINISH(GetTransportTunedQuality);
12444 return(tuned_signal_quality);
12462 FUNCTION_START(GetTransportListOriginalNetworkId);
12467 orig_nid = t_ptr->orig_net_id;
12470 FUNCTION_FINISH(GetTransportOriginalNetworkId);
12489 FUNCTION_START(GetTransportFreq);
12494 tp_freq = (t_ptr->frequency);
12497 FUNCTION_FINISH(GetTransportFreq);
12516 FUNCTION_START(GetTransportBwidth);
12521 switch (t_ptr->u.terr.bwidth)
12523 case TBWIDTH_8MHZ: {bwidth_no = 8;
break; }
12524 case TBWIDTH_7MHZ: {bwidth_no = 7;
break; }
12525 case TBWIDTH_6MHZ: {bwidth_no = 6;
break; }
12526 case TBWIDTH_5MHZ: {bwidth_no = 5;
break; }
12527 case TBWIDTH_10MHZ: {bwidth_no = 10;
break; }
12528 case TBWIDTH_UNDEFINED: {bwidth_no = 0;
break; }
12532 FUNCTION_FINISH(GetTransportBwidth);
12551 FUNCTION_START(GetTransportOffset);
12556 offset = t_ptr->u.terr.freq_offset;
12559 FUNCTION_FINISH(GetTransportOffset);
12578 U8BIT *trans_qam_string_ptr;
12581 FUNCTION_START(GetTransportConstellationString);
12586 switch (t_ptr->u.terr.constellation)
12588 case TUNE_TCONST_QPSK: {temp_str = (U8BIT *)
"QPSK QAM";
break; }
12589 case TUNE_TCONST_QAM16: {temp_str = (U8BIT *)
"16 QAM";
break; }
12590 case TUNE_TCONST_QAM64: {temp_str = (U8BIT *)
"64 QAM";
break; }
12595 trans_qam_string_ptr = NULL;
12596 if (temp_str != NULL)
12600 if (trans_qam_string_ptr != NULL)
12602 memcpy(trans_qam_string_ptr, temp_str, nbytes);
12606 FUNCTION_FINISH(GetTransportConstellationString);
12607 return(trans_qam_string_ptr);
12624 U8BIT *hierarchy_str;
12627 FUNCTION_START(GetTransportHierarchyString);
12632 switch (t_ptr->u.terr.hierarchy)
12634 case TUNE_THIERARCHY_NONE: {temp_str = (U8BIT *)
"None";
break; }
12635 case TUNE_THIERARCHY_1: {temp_str = (U8BIT *)
"1";
break; }
12636 case TUNE_THIERARCHY_2: {temp_str = (U8BIT *)
"2";
break; }
12637 case TUNE_THIERARCHY_4: {temp_str = (U8BIT *)
"4";
break; }
12642 hierarchy_str = NULL;
12643 if (temp_str != NULL)
12647 if (hierarchy_str != NULL)
12649 memcpy(hierarchy_str, temp_str, nbytes);
12653 FUNCTION_FINISH(GetTransportHierarchyString);
12654 return(hierarchy_str);
12672 static BOOLEAN CheckServiceInListType(
ADB_SERVICE_REC *s_ptr, U32BIT list_type, BOOLEAN inc_hidden,
12673 BOOLEAN ignore_selectable)
12678 FUNCTION_START(CheckServiceInListType);
12684 if (!s_ptr->hidden || ignore_selectable || (inc_hidden && s_ptr->selectable))
12686 if ((list_type == ADB_SERVICE_LIST_ALL) ||
12687 (((list_type & ADB_SERVICE_LIST_TV) != 0) &&
12688 ((s_ptr->serv_type == ADB_SERVICE_TYPE_TV) ||
12689 (s_ptr->serv_type == ADB_SERVICE_TYPE_AVC_SD_TV) ||
12690 (s_ptr->serv_type == ADB_SERVICE_TYPE_HD_TV) ||
12691 (s_ptr->serv_type == ADB_SERVICE_TYPE_MPEG2_HD) ||
12692 (s_ptr->serv_type == ADB_SERVICE_TYPE_UHD_TV)
12694 (((list_type & ADB_SERVICE_LIST_RADIO) != 0) &&
12695 ((s_ptr->serv_type == ADB_SERVICE_TYPE_RADIO) ||
12696 (s_ptr->serv_type == ADB_SERVICE_TYPE_AVC_RADIO)
12698 (((list_type & ADB_SERVICE_LIST_DATA) != 0) && (s_ptr->serv_type == ADB_SERVICE_TYPE_DATA)) ||
12699 (((list_type & ADB_SERVICE_LIST_FAV_GROUP_A) != 0) && ((s_ptr->fav_groups & FAV_GROUP_A) != 0)) ||
12700 (((list_type & ADB_SERVICE_LIST_FAV_GROUP_B) != 0) && ((s_ptr->fav_groups & FAV_GROUP_B) != 0)) ||
12701 (((list_type & ADB_SERVICE_LIST_FAV_GROUP_C) != 0) && ((s_ptr->fav_groups & FAV_GROUP_C) != 0)) ||
12702 (((list_type & ADB_SERVICE_LIST_FAV_GROUP_D) != 0) && ((s_ptr->fav_groups & FAV_GROUP_D) != 0)) ||
12703 (((list_type & ADB_SERVICE_LIST_ANALOG) != 0) && ((s_ptr->serv_type == ADB_SERVICE_TYPE_ANALOG) != 0)) ||
12704 ((list_type & ADB_SERVICE_LIST_FAV_LIST) != 0))
12706 if ((list_type & ADB_SERVICE_LIST_FREESAT) == 0 ||
12707 (s_ptr->freesat_id != INVALID_FREESAT_SERV_ID &&
12708 ((s_ptr->allocated_lcn >= 100 && s_ptr->allocated_lcn <= 999) ||
12709 (s_ptr->allocated_lcn >= 1100 && s_ptr->allocated_lcn <= 1999))))
12711 if ((list_type & ADB_SERVICE_LIST_FAV_LIST) != 0)
12732 FUNCTION_FINISH(CheckServiceInListType);
12751 static void GetServiceList(U32BIT list_type,
void ***slist_ptr, U16BIT *num_entries_ptr,
12752 BOOLEAN show_hidden, BOOLEAN ignore_selectable)
12755 U16BIT max_no_entries;
12756 U16BIT num_entries;
12762 FUNCTION_START(GetServiceList);
12770 max_no_entries = 0;
12775 if ((list_type & ADB_SERVICE_LIST_FAV_LIST) != 0)
12787 if (max_no_entries > 0)
12792 if ((list_type & ADB_SERVICE_LIST_FAV_LIST) != 0)
12796 s_ptr = fav_serv->serv_ptr;
12808 for (i = 0; ((i < max_no_entries) && (s_ptr != NULL)); i++)
12811 (CheckServiceInListType(s_ptr, list_type, show_hidden, ignore_selectable) == TRUE))
12815 if (!HasNordigSimulcastService(s_ptr))
12817 slist[num_entries] = (
void *)s_ptr;
12823 slist[num_entries] = (
void *)s_ptr;
12828 if ((list_type & ADB_SERVICE_LIST_FAV_LIST) != 0)
12832 s_ptr = fav_serv->serv_ptr;
12845 if (num_entries == 0)
12853 *slist_ptr = slist;
12854 *num_entries_ptr = num_entries;
12858 FUNCTION_FINISH(GetServiceList);
12877 static U8BIT* GetServiceNameByLangAndPrefId(
ADB_SERVICE_REC *s_ptr, U8BIT lang, U8BIT pref_name_id,
12878 BOOLEAN short_name)
12882 FUNCTION_START(GetServiceNameByLangAndPrefId);
12887 if (short_name == TRUE)
12889 name_str = ExtractShortName(s_ptr->name_array[lang][pref_name_id]);
12893 name_str = CopyString(s_ptr->name_array[lang][pref_name_id], TRUE);
12896 FUNCTION_FINISH(GetServiceNameByLangAndPrefId);
12916 FUNCTION_START(GetServiceLcn);
12921 lcn_value = s_ptr->allocated_lcn;
12923 FUNCTION_FINISH(GetServiceLcn);
12943 FUNCTION_START(GetServiceId);
12948 sid_value = s_ptr->serv_id;
12950 FUNCTION_FINISH(GetServiceId);
12966 static BOOLEAN GetServiceUnavailFlag(
void *s_ptr)
12968 BOOLEAN unavailable;
12970 FUNCTION_START(GetServiceUnavailFlag);
12972 unavailable = FALSE;
12978 FUNCTION_FINISH(GetServiceUnavailFlag);
12979 return(unavailable);
12993 static BOOLEAN GetServiceNewFlag(
void *s_ptr)
12995 BOOLEAN new_service;
12997 FUNCTION_START(GetServiceNewFlag);
12999 new_service = FALSE;
13005 FUNCTION_FINISH(GetServiceNewFlag);
13006 return(new_service);
13021 static U8BIT* GetNetworkName(
ADB_NETWORK_REC *n_ptr, BOOLEAN short_name)
13027 FUNCTION_START(GetNetworkName);
13035 if (lang_ids != NULL)
13037 for (i = 0; (i < ACFG_MAX_DB_LANG_CODES) &&
13038 (lang_ids[i] != ACFG_INVALID_DB_LANG) && (name_str == NULL); i++)
13040 if (n_ptr->name_array[lang_ids[i]] != NULL)
13042 name_str = GetNetworkNameByLang(n_ptr, lang_ids[i], short_name);
13047 if (name_str == NULL)
13050 name_str = GetDefaultNetworkName(n_ptr, short_name);
13053 FUNCTION_FINISH(GetNetworkName);
13070 static U8BIT* GetNetworkNameByLang(
ADB_NETWORK_REC *n_ptr, U8BIT lang, BOOLEAN short_name)
13074 FUNCTION_START(GetNetworkNameByLang);
13081 name_str = ExtractShortName(n_ptr->name_array[lang]);
13085 name_str = CopyString(n_ptr->name_array[lang], TRUE);
13088 FUNCTION_FINISH(GetNetworkNameByLang);
13105 static U8BIT* GetDefaultNetworkName(
ADB_NETWORK_REC *n_ptr, BOOLEAN short_name)
13109 FUNCTION_START(GetDefaultNetworkName);
13117 name_str = ExtractShortName(n_ptr->name_str);
13121 name_str = CopyString(n_ptr->name_str, TRUE);
13124 FUNCTION_FINISH(GetDefaultNetworkName);
13143 FUNCTION_START(GetNetworkId);
13148 nid_value = n_ptr->net_id;
13150 FUNCTION_FINISH(GetNetworkId);
13174 FUNCTION_START(CopyEventRec);
13181 if (tmp_event != NULL)
13183 memset(tmp_event, 0,
sizeof(
S_EVENT));
13185 tmp_event->serv_ptr = (
void *)s_ptr;
13186 tmp_event->event_id = e_ptr->event_id;
13190 FUNCTION_FINISH(CopyEventRec);
13198 BOOLEAN do_not_scramble;
13200 FUNCTION_START(FindDoNotScramble);
13203 do_not_scramble = TRUE;
13207 if (e_ptr->has_content_management_desc)
13210 do_not_scramble = e_ptr->do_not_scramble;
13217 if (s_ptr->has_fta_desc)
13219 do_not_scramble = s_ptr->do_not_scramble;
13224 if (s_ptr->transport != NULL)
13226 if (s_ptr->transport->has_fta_desc)
13228 do_not_scramble = s_ptr->transport->do_not_scramble;
13233 if (s_ptr->transport->network != NULL)
13235 if (s_ptr->transport->network->has_fta_desc)
13237 do_not_scramble = s_ptr->transport->network->do_not_scramble;
13242 if (s_ptr->transport->network->satellite != NULL)
13244 if (s_ptr->transport->network->satellite->has_fta_desc)
13246 do_not_scramble = s_ptr->transport->network->satellite->do_not_scramble;
13256 FUNCTION_FINISH(FindDoNotScramble);
13258 return(do_not_scramble);
13266 static BOOLEAN HasNordigSimulcastService(
void *serv_ptr)
13272 FUNCTION_START(HasNordigSimulcastService);
13277 if (temp_serv_ptr != NULL)
13279 desc_ptr = temp_serv_ptr->linkage_desc_list;
13280 while ((desc_ptr != NULL) && !found)
13282 if (desc_ptr->link_type == NORDIG_SIMULCAST_TYPE)
13285 desc_ptr->tran_id, desc_ptr->serv_id) != NULL)
13290 desc_ptr = desc_ptr->next;
13294 FUNCTION_FINISH(HasNordigSimulcastService);
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...
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...
U16BIT ADB_FindServiceInList(void *s_ptr, void **slist_ptr, U16BIT num_entries)
Returns the index in the given list of services of the given service.
U8BIT ** ADB_GetServiceListTransportNames(void **slist, U16BIT num_entries)
Allocates and returns a list of transport names for all the services in the given service list...
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...
BOOLEAN ADB_GetEventAudioDescriptionFlag(void *event_ptr)
Returns whether audio description is signalled as being available for the given event.
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...
U16BIT ADB_GetNumNetworks(void)
Returns the number of network records in the database.
void * ADB_EarlierEvent(void *serv_ptr, U32DHMS time)
Returns a copy of the event preceeding the given date/time on the given service.
U8BIT DBDEF_GetEventParentalAge(ADB_EVENT_REC *e_ptr)
Returns the parental age value for the given event.
void DBDEF_SetTunedTransport(U8BIT path, ADB_TRANSPORT_REC *t_ptr)
sets the currently tuned transport
U8BIT ADB_GetTransportBwidth(void *t_ptr)
Returns the bandwidth value of the given DVB-T/T2 transport.
void * ADB_GetTransportNetworkPtr(void *t_ptr)
Returns the network of the given transport.
U8BIT * STB_ConvertStringToUnicode(U8BIT *string, BOOLEAN *reverse_dir, U16BIT *nchar, BOOLEAN strip_DVB_cntrl_char, U32BIT lang_code)
Converts the specified DVB coded string into a unicode string, counting the number of characters and ...
void DBDEF_DeleteCridRecord(ADB_CRID_REC *c_ptr)
Deletes the given CRID record from the database.
U32DHMS STB_GCCalculateDHMS(U32DHMS dhms, U32DHMS period, E_STB_GC_CALCTYPE calc)
Calculates the date/time when the period is added/subtracted to/from dhms.
U16BIT ADB_GetServicePCRPid(void *s_ptr)
Returns the PCR PID for the given service.
void ADB_AllocateLcns(E_STB_DP_SIGNAL_TYPE tuner_type)
Allocates LCNs to services after a service search. This function assumes that ADB_FinaliseDatabaseAft...
U16BIT ADB_GetStreamTagContentType(void *stream_ptr, U8BIT index)
For the given stream and index into component tag array for stream, return stream content and compone...
void ADB_SetTransportSearchFlag(void *t_ptr, BOOLEAN state)
Sets whether a transport has been used during a service scan operation.
void ASI_NotifyEitSchedUpdate(void *serv_ptr, U16BIT event_id, E_APP_SI_EIT_JOURNAL_TYPE type)
Calls the EIT schedule update callback function, if one has been registered, with details of the serv...
void ADB_GetServiceListIncludingHidden(U32BIT list_type, void ***slist_ptr, U16BIT *num_entries_ptr, BOOLEAN ignore_selectable)
Allocates and returns a list of all services in the database for the given list type, including hidden services.
U32BIT * ADB_GetServiceListHdFlag(void **slist, U16BIT num_entries)
Allocates and returns an array indicating whether each service in the given service list is an HD ser...
void * ADB_GetLNBBandLNB(void *band_ptr)
Returns the LNB associated with the band.
U16BIT ADB_GetNumSatellites(void)
Returns the number of satellites in the database.
void DBDEF_DeleteEventList(ADB_EVENT_REC *elist)
Deletes all events in the given list.
U16BIT ADB_GetStreamPID(void *stream_ptr)
Returns the PID for the given stream.
U16BIT ADB_GetServiceId(void *s_ptr)
Returns the signalled service id of the given service.
void ADB_FinaliseDatabaseAfterSearch(BOOLEAN save_changes, E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite, BOOLEAN search_completed, BOOLEAN clear_new_flags, BOOLEAN manual_search)
Completes the database setup after a search.
void * ADB_AddLNBBand(S_STB_DP_LNB_BAND *band_parameters, void *lnb_ptr)
Creates a new LNB band in the database with the given settings.
void ADB_SaveCridRecord(void *c_ptr)
Saves a CRID record to non-volatile storage.
U8BIT * ADB_GetFullCrid(void *serv_ptr, U8BIT *event_str)
Returns the full CRID for the given CRID string The returned string should be freed using STB_AppFree...
void ADB_SetCridDateTime(void *c_ptr, U32DHMS datetime)
Sets the date and time fields on the given CRID record.
U16BIT ADB_GetNetworkId(void *n_ptr)
Returns the network id of the given network.
U8BIT ** ADB_GetServiceListFullNames(void **slist, U16BIT num_entries, BOOLEAN use_pref_names)
Allocates and returns a list of the fullnames for all the services in the given service list...
U16BIT DBDEF_GetNumServicesInFavouriteList(ADB_FAVLIST_REC *fav_list)
Returns the number of services in the given favourite list.
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...
U8BIT * DBDEF_GetTextLang(void)
returns array of current text langs
void * ADB_FindCridRecord(U8BIT *crid_str)
Searches for and returns the CRID record with the given CRID string.
void DBDEF_SetSecondaryTextLang(U8BIT *lang_ids)
sets secondary text lang
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.
void * ADB_AddSatellite(U8BIT *name_str, U16BIT dish_pos, U16BIT long_pos, BOOLEAN east_west, void *lnb_ptr)
Creates a new satellite in the database with the given settings.
void * ADB_GetNextServiceInList(U32BIT list_type, void *serv)
Returns the next service, in LCN order, for the given list type, starting from the given service...
U16BIT DBDEF_GetNumSatellites(void)
Returns the number of satellite records in the database.
ADB_STREAM_TYPE ADB_GetServiceAudioType(void *s_ptr)
Returns the audio type being used by the given service.
BOOLEAN DBDEF_SetLNB22k(ADB_LNB_REC *lnb, BOOLEAN is_22k)
Sets the LNB 22k setting.
U16BIT ADB_GetEventId(void *event_ptr)
Returns the event id for the given event.
U8BIT * ADB_GetEventGuidance(void *event_ptr, void *serv_ptr, U8BIT *type, U8BIT *mode)
Returns the guidance text for an event, either from the event itself or the event's service...
BOOLEAN ADB_GetServiceHiddenFlag(void *s_ptr)
Returns the hidden status of the given service. A hidden service should not be present to the user in...
BOOLEAN DBA_SaveDatabase(void)
Saves any changes made to the working database to non-volatile storage. If saving to a file...
U32BIT * ADB_GetServiceListNewFlag(void **slist, U16BIT num_entries)
Allocates and returns an array of the 'new' flags for each of the services in the given service list...
U8BIT ADB_GetStreamComponentType(void *stream_ptr)
Returns the component type as defined in the EITp/f's component descriptor for the given stream...
BOOLEAN ADB_ServiceRCTCanUseDefaultIcon(void *serv_ptr)
Checks all the RCT links for the given service to determine whether any of them specify that the defa...
void ADB_SetCridDoNotDelete(void *c_ptr, BOOLEAN do_not_delete)
Sets the do not delete flag for the given CRID.
void ADB_SetServiceFavGroups(void *s_ptr, U8BIT groups)
Sets the favourite group value for the given service. This is an 8-bit value that can define whether ...
void * ADB_GetTunedTransport(U8BIT path)
Returns the transport that's tuned to on the given decode path.
BOOLEAN DBA_RestoreDatabase(void)
Restores the working database from a previously made backup copy.
void * ADB_GetNextLNB(void *lnb_ptr)
Returns the next LNB from the database.
ADB_SERVICE_LIST_TYPE ADB_GetServiceListTypeForCurrentProfile(void)
Returns the default list type for the current profile. This function returns ADB_SERVICE_LIST_ALL if ...
U8BIT * ADB_GetServiceShortNameByLangAndPrefId(void *s_ptr, U8BIT lang, U8BIT pref_name_id)
Returns the short name of the given service as a UTF-8 string using the given language and preferred ...
U16BIT ADB_GetCridEitDate(void *c_ptr)
Returns the EIT update date contained in the given CRID record.
void ADB_SetSecondaryAudioLang(U32BIT country_code, U8BIT lang_id)
Sets the secondary audio language to be used. This will be selected if the primary audio language isn...
void ADB_ReleaseTransportList(void **tlist, U16BIT num_transports)
Frees a transport list returned from one of the ADB_GetTransportList functions.
BOOLEAN ADB_GetServiceScrambledFlag(void *s_ptr)
Returns the status of the 'scrambled' flag of the given service. This flag is set depending on the sc...
U16BIT ADB_GetNumLNBBands(void)
Returns the number of LNB bands in the database.
void ADB_SetServiceListLockedFlag(void **slist, U16BIT num_entries, BOOLEAN locked)
Sets the locked state of all services in the given service list.
BOOLEAN DBA_BackupDatabase(U8BIT *pathname)
Creates a backup copy of the working database. Whether the backup database is saved to non-volatile s...
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.
BOOLEAN ADB_IsSeriesCrid(void *c_ptr)
Returns TRUE if the CRID record given represents a series.
BOOLEAN ADB_GetStreamHasCaDesc(void *stream_ptr)
Returns whether the given stream has a CA descriptor.
U8BIT ADB_GetServiceFavGroups(void *s_ptr)
Returns the favourite group value for the given service. This is an 8-bit value that can define wheth...
Application configuration.
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.
U32BIT * ADB_GetTransportListBwidths(void **tlist, U16BIT num_entries)
Returns the transport bwidth_array.
U16BIT ADB_GetNumStreams(void *serv_ptr, ADB_STREAM_LIST_TYPE stream_list_type)
Returns the number of streams of the given type for the given service.
void ADB_ReleaseNetworkList(void **nlist)
Frees a network list returned by ADB_GetNetworkList.
U16BIT DBDEF_GetNumCridRecords(void)
Returns the number of CRID records in the database.
U8BIT * STB_ConvertUTF16toUTF8(U8BIT *src, U32BIT *outlen)
Creates the given string from UTF-16 to UTF-8 and returns a new string. The returned string should be...
void ADB_GetUnavailableServiceList(void ***slist_ptr, U16BIT *num_entries_ptr)
Allocates and returns a list of all services that are marked as being unavailable. A service becomes unavailable when it disappears from the SDT.
U32BIT ADB_GetSubtitleStreamLangCode(void *stream_ptr)
Returns the 3 char language code of the given subtitle stream.
void * ADB_FindServiceByNearestLcn(U32BIT list_type, U16BIT lcn)
Returns the service matching the given, or preceding, LCN and list type.
U16BIT ADB_GetServicePmtPid(void *s_ptr)
Returns the current PMT PID for the given service.
void ADB_SetServiceHiddenFlag(void *s_ptr, BOOLEAN hidden)
Sets the hidden status of the given service, which means the service would not be presented to the us...
Application database control.
U32DHMS STB_GCNowDHMSGmt(void)
Reads the current GMT date code and time.
U16BIT ADB_GetNumDeletedServices(E_STB_DP_SIGNAL_TYPE tuner_type)
Returns the number of services marked as deleted with the given tuner type.
BOOLEAN ADB_GetSatelliteDirection(void *sat_ptr)
Returns the position direction of the given satellite.
U16BIT DBDEF_GetDeletedServiceList(E_STB_DP_SIGNAL_TYPE tuner_type, void ***slist_ptr)
Header file - macros and function prototypes for public use.
BOOLEAN DBDEF_IsActiveProfile(ADB_NETWORK_REC *profile)
Is the given profile the currently active profile?
void ACTL_TuneOff(U8BIT path)
Stops tuning on the given path.
U8BIT * ACTL_GetRfNameFromFreq(E_STB_DP_SIGNAL_TYPE tuner_type, U32BIT freq_hz)
Returns the rf name appropriate to the frequency specified.
void ADB_SortServiceListAlphabetically(void **slist, U16BIT num_entries, BOOLEAN short_name)
Sorts the given list of services into alphabetical order. Case is significant.
Header file for NVM data handling functions.
void ADB_ReleaseEventSIDescriptorData(U8BIT *desc_data, U16BIT desc_len)
Frees the data returned by ADB_GetEventSIDescriptorData.
U8BIT ADB_GetEventStartHour(void *event_ptr)
Returns the hour (0-23) value for the start of the given event.
void * ADB_GetTransportFromIds(U16BIT net_id, U16BIT onet_id, U16BIT tran_id)
Finds the transport with the given ids.
void ADB_SetReqdSubtitleStreamSettings(void *s_ptr, BOOLEAN valid, U32BIT lang_code, ADB_SUBTITLE_TYPE subtitle_type)
Explicitly sets or clears the stream that will be used for subtitles on the given service...
void ADB_DeleteAllServiceEvents(BOOLEAN delete_now_next)
Deletes all events and event related data for all services.
BOOLEAN ADB_GetEventHDLinkageInfo(void *event_ptr, BOOLEAN verify_event, BOOLEAN only_simulcast, void **hd_serv_ptr, void **hd_event_ptr)
Returns whether there's an HD event linked to the SD event and returns the info for it...
ADB_TRANSPORT_REC * DBDEF_FindTerrestrialTransportRec(U32BIT freq_hz, U8BIT plp_id)
Find the terrestrial transport record in the database matching the given params.
BOOLEAN DBDEF_SetLNBCSwitch(ADB_LNB_REC *lnb, E_STB_DP_DISEQC_CSWITCH cswitch)
Sets the LNB committed switch setting.
void ADB_SetServiceLcn(void *s_ptr, U16BIT lcn)
Sets the assigned logical channel number of the given service. This will override any LCN assigned wh...
BOOLEAN ADB_AddFavouriteList(U8BIT *name, U32BIT user_data, S16BIT index, U8BIT *list_id)
Creates a new favourite list and adds it to the existing lists, if any.
void DBDEF_SetCridProgrammeName(ADB_CRID_REC *c_ptr, U8BIT *prog_name)
Sets the programme name field of the given CRID record.
BOOLEAN ADB_GetServiceScheduleState(void *s_ptr)
Returns whether the EIT schedule events are being held in memory for the service. ...
U8BIT ADB_GetStreamNumTags(void *stream_ptr)
Returns the number of tag values defined for the given stream.
void * ADB_AddCridRecord(U8BIT *crid, BOOLEAN series, BOOLEAN recommended)
Adds a CRID record to the database; use ADB_SaveCridRecord to store it. If a CRID record with the giv...
void DBDEF_SetTunedService(U8BIT path, ADB_SERVICE_REC *s_ptr)
Sets the currently tuned service.
void STB_SIReleaseTargetRegionList(SI_TARGET_REGION_DESC *desc_list)
Frees the memory used by the descriptor list specified.
void ADB_GetLockedServiceList(void ***slist_ptr, U16BIT *num_entries_ptr)
Allocates and returns a list of all services that are marked as locked for parental control purposes...
U8BIT * ADB_GetAuthorityFromCrid(U8BIT *crid)
Returns a copy of the authority part of the CRID string The returned string should be freed using STB...
void * STB_AppGetMemory(U32BIT bytes)
Attempts to allocate memory from the application heap.
void * ADB_GetEarlierEvent(void *serv_ptr, U16BIT date, U8BIT hour, U8BIT min)
Returns a copy of the event preceeding the given date/time on the given service.
U8BIT ADB_GetEventComponentList(void *event_ptr, ADB_EVENT_COMPONENT_INFO **component_list)
Retrieves a list of components associated with the specified event, as described by component descrip...
BOOLEAN ADB_GetCridDoNotDelete(void *c_ptr)
Returns the value of the do not delete flag for the given CRID record.
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.
void ADB_SetServiceLockedFlag(void *s_ptr, BOOLEAN locked)
Locks or unlocks the given service.
void ADB_GetReqdSubtitleStreamSettings(void *s_ptr, BOOLEAN *valid, U32BIT *lang_code, ADB_SUBTITLE_TYPE *subtitle_type)
Returns the settings defined by ADB_SetReqdSubtitleStreamSettings that will be used for subtitles on ...
E_STB_DP_VIDEO_CODEC ADB_GetVideoCodecFromStream(ADB_STREAM_TYPE video_stream_type)
Derive video codec from stream.
E_STB_DP_SIGNAL_TYPE ADB_GetServiceSignalType(void *s_ptr, BOOLEAN *is_sig2)
Returns the signal type for transport of given service. It also indicates the mode - i...
E_STB_TUNE_TCODERATE ADB_GetTransportLpCodeRate(void *t_ptr)
Returns the LP coderate of the given DVB-T/T2 transport.
void DBA_SaveRecord(void *record)
Forces a record to be saved to non-volatile storage. Depending on the implementation, this function may not do anything if the data is updated to non-volatile storage as any records and/or fields are created or updated.
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...
void ADB_GetTransportAnalogTuningParams(void *t_ptr, U32BIT *freq_hz, S8BIT *offset, E_STB_DP_ANALOG_VIDEO_TYPE *vtype)
Returns the settings to tune to the given terrestrial analog transport.
void DBA_EraseBackupDatabase(void)
Erases the backup copy of the database. If data was stored in non-volatile storage then this should b...
void DBDEF_SetAudioLang(U8BIT *lang_ids)
sets current audio lang
U8BIT * ADB_GetEventExtendedDescription(void *event_ptr)
Returns the extended event description text of the event as a UTF-8 string. The returned string shoul...
void ADB_ReleaseEventItemizedInfo(ADB_EVENT_ITEMIZED_INFO *event_itemized_info, U16BIT num_of_items)
Frees the memory used by event itemized data.
Structure representing the component information as found in the EIT component_descriptor.
void DBDEF_PopProfile(void)
Restores a previously pushed profile.
U16BIT ADB_GetSubtitleStreamCompositionPage(void *stream_ptr)
Returns the composition page value of the given subtitle stream.
U16BIT ADB_GetNetworkTertiaryTargetRegions(U32BIT country_code, U8BIT primary_region, U8BIT secondary_region, U16BIT **code_array, U8BIT ***name_array)
Returns an array of tertiary region codes and names for the given country, primary region and seconda...
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.
void ADB_ReleaseDatabaseSearchData(void)
Frees all data that's only required for service search. This should be called after the search is com...
U16BIT ADB_GetTransportTid(void *t_ptr)
Returns the transport id of the given transport.
E_STB_DP_AUDIO_MODE ADB_GetRequiredAudioMode(void *s_ptr)
Returns the mode to be used for audio for the given service based on language settings, output format, etc.
void ADB_GetTransportServiceList(void *t_ptr, void ***slist_ptr, U16BIT *num_entries_ptr)
Allocates and returns a list of all services in the database on the given transport.
void ADB_GetTransportListForTunerType(E_STB_DP_SIGNAL_TYPE tuner_type, void ***tlist_ptr, U16BIT *num_entries_ptr)
Allocates and returns a list of all transport records in the database for the given type of tuner...
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...
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 ...
U8BIT * STB_ConvertStringToUTF8(U8BIT *string, U16BIT *nchar, BOOLEAN strip_DVB_cntrl_char, U32BIT lang_code)
Converts the given DVB coded string into a UTF-8 unicode string. The returned string will be preceded...
U8BIT ADB_GetEventDurationSecs(void *event_ptr)
Returns the seconds value (0-59) for the duration of the given event.
U32BIT ADB_GetTtextStreamLangCode(void *stream_ptr)
Returns the 3 char language code of the given teletext stream.
U16BIT ADB_GetServiceLcn(void *s_ptr)
Returns the logical channel number assigned to the given service.
void DBDEF_ReleaseString(ADB_STRING *string)
Releases an ADB_STRING.
BOOLEAN ADB_GetServiceHasCaDesc(void *s_ptr)
Used to query whether the given service has a CA descriptor.
void ADB_PrepareDatabaseForSearch(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite, BOOLEAN retune, BOOLEAN manual_search)
Sets up the database for a search.
BOOLEAN DBDEF_SetLNBUnicable(ADB_LNB_REC *lnb, U32BIT inter_freq, U8BIT chan)
Sets the LNB Unicable settings.
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.
void DBDEF_ReleaseProfileList(void **profile_list, U16BIT num_profiles)
Frees a profile list returned by DBDEF_GetProfileList.
void ADB_DeleteAssociatedLNBBands(void *lnb_ptr)
Deletes LNB bands associated with a given LNB.
U8BIT * ADB_GetEventContentData(void *event_ptr, U8BIT *p_len)
Returns the level 1 and 2 values for all content identifiers for the given event. ...
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.
U16BIT DBDEF_GetNumFavouriteLists(void)
Returns the number of favourite lists.
U32BIT ADB_GetTransportFreqHz(void *t_ptr)
Returns the frequency, in Hz for DVB-T/T2 and DVB-C, and MHz for DVB-S/S2, of the given transport...
U16BIT ADB_GetCridService(void *c_ptr)
Returns the service ID held in the given CRID record.
BOOLEAN DBDEF_SetLNBRepeats(ADB_LNB_REC *lnb, U8BIT repeats)
Sets the LNB message repeat setting in the range 0 to 3.
void * ADB_GetServiceTransportPtr(void *s_ptr)
Returns a pointer to the service's parent transport record.
void ADB_Initialise(void)
Initialises database access.
void ADB_SetTunedService(U8BIT path, void *s_ptr)
Sets the tuned service for the given path, together with the associated tuned transport and network...
U32BIT * ADB_GetServiceListLockedFlag(void **slist, U16BIT num_entries)
Allocates and returns an array of the 'locked' flags for each of the services in the given service li...
U16BIT ADB_GetServiceAudioPid(void *s_ptr)
Returns the audio PID for the given service. This will be the one chosen based on the settings for la...
void STB_SIReleaseDelSysDesc(SI_DELIVERY_SYS_DESC *desc, SI_DELIVERY_SYS_DESC_TYPE type)
Frees the memory used by the descriptor specified.
U8BIT * ADB_GetEventName(void *event_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.
Application timer functions and defines.
void ADB_DeleteAllServicesFromFavouriteList(U8BIT list_id)
Removes all services from the favourite list defined by list_id.
U8BIT * ADB_GetCridString(void *c_ptr)
Returns the CRID string from the given CRID record. The returned value should not be freed...
ADB_SERVICE_REC * DBDEF_GetTunedService(U8BIT path)
Returns the currently tuned service on the given path.
U16BIT ADB_GetNumFavouriteLists(void)
Returns the number of favourite lists.
U16BIT ADB_ServiceGetSubtitlePid(void *serv_ptr, ADB_SUBT_INFO *subt_info)
Determines subtitle PID and whether it is DVB or teletext, for the given service. ...
U16BIT ADB_GetSubtitleStreamAncillaryPage(void *stream_ptr)
Returns the ancillary page value of the given subtitle stream.
BOOLEAN ADB_GetStreamInUse(void *stream_ptr)
Returns whether the given stream is marked as being 'in use', which means it will be the stream being...
U8BIT ADB_GetServiceContentProtectionLevel(void *s_ptr)
Returns the content protection level value for the service that will have been set by the Nordig cont...
void ADB_SetAudioLang(U32BIT country_code, U8BIT db_lang_id)
Sets the primary audio language to be used.
void ADB_SetServiceNowNextState(void *s_ptr, BOOLEAN state)
Sets whether the now/next EIT events for this service are held in memory. All services save now/next ...
void * ADB_AddLNB(ADB_LNB_SETTINGS *settings)
Creates a new LNB in the database with the given settings.
U8BIT * ADB_GetNetworkName(void *n_ptr)
Returns the name, in UTF-8 format, of the given network. The returned name should be freed using STB_...
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...
void ADB_SetCridProgrammeName(void *c_ptr, U8BIT *prog_name)
Sets the programme name field of the given CRID record.
BOOLEAN DBDEF_SetLNB12V(ADB_LNB_REC *lnb, BOOLEAN is_12v)
Sets the LNB 12V setting.
void ADB_DeleteServiceRec(void *s_ptr)
Deletes the given service from the database.
void DBDEF_DeleteServiceRec(ADB_SERVICE_REC *s_ptr)
Deletes specified service record.
void DBDEF_DeleteImageIcons(ADB_IMAGE_ICON *icon_list)
Frees given list of image icons and any associated memory.
ADB_FAVLIST_REC * DBDEF_FindFavouriteList(U8BIT list_id)
Return the favourite list with the given list id.
BOOLEAN ADB_AreLcnsDuplicated(E_STB_DP_SIGNAL_TYPE tuner_type)
Checks through all services after a service search and determines whether any of them require the sam...
U8BIT * ADB_GetFavouriteListName(U8BIT list_id)
Returns the name of the given favourite list, as a Unicode string.
ADB_LNB_REC * DBDEF_AddLNB(E_STB_DP_LNB_TYPE type, ADB_STRING *name)
Add an LNB record to the database.
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...
ADB_EVENT_ITEMIZED_INFO * ADB_GetEventItemizedDescription(void *event_ptr, U16BIT *num_items_ptr)
Returns the items of extended event descriptor as item descriptor and item itself.
void * ADB_AddServiceUsingDsd(U8BIT *data, U16BIT service_id)
Add service record defined by the given delivery system descriptor. If the DSD defines a transport th...
void DBDEF_SetAnalogServiceName(ADB_SERVICE_REC *s_ptr, U8BIT *new_name, U8BIT new_len)
Updates analog service names - ASSUMES NORMAL ASCII CODED.
void ADB_SetServiceDeletedFlag(void *s_ptr, BOOLEAN deleted)
Sets the 'deleted' flag for the given service as a deleted service. If it's marked as deleted then it...
ADB_FAVSERV_REC * DBDEF_GetPrevServiceFromFavouriteList(ADB_FAVLIST_REC *fav_list, ADB_FAVSERV_REC *fav_serv)
Returns the previous favourite list service record.
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...
U16BIT ADB_GetServiceOrigLcn(void *s_ptr)
Returns the logical channel number originally requested by the given service.
U8BIT * ADB_GetServiceProviderName(void *s_ptr)
Returns the provider name, as a UTF-8 string, using the default language, of the given service...
U16BIT ADB_GetServiceVideoPid(void *s_ptr)
Returns the video PID for the given service.
void * ADB_FindServiceByLcn(U32BIT list_type, U16BIT lcn, BOOLEAN show_unselectable)
Returns the service matching the given LCN and list type.
BOOLEAN DBDEF_SetLNBDiSEqCTone(ADB_LNB_REC *lnb, E_STB_DP_DISEQC_TONE diseqc_tone)
Sets the LNB DiSEqC tone setting.
void ADB_SetTunedTransport(U8BIT path, void *t_ptr)
Sets the given transport as the one tuned to on the given decode path. The transport's network is als...
BOOLEAN ADB_GetEventFreeToAir(void *event_ptr)
Returns whether the event is signalled with none of its streams being CA scrambled.
BOOLEAN DBDEF_GetEventAudioDescriptionFlag(ADB_EVENT_REC *e_ptr)
Returns whether audio description is signalled as being available for the given event.
void ADB_ReleaseEventData(void *event_ptr)
Frees any memory allocated for the given event and the event itself.
U8BIT ** ADB_GetNetworkListNames(void **nlist, U16BIT num_entries, BOOLEAN short_names)
Returns a list of names, in UTF-8 format, corresponding to the given network list. The returned list should be freed using ADB_ReleaseNameList.
ADB_STRING * DBDEF_GetServiceProviderName(ADB_SERVICE_REC *s_ptr)
Returns a pointer to the service provider name.
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 ...
U8BIT ADB_GetTtextStreamMagazine(void *stream_ptr)
Returns the magazine value of the given teletext stream.
BOOLEAN ADB_GetServiceDoNotScramble(void *s_ptr)
Returns the do_not_scramble flag for the service which is based on the presence of an FTA descriptor...
E_STB_DP_TMODE ADB_GetTransportTerrMode(void *t_ptr)
Returns the terrestrial mode of the given DVB-T/T2 transport.
U16BIT ADB_FindNearestLcnInServiceList(U16BIT lcn, void **slist_ptr, U16BIT num_entries)
Returns the index in the given list of services of the service matching the given, or preceding, LCN.
U16BIT DBDEF_GetNumServices(void)
Returns the total number of services.
U32BIT STB_OSGetClockRTC(void)
Returns the current time in seconds. This is calculated by using the set UTC time and adding the diff...
ADB_EVENT_CONTENT DBDEF_GetEventGenre(ADB_EVENT_REC *e_ptr, ADB_SERVICE_REC *s_ptr)
Returns the genre of an event.
U32DHMS ADB_GetEventDuration(void *event_ptr)
Returns a value representing the duration of the given event.
U8BIT * ADB_GetServiceShortName(void *s_ptr, BOOLEAN use_pref_name)
Returns the short name of the given service as a UTF-8 string. The returned string should be freed us...
U8BIT * ADB_GetEventSeriesCrid(U8BIT index, void *serv_ptr, void *event_ptr)
Returns the full series CRID of the given event The returned string should be freed using STB_AppFree...
U8BIT STB_DPGetLivePath(void)
Returns the ID of the decode path being used for live viewing.
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...
U8BIT * ADB_GetTransportName(void *t_ptr)
Returns the name, in UTF-8 format, of the given transport. The returned name should be freed using ST...
U16BIT ADB_FindLcnInServiceList(U16BIT lcn, void **slist_ptr, U16BIT num_entries)
Returns the index into the given list of services of the service with the given LCN.
void ADB_SaveEventSchedule(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite)
Saves the event schedule for all services for the given type of tuner to the database. Note: the database has to support this operation.
void ADB_UpdateCridEitDate(void *c_ptr)
Updates the time the CRID was last seen in the EIT.
U16BIT ADB_GetEventStartDate(void *event_ptr)
Returns the MJD date code for the start of the given event.
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 ...
S8BIT STB_CompareUnicodeStrings(U8BIT *string1_ptr, U8BIT *string2_ptr, BOOLEAN exact_match, BOOLEAN ignore_case)
Compares the contents of the two given unicode strings and returns the status (as per strcmp) ...
void ADB_GetCridRecordList(void ***clist_ptr, U16BIT *num_entries_ptr, BOOLEAN inc_series_crids, BOOLEAN inc_rec_crids, BOOLEAN inc_prog_crids)
Creates an array of CRID record pointers to pass back to the caller with the number of entries in the...
void ADB_GetEventSchedule(BOOLEAN include_old_events, void *serv_ptr, void ***elist_ptr, U16BIT *num_entries_ptr)
Allocates and returns an array containing copies of events for the given service from the service's E...
BOOLEAN ADB_GetServiceIsHd(void *s_ptr)
Returns whether the service is signalled as an HD service.
U16BIT DBDEF_GetNumLNBs(void)
Returns the number of LNB records in the database.
void STB_FreeMemory(void *addr)
Releases previously allocated heap memory.
U16BIT ADB_GetNumServices(void)
Returns the total number of services in the database.
U8BIT * ADB_GetEventDescription(void *event_ptr)
Returns the short event description text of the event as a UTF-8 string. The returned string should b...
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.
void * ADB_GetAlternativeService(void *s_ptr, U8BIT alt_serv_type)
Searches for a replacement service of the given type for the given service.
U16BIT ADB_GetTransportSatelliteSymbolRate(void *t_ptr)
Returns the symbol rate of the given satellite transponder.
BOOLEAN ADB_IsProgrammeCrid(void *c_ptr)
Returns TRUE if the CRID record given represents a programme (split event)
BOOLEAN ADB_IsSameEvent(void *event1_ptr, void *event2_ptr)
Checks whether the two events are the same. Not all fields are checked, just date, time, duration and event ID.
void DBDEF_SaveServiceEventSchedule(ADB_SERVICE_REC *s_ptr)
Saves the event schedule of a service to the service database.
void ADB_ServiceReleaseRCTLinks(void *serv_ptr)
Frees all RCT link info for the given service.
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...
BOOLEAN DBDEF_AddAnalogService(void)
Adds an analogue service, transport and, if necessary, network to the database based on the current t...
BOOLEAN STB_SIParseDelSysDesc(U8BIT *data, SI_DELIVERY_SYS_DESC_TYPE *type, SI_DELIVERY_SYS_DESC **desc)
Parses and allocates a system delivery descriptor which should be freed by calling STB_SIReleaseDelSy...
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. ...
void STB_ReleaseUnicodeString(U8BIT *string)
Releases the specified unicode string, freeing associated heap resources.
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...
BOOLEAN ADB_IsRecommendationCrid(void *c_ptr)
Returns TRUE if the CRID record given represents a recommendation.
BOOLEAN ADB_GetLNBSettings(void *lnb_ptr, ADB_LNB_SETTINGS *settings)
Returns the current settings for the given LNB.
U8BIT * ADB_GetEventFullProgrammeCrid(void *serv_ptr, void *event_ptr)
Returns the full programme CRID of the given event (including IMI). The returned string should be fre...
void DBDEF_ReleaseAccess(void)
Releases access to the app's database.
U8BIT * ADB_GetNetworkNameByLang(void *n_ptr, U8BIT lang)
Returns the name in the language defined by lang, in UTF-8 format, of the given network. The returned name should be freed using STB_ReleaseUnicodeString.
U32BIT * ADB_GetNetworkListIds(void **nlist, U16BIT num_entries)
Allocates and returns an array of network ids for the given networks The returned array should be fre...
void ADB_ServiceAddRCTLink(void *serv_ptr, void *link_ptr)
Adds the given RCT link info to the end of the list of existing RCT links already defined for the giv...
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.
U32BIT * ADB_GetTransportListFreqs(void **tlist, U16BIT num_entries)
Allocates and returns an array of tuning frequencies for each transport in the given list...
BOOLEAN ADB_GetServiceNewFlag(void *s_ptr)
Returns the status of the 'new' flag of the given service. This flag indicates whether a service has ...
BOOLEAN ACFG_IsNordigCountry(void)
Returns whether the current country requires Nordig compliance for SI.
void DBDEF_UpdateCridEitDate(ADB_CRID_REC *c_ptr)
Updates the stored EIT date of this CRID with the current GMT date.
void ADB_ReleaseEventList(void **elist, U16BIT num_entries)
Frees all teh events in the given list and all associated memory for those events.
U8BIT * ACFG_GetDbLangId(U32BIT country_code, U8BIT lang_entry)
Returns an array of language ids for a given country and index into the language array. A language id is one of the ACFG_DB_LANG_XXXX values above and there might be more than one for a given language. For example german language has two ids associated to it: ACFG_DB_LANG_GERMAN1 and ACFG_DB_LANG_GERMAN2 because german language can have two different codes, 'deu' and 'ger'. See also functions ACFG_ConvertLangIdToCode and ACFG_ConvertLangCodeToId. The returned pointer is an internal array and must not be freed.
Debug functions header file.
Header file - Function prototypes for linked lists.
Header file - macros and function prototypes for public use.
void ADB_ReleaseNameList(U8BIT **name_list, U16BIT num_names)
Frees the memory used by any of the name lists (e.g. networks, services, etc)
void ADB_DeleteCridRecord(void *c_ptr)
Deletes the given CRID record from the database.
void DBDEF_SetTextLang(U8BIT *lang_ids)
sets current text lang
BOOLEAN ADB_GetServiceLockedFlag(void *s_ptr)
Returns the status of the 'locked' flag of the given service, which is used by the parental control...
Header file - macros and function prototypes for public use.
void DBDEF_SetCridDoNotDelete(ADB_CRID_REC *c_ptr, BOOLEAN do_not_delete)
Sets the do not delete flag in the crid record.
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.
U8BIT ADB_GetEventNumSeriesCrids(void *event_ptr)
Returns the number of series CRIDs for the given event.
U16BIT ADB_GetServiceTextPid(void *s_ptr)
Returns the PID being used for DVB subtitles and/or teletext for the given service. This will be the one chosen based on the settings for language, etc, or the one explicitly set (e.g. due to user selection).
void ADB_ResetDatabase(void)
Clears the service database and resets everything to default values.
U8BIT * ADB_GetServiceFullName(void *s_ptr, BOOLEAN use_pref_name)
Returns the full name of the given service as a UTF-8 string. The returned string should be freed usi...
Database access defines, structures and public functions.
void * ADB_FindServiceByIds(U16BIT onet_id, U16BIT tid, U16BIT sid)
Returns a pointer to the service matching the given IDs.
U8BIT ADB_GetNetworkTargetCountries(U32BIT **code_array)
Returns a combined array of country codes for all discovered networks.
U8BIT ADB_GetServiceRunningStatus(void *s_ptr)
Returns the running status of the given service as reported by the SDT.
U8BIT ADB_GetServiceNumRCTLinks(void *serv_ptr)
Returns the number of RCT links for the given service.
void ADB_SetReqdAudioStreamSettings(void *s_ptr, BOOLEAN valid, U32BIT lang_code, ADB_AUDIO_TYPE audio_type, ADB_STREAM_TYPE stream_type)
Explicitly sets or clears the stream that will be used for audio on the given service. If 'valid' is TRUE then the stream is set according to the given language and types, but if FALSE then the audio stream selected for the service will be based on the default settings.
ADB_TRANSPORT_REC * DBDEF_FindCableTransportRec(U32BIT freq_hz, U32BIT symbol_rate)
Find the cable transport record in the database matching the given params.
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...
void ADB_SetSecondaryTextLang(U32BIT country_code, U8BIT lang_id)
Sets the secondary subtitle and teletext language to be used. This will be used if the primary langua...
ADB_STREAM_TYPE ADB_GetStreamType(void *stream_ptr)
Returns the type of the given stream.
U16BIT ADB_GetNetworkPrimaryTargetRegions(U32BIT country_code, U8BIT **code_array, U8BIT ***name_array)
Returns an array of primary region codes and names for the given country.
U32BIT * ADB_GetServiceListScrambledFlag(void **slist, U16BIT num_entries)
Allocates and returns an array of the scrambled flags for each of the services in the given service l...
BOOLEAN ADB_GetTransportSearchFlag(void *t_ptr)
Returns whether a transport has been used during a service scan operation.
ADB_FAVLIST_REC * DBDEF_GetNextFavouriteList(ADB_FAVLIST_REC *fav_list)
Returns the favourite list following the given item.
Application configuration data.
U32BIT * ADB_GetServiceListTransportStrengths(void **slist, U16BIT num_entries)
Allocates and returns an array of the signal strengths of the transports containing the given list of...
void * ADB_GetEventService(void *event_ptr)
Returns the service pointer of event.
void ADB_GetServiceIds(void *s_ptr, U16BIT *onet_id, U16BIT *trans_id, U16BIT *serv_id)
Returns the original network id, transport id and service id for the given service.
void DBDEF_SetFavouriteListUserData(ADB_FAVLIST_REC *fav_list, U32BIT user_data)
Saves the given user data with a favourite list.
U16BIT DBDEF_GetNumNetworks(void)
Returns the number of networks in ther service database.
void ADB_GetTransportCableTuningParams(void *t_ptr, U32BIT *freq_hz, E_STB_DP_CMODE *mode, U16BIT *symrate)
Returns the parameters needed to tune a cable tuner to a transport.
BOOLEAN ADB_ServiceAddImageIcon(void *serv_ptr, void *icon_ptr)
Adds the given image icon to the end of the service's icon list. The icon id is checked and if it mat...
BOOLEAN ADB_IsSplitProgrammeCrid(U8BIT *crid)
Returns TRUE if the given CRID represents a split event (i.e. it contains an Instance Metadata Identi...
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...
void * ADB_FindEventFromTime(U32DHMS time, void *serv_ptr)
Finds the event scheduled to be broadcast at the specified time on the specified service.
Header file - Function prototypes for Event Reporting.
void DBDEF_SetServiceFavGroups(ADB_SERVICE_REC *s_ptr, U8BIT groups)
Sets the favourite groups for a service.
U8BIT * ADB_GetEventRecommendationCrid(U8BIT index, void *serv_ptr, void *event_ptr)
Returns the full recommendation CRID of the given event The returned string should be freed using STB...
BOOLEAN DBA_CanRestoreDatabase(void)
Checks whether the working database can be restored from a backup copy.
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...
Header for STB unicode string handling routines.
void ADB_GetReqdTeletextStreamSettings(void *s_ptr, BOOLEAN *valid, U32BIT *lang_code, ADB_TELETEXT_TYPE *ttext_type)
Returns the settings defined by ADB_SetReqdTeletextStreamSettings that will be used for teletext on t...
E_STB_DP_AUDIO_CODEC ADB_GetAudioCodecFromStream(ADB_STREAM_TYPE audio_stream_type)
Derive audio codec from stream.
void ADB_GetServiceListLockedSubset(void **slist, U16BIT num_entries, void ***locked_slist_ptr, U16BIT *locked_num_entries_ptr)
Creates a subset of locked services from the supplied service list. Memory is allocated as TempMemory...
U32BIT ADB_GetAudioStreamLangCode(void *stream_ptr)
Returns the language code associated with the given audio stream.
void DBDEF_SetTunedNetwork(U8BIT path, ADB_NETWORK_REC *n_ptr)
sets the currently tuned network
E_STB_DP_AUDIO_MODE ADB_GetAudioStreamMode(void *stream_ptr)
Returns the audio mode of the given stream.
U32DHMS ADB_GetEventEndDateTime(void *event_ptr)
Returns a value representing the date and time of the end of the given event.
BOOLEAN ADB_GetLNBBandParameters(void *band_ptr, S_STB_DP_LNB_BAND *params)
Returns the structure describing the band and the expected LNB behaviour in it.
U8BIT ** ADB_GetServiceListNetworkNames(void **slist, U16BIT num_entries)
Allocates and returns a list of network names for all the services in the given service list...
U16BIT ADB_GetSatelliteLongitude(void *sat_ptr)
Returns the longitudinal position of the given satellite in 1/10ths degree.
void DBDEF_RequestAccess(void)
Requests access to the app's database.
BOOLEAN ADB_GetEventHasExtendedDescription(void *event_ptr)
Checks whether the given event has any extended event descriptors.
U8BIT ** ADB_GetTransportListConstellationStrings(void **tlist, U16BIT num_entries)
Returns the transport constellation string array.
BOOLEAN ADB_GetEventDoNotScramble(void *event_ptr)
Returns the do_not_scramble flag for the event, which will have been found by looking backwards in th...
void ADB_GetStreamList(void *serv_ptr, ADB_STREAM_LIST_TYPE stream_list_type, void ***streamlist_ptr, U16BIT *num_entries_ptr)
Allocates and returns an array of the streams of the given type and for the given service...
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.
BOOLEAN STB_GCIsFutureDateTime(U16BIT code, U8BIT hour, U8BIT min, U8BIT secs)
Tests given date and time against current GMT date and time.
BOOLEAN DBDEF_LoadDatabase(U8BIT *db_pathname)
Loads the service database from non-volatile storage and creates the RAM version of this data that wi...
void DBDEF_DeleteFavouriteList(ADB_FAVLIST_REC *fav_list)
Deletes the given favourite list.
U16BIT ADB_GetRequiredTtextPid(void *s_ptr, BOOLEAN for_subtitles, U8BIT *magazine, U8BIT *page)
Returns the PID to be used for teletext for the given service based on language settings.
void ADB_SaveDatabase(void)
Saves the database to non-volatile memory.
void DBDEF_DeleteTransportRec(ADB_TRANSPORT_REC *t_ptr)
Deletes the given transport from the service database, deleting any service records that it's the par...
ADB_STRING * DBDEF_CopyString(ADB_STRING *src_str)
Creates a copy of the given ADB_STRING.
U8BIT ** ADB_GetTransportListNames(void **tlist, U16BIT num_entries)
Returns a list of names, in UTF-8 format, corresponding to the given transport list. The returned list should be freed using ADB_ReleaseNameList.
BOOLEAN DBDEF_IsValidCridRecord(ADB_CRID_REC *c_ptr)
Checks whether the given crid record is in the list of valid crid records.
BOOLEAN ADB_GetServiceLcnEditable(void *s_ptr)
Returns whether the LCN assigned to the given service can be changed.
U8BIT ADB_GetStreamTag(void *stream_ptr, U8BIT index)
Returns the requested tag value of the given stream.
U32BIT ACFG_GetCountry(void)
Returns the country code the DVB is configured for.
ADB_FAVSERV_REC * DBDEF_GetNextServiceFromFavouriteList(ADB_FAVLIST_REC *fav_list, ADB_FAVSERV_REC *fav_serv)
Returns the next favourite list service record.
ADB_EVENT_CONTENT ADB_GetEventContentDesc(void *event_ptr)
Returns the level 1 value of the first content identifier for the given event.
void * ADB_GetNextSatellite(void *sat_ptr)
Returns the next satellite from the database.
BOOLEAN DBDEF_SetLNBSmatv(ADB_LNB_REC *lnb, BOOLEAN is_smatv)
Sets the LNB SMATV setting.
U32BIT STB_GetNumBytesInString(U8BIT *string_ptr)
Determines the no of bytes of the given string.
E_STB_DP_SIGNAL_TYPE ADB_GetTransportSignalType(void *t_ptr)
Returns the signal type for the given transport.
U8BIT DBDEF_NumberOfCridsOfType(ADB_EVENT_REC *e_ptr, U8BIT crid_type)
Returns the number of CRIDs of the given type for the event.
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...
void ADB_ReleaseServiceList(void **slist, U16BIT num_servs)
Frees a list of services returned from one of the functions that returns a service list...
Application stb layer control.
void DBDEF_DeleteNetworkRec(ADB_NETWORK_REC *n_ptr)
Deletes specified network record.
U8BIT ** ADB_GetTransportListHierarchyStrings(void **tlist, U16BIT num_entries)
Returns the transport hierarchy string array.
U8BIT ADB_GetTransportTunedStrength(void *t_ptr)
Returns the signal strength, as a percentage, of the tuned transport.
U16BIT ADB_GetNumLNBs(void)
Returns the number of LNBs in the database.
void DBDEF_DeleteServiceFromFavouriteList(ADB_FAVLIST_REC *fav_list, ADB_FAVSERV_REC *fav_serv)
Delete the given service from the given favourite list.
void DBDEF_DeleteAllServicesFromFavouriteList(ADB_FAVLIST_REC *fav_list)
Delete the all services from the given favourite list.
void * ADB_GetNextRCTLink(void *link_ptr)
Returns the RCT link following the given link.
U8BIT ADB_GetTtextStreamType(void *stream_ptr)
Returns the type, as defined in the PMT, of the given teletext stream.
Header file - Function prototypes for operating system.
System Wide Global Technical Data Type Definitions.
U8BIT ADB_GetFavouriteListByUserData(U32BIT user_data)
Returns the list id of the favourite list with the given user data.
BOOLEAN DBA_SetFieldValue(void *record, U32BIT field_id, U32BIT value)
Set the value of a record's field. The function will fail if the record doesn't exist, the record doesn't include the given field, or the field is a string value.
BOOLEAN ADB_SetFavouriteListName(U8BIT list_id, U8BIT *name)
Set the name of the given favourite list.
void DBDEF_DeleteAllRecords(void)
Deletes all records in the database.
ADB_AUDIO_TYPE ADB_GetAudioStreamType(void *stream_ptr)
Returns the audio type of the given stream.
U16BIT DBDEF_GetServicePmtPid(ADB_SERVICE_REC *s_ptr)
gets the PMT PID associated with the service
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 ...
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.
void ADB_SetReqdAudioStreamPID(void *s_ptr, BOOLEAN valid, U16BIT pid)
Explicitly sets or clears the stream that will be used for audio on the given service. If 'valid' is TRUE then the stream is set according to the given PID, but if FALSE then the audio stream selected for the service will be based on the default settings.
U16BIT ADB_GetRequiredAudioPid(void *s_ptr)
Returns the audio PID to be used for the given service based on language settings, output format, etc.
BOOLEAN ADB_ServiceHasSubtitles(void *serv_ptr, BOOLEAN *dvb_subs)
Determines whether the given service has subtitles, DVB or teletext.
void * ADB_GetNextLNBBand(void *band_ptr)
Returns the next LNB band from the database.
void ADB_DeleteServices(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite)
Deletes all networks, transports and services related to the given type of tuner. ...
U16BIT ADB_GetFreesatServiceId(void *s_ptr)
Returns Freesat service ID of the given service.
ADB_NETWORK_REC * DBDEF_GetTunedNetwork(U8BIT path)
gets the currently tuned network
void STB_AppFreeMemory(void *addr)
Releases previously allocated application heap memory.
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...
void DBDEF_DeleteRecordsForTunerType(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite)
Deletes all network, transport and services records for the given tuner type.
void ADB_ReportNoSignalDuringSearch(void *t_ptr)
Set the signal level to 0 and searched flag to TRUE for the given transport.
ADB_TRANSPORT_REC * DBDEF_GetTunedTransport(U8BIT path)
gets the currently tuned transport
void DBDEF_SetServiceDeletedFlag(ADB_SERVICE_REC *s_ptr, BOOLEAN deleted)
Marks whether a service is deleted or not.
U8BIT * ADB_GetCridProgrammeName(void *c_ptr)
Returns the programme name field of the given CRID record. The returned string should be freed using ...
U32BIT * ADB_GetTransportListOriginalNetworkIds(void **tlist, U16BIT num_entries)
Allocates and returns an array of original network ids for each transport in the given list was tuned...
BOOLEAN DBDEF_SetLNBUSwitch(ADB_LNB_REC *lnb, U8BIT uswitch)
Sets the LNB uncommitted switch setting.
BOOLEAN ADB_ServiceGetRCTIcon(void *serv_ptr, U8BIT **icon_data, U32BIT *data_size, BOOLEAN *pos_valid, U16BIT *x_pos, U16BIT *y_pos, U16BIT *width, U16BIT *height, E_ICON_COORD_SYSTEM *coord_system)
Searches all the RCT links for a service to see if any of them define an icon to be used...
void ADB_GetEventScheduleByGenre(ADB_EVENT_CONTENT genre, BOOLEAN include_old_events, void *serv_ptr, void ***elist_ptr, U16BIT *num_entries_ptr)
Creates a copy of the event schedule for the given service, but only includes events of the given gen...
U8BIT * ADB_GetServicePMTData(void *s_ptr, U16BIT *data_len)
Returns the current PMT data for the given service.
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.
U16BIT DBDEF_GetNumTransports(void)
Returns the number of transports in ther service database.
void ADB_GetTransportTerrestrialTuningParams(void *t_ptr, E_STB_DP_TTYPE *terr_type, U32BIT *freq_hz, E_STB_DP_TMODE *mode, E_STB_DP_TBWIDTH *bwidth, U8BIT *plp_id)
Returns the settings to tune to the given DVB-T/T2 transport.
void * ADB_GetTunedNetwork(U8BIT path)
Returns the network currently tuned to on the given decode path.
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...
void ADB_ReleaseCridRecordList(void **crid_list, U16BIT num_entries)
Frees memory allocated for a CRID list due to a call to ADB_GetCridRecordList.
U8BIT ADB_GetTransportTunedQuality(void *t_ptr)
Returns the signal quality, as a percentage, of the tuned transport.
U32DHMS ADB_GetCridDateTime(void *c_ptr)
Returns a value representing the date & time held in the given CRID record.
void * ADB_GetPrevServiceInList(U32BIT list_type, void *serv)
Returns the previous service, in LCN order, for the given list type, starting from the given service...
BOOLEAN ADB_IsRCTLinkGroupTrailer(void *link_ptr)
Returns whether the given link is for a group trailer.
void * ADB_GetTunedService(U8BIT path)
Returns the tuned service for the given decode path.
E_STB_TUNE_TCODERATE ADB_GetTransportHpCodeRate(void *t_ptr)
Returns the HP coderate of the given DVB-T/T2 transport.
U32BIT ATMR_FindTimerFromEvent(U16BIT onet_id, U16BIT trans_id, U16BIT serv_id, U16BIT event_id)
Searches the timers for a recording timer with the given event and service IDs.
U8BIT ADB_GetEventStartMin(void *event_ptr)
Returns the minute (0-59) value for the start of the given event.
BOOLEAN ADB_IsValidService(void *serv_ptr)
Checks whether the given service is in the current service list.
U16BIT * ADB_GetServiceListOrigLcns(void **slist, U16BIT num_entries)
Allocates and returns an array of the logical channel numbers that each of the services in the given ...
U8BIT ADB_GetEventDurationHour(void *event_ptr)
Returns the hour value for the duration of the given event.
U32BIT * ADB_GetTransportListTids(void **tlist, U16BIT num_entries)
Allocates and returns an array of transport ids for the given transports. The returned array should b...
void DBDEF_SetSecondaryAudioLang(U8BIT *lang_ids)
sets the secondary audio lang
U8BIT * ADB_GetServiceProviderNameByLang(void *s_ptr, U8BIT lang)
Returns the provider name, as a UTF-8 string, using the given language, of the given service...
BOOLEAN ADB_GetServiceNowNextState(void *s_ptr)
Returns whether the EIT now/next data is being held in memory for the service.
void ADB_SortServicesByLcn(void)
Sort all services in the database according to their LCNs.
U32BIT * ADB_GetTransportListTunedStrengths(void **tlist, U16BIT num_entries)
Allocates and returns an array of percentage values representing the signal strength when each transp...
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...
U16BIT ADB_GetRequiredADPid(void *s_ptr, BOOLEAN *broadcast_mix)
Returns the PID to be used for audio description for the given service based on language settings...
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.
void ADB_SetFavouriteListUserData(U8BIT list_id, U32BIT user_data)
Set the user data of the given favourite list.
U16BIT * ADB_GetServiceListLcns(void **slist, U16BIT num_entries)
Allocates and returns an array of the logical channel numbers that have been assigned to all the serv...
void * ADB_GetLaterEvent(void *serv_ptr, U16BIT date, U8BIT hour, U8BIT min)
Returns a copy of the event following the given date/time on the given service.
void ADB_SetTextLang(U32BIT country_code, U8BIT lang_id)
Sets the primary subtitle and teletext language to be used.
S8BIT STB_CompareStringsIgnoreCase(U8BIT *string1_ptr, U8BIT *string2_ptr)
Compares the contents of the two given ASCII strings and returns the status (as per strcmp) but ignor...
U16BIT ADB_GetNumTransports(void)
Returns the number of transports in the database.
U16BIT DBDEF_GetNumLNBBands(void)
Returns the number of LNB band records in the database.
U8BIT * ADB_GetEventProgrammeCrid(void *serv_ptr, void *event_ptr)
Returns the programme CRID of the given event (excluding IMI) The returned string should be freed usi...
void ADB_ReleaseRCTLinks(void *links)
Frees the given list of RCT links.
Header file - Function prototypes for heap memory.
BOOLEAN ADB_AddServiceToFavouriteList(U8BIT list_id, void *serv_ptr, S16BIT index)
Adds the given service to the favourite list defined by list_id, with the service being optionally ad...
void ADB_DeleteFavouriteList(U8BIT list_id)
Deletes the favourite list with the given list id.
BOOLEAN ADB_GetServiceSelectableFlag(void *s_ptr)
Returns the selectable status of the given service.
BOOLEAN DBA_ClearDatabase(void)
Clears the working database of all records. Following this call, it should still be possible to acces...
BOOLEAN ADB_MoveFavouriteListServiceFromTo(U8BIT list_id, S16BIT current_index, S16BIT new_index)
Change the order of the services in the given favourite lists by moving it to the given position...
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...
void DBDEF_SetFavouriteListName(ADB_FAVLIST_REC *f_ptr, U8BIT *name)
Set or change the name of the given favourite list.
U16BIT ADB_GetRequiredSubtitleParams(void *s_ptr, U16BIT *cpage_ptr, U16BIT *apage_ptr)
Returns the PID to be used for DVB subtitles for the given service based on language settings...
void DBDEF_SetCridService(ADB_CRID_REC *c_ptr, U16BIT serv_id)
Sets the service ID in the crid record.
E_STB_TUNE_TGUARDINT ADB_GetTransportGuardInt(void *t_ptr)
Returns the guard interval of the given DVB-T/T2 transport.
U8BIT ADB_GetEventParentalAge(void *event_ptr)
Returns the parental age value for the given event.
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.
void ADB_ToggleServiceLockedFlag(void *s_ptr)
Changes the current state of the given service from locked to unlocked, or vice versa.
BOOLEAN DBDEF_GetEventSubtitlesAvailFlag(ADB_EVENT_REC *e_ptr)
Returns whether DVB subtitles are signalled as being available for the given event.
BOOLEAN DBDEF_SetLNBPulsePosition(ADB_LNB_REC *lnb, BOOLEAN is_pulse_posn)
Sets the LNB pulse position setting.
void * ADB_FindEventFromCrid(U8BIT *prog_crid, void *original_event_ptr, void **serv_ptr)
Finds an alternative event for the given programme CRID and returns a pointer to a copy of the event ...
U8BIT * ADB_GetRCTLinkUriString(void *link_ptr)
Returns the uri string of the given RCT link.
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.
void ADB_SetServiceScheduleState(void *s_ptr, BOOLEAN state)
Sets whether the EIT schedule events for this service are held in memory. All services hold schedule ...
U8BIT * ADB_GetRCTLinkPromoText(void *link_ptr)
Returns the RCT link's promotional text based on the default language.
void ADB_DeleteServiceEvents(void *serv_ptr, BOOLEAN delete_now_next)
Deletes all events and event related data for the given service.
void ADB_GetNetworkServiceList(void *n_ptr, void ***slist_ptr, U16BIT *num_entries_ptr)
Allocates and returns a list of all services in the database on all transports on the given network...
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.
ADB_SUBTITLE_TYPE ADB_GetSubtitleStreamType(void *stream_ptr)
Returns the type, as defined in the PMT, of the given subtitle stream.
U8BIT ADB_GetEventNumRecommendationCrids(void *event_ptr)
Returns the number of recommendation CRIDs for the given event.
U8BIT * ADB_GetDefaultServiceProviderName(void *s_ptr)
Returns the default service provider name of the specified service.
BOOLEAN ADB_GetServiceNotRunningFlag(void *s_ptr)
Returns the status of the 'not running' flag of the given service. This flag indicates whether a serv...
BOOLEAN DBDEF_AllocateLcns(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN assign_lcns)
allocates lcns - expects allocated lcn for all services to be 0
BOOLEAN ADB_IsFreesatService(void *s_ptr)
Returns a value indicating whether the given service is a Freesat service.
BOOLEAN DBDEF_SetLNBPower(ADB_LNB_REC *lnb, E_STB_DP_LNB_POWER power)
Sets the LNB power setting.
BOOLEAN ADB_GetServiceUnavailableFlag(void *s_ptr)
Returns the status of the unavailable flag of the given service. This flag indicates whether a servic...
void DBA_LockDatabase(void)
Locks the database to prevent access from other threads or processes.
void ADB_GetServiceList(U32BIT list_type, void ***slist_ptr, U16BIT *num_entries_ptr)
Allocates and returns a list of all services in the database for the given list type.
ADB_CRID_REC * DBDEF_AddCridRecord(U8BIT *crid, BOOLEAN series, BOOLEAN recommended)
Creates a CRID record and adds it to the database.
U8BIT ** ADB_GetServiceListShortNames(void **slist, U16BIT num_entries, BOOLEAN use_pref_names)
Allocates and returns a list of the short names for all the services in the given service list...
void ADB_GetNowNextEvents(void *serv_ptr, void **v_now_event, void **v_next_event)
Makes copies of the now and/or next events (EITp/f) for the given service. The returned events should...
U8BIT * ADB_GetServiceDefaultAuthority(void *serv_ptr)
Returns a copy of the default authority CRID string for the given service. This string will be return...
void ADB_GetTransportSatTuningParams(void *t_ptr, U32BIT *freq_hz, E_STB_DP_POLARITY *polarity, U16BIT *symrate, E_STB_DP_FEC *fec, BOOLEAN *dvb_s2, E_STB_DP_MODULATION *modulation)
Returns the parameters needed to tune a satellite tuner to a transport.
U32BIT * ADB_GetServiceListHiddenFlag(void **slist, U16BIT num_entries)
Allocates and returns an array indicating whether each service in the given service list is signalled...
void DBDEF_Initialise(void)
Initialises the database, preparing for it to be accessed.
void * ADB_FindEITScheduleEventFromTime(U32DHMS time, void *serv_ptr)
Finds the event in the event schedule to be broadcast at the specified time on the specified service...
void DBA_UnlockDatabase(void)
Unlocks the database to allow other threads or processes to access it.
void * ADB_GetFullSITransport(void *n_ptr)
Returns a transport that is signalled as containing a complete set of SI data via an NIT linkage desc...
U8BIT * ADB_GetEventSIDescriptorData(void *serv_ptr, U16BIT event_id, U8BIT dtag_id, S16BIT ext_dtag_id, U16BIT *desc_len)
Returns a copy of the raw SI descriptor data with the given descriptor tag id and, optionally, extended descriptor tag id, for the event with the given event id. The data must be freed using ADB_ReleaseEventSIDescriptorData.
void ADB_GetNetworkList(void ***nlist_ptr, U16BIT *num_entries_ptr)
Allocates and returns a list of the network records in the database.
void * ADB_GetTransportSatellite(void *t_ptr)
Returns the parent satellite for the given transport.
void * ADB_GetEvent(void *serv_ptr, U16BIT event_id)
Returns a copy of the event with the given event ID on the given service.
U16BIT ADB_GetDeletedServiceList(E_STB_DP_SIGNAL_TYPE tuner_type, void ***slist_ptr)
Returns a list of services that have been marked as 'deleted' for the given tuner type...
U8BIT * ADB_GetSatelliteName(void *sat_ptr)
Returns the pointer to the name of the satellite.
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...
U8BIT ADB_GetEventDurationMin(void *event_ptr)
Returns the minute value (0-59) for the duration of the given event.
U16BIT ADB_GetServiceAitPid(void *s_ptr)
Returns the current AIT PID for the given service.
void ADB_SetReqdTeletextStreamSettings(void *s_ptr, BOOLEAN valid, U32BIT lang_code, ADB_TELETEXT_TYPE ttext_type)
Explicitly sets or clears the stream that will be used for teletext on the given service. If 'valid' is TRUE then the stream is set according to the given language and type, but if FALSE then the stream selected for the service will be based on the default settings.
void ADB_ReleaseProfileList(void **profile_list, U16BIT num_profiles)
Frees a profile list acquired using ADB_GetProfileList.
U8BIT ADB_GetEventStartSecs(void *event_ptr)
Returns the seconds (0-59) value for the start of the given event.
ADB_PROFILE_TYPE ADB_GetProfileType(void *profile)
Returns the type of the given profile.
void DBDEF_ClearTableVersionHistory(ADB_TRANSPORT_REC *t_ptr)
Clears the version histories stored in the transport records.
BOOLEAN ADB_GetEventSubtitlesAvailFlag(void *event_ptr)
Returns whether DVB subtitles are signalled as being available for the given event.
void ADB_GetNetworkTransportList(void *n_ptr, void ***tlist_ptr, U16BIT *num_entries_ptr)
Allocates and returns a list of all transport records in the database for the given network...
ADB_STREAM_TYPE ADB_GetServiceVideoType(void *s_ptr)
Returns the video type being used by the given service.
U32BIT * ADB_GetTransportListOffsets(void **tlist, U16BIT num_entries)
Returns the transport offset array.
U16BIT ADB_GetNumServicesInList(U32BIT list_type, BOOLEAN inc_hidden)
Returns the number of services in the database that would be returned with the given list type...
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...
S8BIT ADB_GetTransportOffset(void *t_ptr)
Returns the tuning offset of the given DVB-T/T2 transport.
void ADB_GetTransportList(void ***tlist_ptr, U16BIT *num_entries_ptr)
Allocates and returns a list of all transport records in the database.
void * ADB_GetSatelliteLNB(void *sat_ptr)
Returns the LNB associated with the given satellite.
U16BIT ADB_GetNetworkSecondaryTargetRegions(U32BIT country_code, U8BIT primary_region, U8BIT **code_array, U8BIT ***name_array)
Returns an array of secondary region codes and names for the given country and primary region...
void ADB_GetReqdAudioStreamSettings(void *s_ptr, BOOLEAN *valid, U32BIT *lang_code, ADB_AUDIO_TYPE *audio_type, ADB_STREAM_TYPE *stream_type)
Returns the settings defined by ADB_SetReqdAudioStreamSettings that will be used for audio on the giv...
U16BIT ADB_GetProfileList(void ***profile_list, U16BIT *active_profile)
Returns an array of available profiles. The array will be allocated within the function and should be...
void DBDEF_SetCridDateTime(ADB_CRID_REC *c_ptr, U32DHMS date_time)
Sets the date and time fields in the crid record.
E_STB_TUNE_TCONST ADB_GetTransportConstellation(void *t_ptr)
Returns the constellation of the given DVB-T/T2 transport.
U32BIT * ADB_GetServiceListUnavailableFlag(void **slist, U16BIT num_entries)
Allocates and returns an array of the unavailable flags for each of the services in the given service...
void DBDEF_DeleteLNBBandRec(ADB_LNB_BAND_REC *band_ptr)
Deletes an LNB band record from the database.
U8BIT ADB_GetFavouriteListIdByIndex(U16BIT index)
Returns the list id of the favourite list defined by the given index.
ADB_EVENT_REC * DBDEF_FindScheduleEventById(ADB_SERVICE_REC *s_ptr, U16BIT event_id)
Find an event for a service from its event_id.
U8BIT ADB_GetTtextStreamPage(void *stream_ptr)
Returns the page value of the given teletext stream.
BOOLEAN ADB_MoveFavouriteListServiceTo(U8BIT list_id, void *serv_ptr, S16BIT index)
Change the order of the services in the given favourite lists by moving it to the given position...
U16BIT ADB_GetTransportCableSymbolRate(void *t_ptr)
Returns the symbol rate of the given cable transport.
U8BIT * ADB_GetRCTLinkName(void *link_ptr)
Returns the name of the given RCT link.
BOOLEAN ADB_MoveFavouriteListTo(U8BIT list_id, S16BIT index)
Change the order of the favourite lists by moving the given list to the given position.
Application database access functions.
BOOLEAN DBDEF_SetLNBDiSEqCPosition(ADB_LNB_REC *lnb, BOOLEAN is_diseqc_posn)
Sets the LNB DiSEqC position setting.
void ADB_ReleaseStreamList(void **streamlist_ptr, U16BIT num_entries)
Frees the memory allocated for a stream list using ADB_GetStreamList.
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...
E_STB_TUNE_THIERARCHY ADB_GetTransportHierarchy(void *t_ptr)
Returns the hierarchy of the given DVB-T/T2 transport.
void * ADB_GetEPGService(void *n_ptr)
Returns a service that is signalled as containing EPG data via an NIT linkage descriptor.
void * ADB_GetServiceRCTLinks(void *serv_ptr, U8BIT *num_links)
Returns a copy of the RCT links for the given service. The returned list should be freed using ADB_Re...
void ADB_DeleteServiceFromFavouriteList(U8BIT list_id, void *serv_ptr)
Removes the given service from the favourite list defined by the list id.
U32DHMS ADB_GetEventStartDateTime(void *event_ptr)
Returns a value representing the date and time of the start of the given event.
void ADB_SetCridService(void *c_ptr, U16BIT serv_id)
Sets the service ID on the given CRID record.
U16BIT DBDEF_GetProfileList(void ***profile_list, U16BIT *active_profile)
Gets a list of the available network profiles.
E_STB_DP_CMODE ADB_GetTransportCableMode(void *t_ptr)
Returns the QAM mode of the given cable transport.
U8BIT * ADB_GetServiceFullNameByLangAndPrefId(void *s_ptr, U8BIT lang, U8BIT pref_name_id)
Returns the full name of the given service as a UTF-8 string using the given language and preferred n...
Header file - macros and function prototypes for public use.
void STB_SIReleaseTargetRegionNameList(SI_NIT_TARGET_REGION_NAME_DESC *desc_list)
Frees the memory used by the descriptor list specified.
U16BIT ADB_GetTransportOriginalNetworkId(void *t_ptr)
Returns the original network id of the given transport.
void DBDEF_SortServicesByLcn(void)
Sort the full service list into ascending logical channel number order.
U32BIT ADB_GetFavouriteListUserData(U8BIT list_id)
Returns the user data of the given favourite list.
void * ADB_LaterEvent(void *serv_ptr, U32DHMS time)
Returns a copy of the event following the given date/time on the given service.
void DBDEF_DeleteRCTLinks(ADB_RCT_LINK_INFO *links)
Frees the given list of RCT links.
ADB_SERVICE_TYPE ADB_GetServiceType(void *s_ptr)
Returns the signalled type of the given service.