📄 db_api.h
字号:
*/
u16 DVB_GetPreviousFavorService(EN_SERVICE_TYPE tvRadioMode, u16 pgmIndex);
/*! \fn u16 DVB_GetPreviousFavorServiceEX(EN_SERVICE_TYPE tvRadioMode, u16 pgmIndex)
\brief Get the previous favor service.
\param enServiceType (Input) the service type
\param u16CurrentIdx (Input) This is the current service index.
\return the favor service index
*/
u16 DVB_GetFirstFavorServiceEX(EN_SERVICE_TYPE tvRadioMode, u8 u8FavGroup);
/*! \fn u16 DVB_GetFirstFavorServiceEX(EN_SERVICE_TYPE tvRadioMode, u8 u8FavGroup)
\brief Get the first favor service.
\param enServiceType (Input) the service type
\param u8FavGroup (Input) choose which group, 0~(MAX_FAVORITE_GROUP_NUM-1)
\return the favor service index
*/
u16 DVB_GetNextFavorServiceEX(EN_SERVICE_TYPE tvRadioMode, u16 pgmIndex, u8 u8FavGroup);
/*! \fn u16 DVB_GetNextFavorServiceEX(EN_SERVICE_TYPE tvRadioMode, u16 pgmIndex, u8 u8FavGroup)
\brief Get the next favor service.
\param enServiceType (Input) the service type
\param u16CurrentIdx (Input) This is the current service index.
\param u8FavGroup (Input) choose which group, 0~(MAX_FAVORITE_GROUP_NUM-1)
\return the favor service index
*/
u16 DVB_GetPreviousFavorServiceEX(EN_SERVICE_TYPE tvRadioMode, u16 pgmIndex, u8 u8FavGroup);
/*! \fn u16 DVB_GetPreviousFavorServiceEX(EN_SERVICE_TYPE tvRadioMode, u16 pgmIndex, u8 u8FavGroup)
\brief Get the previous favor service.
\param enServiceType (Input) the service type
\param u16CurrentIdx (Input) This is the current service index.
\param u8FavGroup (Input) choose which group, 0~(MAX_FAVORITE_GROUP_NUM-1)
\return the favor service index
*/
bool8 DVB_ServiceSetParentalLock (EN_SERVICE_TYPE enServiceType, u16 u16SrvIdx, bool8 bLock);
/*! \fn bool8 DVB_ServiceSetParentalLock (EN_SERVICE_TYPE enServiceType, u16 u16SrvIdx, bool8 bLock)
\brief Update a parental lock to database by service index.
\param enServiceType (Input) the service type
\param u16SrvIdx (Input) the service index
\param bLock (Input) Set lock or not
\return TRUE - success
\return FALSE - The index number can't be found.
*/
bool8 DVB_ServiceCheckParentalLock (DVB_ServiceInfo *pstService);
/*! \fn bool8 DVB_ServiceCheckParentalLock (DVB_ServiceInfo *pstService)
\brief Check parental lock by service item.
\param DVB_ServiceInfo *pstService (Input) the service want to check
\return TRUE - LOCK
\return FALSE - UNLOCK.
*/
bool8 DVB_ServiceSetFavorite (EN_SERVICE_TYPE enServiceType, u16 u16SrvIdx, bool8 bFavorite);
/*! \fn bool8 DVB_ServiceSetFavorite (EN_SERVICE_TYPE enServiceType, u16 u16SrvIdx, bool8 bFavorite)
\brief Update favorite to database by service index.
\param enServiceType (Input) the service type
\param u16SrvIdx (Input) the service index
\param bFavorite (Input) Set Favorite or not
\return TRUE - success
\return FALSE - The index number can't be found.
*/
bool8 DVB_ServiceCheckFavorite (DVB_ServiceInfo *pstService);
/*! \fn bool8 DVB_ServiceCheckFavorite (DVB_ServiceInfo *pstService)
\brief Update favorite to database by service index.
\param DVB_ServiceInfo *pstService (Input) the service want to check
\return TRUE - Favorite channel
\return FALSE - not a favorite channel.
*/
bool8 DVB_ServiceSetFavoriteEX (EN_SERVICE_TYPE enServiceType, u16 u16SrvIdx, bool8 bFavorite, u8 u8FavGroup);
/*! \fn bool8 DVB_ServiceSetFavoriteEX (EN_SERVICE_TYPE enServiceType, u16 u16SrvIdx, bool8 bFavorite, u8 u8FavGroup)
\brief Update favorite to database by service index.
\param enServiceType (Input) the service type
\param u16SrvIdx (Input) the service index
\param bFavorite (Input) Set Favorite or not
\param u8FavGroup (Input) set to which group, 0~(MAX_FAVORITE_GROUP_NUM-1)
\return TRUE - success
\return FALSE - The index number can't be found.
*/
bool8 DVB_ServiceCheckFavoriteEX (DVB_ServiceInfo *pstService, u8 u8FavGroup);
/*! \fn bool8 DVB_ServiceCheckFavoriteEX (DVB_ServiceInfo *pstService, u8 u8FavGroup)
\brief Update favorite to database by service index.
\param DVB_ServiceInfo *pstService (Input) the service want to check
\param u8FavGroup (Input) set to which group, 0~(MAX_FAVORITE_GROUP_NUM-1)
\return TRUE - Favorite channel
\return FALSE - not a favorite channel.
*/
bool8 DVB_ServiceSetAudioChannel (EN_SERVICE_TYPE enServiceType, u16 u16SrvIdx, u8 u8AudioChannel);
/*! \fn bool8 DVB_ServiceSetAudioChannel (EN_SERVICE_TYPE enServiceType, u16 u16SrvIdx, u8 u8AudioChannel)
\brief Update audio channel setting to database by service index.
\param enServiceType (Input) the service type
\param u16SrvIdx (Input) the service index
\param u8AudioChannel (Input) Set Audio channel
\return TRUE - success
\return FALSE - The index number can't be found.
*/
u8 DVB_ServiceCheckAudioChannel (DVB_ServiceInfo *pstService);
/*! \fn bool8 DVB_ServiceCheckAudioChannel (DVB_ServiceInfo *pstService)
\brief Check audio channel by service item.
\param DVB_ServiceInfo *pstService (Input) the service want to check
\return audio channel
*/
bool8 DVB_ServiceSetAudioMode (EN_SERVICE_TYPE enServiceType, u16 u16SrvIdx, EN_AUD_MODE enAudioMode);
/*! \fn bool8 DVB_ServiceSetAudioMode (EN_SERVICE_TYPE enServiceType, u16 u16SrvIdx, EN_AUD_MODE enAudioMode)
\brief Update favorite to database by service index.
\param enServiceType (Input) the service type
\param u16SrvIdx (Input) the service index
\param enAudioMode (Input) Set Audio mode
\return TRUE - success
\return FALSE - The index number can't be found.
*/
EN_AUD_MODE DVB_ServiceCheckAudioMode (DVB_ServiceInfo *pstService);
/*! \fn bool8 DVB_ServiceCheckAudioMode (DVB_ServiceInfo *pstService)
\brief Check audio mode by service item.
\param DVB_ServiceInfo *pstService (Input) the service want to check
\return EN_AUD_MODE , see dvb_av.h
*/
bool8 DVB_GetTPidxBySat(u8 u8SatIndex, u16 *pu16FirstTPIndex, u16 *pu16LastTPIndex);
/*! \fn bool8 DVB_GetTPidxBySat(u8 u8SatIndex, u16 *pu16FirstTPIndex, u16 *pu16LastTPIndex)
\brief Get first tp idx and lastest tp index in specific sat.
\param u8SatIndex (Input) the sat index
\param pu16FirstTPIndex (Output) the first tp idx in this sat
\param pu16LastTPIndex (Output) the lastest tp idx in this sat
\return TRUE - success
\return FALSE - The index number can't be found.
*/
bool8 DVB_GetSatIdxBySrv(EN_SERVICE_TYPE enServiceType, u16 u16SrvIndex, u8* pu8SatIndex);
/*! \fn bool8 DVB_GetSatIdxBySrv(EN_SERVICE_TYPE enServiceType, u16 u16SrvIndex, u8* pu8SatIndex)
\brief Get satellite index by specific service index.
\param enServiceType (Input) TV or Radio list
\param u16SrvIndex (Intput) the service index
\param pu8SatIndex (Output) the satellite index
\return TRUE - success
\return FALSE - The index number can't be found.
*/
void DVB_SetPgmDisplayType( EN_PGM_DISPLAY_TYPE enType);
/*! \fn void DVB_SetPgmDisplayType( EN_PGM_DISPLAY_TYPE enType)
\brief Set display type of program number.
\param enType (Intput) please see EN_PGM_DISPLAY_TYPE.
*/
EN_PGM_DISPLAY_TYPE DVB_GetPgmDisplayType(void);
/*! \fn EN_PGM_DISPLAY_TYPE DVB_GetPgmDisplayType(void)
\brief Get display type of program number.
\return please see EN_PGM_DISPLAY_TYPE.
*/
u16 DVB_GetPgmNo(EN_SERVICE_TYPE enServiceType, u16 u16DbIdx);
/*! \fn u16 DVB_GetPgmNo(EN_SERVICE_TYPE enServiceType, u16 u16DbIdx)
\brief Get program number depends on current display type.
\param enServiceType (Input) TV or Radio list
\param u16DbIdx (Intput) the service index
\return program number or service id.
*/
u16 DVB_GetDbIdx(EN_SERVICE_TYPE enServiceType, u16 u16PgmNo);
/*! \fn u16 DVB_GetDbIdx(EN_SERVICE_TYPE enServiceType, u16 u16PgmNo)
\brief Get database index of specific programber number.
\param enServiceType (Input) TV or Radio list
\param u16PgmNo (Intput) the service index
\return the service index in database.
*/
u16 DVB_GetSrvIDByDbIdx(EN_SERVICE_TYPE enServiceType, u16 u16DbIdx);
/*! \fn bool8 DVB_GetSatIdxBySrv(EN_SERVICE_TYPE enServiceType, u16 u16SrvIndex, u8* pu8SatIndex)
\brief Get service id from database index.
\param enServiceType (Input) TV or Radio list
\param u16DbIdx (Intput) the service index
\return FALSE - The index number can't be found.
*/
#ifdef ATSC_SYSTEM
u16 DVB_GetDbIdxByMaMiNum(EN_SERVICE_TYPE enServiceType, u16 u16MajorNum, u16 u16MinorNum);
/*! \fn u16 DVB_GetDbIdxByMaMiNum(EN_SERVICE_TYPE enServiceType, u16 u16MajorNum, u16 u16MinorNum)
\brief Get service index by ATSC channel major number and minor number.
\param enServiceType (Input) TV or Radio list
\param u16MajorNum (Intput) the channel major number
\param u16MinorNum (Intput) the channel minor number
\return the service index in database.
*/
#endif // end ATSC_SYSTEM
u16 DVB_GetDbIdxBySrvID(EN_SERVICE_TYPE enServiceType, u16 u16SrvID);
/*! \fn bool8 DVB_GetSatIdxBySrv(EN_SERVICE_TYPE enServiceType, u16 u16SrvIndex, u8* pu8SatIndex)
\brief Get satellite index by specific service index.
\param enServiceType (Input) TV or Radio list
\param u16SrvID (Intput) the service id
\return the service index in database.
*/
u16 DVB_SortDB(EN_SERVICE_TYPE enSrvType, EN_SORT_TYPE enType, u16 u16OrgIdx );
/*! \fn u16 DVB_SortDB(EN_SERVICE_TYPE enSrvType, EN_SORT_TYPE enType, u16 u16OrgIdx )
\brief Sort tv or radio database, .
\param enSrvType (Input) TV or Radio list.
\param enType (Intput) please see EN_SORT_TYPE.
\param u16OrgIdx (Intput) the service index before sorting.
\return the service index after sorting.
*/
void DVB_ServiceSetDefaultAudioMode(EN_SERVICE_TYPE enSrvType,EN_AUD_MODE enAudMode);
/*! \fn DVB_ServiceSetDefaultAudioMode(EN_SERVICE_TYPE enSrvType,EN_AUD_MODE enAudMode)
\brief Set TV or radio audio output mode,when add new service.
\param enSrvType (Input) TV or Radio list.
\param enAudMode (Intput) the audio output mode.
*/
EN_AUD_MODE DVB_ServiceGetDefaultAudioMode(EN_SERVICE_TYPE enSrvType);
/*! \fn EN_AUD_MODE DVB_ServiceGetDefaultAudioMode(EN_SERVICE_TYPE enSrvType)
\brief Get TV or radio audio output mode,when add new service.
\param enSrvType (Input) TV or Radio list.
\param enAudMode (Output) the audio output mode.
*/
void DVB_TPCleanUnusedTp(void);
/*! \fn void DVB_TPCleanUnusedTp(void)
\brief delete transponder that has no service.
*/
bool8 DVB_ServiceSetSkip (DVB_ServiceInfo *pstService, bool8 b8Skip);
/*! \fn bool8 DVB_ServiceSetSkip (EN_SERVICE_TYPE enServiceType, u16 u16SrvIdx, bool8 b8Skip)
\brief Update skip info in service item.
\param DVB_ServiceInfo *pstService (Input) the service want to set
\param b8Skip (Input) skip this service or not
\return TRUE - success
\return FALSE - invaild pointer of pstService.
*/
bool8 DVB_ServiceCheckSkip (DVB_ServiceInfo *pstService);
/*! \fn bool8 DVB_ServiceCheckSkip (DVB_ServiceInfo *pstService)
\brief Check skip info in service item.
\param DVB_ServiceInfo *pstService (Input) the service want to check
\return TRUE - Skip this channel
\return FALSE - not a skip channel.
*/
#ifdef ENABLE_LCN_SUPPORT
u16 DVB_GetDbIdxByLCNs(EN_SERVICE_TYPE enServiceType, u16 u16LCNs, bool8 *pb8LCNEnable);
void DVB_LCNResetByONID(u16 u16ONID);
bool8 DVB_CheckONIDinDB(EN_SERVICE_TYPE enServiceType, u16 u16ONID);
u16 DVB_LCNResetByMaxNum(u16 u16MaxLCN);
#endif
bool8 FLASH_EEPROM_Read(u8 *pData, u16 u16Length, u16 u16Offset);
/*! \fn bool8 FLASH_EEPROM_Read(u8 *pData, u16 u16Length, u16 u16Offset)
\brief Read the data from dummy EEPROM(flash).
\param pData (Output) the start pointer of the buffer
\param u16Length (Input) the length of buffer
\param u16Offset (Input) the start offset in EEPROM
\return TRUE - success
\return FALSE - fail
*/
bool8 FLASH_EEPROM_Write(u8 *pData, u16 u16Length, u16 u16Offset);
/*! \fn bool8 FLASH_EEPROM_Write(u8 *pData, u16 u16Length, u16 u16Offset)
\brief Write the data to dummy EEPROM(flash).
\param pData (Input) the start pointer of the buffer
\param u16Length (Input) the length of buffer
\param u16Offset (Input) the start offset in EEPROM
\return TRUE - success
\return FALSE - fail
*/
bool8 FLASH_EEPROM_Info(u8 *pu8BankID, u32 *pu32Address, u32 *pu32Length);
bool8 FLASH_EEPROM_ReadAll(u8 *pu8Buffer);
bool8 DVB_StringSearch(EN_SERVICE_TYPE _enSrvType,u16*pu16SortIdx,u16 u16ServiceStartIdx,u16 u16ServiceEndIdx,u8* pu8SubString,u16* pu16idx);//Neal
void DVB_ServiceDelByTp(u16 u16TpIdx);
void DVB_ServiceSwap( EN_SERVICE_TYPE enSrvType, u16 u16idx1, u16 u16idx2);
u16 DVB_DBGetVersion(void);
u16 DVB_DBGetBankNum(void);
u32 DVB_DBGetDigest(void);
u16 DVB_DBGetStartBank(void);
void DVB_DBSetStartBank(u8 u8StartBank);
bool8 DVB_DatabaseInit2(void);
//Marlin 20060504 add for combo DB ===================================================
void DVB_DBSetSystemType(EN_SYSTEM_TYPE enSysType);
EN_SYSTEM_TYPE DVB_DBGetSystemType(void);
bool8 DVB_DatabaseCleanEx(EN_SYSTEM_TYPE enSysType);
u16 DVB_NetGetTotal(void);
bool8 DVB_NetAdd(u16 *pu16NetIdx, DVB_NetInfo *pstNetInfo);
bool8 DVB_NetRead(u16 u16NetIdx, DVB_NetInfo *pstNetInfo);
bool8 DVB_NetUpdate(u16 u16NetIdx, DVB_NetInfo *pstNetInfo);
void DVB_NetDelete(u16 u16NetIdx);
bool8 DVB_TPAddEx(u16 *pu16TpIdx, DVB_TPInfoEx *pstTpInfo);
bool8 DVB_TPReadEx(u16 u16TpIndex, DVB_TPInfoEx *pstTpInfo);
bool8 DVB_TPUpdateEx(u16 u16TpIndex, DVB_TPInfoEx *pstTpInfo);
bool8 DVB_GetTPIdxByNet(u16 u16NetIndex, u16 *pu16FirstTPIndex, u16 *pu16LastTPIndex);
bool8 DVB_GetTPIdxByFB(u32 u32Freq, u8 u8BandWidth, u16 *TPIndex);
bool8 DVB_GetNetIdxBySrv(EN_SERVICE_TYPE enSrvType, u16 u16SrvIndex, u16 *pu16NetIdx);
EN_SYSTEM_TYPE DVB_ServiceGetSystemTypeByIndex(u16 u16SrvIdx);
// end ===============================================================================
//Marlin 20060602 add for combo DB ===================================================
bool8 DVB_CableTPRead(u16 u16TpIndex, DVB_CableTPInfoEx *pstTpInfo);
bool8 DVB_CableTPUpdate(u16 u16TpIndex, DVB_CableTPInfoEx *pstTpInfo);
// end ===============================================================================
u16 DVB_ServiceGetTotalByNet(EN_SERVICE_TYPE enSrvType, u16 u16NetIdx);
u16 DVB_ServiceGetTotalbyTP(EN_SERVICE_TYPE enSrvType, u16 u16TpIdx);
/*! \fn u16 DVB_ServiceGetTotalbyTP(EN_SERVICE_TYPE enSrvType, u16 u16TpIdx)
\brief Get the total service number in one TP.
\param enServiceType (Input) the service type
\param u16TpIdx (Input) the TP index
\return the number of total service for a specific TP index
*/
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -