/** * Copyright(c) 2011 Sunmedia Technologies - All Rights Reserved. * * @file * * @brief Provides common includes, macros, external declarations and definitions * of Common DataBase Interface module. * * @author liang.wu * @author jun.luo */ #ifndef _CDBI_H_ #define _CDBI_H_ #include "db_common.h" #include "cdb.h" #include "tdb.h" #include "sdb.h" #include "adb.h" #include "sbtvddb.h" #ifdef __cplusplus extern "C"{ #endif /** * @brief defines maxism number of callback function registered by upper layer. */ #define MAX_CALLBACK_FP (10) /** * @brief The invalid record handle */ #define CDBI_INVALID_HDL (0) /** * @brief It is an opaque type specific to the target platform. It is a unique identifier for each record. */ typedef UINT32 CDBIHandle_t; /** * @brief Macro for CDBI Error calling prompt message */ #define CDBI_FUNC_CALL(funcCall) do { \ if ((funcCall) != DB_SUCCESS)\ {\ UMFDBG(0,"[Error]%s: %d Line ", __FUNCTION__, __LINE__); \ UMFDBG(0,"%s return failed~\n", #funcCall);\ } \ } while(0) /** * @brief Enumeration of database type for CDBI internal use */ typedef enum { DBTYPE_ATV = 0x01, /**< Analog channel database*/ DBTYPE_T = 0x02, /**< Terrestrial channel database*/ DBTYPE_C = 0x04, /**< Cable channel database*/ DBTYPE_S = 0x08, /**< Satellite channel database*/ DBTYPE_SBTVD= 0x20, /**< SBTVD channel database*/ #if 1 DBTYPE_OOB = 0x10, /**< Out-of-band channel database*/ DBTYPE_MASK = DBTYPE_ATV|DBTYPE_T|DBTYPE_C|DBTYPE_S|DBTYPE_OOB, /**< database type mask*/ #endif DBTYPE_DVB = 0x80, /**< DVB system*/ #if 1 DBTYPE_ATSC = 0x40, /**< ATSC system*/ #endif } EDBInnerType_t; /** * @brief Enumeration of all the supported databases including DVB & ATSC */ typedef enum { CDBI_DBTYPE_DVB_ATV = DBTYPE_DVB | DBTYPE_ATV, /**< DVB Analog channel database*/ CDBI_DBTYPE_DVB_T = DBTYPE_DVB | DBTYPE_T, /**< DVB Terrestrial channel database*/ CDBI_DBTYPE_DVB_C = DBTYPE_DVB | DBTYPE_C, /**< DVB Cable channel database*/ CDBI_DBTYPE_DVB_S = DBTYPE_DVB | DBTYPE_S, /**< DVB Satellite channel database*/ CDBI_DBTYPE_DVB_SBTVD = DBTYPE_DVB | DBTYPE_SBTVD, /**< SBTVD channel database*/ #if 1 CDBI_DBTYPE_ATSC_NTSC = DBTYPE_ATSC | DBTYPE_ATV, /**