DVBCore  22.3.0
Open Source DVB Engine
Macros | Functions
ap_cfg.c File Reference

Application configuration functions. More...

#include <string.h>
#include "techtype.h"
#include "dbgfuncs.h"
#include "stbheap.h"
#include "stbdpc.h"
#include "stbsiflt.h"
#include "stbsitab.h"
#include "stbllist.h"
#include "app.h"
#include "ap_cfg.h"
#include "app_nvm.h"
#include "ap_tmr.h"
#include "ap_dbacc.h"
#include "ap_dbdef.h"
#include "ap_cfdat.h"

Macros

#define NUM_COUNTRIES   (sizeof(country_data_table) / sizeof(ACFG_COUNTRY_CONFIG))
 
#define DECLARE_DATA_TABLES
 
#define DECLARE_DB_LANG_LIST
 

Functions

U8BIT ACFG_GetNumCountries (void)
 Returns the number of country configurations included in the DVB stack. More...
 
U32BIT ACFG_GetCountry (void)
 Returns the country code the DVB is configured for. More...
 
U8BIT ACFG_GetCountryIndex (U32BIT country_code)
 Returns the index in the list of countries known by the DVB, of the given country. More...
 
U8BIT ACFG_GetRegionId (void)
 Returns the internal ID of the region the DVB is configured for. More...
 
U8BIT ACFG_GetPrimaryAudioLangId (void)
 Returns the primary audio language ID. More...
 
U8BIT ACFG_GetSecondaryAudioLangId (void)
 Returns the secondary audio language ID. More...
 
U8BIT ACFG_GetPrimaryTextLangId (void)
 Returns the primary DVB subtitle/teletext language ID. More...
 
U8BIT ACFG_GetSecondaryTextLangId (void)
 Returns the secondary DVB subtitle/teletext language ID. More...
 
BOOLEAN ACFG_SetCountry (U32BIT country_code)
 Sets the current country and sets default values for region and language. More...
 
void ACFG_SetCountryIds (U32BIT country_code, U8BIT region_id, U8BIT audio_lang_id, U8BIT sub_lang_id)
 Saves the configured country and changes settings related to the country. More...
 
void ACFG_SetPrimaryAudioLangId (U8BIT lang_id)
 Sets the primary language id to be used for audio. This is the language that will be chosen first, if available. More...
 
void ACFG_SetSecondaryAudioLangId (U8BIT lang_id)
 Sets the secondary language id to be used for audio. More...
 
void ACFG_SetPrimaryTextLangId (U8BIT lang_id)
 Sets the primary language id to be used for teletext/subtitles. More...
 
void ACFG_SetSecondaryTextLangId (U8BIT lang_id)
 Sets the secondary language id to be used for teletext/subtitles. More...
 
void ACFG_GetCountryList (U8BIT ***str_array_ptr, U8BIT *num_countries_ptr)
 Returns an array containing the names of all the countries included in the DVB. The index into this array is referred to as the country_id. The returned array should be freed using ACFG_ReleaseCountryList. More...
 
void ACFG_ReleaseCountryList (U8BIT **str_array, U8BIT num_countries)
 Frees a country list previously acquired using ACFG_GetCountryList. More...
 
BOOLEAN ACFG_GetCountryConfig (U32BIT country_code, ACFG_COUNTRY_CONFIG *config)
 Copies the country configuration for the given country into the provided structure. None of the included arrays should be freed. More...
 
BOOLEAN ACFG_SetCountryConfig (U32BIT country_code, ACFG_COUNTRY_CONFIG *config)
 Sets the country configuration settings that will be used for given country. This could be used to override the built-in configuration for a country but would more normally be used to set the configuration for the user defined country, if it's been included. If the config is set for the current country then ACFG_SetCountryIds will be called to ensure any country settings are changed if necessary. More...
 
U8BIT ACFG_GetNumRegions (U32BIT country_code)
 Returns the number of regions in the given country. More...
 
U8BIT ACFG_GetNumDbLanguages (U32BIT country_code)
 Returns the number of languages defined for the given country that can be used for audio and subtitles/teletext. More...
 
BOOLEAN ACFG_GetRegionList (U32BIT country_code, U8BIT ***str_array_ptr, U8BIT *num_regions_ptr)
 Returns an array of pointers to strings containing the region names for the given country. The index into this array is the region_id. The array is allocated by this function and should be freed using ACFG_ReleaseRegionList. More...
 
void ACFG_ReleaseRegionList (U8BIT **str_array, U8BIT num_regions)
 Frees the region array previously acquired using ACFG_GetRegionList. More...
 
BOOLEAN ACFG_SetDbLanguages (U32BIT country_code, ACFG_LANGUAGE_IDS *languages, U8BIT num_languages)
 Sets the languages that can be used for setting the default primary and secondary audio, subtitle and teletext languages. These will override any languages that are defined in the country configuration. The currently set primary and secondary audio language ids will be reset to 0 if they're greater than the number of languages in the new array. More...
 
BOOLEAN ACFG_GetDbLangList (U32BIT country_code, U8BIT ***str_array_ptr, U8BIT *num_langs_ptr)
 Returns an array of pointers to strings containing the available language names for the given country. The index into this array is the lang_id used when getting and setting audio and text language ids. The array is allocated by this function and should be freed using ACFG_ReleaseDbLangList. More...
 
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. More...
 
U8BIT ACFG_ConvertLangCodeToId (U32BIT lang_code)
 Returns the language id for the given language code. More...
 
U32BIT ACFG_ConvertLangIdToCode (U8BIT lang)
 Returns the language code for the given language id. More...
 
void ACFG_ReleaseDbLangList (U8BIT **str_array, U8BIT num_langs)
 Frees the language array previously acquired using ACFG_GetDbLangList. More...
 
BOOLEAN ACFG_GetAnaRfChannelTable (U32BIT country_code, ACFG_ANA_RF_CHANNEL_DATA **rf_chan_data_ptr, U16BIT *num_entries_ptr)
 Returns a pointer to the channel table for an analog tuner for the given country. More...
 
BOOLEAN ACFG_GetTerRfChannelTable (U32BIT country_code, ACFG_TER_RF_CHANNEL_DATA **rf_chan_data_ptr, U16BIT *num_entries_ptr)
 Returns a pointer to the channel table for a terrestrial tuner for the given country. More...
 
BOOLEAN ACFG_GetCabRfChannelTable (U32BIT country_code, ACFG_CAB_RF_CHANNEL_DATA **rf_chan_data_ptr, U16BIT *num_entries_ptr)
 Returns a pointer to the channel table for a cable tuner for the given country. More...
 
void ACFG_SetCableChannelTable (ACFG_CAB_RF_CHANNEL_DATA *cable_channel_data, U16BIT number_channels)
 Replaces the cable tuning table for the current country with the one provided. More...
 
U32BIT ACFG_GetCountryCode (U8BIT country_id)
 Returns the country code for the given country index. More...
 
U16BIT ACFG_GetOriginalNetworkID (U32BIT country_code, E_STB_DP_SIGNAL_TYPE tuner_type)
 Returns the original network ID for the given country and tuner type. More...
 
void ACFG_SetOriginalNetworkID (U32BIT country_code, E_STB_DP_SIGNAL_TYPE tuner_type, U16BIT onet_id)
 Sets the original network ID for the given country and tuner type, replacing any existing value defined in the country's data table. More...
 
U32BIT ACFG_GetPrivateDataSpecifier (U32BIT country_code)
 Returns the private data specifier value for the given country. More...
 
U16BIT ACFG_GetFirstUnallocatedLcn (U32BIT country_code, E_STB_DP_SIGNAL_TYPE tuner_type)
 Returns the first LCN that should be used when assigning LCNs to services that don't appear in an LCN descriptor, or can't be assigned their desired LCN. More...
 
U16BIT ACFG_GetLastUnallocatedLcn (U32BIT country_code, E_STB_DP_SIGNAL_TYPE tuner_type)
 Returns the last LCN that should be used when assigning LCNs to services that don't appear in an LCN descriptor, or can't be assigned their desired LCN. More...
 
BOOLEAN ACFG_GetWatershedTimes (U32BIT country_code, U16BIT *start_time, U16BIT *end_time)
 Get the start and end times of the watershed hours for a country. More...
 
U16BIT ACFG_GetMinSatelliteScanFreq (U32BIT country_code)
 Returns the minimum frequency to be used when performing a satellite based frequency scan in the given country. More...
 
U16BIT ACFG_GetMaxSatelliteScanFreq (U32BIT country_code)
 Returns the maximum frequency to be used when performing a satellite based frequency scan in the given country. More...
 
U16BIT ACFG_GetSatelliteScanFreqInc (U32BIT country_code)
 Returns the increment frequency to be used when performing a satellite based frequency scan in the given country. More...
 
U16BIT * ACFG_GetSatelliteScanSymbolRates (U32BIT country_code)
 Returns a fixed array of symbol rates to be used when performing a satellite based frequency scan in the given country. More...
 
U8BIT ACFG_GetSatelliteScanNumSymbolRates (U32BIT country_code)
 Returns the number of items in the fixed array of symbol rates to be used when performing a satellite based frequency scan in the given country. More...
 
BOOLEAN ACFG_GetSatelliteScanDvbS2 (U32BIT country_code)
 Returns whether DVB-S2 should be included when performing a satellite based frequency scan in the given country. More...
 
BOOLEAN ACFG_GetAerialPowerOptionReqd (U32BIT country_code)
 Returns whether the aerial power option is required for DVB-T/T2 for the given country. More...
 
BOOLEAN ACFG_GetDefaultAerialPower (U32BIT country_code)
 Returns the default aerial power option setting for DVB-T/T2 for the given country. More...
 
BOOLEAN ACFG_GetAerialTuningScreenReqd (U32BIT country_code)
 Returns whether an aerial tuning screen should be presented by the interface before performing a DVB-T/T2 scan for services for the given country. More...
 
BOOLEAN ACFG_GetRegionCode (U32BIT country_code, U8BIT region_id, U8BIT *code_ptr)
 Returns the region code that identifies the given region. More...
 
U8BIT * ACFG_GetEventContentTypes (U32BIT country_code)
 Returns the event content types for the given country. This defines how the content type value broadcast as part of the EIT is to be interpreted. More...
 
void ACFG_SetBackgroundSearchTime (U16BIT start_time, U16BIT end_time)
 Sets the start and end times during which background searches are allowed run when in standby. More...
 
void ACFG_GetBackgroundSearchTime (U16BIT *start_time, U16BIT *end_time)
 Gets the background start and end search times. More...
 
void ACFG_SetBackgroundServiceSearch (BOOLEAN enabled)
 Enables or disables the background service search when in standby. More...
 
BOOLEAN ACFG_GetBackgroundServiceSearch (void)
 Returns whether the background service search is enabled or not. More...
 
void ACFG_SetBackgroundSSUSearch (BOOLEAN enabled)
 Enables or disables the background SSU search when in standby. More...
 
BOOLEAN ACFG_GetBackgroundSSUSearch (void)
 Returns whether the background SSU search is enabled or not. More...
 
BOOLEAN ACFG_IsNordigCountry (void)
 Returns whether the current country requires Nordig compliance for SI. More...
 
BOOLEAN ACFG_IsNordigService (E_STB_DP_SIGNAL_TYPE tuner_type)
 Returns whether the broadcast SI data for the given tuner type is to be treated as Nordig compliant. This is in relation to the current country. More...
 
U8BIT ACFG_GetEitSearchesPerDay (void)
 Returns the number of EIT searches that should be performed per day when the box is in standby. More...
 
U8BIT ACFG_GetEitUpdateTime (void)
 Returns the number of minutes after which all the events should have been received during an EIT search. This is the EIT repetition time. More...
 
AllocLcnFunc ACFG_GetTerrestrialLcnFunction (U32BIT country_code)
 Returns a pointer to a function that's used to assign LCNs following a DVB-T/T2 scan for the given country. More...
 
void ACFG_SetTerrestrialLcnFunction (U32BIT country_code, AllocLcnFunc func_ptr)
 Overrides an existing DVB-T/T2 LCN allocation function for the given country. More...
 
AllocLcnFunc ACFG_GetCableLcnFunction (U32BIT country_code)
 Returns a pointer to a function that's used to assign LCNs following a DVB-C scan for the given country. More...
 
void ACFG_SetCableLcnFunction (U32BIT country_code, AllocLcnFunc func_ptr)
 Overrides an existing DVB-C LCN allocation function for the given country. More...
 
AllocLcnFunc ACFG_GetSatelliteLcnFunction (U32BIT country_code)
 Returns a pointer to a function that's used to assign LCNs following a DVB-S/S2 scan for the given country. More...
 
void ACFG_SetSatelliteLcnFunction (U32BIT country_code, AllocLcnFunc func_ptr)
 Overrides an existing DVB-S/S2 LCN allocation function for the given country. More...
 
DBTidyFunc ACFG_GetTerrestrialDBTidyFunction (U32BIT country_code)
 Returns a pointer to a function that's used to tidy up the database following a DVB-T/T2 scan for the given country. More...
 
DBTidyFunc ACFG_GetCableDBTidyFunction (U32BIT country_code)
 Returns a pointer to a function that's used to tidy up the database following a DVB-C scan for the given country. More...
 
DBTidyFunc ACFG_GetSatelliteDBTidyFunction (U32BIT country_code)
 Returns a pointer to a function that's used to tidy up the database following a DVB-S/S2 scan for the given country. More...
 
U8BIT ACFG_GetDefaultSecondaryLangId (void)
 Returns the default secondary language for audio and subtitles as defined for the selected country. This is used for countries that don't use the secondary language, but expect a defined language to be used if the primary one isn't available. More...
 
void ACFG_SetUndefinedLanguageBehaviour (U32BIT lang_code)
 Sets the language code to be used when the SI descriptors contain 'und', 'qaa' or don't contain any language descriptors. More...
 
U32BIT ACFG_GetUndefinedLanguageBehaviour (void)
 Gets the language code set by ACFG_SetUndefinedLanguageBehaviour, or 'und' if that function has not been called. More...
 
void ACFG_SetHostCountryLanguageModuleId (U32BIT module)
 Sets the host and country module for CI stack. Value zero for disable. More...
 
BOOLEAN ACFG_GetDynamicSIUpdate (E_STB_DP_SIGNAL_TYPE signal_type, U16BIT onet_id, E_ACFG_DYNAMIC_SI_UPDATE_TYPE update_type)
 Use to check whether a dynamic SI update type is enabled for the currently configured country and given signal type and original network ID. If an array item is found with an original network ID of ADB_INVALID_DVB_ID then this item will be used. More...
 
BOOLEAN ACFG_SetDynamicSIUpdates (E_STB_DP_SIGNAL_TYPE signal_type, ACFG_DYNAMIC_SI_UPDATES *dynamic_updates, U8BIT num_updates)
 Sets the dynamic SI updates for the given tuner type of the currently configured country. More...
 

Detailed Description

Application configuration functions.

Date
05/04/2004
Author
Ocean Blue

Function Documentation

U8BIT ACFG_ConvertLangCodeToId ( U32BIT  lang_code)

Returns the language id for the given language code.

Parameters
lang_codelanguage code
Returns
language id, or ACFG_INVALID_LANG if language code isn't found
U32BIT ACFG_ConvertLangIdToCode ( U8BIT  lang)

Returns the language code for the given language id.

Parameters
lang_idlanguage id
Returns
language code, or 0 if language id isn't valid
BOOLEAN ACFG_GetAerialPowerOptionReqd ( U32BIT  country_code)

Returns whether the aerial power option is required for DVB-T/T2 for the given country.

Parameters
country_codecountry code
Returns
TRUE if required, FALSE otherwise
BOOLEAN ACFG_GetAerialTuningScreenReqd ( U32BIT  country_code)

Returns whether an aerial tuning screen should be presented by the interface before performing a DVB-T/T2 scan for services for the given country.

Parameters
country_codecountry code
Returns
TRUE if required, FALSE otherwise
BOOLEAN ACFG_GetAnaRfChannelTable ( U32BIT  country_code,
ACFG_ANA_RF_CHANNEL_DATA **  rf_chan_data_ptr,
U16BIT *  num_entries_ptr 
)

Returns a pointer to the channel table for an analog tuner for the given country.

Parameters
country_codecountry whose table is to be returned
rf_chan_data_ptrreturned pointer to the channel table
num_entries_ptrnumber of entries in the returned channel table
Returns
TRUE if the country is valid and data is returned, FALSE otherwise
void ACFG_GetBackgroundSearchTime ( U16BIT *  start_time,
U16BIT *  end_time 
)

Gets the background start and end search times.

Parameters
start_timereturn start time in minutes since midnight
end_timereturn end time in minutes
BOOLEAN ACFG_GetBackgroundServiceSearch ( void  )

Returns whether the background service search is enabled or not.

Returns
TRUE if enabled, FALSE otherwise
BOOLEAN ACFG_GetBackgroundSSUSearch ( void  )

Returns whether the background SSU search is enabled or not.

Returns
TRUE if enabled, FALSE otherwise
DBTidyFunc ACFG_GetCableDBTidyFunction ( U32BIT  country_code)

Returns a pointer to a function that's used to tidy up the database following a DVB-C scan for the given country.

Parameters
country_codecountry code
Returns
pointer to functions, or NULL
AllocLcnFunc ACFG_GetCableLcnFunction ( U32BIT  country_code)

Returns a pointer to a function that's used to assign LCNs following a DVB-C scan for the given country.

Parameters
country_codecountry code
Returns
pointer to functions, or NULL
BOOLEAN ACFG_GetCabRfChannelTable ( U32BIT  country_code,
ACFG_CAB_RF_CHANNEL_DATA **  rf_chan_data_ptr,
U16BIT *  num_entries_ptr 
)

Returns a pointer to the channel table for a cable tuner for the given country.

Parameters
country_codecountry whose table is to be returned
rf_chan_data_ptrreturned pointer to the channel table
num_entries_ptrnumber of entries in the returned channel table
Returns
TRUE if the country is valid and data is returned, FALSE otherwise
U32BIT ACFG_GetCountry ( void  )

Returns the country code the DVB is configured for.

Returns
country code
U32BIT ACFG_GetCountryCode ( U8BIT  country_id)

Returns the country code for the given country index.

Parameters
country_idcountry index
Returns
country code, or 0 if country id isn't valid
BOOLEAN ACFG_GetCountryConfig ( U32BIT  country_code,
ACFG_COUNTRY_CONFIG config 
)

Copies the country configuration for the given country into the provided structure. None of the included arrays should be freed.

Parameters
country_code3 character country code
configstructure into which the configuration data will be copied
Returns
TRUE if the country code is valid, FALSE otherwise
U8BIT ACFG_GetCountryIndex ( U32BIT  country_code)

Returns the index in the list of countries known by the DVB, of the given country.

Parameters
country_codecountry code
Returns
country index, value returned by ACFG_GetNumCountries() if the country isn't found
void ACFG_GetCountryList ( U8BIT ***  str_array_ptr,
U8BIT *  num_countries_ptr 
)

Returns an array containing the names of all the countries included in the DVB. The index into this array is referred to as the country_id. The returned array should be freed using ACFG_ReleaseCountryList.

Parameters
str_array_ptrpointer to an allocated array of static UTF-8 strings
num_countries_ptrpointer to the number of countries in the returned array
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.

Parameters
country_codecountry code
lang_entryindex into the language array
Returns
pointer to the array of language ids, or NULL if either of the indices are invalid.
BOOLEAN ACFG_GetDbLangList ( U32BIT  country_code,
U8BIT ***  str_array_ptr,
U8BIT *  num_langs_ptr 
)

Returns an array of pointers to strings containing the available language names for the given country. The index into this array is the lang_id used when getting and setting audio and text language ids. The array is allocated by this function and should be freed using ACFG_ReleaseDbLangList.

Parameters
country_codecountry code
str_array_ptrpointer to an allocated array of static UTF-8 strings
num_langs_ptrpointer to the number of languages in the returned array
Returns
TRUE if the country_id is valid
BOOLEAN ACFG_GetDefaultAerialPower ( U32BIT  country_code)

Returns the default aerial power option setting for DVB-T/T2 for the given country.

Parameters
country_codecountry code
Returns
TRUE or FALSE
U8BIT ACFG_GetDefaultSecondaryLangId ( void  )

Returns the default secondary language for audio and subtitles as defined for the selected country. This is used for countries that don't use the secondary language, but expect a defined language to be used if the primary one isn't available.

Returns
language id, or ACFG_INVALID_LANG when the value is not defined
BOOLEAN ACFG_GetDynamicSIUpdate ( E_STB_DP_SIGNAL_TYPE  signal_type,
U16BIT  onet_id,
E_ACFG_DYNAMIC_SI_UPDATE_TYPE  update_type 
)

Use to check whether a dynamic SI update type is enabled for the currently configured country and given signal type and original network ID. If an array item is found with an original network ID of ADB_INVALID_DVB_ID then this item will be used.

Use to check whether a dynamic SI update is enabled for the currently configured country and given signal type and original network ID. If an array item is found with an original network ID of ADB_INVALID_DVB_ID then this item will be used.

Parameters
signal_typeterrestrial, satellite or cable
onet_idoriginal network ID to be checked
update_typesee whether this type of update is enabled
Returns
TRUE if the update is enabled, FALSE otherwise
U8BIT ACFG_GetEitSearchesPerDay ( void  )

Returns the number of EIT searches that should be performed per day when the box is in standby.

Returns
number of times
U8BIT ACFG_GetEitUpdateTime ( void  )

Returns the number of minutes after which all the events should have been received during an EIT search. This is the EIT repetition time.

Returns
time in minutes
U8BIT* ACFG_GetEventContentTypes ( U32BIT  country_code)

Returns the event content types for the given country. This defines how the content type value broadcast as part of the EIT is to be interpreted.

Parameters
country_codecountry code
Returns
pointer to the content type array. The index of this array is level_1 from the event content descriptors in the EIT and its elements are of type ADB_EVENT_CONTENT, defined in ap_dbacc.h
U16BIT ACFG_GetFirstUnallocatedLcn ( U32BIT  country_code,
E_STB_DP_SIGNAL_TYPE  tuner_type 
)

Returns the first LCN that should be used when assigning LCNs to services that don't appear in an LCN descriptor, or can't be assigned their desired LCN.

Parameters
country_codecountry code
tuner_typetuner type of the value to be returned
Returns
LCN; 0 if country or tuner type aren't valid
U16BIT ACFG_GetLastUnallocatedLcn ( U32BIT  country_code,
E_STB_DP_SIGNAL_TYPE  tuner_type 
)

Returns the last LCN that should be used when assigning LCNs to services that don't appear in an LCN descriptor, or can't be assigned their desired LCN.

Parameters
country_codecountry code
tuner_typetuner type of the value to be returned
Returns
LCN; 0 if country or tuner type aren't valid
U16BIT ACFG_GetMaxSatelliteScanFreq ( U32BIT  country_code)

Returns the maximum frequency to be used when performing a satellite based frequency scan in the given country.

Parameters
country_codecountry code
Returns
frequency in MHz; 0 if undefined or country is invalid
U16BIT ACFG_GetMinSatelliteScanFreq ( U32BIT  country_code)

Returns the minimum frequency to be used when performing a satellite based frequency scan in the given country.

Parameters
country_codecountry code
Returns
frequency in MHz; 0 if undefined or country is invalid
U8BIT ACFG_GetNumCountries ( void  )

Returns the number of country configurations included in the DVB stack.

Returns
number of countries
U8BIT ACFG_GetNumDbLanguages ( U32BIT  country_code)

Returns the number of languages defined for the given country that can be used for audio and subtitles/teletext.

Parameters
country_codecountry code
Returns
number of available languages
U8BIT ACFG_GetNumRegions ( U32BIT  country_code)

Returns the number of regions in the given country.

Parameters
country_codecountry code
Returns
number of regions
U16BIT ACFG_GetOriginalNetworkID ( U32BIT  country_code,
E_STB_DP_SIGNAL_TYPE  tuner_type 
)

Returns the original network ID for the given country and tuner type.

Parameters
country_codecountry code
tuner_typedefines the original network ID value to be returned
Returns
original network ID which will be 0 if the country isn't defined or tuner type is invalid
U8BIT ACFG_GetPrimaryAudioLangId ( void  )

Returns the primary audio language ID.

Returns
language id
U8BIT ACFG_GetPrimaryTextLangId ( void  )

Returns the primary DVB subtitle/teletext language ID.

Returns
language id
U32BIT ACFG_GetPrivateDataSpecifier ( U32BIT  country_code)

Returns the private data specifier value for the given country.

Parameters
country_codecoutry code
Returns
private data specifier value; 0 if one isn't defined for the country or country code isn't valid
BOOLEAN ACFG_GetRegionCode ( U32BIT  country_code,
U8BIT  region_id,
U8BIT *  code_ptr 
)

Returns the region code that identifies the given region.

Parameters
country_codecountry code
region_idregion index
code_ptrpointer to value in which the code will be returned
Returns
TRUE if the country and region indices are valid, FALSE otherwise
U8BIT ACFG_GetRegionId ( void  )

Returns the internal ID of the region the DVB is configured for.

Returns
region id
BOOLEAN ACFG_GetRegionList ( U32BIT  country_code,
U8BIT ***  str_array_ptr,
U8BIT *  num_regions_ptr 
)

Returns an array of pointers to strings containing the region names for the given country. The index into this array is the region_id. The array is allocated by this function and should be freed using ACFG_ReleaseRegionList.

Parameters
country_codecountry code
str_array_ptrpointer to an allocated array of static UTF-8 strings
num_regions_ptrpointer to the number of regions in the returned array
Returns
TRUE if the country_id is valid
DBTidyFunc ACFG_GetSatelliteDBTidyFunction ( U32BIT  country_code)

Returns a pointer to a function that's used to tidy up the database following a DVB-S/S2 scan for the given country.

Parameters
country_codecountry code
Returns
pointer to functions, or NULL
AllocLcnFunc ACFG_GetSatelliteLcnFunction ( U32BIT  country_code)

Returns a pointer to a function that's used to assign LCNs following a DVB-S/S2 scan for the given country.

Parameters
country_codecountry code
Returns
pointer to functions, or NULL
BOOLEAN ACFG_GetSatelliteScanDvbS2 ( U32BIT  country_code)

Returns whether DVB-S2 should be included when performing a satellite based frequency scan in the given country.

Parameters
country_codecountry code
Returns
TRUE if DVB-S2 should be used, FALSE otherwise
U16BIT ACFG_GetSatelliteScanFreqInc ( U32BIT  country_code)

Returns the increment frequency to be used when performing a satellite based frequency scan in the given country.

Parameters
country_codecountry code
Returns
frequency in MHz; 0 if undefined or country is invalid
U8BIT ACFG_GetSatelliteScanNumSymbolRates ( U32BIT  country_code)

Returns the number of items in the fixed array of symbol rates to be used when performing a satellite based frequency scan in the given country.

Parameters
country_codecountry code
Returns
number of symbol rates; 0 if undefined or country is invalid
U16BIT* ACFG_GetSatelliteScanSymbolRates ( U32BIT  country_code)

Returns a fixed array of symbol rates to be used when performing a satellite based frequency scan in the given country.

Parameters
country_codecountry code
Returns
array of symbol rates in Kbps; NULL if undefined or country is invalid
U8BIT ACFG_GetSecondaryAudioLangId ( void  )

Returns the secondary audio language ID.

Returns
language id
U8BIT ACFG_GetSecondaryTextLangId ( void  )

Returns the secondary DVB subtitle/teletext language ID.

Returns
language id
DBTidyFunc ACFG_GetTerrestrialDBTidyFunction ( U32BIT  country_code)

Returns a pointer to a function that's used to tidy up the database following a DVB-T/T2 scan for the given country.

Parameters
country_codecountry code
Returns
pointer to functions, or NULL
AllocLcnFunc ACFG_GetTerrestrialLcnFunction ( U32BIT  country_code)

Returns a pointer to a function that's used to assign LCNs following a DVB-T/T2 scan for the given country.

Parameters
country_codecountry code
Returns
pointer to functions, or NULL
BOOLEAN ACFG_GetTerRfChannelTable ( U32BIT  country_code,
ACFG_TER_RF_CHANNEL_DATA **  rf_chan_data_ptr,
U16BIT *  num_entries_ptr 
)

Returns a pointer to the channel table for a terrestrial tuner for the given country.

Parameters
country_codecountry whose table is to be returned
rf_chan_data_ptrreturned pointer to the channel table
num_entries_ptrnumber of entries in the returned channel table
Returns
TRUE if the country is valid and data is returned, FALSE otherwise
U32BIT ACFG_GetUndefinedLanguageBehaviour ( void  )

Gets the language code set by ACFG_SetUndefinedLanguageBehaviour, or 'und' if that function has not been called.

Returns
Language code currently used when the SI descriptors don't define a language
BOOLEAN ACFG_GetWatershedTimes ( U32BIT  country_code,
U16BIT *  start_time,
U16BIT *  end_time 
)

Get the start and end times of the watershed hours for a country.

Parameters
country_codecountry code
start_timereturns the start time in minutes since midnight
end_timereturns the end time in minutes since midnight
Returns
TRUE if the start and end times are valid and have been returned, FALSE otherwise
BOOLEAN ACFG_IsNordigCountry ( void  )

Returns whether the current country requires Nordig compliance for SI.

Returns
TRUE if Nordig, FALSE otherwise
BOOLEAN ACFG_IsNordigService ( E_STB_DP_SIGNAL_TYPE  tuner_type)

Returns whether the broadcast SI data for the given tuner type is to be treated as Nordig compliant. This is in relation to the current country.

Parameters
tuner_typetuner type to be checked; SIGNAL_NONE is not a valid argument
Returns
TRUE if SI data should comply with Nordig specifications, FALSE otherwise
void ACFG_ReleaseCountryList ( U8BIT **  str_array,
U8BIT  num_countries 
)

Frees a country list previously acquired using ACFG_GetCountryList.

Parameters
str_arrayarray to be freed
num_countriesnumber of items in the array
void ACFG_ReleaseDbLangList ( U8BIT **  str_array,
U8BIT  num_langs 
)

Frees the language array previously acquired using ACFG_GetDbLangList.

Parameters
str_arrayarray of lang names to be freed
num_langsnumber of names in the array
void ACFG_ReleaseRegionList ( U8BIT **  str_array,
U8BIT  num_regions 
)

Frees the region array previously acquired using ACFG_GetRegionList.

Parameters
str_arrayarray to be freed
num_regionsnumber of items in the array
void ACFG_SetBackgroundSearchTime ( U16BIT  start_time,
U16BIT  end_time 
)

Sets the start and end times during which background searches are allowed run when in standby.

Parameters
start_timestart time in minutes since midnight
end_timeend time in minutes
void ACFG_SetBackgroundServiceSearch ( BOOLEAN  enabled)

Enables or disables the background service search when in standby.

Parameters
enabledTRUE to enable, FALSE to disable
void ACFG_SetBackgroundSSUSearch ( BOOLEAN  enabled)

Enables or disables the background SSU search when in standby.

Parameters
enabledTRUE to enable, FALSE to disable
void ACFG_SetCableChannelTable ( ACFG_CAB_RF_CHANNEL_DATA cable_channel_data,
U16BIT  number_channels 
)

Replaces the cable tuning table for the current country with the one provided.

Parameters
cable_channel_datapointer to the new table to point
number_channelsnumber of entries in the channel table
void ACFG_SetCableLcnFunction ( U32BIT  country_code,
AllocLcnFunc  func_ptr 
)

Overrides an existing DVB-C LCN allocation function for the given country.

Parameters
country_codecountry code
pointerto function, can be NULL if no function is to be called
BOOLEAN ACFG_SetCountry ( U32BIT  country_code)

Sets the current country and sets default values for region and language.

Parameters
country_codecountry code, as defined above (see COUNTRY_CODE_* defines)
Returns
TRUE if country is known, FALSE otherwise
BOOLEAN ACFG_SetCountryConfig ( U32BIT  country_code,
ACFG_COUNTRY_CONFIG config 
)

Sets the country configuration settings that will be used for given country. This could be used to override the built-in configuration for a country but would more normally be used to set the configuration for the user defined country, if it's been included. If the config is set for the current country then ACFG_SetCountryIds will be called to ensure any country settings are changed if necessary.

Parameters
country_code3 character country code
configconfiguration settings to be used for the country
Returns
TRUE if the country code is valid, FALSE otherwise
void ACFG_SetCountryIds ( U32BIT  country_code,
U8BIT  region_id,
U8BIT  audio_lang_id,
U8BIT  sub_lang_id 
)

Saves the configured country and changes settings related to the country.

Parameters
country_codecountry code
region_idID of region in country, if appropriate
audio_lang_idID of language to be used for audio
sub_lang_idID of language to be used for subtitles/teletext
BOOLEAN ACFG_SetDbLanguages ( U32BIT  country_code,
ACFG_LANGUAGE_IDS languages,
U8BIT  num_languages 
)

Sets the languages that can be used for setting the default primary and secondary audio, subtitle and teletext languages. These will override any languages that are defined in the country configuration. The currently set primary and secondary audio language ids will be reset to 0 if they're greater than the number of languages in the new array.

Parameters
country_codecountry code of the country whose languages are to be set
languagesarray of languages. This array will be copied.
num_languagesnumber of items in the above language array
Returns
TRUE if the country is found and the languages are set, FALSE otherwise
BOOLEAN ACFG_SetDynamicSIUpdates ( E_STB_DP_SIGNAL_TYPE  signal_type,
ACFG_DYNAMIC_SI_UPDATES dynamic_updates,
U8BIT  num_updates 
)

Sets the dynamic SI updates for the given tuner type of the currently configured country.

Parameters
signal_typeterrestrial, satellite or cable
dynamic_updatesarray of SI update types; the content of this array isn't copied so must continue to exist after it's set. The last element of the array must be an entry with the update type of ACFG_DYNAMIC_SI_UPDATE_NONE; the original network ID for this entry will be ignored so can be any value.
num_updatesnumber of SI update entries in the provided array
Returns
TRUE if the country and signal type are valid, FALSE otherwise
void ACFG_SetHostCountryLanguageModuleId ( U32BIT  module)

Sets the host and country module for CI stack. Value zero for disable.

Parameters
moduleModule Id given by CI stack
void ACFG_SetOriginalNetworkID ( U32BIT  country_code,
E_STB_DP_SIGNAL_TYPE  tuner_type,
U16BIT  onet_id 
)

Sets the original network ID for the given country and tuner type, replacing any existing value defined in the country's data table.

Parameters
country_codecountry code
tuner_typedefines the original network ID value to be returned
onet_idoriginal network ID to be used
void ACFG_SetPrimaryAudioLangId ( U8BIT  lang_id)

Sets the primary language id to be used for audio. This is the language that will be chosen first, if available.

Parameters
lang_idlanguage id
void ACFG_SetPrimaryTextLangId ( U8BIT  lang_id)

Sets the primary language id to be used for teletext/subtitles.

Parameters
lang_idlanguage id
void ACFG_SetSatelliteLcnFunction ( U32BIT  country_code,
AllocLcnFunc  func_ptr 
)

Overrides an existing DVB-S/S2 LCN allocation function for the given country.

Parameters
country_codecountry code
pointerto function, can be NULL if no function is to be called
void ACFG_SetSecondaryAudioLangId ( U8BIT  lang_id)

Sets the secondary language id to be used for audio.

Parameters
lang_idlanguage id
void ACFG_SetSecondaryTextLangId ( U8BIT  lang_id)

Sets the secondary language id to be used for teletext/subtitles.

Parameters
lang_idlanguage id
void ACFG_SetTerrestrialLcnFunction ( U32BIT  country_code,
AllocLcnFunc  func_ptr 
)

Overrides an existing DVB-T/T2 LCN allocation function for the given country.

Parameters
country_codecountry code
pointerto function, can be NULL if no function is to be called
void ACFG_SetUndefinedLanguageBehaviour ( U32BIT  lang_code)

Sets the language code to be used when the SI descriptors contain 'und', 'qaa' or don't contain any language descriptors.

Parameters
lang_codeLanguage code to be use when the language is undefined. ILanguage codes that are not present in db_lang_list[] (defined in ap_cfdat.h), except ADB_LANG_CODE_UNDEF, will be ignored.