tdmb_rf.h
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:6k
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * tdmb_rf.h
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * TDMB RF header
- *
- * Author:
- * -------
- * Andy Ueng (mtk00490)
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * $Revision$
- * $Modtime$
- * $Log$
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- #ifndef _TDMB_RF_H_
- #define _TDMB_RF_H_
- // common
- #ifndef _METAAPP_COMMON_H_
- #include "metaapp_common.h"
- #endif
- #ifndef META_DLL_H
- #include "meta.h"
- #endif
- #ifndef _MAN_HANDLE_H_
- #include "man_handle.h"
- #endif
- // TDMB
- #ifndef _TDMB_COMMON_H_
- #include "tdmb_common.h"
- #endif
- //-----------------------------------------------------------------------------
- typedef struct
- {
- unsigned char percent;
- int sent_bytes;
- int total_bytes;
- }S_FAT_PROGRESS;
- typedef struct
- {
- bool b_valid;
- TDMB_SEL_SERV_ERROR_RESULT e_result;
- }S_TDMB_SEL_SERV_ERROR_RESULT;
- typedef struct
- {
- TDMB_SEL_SERVICE_ONLY_REQ_T req;
- unsigned int ui_freq_khz;
- }S_TDMB_SEL_SERV_ONLY_T;
- typedef struct
- {
- TDMB_SEL_SERVICE_REQ_T req;
- unsigned int ui_freq_khz;
- }S_TDMB_SEL_SERV_T;
- /*---------------------------------------------------------------------------*/
- class CTDMBRF
- {
- private:
- // common
- CMETAHANDLE m_META_HANDLE_Obj;
- E_METAAPP_RESULT_T m_eConfirmState;
- bool m_bTDMBSupport;
- E_TDMB_BAND_T m_eBand;
- unsigned int m_uiFreqKHz;
- TDMB_AUTO_SCAN_CNF_T m_sScanResult;
- TDMB_SET_FREQ_CNF_T m_sFreqEnsemble;
- TDMB_GET_ENSM_INFO_BY_AUTO_SCAN_CNF_T m_sScanEnsemble;
- TDMB_GET_SIGNAL_CNF_T m_sSignal;
- S_TDMB_SEL_SERV_ONLY_T m_sServiceOnly;
- S_TDMB_SEL_SERV_T m_sService;
- S_FAT_PROGRESS m_sFatProgress;
- S_TDMB_SEL_SERV_ERROR_RESULT m_sSelServiceResult;
- protected:
- public:
- void Confirm(E_METAAPP_RESULT_T confirm_state);
- CTDMBRF(void);
- ~CTDMBRF();
- void REQ_Power_On(void);
- void REQ_Set_Freq(void);
- void REQ_AutoScan(void);
- void REQ_Get_Signal(void);
- void REQ_Select_Service_Only(void);
- void REQ_RecordStream(void);
- void REQ_Stop_Service(void);
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
- void (*ConfirmCallback)(void);
- // callback
- void __stdcall CNF_RecordStream(const TDMB_SEL_SERV_ERROR_RESULT status);
- int __stdcall CNF_Stop_Service(unsigned char percent, int sent_bytes, int total_bytes, const short token, void *usr_arg);
- //---------------------------------------------------------------------------
- // Public interface
- void REQ_Power_On_Start(void);
- void REQ_AutoScan_Start(E_TDMB_BAND_T band);
- void REQ_Set_Freq_Start(E_TDMB_BAND_T band, unsigned int freq_kHz);
- bool REQ_Get_Signal_Start(void);
- void REQ_Select_Service_Only_Start(S_TDMB_SEL_SERV_ONLY_T req);
- void REQ_RecordStream_Start(S_TDMB_SEL_SERV_T req);
- void REQ_Stop_Service_Start(void);
- // query
- bool Query_TDMBSupport_Start(void);
- // global information
- E_METAAPP_RESULT_T Get_ConfirmState(void);
- bool Get_TDMBSupport(void);
- TDMB_SET_FREQ_CNF_T* Get_FreqEnsembleResult(void);
- TDMB_GET_ENSM_INFO_BY_AUTO_SCAN_CNF_T* Get_ScanEnsembleResult(void);
- TDMB_GET_SIGNAL_CNF_T* Get_Signal(void);
- S_TDMB_SEL_SERV_ERROR_RESULT* Get_SelServiceResult(void);
- S_FAT_PROGRESS* Get_FatProgress(void);
- };
- /*---------------------------------------------------------------------------*/
- #endif