DVBCore  1.0
Open source DVB engine
dvb/inc/ap_dbacc.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
00003  * Copyright © 2004 Ocean Blue Software Ltd
00004  *
00005  * This file is part of a DTVKit Software Component
00006  * You are permitted to copy, modify or distribute this file subject to the terms
00007  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
00008  * 
00009  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
00010  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
00011  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
00012  * 
00013  * If you or your organisation is not a member of DTVKit then you have access
00014  * to this source code outside of the terms of the licence agreement
00015  * and you are expected to delete this and any associated files immediately.
00016  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
00017  *******************************************************************************/
00024 // pre-processor mechanism so multiple inclusions don't cause compilation error
00025 
00026 #ifndef _AP_DBACC_H
00027 #define _AP_DBACC_H
00028 
00029 #include "stbhwtun.h"
00030 #include "stbdpc.h"     // required for E_STB_DP_TMODE and E_STB_DP_BWIDTH
00031 #include "stbsitab.h"   /* Required for E_ICON_COORD_SYSTEM */
00032 //#include "dba_main.h"
00033 #include "stbgc.h"
00034 
00035 //---Constant and macro definitions for public use-----------------------------
00036 
00037 #define ADB_INVALID_DVB_ID                0xffff
00038 
00039 #define LINK_TYPE_CA_REPLACEMENT_SERVICE  0x03
00040 #define LINK_TYPE_SERVICE_REPLACEMENT     0x05
00041 
00042 // number of service names (default name + preferred names)
00043 #define ADB_NUM_SERV_NAME_IDS    6
00044 
00045 //maximum number of favgroups that can be handled by the database
00046 #define ADB_MAX_FAVGROUPS        8
00047 
00048 /* LNB freq bands */
00049 #define LNB_C_BAND_FREQUENCY              5150
00050 
00051 #define LNB_KU_BAND_FREQUENCY_MINIMUM     9750
00052 #define LNB_KU_BAND_FREQUENCY_MAXIMUM     12000
00053 
00054 #define LNB_KU_BAND_FREQUENCY_LOW         LNB_KU_BAND_FREQUENCY_MINIMUM
00055 #define LNB_KU_BAND_FREQUENCY_HIGH        10600
00056 
00057 //---Enumerations for public use-----------------------------------------------
00058 typedef enum
00059 {
00060    ADB_TRANSPORT_LIST_ALL = 0xff,
00061    ADB_TRANSPORT_LIST_NOT_TUNED = 0x01,
00062    ADB_TRANSPORT_LIST_TUNED = 0x02
00063 } ADB_TRANSPORT_LIST_TYPE;
00064 
00065 typedef enum
00066 {
00067    ADB_SERVICE_LIST_UNKNOWN = 0x0000,
00068    ADB_SERVICE_LIST_TV = 0x0001,               // these definitions can be ORed together to make
00069    ADB_SERVICE_LIST_RADIO = 0x0002,            // combinations, e.g.
00070    ADB_SERVICE_LIST_DATA = 0x0004,             // ADB_SERVICE_LIST_TV | ADB_SERVICE_LIST_DATA
00071    ADB_SERVICE_LIST_DIGITAL = 0x0007,
00072    ADB_SERVICE_LIST_ANALOG = 0x0080,
00073    ADB_SERVICE_LIST_TV_DATA = 0x0085,
00074    ADB_SERVICE_LIST_FAV_GROUP_A = 0x0100,
00075    ADB_SERVICE_LIST_FAV_GROUP_B = 0x0200,
00076    ADB_SERVICE_LIST_FAV_GROUP_C = 0x0400,
00077    ADB_SERVICE_LIST_FAV_GROUP_D = 0x0800,
00078    ADB_SERVICE_LIST_ALL = (ADB_SERVICE_LIST_DIGITAL | ADB_SERVICE_LIST_ANALOG),
00079    ADB_SERVICE_LIST_FAV_LIST = 0x8000
00080 } ADB_SERVICE_LIST_TYPE;
00081 
00082 /* Macro to define an ADB_SERVICE_LIST_TYPE for a favourite list */
00083 #define ADB_LIST_TYPE_FROM_FAVLIST(id)  (((id) << 16) | ADB_SERVICE_LIST_FAV_LIST)
00084 #define ADB_FAVLIST_FROM_LIST_TYPE(L)  (U8BIT)((L) >> 16)
00085 
00086 typedef enum /* These values come from the 8bit service type field in the service descriptor */
00087 {ADB_SERVICE_TYPE_TV = 1,
00088  ADB_SERVICE_TYPE_RADIO = 2,
00089  ADB_SERVICE_TYPE_AVC_RADIO = 0x0a,
00090  ADB_SERVICE_TYPE_DATA = 0x0c,
00091  ADB_SERVICE_TYPE_MPEG2_HD = 0x11,
00092  ADB_SERVICE_TYPE_AVC_SD_TV = 0x16,
00093  ADB_SERVICE_TYPE_HD_TV = 0x19,
00094  ADB_SERVICE_TYPE_ANALOG = 0x100       /* This value chosen so that it doesn't conflict with broadcast values */
00095 } ADB_SERVICE_TYPE;
00096 
00097 typedef enum
00098 {
00099    ADB_VIDEO_STREAM,
00100    ADB_H264_VIDEO_STREAM,
00101    ADB_AUDIO_STREAM,
00102    ADB_AAC_AUDIO_STREAM,
00103    ADB_HEAAC_AUDIO_STREAM,
00104    ADB_AC3_AUDIO_STREAM,
00105    ADB_EAC3_AUDIO_STREAM,
00106    ADB_SUBTITLE_STREAM,
00107    ADB_DATA_STREAM,
00108    ADB_TTEXT_STREAM
00109 } ADB_STREAM_TYPE;
00110 
00111 typedef enum
00112 {
00113    ADB_STREAM_LIST_ALL = 0xff,
00114    ADB_VIDEO_LIST_STREAM = 0x01,
00115    ADB_AUDIO_LIST_STREAM = 0x02,
00116    ADB_SUBTITLE_LIST_STREAM = 0x04,
00117    ADB_DATA_LIST_STREAM = 0x08,
00118    ADB_TTEXT_LIST_STREAM = 0x10,
00119    ADB_TTEXT_SUBT_LIST_STREAM = 0x20
00120 } ADB_STREAM_LIST_TYPE;
00121 
00122 
00123 typedef enum
00124 {
00125    ADB_AUDIO_TYPE_UNDEFINED = 0,
00126    ADB_AUDIO_TYPE_NORMAL = 1,
00127    ADB_AUDIO_TYPE_FOR_HEARING_IMPAIRED = 2,
00128    ADB_AUDIO_TYPE_FOR_VISUALLY_IMPAIRED = 3
00129 } ADB_AUDIO_TYPE;
00130 
00131 
00132 typedef enum
00133 {
00134    ADB_SUBTITLE_TYPE_DVB = 0x10,
00135    ADB_SUBTITLE_TYPE_DVB_4_3 = 0x11,
00136    ADB_SUBTITLE_TYPE_DVB_16_9 = 0x12,
00137    ADB_SUBTITLE_TYPE_DVB_221_1 = 0x13,
00138    ADB_SUBTITLE_TYPE_DVB_HD = 0x14,
00139    ADB_SUBTITLE_TYPE_DVB_HARD_HEARING = 0x20,
00140    ADB_SUBTITLE_TYPE_DVB_HARD_HEARING_4_3 = 0x21,
00141    ADB_SUBTITLE_TYPE_DVB_HARD_HEARING_16_9 = 0x22,
00142    ADB_SUBTITLE_TYPE_DVB_HARD_HEARING_221_1 = 0x23,
00143    ADB_SUBTITLE_TYPE_DVB_HARD_HEARING_HD = 0x24
00144 } ADB_SUBTITLE_TYPE;
00145 
00146 typedef enum
00147 {
00148    ADB_TELETEXT_TYPE_INITIAL = 0x01,
00149    ADB_TELETEXT_TYPE_SUBTITLE = 0x02,
00150    ADB_TELETEXT_TYPE_ADDITIONAL_INFO = 0x03,
00151    ADB_TELETEXT_TYPE_SCHEDULE = 0x04,
00152    ADB_TELETEXT_TYPE_SUBTITLE_HARD_HEARING = 0x05
00153 } ADB_TELETEXT_TYPE;
00154 
00155 typedef enum
00156 {
00157    ADB_EVENT_CONTENT_UNCLASSIFIED = 0x00,
00158    ADB_EVENT_CONTENT_MOVIE = 0x10,
00159    ADB_EVENT_CONTENT_NEWS = 0x20,
00160    ADB_EVENT_CONTENT_ENTERTAINMENT = 0x30,
00161    ADB_EVENT_CONTENT_SPORT = 0x40,
00162    ADB_EVENT_CONTENT_CHILD = 0x50,
00163    ADB_EVENT_CONTENT_MUSIC = 0x60,
00164    ADB_EVENT_CONTENT_ARTS = 0x70,
00165    ADB_EVENT_CONTENT_SOCIAL = 0x80,
00166    ADB_EVENT_CONTENT_EDUCATION = 0x90,
00167    ADB_EVENT_CONTENT_LEISURE = 0xA0,
00168    ADB_EVENT_CONTENT_SPECIAL = 0xB0,
00169    ADB_EVENT_CONTENT_RESERVED1 = 0xC0,
00170    ADB_EVENT_CONTENT_RESERVED2 = 0xD0,
00171    ADB_EVENT_CONTENT_RESERVED3 = 0xE0,
00172    ADB_EVENT_CONTENT_USERDEFINED = 0xF0,
00173 } ADB_EVENT_CONTENT;
00174 
00175 typedef enum
00176 {
00177    FAV_GROUP_A = 0x01,
00178    FAV_GROUP_B = 0x02,
00179    FAV_GROUP_C = 0x04,
00180    FAV_GROUP_D = 0x08,
00181    FAV_GROUP_ALL = 0x0f
00182 } ADB_FAV_GROUP;
00183 
00184 typedef enum
00185 {
00186    ADB_PROFILE_TYPE_BROADCAST,
00187    ADB_PROFILE_TYPE_CIPLUS
00188 } ADB_PROFILE_TYPE;
00189 
00190 //---Global type defs for public use-------------------------------------------
00191 
00192 typedef struct
00193 {
00194    E_STB_DP_LNB_TYPE type;
00195    U16BIT freq_low;
00196    U16BIT freq_high;
00197    E_STB_DP_LNB_POWER power;
00198    E_STB_DP_DISEQC_TONE diseqc_tone;
00199    E_STB_DP_DISEQC_CSWITCH c_switch;
00200    BOOLEAN is_22k;
00201    BOOLEAN is_12v;
00202    BOOLEAN is_pulse_posn;
00203    BOOLEAN is_diseqc_posn;
00204    BOOLEAN is_smatv;
00205    U8BIT diseqc_repeats;      // 0 to 3 inclusive
00206    U8BIT u_switch;            // 0 to 16 inclusive
00207    U8BIT unicable_chan;
00208    U32BIT unicable_if;
00209 } ADB_LNB_SETTINGS;
00210 
00211 
00212 //---Global Function prototypes for public use---------------------------------
00213 
00217 void ADB_ResetDatabase(void);
00218 
00222 void ADB_SaveDatabase(void);
00223 
00232 void ADB_SaveEventSchedule(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite);
00233 
00240 void ADB_DeleteServices(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite);
00241 
00247 void ADB_ReleaseNameList(U8BIT **name_list, U16BIT num_names);
00248 
00253 U16BIT ADB_GetNumSatellites(void);
00254 
00264 void* ADB_NewSatellite(U8BIT *name_str, U16BIT dish_pos, S16BIT long_pos, void *lnb_ptr);
00265 
00276 void* ADB_AddSatellite(U8BIT *name_str, U16BIT dish_pos, U16BIT long_pos, BOOLEAN east_west, void *lnb_ptr);
00277 
00283 void* ADB_GetNextSatellite(void *sat_ptr);
00284 
00290 U8BIT* ADB_GetSatelliteName(void *sat_ptr);
00291 
00297 void* ADB_GetSatelliteLNB(void *sat_ptr);
00298 
00304 U16BIT ADB_GetSatelliteLongitude(void *sat_ptr);
00305 
00311 BOOLEAN ADB_GetSatelliteDirection(void *sat_ptr);
00312 
00317 U16BIT ADB_GetNumLNBs(void);
00318 
00324 void* ADB_AddLNB(ADB_LNB_SETTINGS *settings);
00325 
00331 void* ADB_FindLNBWithSettings(ADB_LNB_SETTINGS *settings);
00332 
00339 BOOLEAN ADB_GetLNBSettings(void *lnb_ptr, ADB_LNB_SETTINGS *settings);
00340 
00345 U16BIT ADB_GetNumNetworks(void);
00346 
00354 void ADB_GetNetworkList(void ***nlist_ptr, U16BIT *num_entries_ptr);
00355 
00360 void ADB_ReleaseNetworkList(void **nlist);
00361 
00370 U8BIT** ADB_GetNetworkListNames(void **nlist, U16BIT num_entries, BOOLEAN short_names);
00371 
00380 U32BIT* ADB_GetNetworkListIds(void **nlist, U16BIT num_entries);
00381 
00388 U8BIT* ADB_GetNetworkName(void *n_ptr);
00389 
00397 U8BIT* ADB_GetNetworkNameByLang(void *n_ptr, U8BIT lang);
00398 
00404 U16BIT ADB_GetNetworkId(void *n_ptr);
00405 
00411 U8BIT ADB_GetNetworkTargetCountries(U32BIT **code_array);
00412 
00422 U16BIT ADB_GetNetworkPrimaryTargetRegions(U32BIT country_code, U8BIT **code_array, U8BIT ***name_array);
00423 
00435 U16BIT ADB_GetNetworkSecondaryTargetRegions(U32BIT country_code, U8BIT primary_region,
00436    U8BIT **code_array, U8BIT ***name_array);
00437 
00450 U16BIT ADB_GetNetworkTertiaryTargetRegions(U32BIT country_code, U8BIT primary_region,
00451    U8BIT secondary_region, U16BIT **code_array, U8BIT ***name_array);
00452 
00458 void* ADB_GetTunedNetwork(U8BIT path);
00459 
00464 U16BIT ADB_GetNumTransports(void);
00465 
00473 void ADB_GetTransportList(void ***tlist_ptr, U16BIT *num_entries_ptr);
00474 
00484 void ADB_GetNetworkTransportList(void *n_ptr, void ***tlist_ptr, U16BIT *num_entries_ptr);
00485 
00491 void ADB_ReleaseTransportList(void **tlist, U16BIT num_transports);
00492 
00500 U8BIT** ADB_GetTransportListNames(void **tlist, U16BIT num_entries);
00501 
00510 U32BIT* ADB_GetTransportListTids(void **tlist, U16BIT num_entries);
00511 
00521 U32BIT* ADB_GetTransportListTunedStrengths(void **tlist, U16BIT num_entries);
00522 
00532 U32BIT* ADB_GetTransportListOriginalNetworkIds(void **tlist, U16BIT num_entries);
00533 
00542 U32BIT* ADB_GetTransportListFreqs(void **tlist, U16BIT num_entries);
00543 
00549 E_STB_DP_SIGNAL_TYPE ADB_GetTransportSignalType(void *t_ptr);
00550 
00557 U8BIT* ADB_GetTransportName(void *t_ptr);
00558 
00564 U16BIT ADB_GetTransportTid(void *t_ptr);
00565 
00571 U16BIT ADB_GetTransportOriginalNetworkId(void *t_ptr);
00572 
00578 void* ADB_GetTransportNetworkPtr(void *t_ptr);
00579 
00586 U32BIT ADB_GetTransportFreqHz(void *t_ptr);
00587 
00593 U8BIT ADB_GetTransportBwidth(void *t_ptr);
00594 
00600 S8BIT ADB_GetTransportOffset(void *t_ptr);
00601 
00607 E_STB_TUNE_TCONST ADB_GetTransportConstellation(void *t_ptr);
00608 
00614 E_STB_DP_TMODE ADB_GetTransportTerrMode(void *t_ptr);
00615 
00621 E_STB_TUNE_TCODERATE ADB_GetTransportLpCodeRate(void *t_ptr);
00622 
00628 E_STB_TUNE_TCODERATE ADB_GetTransportHpCodeRate(void *t_ptr);
00629 
00635 E_STB_TUNE_TGUARDINT ADB_GetTransportGuardInt(void *t_ptr);
00636 
00642 E_STB_TUNE_THIERARCHY ADB_GetTransportHierarchy(void *t_ptr);
00643 
00649 E_STB_DP_CMODE ADB_GetTransportCableMode(void *t_ptr);
00650 
00656 U16BIT ADB_GetTransportCableSymbolRate(void *t_ptr);
00657 
00663 U16BIT ADB_GetTransportSatelliteSymbolRate(void *t_ptr);
00664 
00670 U8BIT ADB_GetTransportTunedStrength(void *t_ptr);
00671 
00678 void* ADB_GetFullSITransport(void *n_ptr);
00679 
00689 void ADB_GetTransportTerrestrialTuningParams(void *t_ptr, E_STB_DP_TTYPE *terr_type, U32BIT *freq_hz,
00690    E_STB_DP_TMODE *mode, E_STB_DP_TBWIDTH *bwidth, U8BIT *plp_id);
00691 
00699 void ADB_GetTransportAnalogTuningParams(void *t_ptr, U32BIT *freq_hz, S8BIT *offset,
00700    E_STB_DP_ANALOG_VIDEO_TYPE *vtype);
00701 
00709 void ADB_GetTransportCableTuningParams(void *t_ptr, U32BIT *freq_hz, E_STB_DP_CMODE *mode,
00710    U16BIT *symrate);
00711 
00722 void ADB_GetTransportSatTuningParams(void *t_ptr, U32BIT *freq_hz, E_STB_DP_POLARITY *polarity,
00723    U16BIT *symrate, E_STB_DP_FEC *fec, BOOLEAN *dvb_s2, E_STB_DP_MODULATION *modulation);
00724 
00730 void* ADB_GetTransportSatellite(void *t_ptr);
00731 
00739 void* ADB_GetTransportFromIds(U16BIT net_id, U16BIT onet_id, U16BIT tran_id);
00740 
00747 void ADB_SetTunedTransport(U8BIT path, void *t_ptr);
00748 
00754 void* ADB_GetTunedTransport(U8BIT path);
00755 
00760 BOOLEAN ADB_AddAnalogService(void);
00761 
00767 void ADB_SetAnalogServiceName(void *s_ptr, U8BIT *new_name);
00768 
00773 U16BIT ADB_GetNumServices(void);
00774 
00783 U16BIT ADB_GetNumServicesInList(U32BIT list_type, BOOLEAN inc_hidden);
00784 
00795 void ADB_GetServiceList(U32BIT list_type, void ***slist_ptr, U16BIT *num_entries_ptr);
00796 
00807 void ADB_GetServiceListIncludingHidden(U32BIT list_type, void ***slist_ptr, U16BIT *num_entries_ptr);
00808 
00817 void ADB_GetTransportServiceList(void *t_ptr, void ***slist_ptr, U16BIT *num_entries_ptr);
00818 
00828 void ADB_GetNetworkServiceList(void *n_ptr, void ***slist_ptr, U16BIT *num_entries_ptr);
00829 
00838 void ADB_GetUnavailableServiceList(void ***slist_ptr, U16BIT *num_entries_ptr);
00839 
00848 void ADB_GetLockedServiceList(void ***slist_ptr, U16BIT *num_entries_ptr);
00849 
00856 void ADB_ReleaseServiceList(void **slist, U16BIT num_servs);
00857 
00866 void ADB_GetServiceListLockedSubset(void **slist, U16BIT num_entries,
00867    void ***locked_slist_ptr, U16BIT *locked_num_entries_ptr);
00868 
00875 void ADB_SortServiceListAlphabetically(void **slist, U16BIT num_entries, BOOLEAN short_name);
00876 
00882 BOOLEAN ADB_IsValidService(void *serv_ptr);
00883 
00892 void* ADB_GetNextServiceInList(U32BIT list_type, void *serv);
00893 
00902 void* ADB_GetPrevServiceInList(U32BIT list_type, void *serv);
00903 
00913 void* ADB_FindServiceByLcn(U32BIT list_type, U16BIT lcn, BOOLEAN show_unselectable);
00914 
00922 void* ADB_FindServiceByNearestLcn(U32BIT list_type, U16BIT lcn);
00923 
00931 void* ADB_FindServiceByIds(U16BIT onet_id, U16BIT tid, U16BIT sid);
00932 
00940 U16BIT ADB_FindLcnInServiceList(U16BIT lcn, void **slist_ptr, U16BIT num_entries);
00941 
00950 U16BIT ADB_FindNearestLcnInServiceList(U16BIT lcn, void **slist_ptr, U16BIT num_entries);
00951 
00959 U16BIT ADB_FindServiceInList(void *s_ptr, void **slist_ptr, U16BIT num_entries);
00960 
00969 U8BIT** ADB_GetServiceListFullNames(void **slist, U16BIT num_entries, BOOLEAN use_pref_names);
00970 
00980 U8BIT** ADB_GetServiceListShortNames(void **slist, U16BIT num_entries, BOOLEAN use_pref_names);
00981 
00990 U32BIT* ADB_GetServiceListLcns(void **slist, U16BIT num_entries);
00991 
01000 U32BIT* ADB_GetServiceListOrigLcns(void **slist, U16BIT num_entries);
01001 
01011 U32BIT* ADB_GetServiceListUnavailableFlag(void **slist, U16BIT num_entries);
01012 
01023 U32BIT* ADB_GetServiceListNewFlag(void **slist, U16BIT num_entries);
01024 
01035 U32BIT* ADB_GetServiceListLockedFlag(void **slist, U16BIT num_entries);
01036 
01043 void ADB_SetServiceListLockedFlag(void **slist, U16BIT num_entries, BOOLEAN locked);
01044 
01054 U32BIT* ADB_GetServiceListScrambledFlag(void **slist, U16BIT num_entries);
01055 
01065 U32BIT* ADB_GetServiceListHdFlag(void **slist, U16BIT num_entries);
01066 
01076 U32BIT* ADB_GetServiceListHiddenFlag(void **slist, U16BIT num_entries);
01077 
01086 U8BIT** ADB_GetServiceListNetworkNames(void **slist, U16BIT num_entries);
01087 
01096 U8BIT** ADB_GetServiceListTransportNames(void **slist, U16BIT num_entries);
01097 
01106 U32BIT* ADB_GetServiceListTransportStrengths(void **slist, U16BIT num_entries);
01107 
01114 void ADB_SetServiceHiddenFlag(void *s_ptr, BOOLEAN hidden);
01115 
01122 BOOLEAN ADB_GetServiceHiddenFlag(void *s_ptr);
01123 
01129 BOOLEAN ADB_GetServiceLcnEditable(void *s_ptr);
01130 
01138 U8BIT* ADB_GetServiceFullName(void *s_ptr, BOOLEAN use_pref_name);
01139 
01147 U8BIT* ADB_GetServiceShortName(void *s_ptr, BOOLEAN use_pref_name);
01148 
01158 U8BIT* ADB_GetServiceFullNameByLangAndPrefId(void *s_ptr, U8BIT lang, U8BIT pref_name_id);
01159 
01169 U8BIT* ADB_GetServiceShortNameByLangAndPrefId(void *s_ptr, U8BIT lang, U8BIT pref_name_id);
01170 
01176 U16BIT ADB_GetServiceLcn(void *s_ptr);
01177 
01184 void ADB_SetServiceLcn(void *s_ptr, U16BIT lcn);
01185 
01191 U16BIT ADB_GetServiceId(void *s_ptr);
01192 
01200 void ADB_GetServiceIds(void *s_ptr, U16BIT *onet_id, U16BIT *trans_id, U16BIT *serv_id);
01201 
01208 void ADB_SetServiceScheduleState(void *s_ptr, BOOLEAN state);
01209 
01215 BOOLEAN ADB_GetServiceScheduleState(void *s_ptr);
01216 
01223 void ADB_SetServiceNowNextState(void *s_ptr, BOOLEAN state);
01224 
01230 BOOLEAN ADB_GetServiceNowNextState(void *s_ptr);
01231 
01235 void ADB_SortServicesByLcn(void);
01236 
01242 U16BIT ADB_GetServiceOrigLcn(void *s_ptr);
01243 
01249 U16BIT ADB_GetServicePCRPid(void *s_ptr);
01250 
01258 U16BIT ADB_GetServiceAudioPid(void *s_ptr);
01259 
01265 ADB_STREAM_TYPE ADB_GetServiceAudioType(void *s_ptr);
01266 
01272 U16BIT ADB_GetServiceVideoPid(void *s_ptr);
01273 
01279 ADB_STREAM_TYPE ADB_GetServiceVideoType(void *s_ptr);
01280 
01288 U16BIT ADB_GetServiceTextPid(void *s_ptr);
01289 
01296 U16BIT ADB_GetRequiredAudioPid(void *s_ptr);
01297 
01304 U16BIT ADB_GetRequiredADPid(void *s_ptr);
01305 
01312 E_STB_DP_AUDIO_MODE ADB_GetRequiredAudioMode(void *s_ptr);
01313 
01323 U16BIT ADB_GetRequiredTtextPid(void *s_ptr, BOOLEAN for_subtitles, U8BIT *magazine, U8BIT *page);
01324 
01333 U16BIT ADB_GetRequiredSubtitleParams(void *s_ptr, U16BIT *cpage_ptr, U16BIT *apage_ptr);
01334 
01340 ADB_SERVICE_TYPE ADB_GetServiceType(void *s_ptr);
01341 
01349 U8BIT* ADB_GetServiceProviderName(void *s_ptr);
01350 
01359 U8BIT* ADB_GetServiceProviderNameByLang(void *s_ptr, U8BIT lang);
01360 
01367 BOOLEAN ADB_GetServiceUnavailableFlag(void *s_ptr);
01368 
01374 U8BIT ADB_GetServiceRunningStatus(void *s_ptr);
01375 
01383 BOOLEAN ADB_GetServiceNotRunningFlag(void *s_ptr);
01384 
01392 BOOLEAN ADB_GetServiceNewFlag(void *s_ptr);
01393 
01400 BOOLEAN ADB_GetServiceLockedFlag(void *s_ptr);
01401 
01407 void ADB_ToggleServiceLockedFlag(void *s_ptr);
01408 
01414 void ADB_SetServiceLockedFlag(void *s_ptr, BOOLEAN locked);
01415 
01423 BOOLEAN ADB_GetServiceScrambledFlag(void *s_ptr);
01424 
01430 BOOLEAN ADB_GetServiceHasCaDesc(void *s_ptr);
01431 
01439 BOOLEAN ADB_GetServiceDoNotScramble(void *s_ptr);
01440 
01446 BOOLEAN ADB_IsFreesatService(void *s_ptr);
01447 
01453 void* ADB_GetServiceTransportPtr(void *s_ptr);
01454 
01461 U8BIT* ADB_GetServiceDefaultAuthority(void *serv_ptr);
01462 
01469 void ADB_ServiceAddRCTLink(void *serv_ptr, void *link_ptr);
01470 
01475 void ADB_ServiceReleaseRCTLinks(void *serv_ptr);
01476 
01482 U8BIT ADB_GetServiceNumRCTLinks(void *serv_ptr);
01483 
01491 void* ADB_GetServiceRCTLinks(void *serv_ptr, U8BIT *num_links);
01492 
01498 void* ADB_GetNextRCTLink(void *link_ptr);
01499 
01504 void ADB_ReleaseRCTLinks(void *links);
01505 
01511 U8BIT* ADB_GetRCTLinkPromoText(void *link_ptr);
01512 
01518 BOOLEAN ADB_IsRCTLinkGroupTrailer(void *link_ptr);
01519 
01525 U8BIT* ADB_GetRCTLinkName(void *link_ptr);
01526 
01532 U8BIT* ADB_GetRCTLinkUriString(void *link_ptr);
01533 
01540 BOOLEAN ADB_ServiceRCTCanUseDefaultIcon(void *serv_ptr);
01541 
01557 BOOLEAN ADB_ServiceGetRCTIcon(void *serv_ptr, U8BIT **icon_data, U32BIT *data_size, BOOLEAN *pos_valid,
01558    U16BIT *x_pos, U16BIT *y_pos, U16BIT *width, U16BIT *height, E_ICON_COORD_SYSTEM *coord_system);
01559 
01568 BOOLEAN ADB_ServiceAddImageIcon(void *serv_ptr, void *icon_ptr);
01569 
01576 void* ADB_GetAlternativeService(void *s_ptr, U8BIT alt_serv_type);
01577 
01584 BOOLEAN ADB_ServiceHasSubtitles(void *serv_ptr, BOOLEAN *dvb_subs);
01585 
01592 void ADB_SetTunedService(U8BIT path, void *s_ptr);
01593 
01599 void* ADB_GetTunedService(U8BIT path);
01600 
01605 void ADB_DeleteServiceRec(void *s_ptr);
01606 
01613 U16BIT ADB_GetNumStreams(void *serv_ptr, ADB_STREAM_LIST_TYPE stream_list_type);
01614 
01624 void ADB_GetStreamList(void *serv_ptr, ADB_STREAM_LIST_TYPE stream_list_type, void ***streamlist_ptr, U16BIT *num_entries_ptr);
01625 
01631 void ADB_ReleaseStreamList(void **streamlist_ptr, U16BIT num_entries);
01632 
01638 ADB_STREAM_TYPE ADB_GetStreamType(void *stream_ptr);
01639 
01645 U8BIT ADB_GetStreamNumTags(void *stream_ptr);
01646 
01653 U8BIT ADB_GetStreamTag(void *stream_ptr, U8BIT index);
01654 
01660 U16BIT ADB_GetStreamPID(void *stream_ptr);
01661 
01668 BOOLEAN ADB_GetStreamInUse(void *stream_ptr);
01669 
01675 BOOLEAN ADB_GetStreamHasCaDesc(void *stream_ptr);
01676 
01683 U8BIT ADB_GetStreamComponentType(void *stream_ptr);
01684 
01690 U32BIT ADB_GetAudioStreamLangCode(void *stream_ptr);
01691 
01697 ADB_AUDIO_TYPE ADB_GetAudioStreamType(void *stream_ptr);
01698 
01704 E_STB_DP_AUDIO_MODE ADB_GetAudioStreamMode(void *stream_ptr);
01705 
01711 U32BIT ADB_GetTtextStreamLangCode(void *stream_ptr);
01712 
01718 U8BIT ADB_GetTtextStreamType(void *stream_ptr);
01719 
01725 U8BIT ADB_GetTtextStreamMagazine(void *stream_ptr);
01726 
01732 U8BIT ADB_GetTtextStreamPage(void *stream_ptr);
01733 
01739 U32BIT ADB_GetSubtitleStreamLangCode(void *stream_ptr);
01740 
01746 ADB_SUBTITLE_TYPE ADB_GetSubtitleStreamType(void *stream_ptr);
01747 
01753 U16BIT ADB_GetSubtitleStreamCompositionPage(void *stream_ptr);
01754 
01760 U16BIT ADB_GetSubtitleStreamAncillaryPage(void *stream_ptr);
01761 
01767 void ADB_SetAudioLang(U8BIT country_id, U8BIT lang_id);
01768 
01775 void ADB_SetSecondaryAudioLang(U8BIT country_id, U8BIT lang_id);
01776 
01782 void ADB_SetTextLang(U8BIT country_id, U8BIT lang_id);
01783 
01790 void ADB_SetSecondaryTextLang(U8BIT country_id, U8BIT lang_id);
01791 
01792 // now/next and schedule events
01793 
01803 void ADB_GetNowNextEvents(void *serv_ptr, void **now_event, void **next_event);
01804 
01816 void ADB_GetEventSchedule(BOOLEAN include_old_events, void *serv_ptr, void ***elist_ptr,
01817    U16BIT *num_entries_ptr);
01818 
01830 void ADB_GetEventScheduleByGenre(ADB_EVENT_CONTENT genre, BOOLEAN include_old_events,
01831    void *serv_ptr, void ***elist_ptr, U16BIT *num_entries_ptr);
01832 
01837 void ADB_ReleaseEventData(void *event_ptr);
01838 
01844 void ADB_ReleaseEventList(void **elist, U16BIT num_entries);
01845 
01851 void ADB_DeleteServiceEvents(void *serv_ptr, BOOLEAN delete_now_next);
01852 
01857 void ADB_DeleteAllServiceEvents(BOOLEAN delete_now_next);
01858 
01865 void* ADB_GetEvent(void *serv_ptr, U16BIT event_id);
01866 
01879 U8BIT* ADB_GetEventSIDescriptorData(void *serv_ptr, U16BIT event_id, U8BIT dtag_id,
01880    S16BIT ext_dtag_id, U16BIT *desc_len);
01881 
01887 void ADB_ReleaseEventSIDescriptorData(U8BIT *desc_data, U16BIT desc_len);
01888 
01895 void* ADB_EarlierEvent(void *serv_ptr, U32DHMS time);
01896 
01903 void* ADB_LaterEvent(void *serv_ptr, U32DHMS time);
01904 
01913 void* ADB_GetEarlierEvent(void *serv_ptr, U16BIT date, U8BIT hour, U8BIT min);
01914 
01923 void* ADB_GetLaterEvent(void *serv_ptr, U16BIT date, U8BIT hour, U8BIT min);
01924 
01931 void* ADB_FindEventFromTime(U32DHMS time, void *serv_ptr);
01932 
01938 U32DHMS ADB_GetEventStartDateTime(void *event_ptr);
01939 
01945 U32DHMS ADB_GetEventDuration(void *event_ptr);
01946 
01952 U32DHMS ADB_GetEventEndDateTime(void *event_ptr);
01953 
01959 U16BIT ADB_GetEventStartDate(void *event_ptr);
01960 
01966 U8BIT ADB_GetEventStartHour(void *event_ptr);
01967 
01973 U8BIT ADB_GetEventStartMin(void *event_ptr);
01974 
01980 U8BIT ADB_GetEventStartSecs(void *event_ptr);
01981 
01987 U8BIT ADB_GetEventDurationHour(void *event_ptr);
01988 
01994 U8BIT ADB_GetEventDurationMin(void *event_ptr);
01995 
02001 U8BIT ADB_GetEventDurationSecs(void *event_ptr);
02002 
02003 #if 0
02004 
02012 BOOLEAN ADB_GetEventEndDateTime(void *event_ptr, U16BIT *end_date, U8BIT *end_hour, U8BIT *end_min);
02013 #endif
02014 
02020 BOOLEAN ADB_GetEventSubtitlesAvailFlag(void *event_ptr);
02021 
02027 ADB_EVENT_CONTENT ADB_GetEventContentDesc(void *event_ptr);
02028 
02035 U8BIT* ADB_GetEventContentData(void *event_ptr, U8BIT *p_len);
02036 
02042 U8BIT ADB_GetEventParentalAge(void *event_ptr);
02043 
02050 U8BIT* ADB_GetEventName(void *event_ptr);
02051 
02058 U8BIT* ADB_GetEventDescription(void *event_ptr);
02059 
02066 U8BIT* ADB_GetEventExtendedDescription(void *event_ptr);
02067 
02076 U8BIT* ADB_GetEventGuidance(void *event_ptr, void *serv_ptr);
02077 
02083 U16BIT ADB_GetEventId(void *event_ptr);
02084 
02090 BOOLEAN ADB_GetEventAudioDescriptionFlag(void *event_ptr);
02091 
02097 BOOLEAN ADB_GetEventFreeToAir(void *event_ptr);
02098 
02106 BOOLEAN ADB_GetEventDoNotScramble(void *event_ptr);
02107 
02121 BOOLEAN ADB_GetEventHDLinkageInfo(void *event_ptr, BOOLEAN verify_event, BOOLEAN only_simulcast,
02122    void **hd_serv_ptr, void **hd_event_ptr);
02123 
02131 BOOLEAN ADB_IsSameEvent(void *event1_ptr, void *event2_ptr);
02132 
02140 U8BIT* ADB_GetEventFullProgrammeCrid(void *serv_ptr, void *event_ptr);
02141 
02149 U8BIT* ADB_GetEventProgrammeCrid(void *serv_ptr, void *event_ptr);
02150 
02158 U8BIT* ADB_GetFullCrid(void *serv_ptr, U8BIT *event_str);
02159 
02165 U8BIT ADB_GetEventNumSeriesCrids(void *event_ptr);
02166 
02175 U8BIT* ADB_GetEventSeriesCrid(U8BIT index, void *serv_ptr, void *event_ptr);
02176 
02182 U8BIT ADB_GetEventNumRecommendationCrids(void *event_ptr);
02183 
02192 U8BIT* ADB_GetEventRecommendationCrid(U8BIT index, void *serv_ptr, void *event_ptr);
02193 
02200 BOOLEAN ADB_IsSplitProgrammeCrid(U8BIT *crid);
02201 
02208 U8BIT* ADB_GetAuthorityFromCrid(U8BIT *crid);
02209 
02219 void* ADB_FindEventFromCrid(U8BIT *prog_crid, void *original_event_ptr, BOOLEAN radio_service, void **serv_ptr);
02220 
02229 U8BIT ADB_GetServiceFavGroups(void *s_ptr);
02230 
02239 void ADB_SetServiceFavGroups(void *s_ptr, U8BIT groups);
02240 
02241 #if 0
02242 
02249 void ADB_UnsetServiceFavGroupBit(void *s_ptr, U8BIT fgrp_bit);
02250 
02262 void ADB_SetServiceTaggedFavGroupBit(U32BIT *tag_array, void **slist, U16BIT num_entries, U8BIT fgrp_bit);
02263 
02275 void ADB_UnsetServiceTaggedFavGroupBit(U32BIT *tag_array, void **slist, U16BIT num_entries, U8BIT fgrp_bit);
02276 #endif
02277 
02289 void ADB_SetReqdAudioStreamSettings(void *s_ptr, BOOLEAN valid, U32BIT lang_code,
02290    ADB_AUDIO_TYPE audio_type, ADB_STREAM_TYPE stream_type);
02291 
02301 void ADB_GetReqdAudioStreamSettings(void *s_ptr, BOOLEAN *valid, U32BIT *lang_code,
02302    ADB_AUDIO_TYPE *audio_type, ADB_STREAM_TYPE *stream_type);
02303 
02314 void ADB_SetReqdSubtitleStreamSettings(void *s_ptr, BOOLEAN valid, U32BIT lang_code, ADB_SUBTITLE_TYPE subt_type);
02315 
02324 void ADB_GetReqdSubtitleStreamSettings(void *s_ptr, BOOLEAN *valid, U32BIT *lang_code, ADB_SUBTITLE_TYPE *subt_type);
02325 
02336 void ADB_SetReqdTeletextStreamSettings(void *s_ptr, BOOLEAN valid, U32BIT lang_code, ADB_TELETEXT_TYPE ttext_type);
02337 
02346 void ADB_GetReqdTeletextStreamSettings(void *s_ptr, BOOLEAN *valid, U32BIT *lang_code, ADB_TELETEXT_TYPE *ttext_type);
02347 
02356 void* ADB_AddCridRecord(U8BIT *crid, BOOLEAN series, BOOLEAN recommended, BOOLEAN radio_service);
02357 
02362 void ADB_SaveCridRecord(void *c_ptr);
02363 
02369 void* ADB_FindCridRecord(U8BIT *crid_str);
02370 
02376 void ADB_SetCridDateTime(void *c_ptr, U32DHMS datetime);
02377 
02383 void ADB_SetCridService(void *c_ptr, U16BIT serv_id);
02384 
02390 void ADB_SetCridProgrammeName(void *c_ptr, U8BIT *prog_name);
02391 
02398 U8BIT* ADB_GetCridProgrammeName(void *c_ptr);
02399 
02405 BOOLEAN ADB_IsProgrammeCrid(void *c_ptr);
02406 
02412 BOOLEAN ADB_IsSeriesCrid(void *c_ptr);
02413 
02419 BOOLEAN ADB_IsRecommendationCrid(void *c_ptr);
02420 
02425 void ADB_UpdateCridEitDate(void *c_ptr);
02426 
02432 BOOLEAN ADB_IsCridForRadioService(void *c_ptr);
02433 
02440 U8BIT* ADB_GetCridString(void *c_ptr);
02441 
02447 U32DHMS ADB_GetCridDateTime(void *c_ptr);
02448 
02454 U16BIT ADB_GetCridService(void *c_ptr);
02455 
02461 U16BIT ADB_GetCridEitDate(void *c_ptr);
02462 
02467 void ADB_DeleteCridRecord(void *c_ptr);
02468 
02479 void ADB_GetCridRecordList(void ***clist_ptr, U16BIT *num_entries_ptr, BOOLEAN inc_series_crids,
02480    BOOLEAN inc_rec_crids, BOOLEAN inc_prog_crids);
02481 
02487 void ADB_ReleaseCridRecordList(void **crid_list, U16BIT num_entries);
02488 
02498 U16BIT ADB_GetProfileList(void ***profile_list, U16BIT *active_profile);
02499 
02505 void ADB_ReleaseProfileList(void **profile_list, U16BIT num_profiles);
02506 
02512 ADB_PROFILE_TYPE ADB_GetProfileType(void *profile);
02513 
02514 #ifdef COMMON_INTERFACE
02515 
02520 void* ADB_FindProfileForModule(U32BIT module);
02521 
02527 BOOLEAN ADB_DeleteProfile(void *profile);
02528 
02535 U8BIT* ADB_GetProfileName(void *profile);
02536 
02542 BOOLEAN ADB_GetProfileModulePresent(void *profile);
02543 
02549 U32BIT ADB_GetProfileModule(void *profile);
02550 
02558 BOOLEAN ADB_GetProfileCAMInfo(void *profile, U16BIT *cicam_onet_id, U32BIT *cicam_id);
02559 
02569 BOOLEAN ADB_SetProfileSearchRequired(void *profile, BOOLEAN search_required, U16BIT date,
02570    U8BIT hour, U8BIT min);
02571 
02577 BOOLEAN ADB_GetProfileSearchRequired(void *profile);
02578 
02587 BOOLEAN ADB_GetProfileSearchDateTime(void *profile, U16BIT *date, U8BIT *hours, U8BIT *mins);
02588 
02594 void ADB_SetProfileSearchTimer(void *profile, U32BIT timer_handle);
02595 
02601 U32BIT ADB_GetProfileSearchTimer(void *profile);
02602 
02608 BOOLEAN ADB_GetServiceSDTReceived(void *s_ptr);
02609 
02615 U8BIT* ADB_GetServiceCIProtectionDesc(void *s_ptr);
02616 
02622 BOOLEAN ADB_HasCIProtectionExpired(void *s_ptr);
02623 #endif
02624 
02632 U8BIT* ADB_GetServicePMTData(void *s_ptr, U16BIT *data_len);
02633 
02639 U16BIT ADB_GetServicePmtPid(void *s_ptr);
02640 
02646 BOOLEAN ADB_ImportDB(U8BIT *filename);
02647 
02653 BOOLEAN ADB_ExportDB(U8BIT *filename);
02654 
02663 BOOLEAN ADB_ExportEPG(U8BIT *filename, U16BIT utc_date_filter, U32BIT type, BOOLEAN use_dvb_uri);
02664 
02669 U16BIT ADB_GetNumFavouriteLists(void);
02670 
02680 BOOLEAN ADB_AddFavouriteList(U8BIT *name, U32BIT user_data, S16BIT index, U8BIT *list_id);
02681 
02687 U8BIT ADB_GetFavouriteListIdByIndex(U16BIT index);
02688 
02694 U8BIT ADB_GetFavouriteListByUserData(U32BIT user_data);
02695 
02702 U8BIT* ADB_GetFavouriteListName(U8BIT list_id);
02703 
02709 U32BIT ADB_GetFavouriteListUserData(U8BIT list_id);
02710 
02716 void ADB_SetFavouriteListUserData(U8BIT list_id, U32BIT user_data);
02717 
02725 BOOLEAN ADB_MoveFavouriteListTo(U8BIT list_id, S16BIT index);
02726 
02731 void ADB_DeleteFavouriteList(U8BIT list_id);
02732 
02742 BOOLEAN ADB_AddServiceToFavouriteList(U8BIT list_id, void *serv_ptr, S16BIT index);
02743 
02753 BOOLEAN ADB_MoveFavouriteListServiceTo(U8BIT list_id, void *serv_ptr, S16BIT index);
02754 
02764 BOOLEAN ADB_MoveFavouriteListServiceFromTo(U8BIT list_id, S16BIT current_index, S16BIT new_index);
02765 
02771 void ADB_DeleteServiceFromFavouriteList(U8BIT list_id, void *serv_ptr);
02772 
02777 void ADB_DeleteAllServicesFromFavouriteList(U8BIT list_id);
02778 
02779 #ifdef DEBUG_PRINT_DATABASE
02780 
02783 void ADB_PrintDatabase(void);
02784 #endif
02785 
02786 
02787 //---Global Function prototypes for internal use---------------------------------
02791 void ADB_Initialise(void);
02792 
02793 #if 0
02794 
02797 void ADB_ReloadDBRam(void);
02798 #endif
02799 
02807 void ADB_PrepareDatabaseForSearch(E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite,
02808    BOOLEAN retune, BOOLEAN manual_search);
02809 
02820 void ADB_FinaliseDatabaseAfterSearch(BOOLEAN save_changes, E_STB_DP_SIGNAL_TYPE tuner_type, void *satellite,
02821    BOOLEAN search_completed, BOOLEAN clear_new_flags, BOOLEAN manual_search);
02822 
02829 BOOLEAN ADB_AreLcnsDuplicated(E_STB_DP_SIGNAL_TYPE tuner_type);
02830 
02835 void ADB_AllocateLcns(E_STB_DP_SIGNAL_TYPE tuner_type);
02836 
02841 void ADB_ReleaseDatabaseSearchData(void);
02842 
02847 void ADB_ReportNoSignalDuringSearch(void *t_ptr);
02848 
02854 BOOLEAN ADB_GetTransportSearchFlag(void *t_ptr);
02855 
02861 void ADB_SetTransportSearchFlag(void *t_ptr, BOOLEAN state);
02862 
02863 #if 0
02864 void ADB_SetServiceListTaggedLockedFlag(U32BIT *tag_array, void **slist, U16BIT num_entries, BOOLEAN locked);
02865 #endif
02866 
02867 #endif //  _AP_DBACC_H
 All Data Structures Files Functions Typedefs Defines