DVBCore  1.0
Open source DVB engine
dvb/inc/ap_cfg.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  *******************************************************************************/
00025 // pre-processor mechanism so multiple inclusions don't cause compilation error
00026 
00027 #ifndef _AP_CFG_H
00028 #define _AP_CFG_H
00029 
00030 //---Constant and macro definitions for public use-----------------------------
00031 
00032 #define ACFG_INVALID_REGION   255
00033 #define ACFG_INVALID_LANG     255
00034 
00035 /* Country codes - please add new countries in alphabetical order */
00036 #define COUNTRY_CODE_AUSTRALIA   (U32BIT)(('a' << 16) | ('u' << 8) | 's')
00037 #define COUNTRY_CODE_AUSTRIA     (U32BIT)(('a' << 16) | ('u' << 8) | 't')
00038 #define COUNTRY_CODE_BELGIUM     (U32BIT)(('b' << 16) | ('e' << 8) | 'l')
00039 #define COUNTRY_CODE_CHINA       (U32BIT)(('c' << 16) | ('h' << 8) | 'i')
00040 #define COUNTRY_CODE_CROATIA     (U32BIT)(('h' << 16) | ('r' << 8) | 'v')
00041 #define COUNTRY_CODE_CZECHREP    (U32BIT)(('c' << 16) | ('z' << 8) | 'e')
00042 #define COUNTRY_CODE_FINLAND     (U32BIT)(('f' << 16) | ('i' << 8) | 'n')
00043 #define COUNTRY_CODE_FRANCE      (U32BIT)(('f' << 16) | ('r' << 8) | 'a')
00044 #define COUNTRY_CODE_GERMANY     (U32BIT)(('d' << 16) | ('e' << 8) | 'u')
00045 #define COUNTRY_CODE_HUNGARY     (U32BIT)(('h' << 16) | ('u' << 8) | 'n')
00046 #define COUNTRY_CODE_ITALY       (U32BIT)(('i' << 16) | ('t' << 8) | 'a')
00047 #define COUNTRY_CODE_LATVIA      (U32BIT)(('l' << 16) | ('v' << 8) | 'a')
00048 #define COUNTRY_CODE_LUXEMBOURG  (U32BIT)(('l' << 16) | ('u' << 8) | 'x')
00049 #define COUNTRY_CODE_NETHERLANDS (U32BIT)(('n' << 16) | ('l' << 8) | 'd')
00050 #define COUNTRY_CODE_POLAND      (U32BIT)(('p' << 16) | ('o' << 8) | 'l')
00051 #define COUNTRY_CODE_PORTUGAL    (U32BIT)(('p' << 16) | ('o' << 8) | 'r')
00052 #define COUNTRY_CODE_RUSSIA      (U32BIT)(('r' << 16) | ('u' << 8) | 's')
00053 #define COUNTRY_CODE_SERBIA      (U32BIT)(('s' << 16) | ('r' << 8) | 'b')
00054 #define COUNTRY_CODE_SLOVAKIA    (U32BIT)(('s' << 16) | ('v' << 8) | 'k')
00055 #define COUNTRY_CODE_SLOVENIA    (U32BIT)(('s' << 16) | ('v' << 8) | 'n')
00056 #define COUNTRY_CODE_SOUTHAFRICA (U32BIT)(('z' << 16) | ('a' << 8) | 'f')
00057 #define COUNTRY_CODE_SPAIN       (U32BIT)(('e' << 16) | ('s' << 8) | 'p')
00058 #define COUNTRY_CODE_SWEDEN      (U32BIT)(('s' << 16) | ('w' << 8) | 'e')
00059 #define COUNTRY_CODE_SWITZERLAND (U32BIT)(('c' << 16) | ('h' << 8) | 'e')
00060 #define COUNTRY_CODE_UK          (U32BIT)(('g' << 16) | ('b' << 8) | 'r')
00061 #define COUNTRY_CODE_UKRAINE     (U32BIT)(('u' << 16) | ('k' << 8) | 'r')
00062 
00063 
00064 //---Enumerations for public use-----------------------------------------------
00065 
00066 /* Database lang definitions */
00067 enum E_DB_LANGS
00068 {
00069    ACFG_DB_LANG_ENGLISH,
00070    ACFG_DB_LANG_WELSH1,
00071    ACFG_DB_LANG_WELSH2,
00072    ACFG_DB_LANG_GAELIC,
00073    ACFG_DB_LANG_IRISH,
00074    ACFG_DB_LANG_DUTCH1,
00075    ACFG_DB_LANG_DUTCH2,
00076    ACFG_DB_LANG_GERMAN1,
00077    ACFG_DB_LANG_GERMAN2,
00078    ACFG_DB_LANG_FRENCH1,
00079    ACFG_DB_LANG_FRENCH2,
00080    ACFG_DB_LANG_RUSSIAN,
00081    ACFG_DB_LANG_SIMPLIFIED_CHINESE,
00082    ACFG_DB_LANG_TRADITIONAL_CHINESE,
00083    ACFG_DB_LANG_FINNISH,
00084    ACFG_DB_LANG_SWEDISH,
00085    ACFG_DB_LANG_NORWEGIAN,
00086    ACFG_DB_LANG_DANISH,
00087    ACFG_DB_LANG_MANDARIN,
00088    ACFG_DB_LANG_CANTONESE,
00089    ACFG_DB_LANG_MAORI1,
00090    ACFG_DB_LANG_MAORI2,
00091    ACFG_DB_LANG_JAPANESE,
00092    ACFG_DB_LANG_ITALIAN,
00093    ACFG_DB_LANG_SPANISH1,
00094    ACFG_DB_LANG_SPANISH2,
00095    ACFG_DB_LANG_KOREAN,
00096    ACFG_DB_LANG_HINDI,
00097    ACFG_DB_LANG_CZECH1,
00098    ACFG_DB_LANG_CZECH2,
00099    ACFG_DB_LANG_SLOVAK1,
00100    ACFG_DB_LANG_SLOVAK2,
00101    ACFG_DB_LANG_AFRIKAANS,
00102    ACFG_DB_LANG_NDEBELE,
00103    ACFG_DB_LANG_NORTHERN_SOTHO,
00104    ACFG_DB_LANG_SOUTHERN_SOTHO,
00105    ACFG_DB_LANG_SWATI,
00106    ACFG_DB_LANG_TSONGA,
00107    ACFG_DB_LANG_TSWANA,
00108    ACFG_DB_LANG_VENDA,
00109    ACFG_DB_LANG_XHOSA,
00110    ACFG_DB_LANG_ZULU,
00111    ACFG_DB_LANG_CROATIAN,
00112    ACFG_DB_LANG_HUNGARIAN,
00113    ACFG_DB_LANG_LATVIAN,
00114    ACFG_DB_LANG_LUXEMBOURGISH,
00115    ACFG_DB_LANG_POLISH,
00116    ACFG_DB_LANG_PORTUGUESE,
00117    ACFG_DB_LANG_SERBIAN,
00118    ACFG_DB_LANG_ROMANIAN1,
00119    ACFG_DB_LANG_ROMANIAN2,
00120    ACFG_DB_LANG_ALBANIAN1,
00121    ACFG_DB_LANG_ALBANIAN2,
00122    ACFG_DB_LANG_SLOVENE,
00123    ACFG_DB_LANG_CATALAN,
00124    ACFG_DB_LANG_GALICIAN,
00125    ACFG_DB_LANG_BASQUE1,
00126    ACFG_DB_LANG_BASQUE2,
00127    ACFG_DB_LANG_UKRAINIAN,
00128    ACFG_DB_LANG_UND,
00129    ACFG_NUM_DB_LANGUAGES
00130 };
00131 
00132 
00133 //---Global type defs for public use-------------------------------------------
00134 
00135 typedef struct ana_rf_channel_data
00136 {
00137    U8BIT *name;
00138    U32BIT freq_hz;
00139 } ACFG_ANA_RF_CHANNEL_DATA;
00140 
00141 typedef struct ter_rf_channel_data
00142 {
00143    U8BIT *name;
00144    U32BIT freq_hz;
00145    E_STB_DP_TBWIDTH bwidth;
00146    E_STB_DP_TMODE mode;
00147    E_STB_DP_TTYPE type;
00148 } ACFG_TER_RF_CHANNEL_DATA;
00149 
00150 typedef struct cab_rf_channel_data
00151 {
00152    U8BIT *name;
00153    U32BIT freq_hz;
00154    E_STB_DP_CMODE mode;
00155    U16BIT symbol_rate;
00156 } ACFG_CAB_RF_CHANNEL_DATA;
00157 
00158 typedef BOOLEAN (*AllocLcnFunc)(E_STB_DP_SIGNAL_TYPE tuner_type);
00159 typedef void (*DBTidyFunc)(E_STB_DP_SIGNAL_TYPE tuner_type, BOOLEAN search_completed, BOOLEAN manual);
00160 
00161 //---Global Function prototypes for public use---------------------------------
00162 
00167 U8BIT ACFG_GetNumCountries(void);
00168 
00176 void ACFG_GetCountryList(U8BIT ***str_array_ptr, U8BIT *num_countries_ptr);
00177 
00183 void ACFG_ReleaseCountryList(U8BIT **str_array, U8BIT num_countries);
00184 
00190 U8BIT ACFG_GetNumRegions(U8BIT country_id);
00191 
00202 BOOLEAN ACFG_GetRegionList(U8BIT country_id, U8BIT ***str_array_ptr, U8BIT *num_regions_ptr);
00203 
00211 BOOLEAN ACFG_GetRegionCode(U8BIT country_id, U8BIT region_id, U8BIT *code_ptr);
00212 
00218 void ACFG_ReleaseRegionList(U8BIT **str_array, U8BIT num_regions);
00219 
00224 U8BIT ACFG_GetCountryId(void);
00225 
00230 U8BIT ACFG_GetRegionId(void);
00231 
00237 BOOLEAN ACFG_SetCountry(U32BIT country_code);
00238 
00245 U8BIT ACFG_GetNumDbLanguages(U8BIT country_id);
00246 
00258 BOOLEAN ACFG_GetDbLangList(U8BIT country_id, U8BIT ***str_array_ptr, U8BIT *num_langs_ptr);
00259 
00272 U8BIT* ACFG_GetDbLangId(U8BIT country_id, U8BIT lang_entry);
00273 
00279 void ACFG_ReleaseDbLangList(U8BIT **str_array, U8BIT num_langs);
00280 
00286 U8BIT ACFG_ConvertLangCodeToId(U32BIT lang_code);
00287 
00293 U32BIT ACFG_ConvertLangIdToCode(U8BIT lang_id);
00294 
00302 void ACFG_SetCountryId(U8BIT country_id, U8BIT region_id, U8BIT audio_lang_id, U8BIT sub_lang_id);
00303 
00308 U8BIT ACFG_GetPrimaryAudioLangId(void);
00309 
00314 U8BIT ACFG_GetSecondaryAudioLangId(void);
00315 
00320 U8BIT ACFG_GetPrimaryTextLangId(void);
00321 
00326 U8BIT ACFG_GetSecondaryTextLangId(void);
00327 
00333 void ACFG_SetPrimaryAudioLangId(U8BIT lang_id);
00334 
00339 void ACFG_SetSecondaryAudioLangId(U8BIT lang_id);
00340 
00345 void ACFG_SetPrimaryTextLangId(U8BIT lang_id);
00346 
00351 void ACFG_SetSecondaryTextLangId(U8BIT lang_id);
00352 
00360 U8BIT ACFG_GetDefaultSecondaryLangId(void);
00361 
00369 BOOLEAN ACFG_GetAnaRfChannelTable(U8BIT country_id, ACFG_ANA_RF_CHANNEL_DATA **rf_chan_data_ptr, U16BIT *num_entries_ptr);
00370 
00378 BOOLEAN ACFG_GetTerRfChannelTable(U8BIT country_id, ACFG_TER_RF_CHANNEL_DATA **rf_chan_data_ptr, U16BIT *num_entries_ptr);
00379 
00387 BOOLEAN ACFG_GetCabRfChannelTable(U8BIT country_id, ACFG_CAB_RF_CHANNEL_DATA **rf_chan_data_ptr, U16BIT *num_entries_ptr);
00388 
00394 void ACFG_SetCableChannelTable(ACFG_CAB_RF_CHANNEL_DATA *cable_channel_data, U16BIT number_channels);
00395 
00401 U32BIT ACFG_GetCountryCode(U8BIT country_id);
00402 
00409 U32BIT ACFG_GetPrivateDataSpecifier(U8BIT country_id);
00410 
00417 U16BIT ACFG_GetFirstUnallocatedLcn(U8BIT country_id);
00418 
00425 U16BIT ACFG_GetLastUnallocatedLcn(U8BIT country_id);
00426 
00434 BOOLEAN ACFG_GetWatershedTimes(U8BIT country_id, U16BIT *start_time, U16BIT *end_time);
00435 
00442 U16BIT ACFG_GetMinSatelliteScanFreq(U8BIT country_id);
00443 
00450 U16BIT ACFG_GetMaxSatelliteScanFreq(U8BIT country_id);
00451 
00458 U16BIT ACFG_GetSatelliteScanFreqInc(U8BIT country_id);
00459 
00466 U16BIT* ACFG_GetSatelliteScanSymbolRates(U8BIT country_id);
00467 
00474 U8BIT ACFG_GetSatelliteScanNumSymbolRates(U8BIT country_id);
00475 
00482 BOOLEAN ACFG_GetSatelliteScanDvbS2(U8BIT country_id);
00483 
00490 BOOLEAN ACFG_GetAerialPowerOptionReqd(U8BIT country_id);
00491 
00498 BOOLEAN ACFG_GetDefaultAerialPower(U8BIT country_id);
00499 
00506 BOOLEAN ACFG_GetAerialTuningScreenReqd(U8BIT country_id);
00507 
00516 U8BIT* ACFG_GetEventContentTypes(U8BIT country_id);
00517 
00524 void ACFG_SetBackgroundSearchTime(U16BIT start_time, U16BIT end_time);
00525 
00531 void ACFG_GetBackgroundSearchTime(U16BIT *start_time, U16BIT *end_time);
00532 
00537 void ACFG_SetBackgroundServiceSearch(BOOLEAN enabled);
00538 
00543 BOOLEAN ACFG_GetBackgroundServiceSearch(void);
00544 
00549 void ACFG_SetBackgroundSSUSearch(BOOLEAN enabled);
00550 
00555 BOOLEAN ACFG_GetBackgroundSSUSearch(void);
00556 
00561 BOOLEAN ACFG_IsNordigCountry(void);
00562 
00568 U8BIT ACFG_GetEitUpdateTime(void);
00569 
00575 U8BIT ACFG_GetEitSearchesPerDay(void);
00576 
00583 AllocLcnFunc ACFG_GetTerrestrialLcnFunction(U8BIT country_id);
00584 
00590 void ACFG_SetTerrestrialLcnFunction(U8BIT country_id, AllocLcnFunc func_ptr);
00591 
00598 AllocLcnFunc ACFG_GetCableLcnFunction(U8BIT country_id);
00599 
00605 void ACFG_SetCableLcnFunction(U8BIT country_id, AllocLcnFunc func_ptr);
00606 
00613 AllocLcnFunc ACFG_GetSatelliteLcnFunction(U8BIT country_id);
00614 
00620 void ACFG_SetSatelliteLcnFunction(U8BIT country_id, AllocLcnFunc func_ptr);
00621 
00627 DBTidyFunc ACFG_GetTerrestrialDBTidyFunction(U8BIT country_id);
00628 
00634 DBTidyFunc ACFG_GetCableDBTidyFunction(U8BIT country_id);
00635 
00641 DBTidyFunc ACFG_GetSatelliteDBTidyFunction(U8BIT country_id);
00642 
00643 #endif //  _AP_CFG_H
 All Data Structures Files Functions Typedefs Defines