form_MMIDataDownload.h
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:9k
- /*****************************************************************************
- * 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:
- * ---------
- * form_MMIDataDownload.h
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * MMI data download form 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 _FORM_MMIDATADOWNLOAD_H_
- #define _FORM_MMIDATADOWNLOAD_H_
- //---------------------------------------------------------------------------
- #include <Classes.hpp>
- #include <Controls.hpp>
- #include <StdCtrls.hpp>
- #include <Forms.hpp>
- #include <ComCtrls.hpp>
- #include <FileCtrl.hpp>
- #include <Buttons.hpp>
- #include <ExtCtrls.hpp>
- #include "META_factory_cfg.h" // added by Andy Ueng
- #include "meta.h"
- #include "mmi_graph_file_download.h"
- #include "INIFileHandle.h"
- #include "form_Audio.h"
- #define META_RESULT_SUCCESSFUL 0
- #define META_RESULT_FAIL 1
- //---------------------------------------------------------------------------
- class TfrmMMIDataDownload : public TForm
- {
- __published: // IDE-managed Components
- TPageControl *PageControlMMIDataDownload;
- TTabSheet *tsMMIDataDownload;
- TLabel *Label1;
- TLabel *Label2;
- TLabel *Label4;
- TLabel *LabelListBoxMMIData;
- TDriveComboBox *DriveComboBoxMMIData;
- TDirectoryListBox *DirectoryListBoxMMIData;
- TFileListBox *FileListBoxMMIData;
- TBitBtn *btnAddToList;
- TFilterComboBox *FilterComboBoxMMIData;
- TListBox *lbLocalMMIData;
- TBitBtn *btnDownloadToFAT;
- TGroupBox *GroupBox1;
- TRadioButton *rbFullScreen;
- TRadioButton *RadioButtonAssociate;
- TRadioButton *RadioButtonEMS;
- TRadioButton *rbMidi;
- TBitBtn *btnRemoveFromList;
- TStatusBar *sbMMIData;
- TTimer *TimerMMIDataDownload;
- TTimer *TimerMMIDataUpload;
- TLabel *Label3;
- TRadioButton *rbiMelody;
- TProgressBar *pbMMIDataDownload;
- void __fastcall FilterComboBoxMMIDataChange(TObject *Sender);
- void __fastcall DirectoryListBoxMMIDataChange(TObject *Sender);
- void __fastcall DriveComboBoxMMIDataChange(TObject *Sender);
- void __fastcall FileListBoxMMIDataChange(TObject *Sender);
- void __fastcall btnAddToListClick(TObject *Sender);
- void __fastcall FormShow(TObject *Sender);
- void __fastcall btnDownloadToFATClick(TObject *Sender);
- void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
- void __fastcall btnRemoveFromListClick(TObject *Sender);
- void __fastcall rbFullScreenClick(TObject *Sender);
- void __fastcall RadioButtonAssociateClick(TObject *Sender);
- void __fastcall RadioButtonEMSClick(TObject *Sender);
- void __fastcall rbMidiClick(TObject *Sender);
- void __fastcall TimerMMIDataDownloadTimer(TObject *Sender);
- void __fastcall BitBtnUploadFromFATClick(TObject *Sender);
- void __fastcall TimerMMIDataUploadTimer(TObject *Sender);
- void __fastcall rbiMelodyClick(TObject *Sender);
-
- private: // User declarations
- short MMIDataToken;
- int fs_handle, filesize;
- char filepath[MAX_FILE_PATH_LEN];
- //char **FAT_filepath_ptr;
- //char **local_filepath_ptr;
- AnsiString as_MAX_FULLSCREEN_FILE_COUNT;
- AnsiString as_MAX_ASSOCIATE_FILE_COUNT;
- AnsiString as_MAX_EMS_FILE_COUNT;
- AnsiString as_MAX_MIDI_FILE_COUNT;
- AnsiString as_MAX_IMELODY_FILE_COUNT;
- AnsiString as_DEFAULT_FULLSCREEN_PATH;
- AnsiString as_DEFAULT_ASSOCIATE_PATH;
- AnsiString as_DEFAULT_EMS_PATH;
- AnsiString as_DEFAULT_MIDI_PATH;
- AnsiString as_DEFAULT_IMELODY_PATH;
- int local_default_fullscreen_file_count;
- int local_default_associate_file_count;
- int local_default_EMS_file_count;
- int local_default_midi_file_count;
- int local_default_imelody_file_count;
- TMETA_factory_cfg *META_factory_cfg;
- AnsiString as_default_FAT_fullscreen_path;
- AnsiString as_default_FAT_associate_path;
- AnsiString as_default_FAT_EMS_path;
- AnsiString as_default_FAT_midi_path;
- AnsiString as_default_FAT_imelody_path;
- AnsiString as_download_type;
- bool lastRadioButtonFullscreenChecked;
- bool lastRadioButtonAssociateChecked;
- bool lastRadioButtonEMSChecked;
- bool lastRadioButtonMidiChecked;
- bool lastRadioButtoniMelodyChecked;
- public: // User declarations
- MMIFILE MMI_FILE_Object;
- __fastcall TfrmMMIDataDownload(TComponent* Owner);
- void write_local_default_fullscreen_file_setting(void);
- void write_local_default_associate_file_setting(void);
- void write_local_default_EMS_file_setting(void);
- void write_local_default_midi_file_setting(void);
- void write_local_default_imelody_file_setting(void);
- void read_DEFAULT_PATH(void);
- void set_DEFAULT_PATH(void);
- void ConfirmCallback_MMIDataDownload( void );
- void SaveLastFileShow(void);
- void ShowFileSelected(void);
- void ModifyLastRadioButtonChecked(void);
- void read_MAX_FILE_COUNT(void);
- void show_download_type(void);
- void GetFullscreenFileListFromFAT(char *FAT_file_path, char *FAT_file_type);
- void GetAssociateFileListFromFAT(char *FAT_file_path, char *FAT_file_type);
- void GetEMSFileListFromFAT(char *FAT_file_path, char *FAT_file_type);
- void REQ_Write_To_FAT(void);
- void write_download_type(
- AnsiString asSetupFile,
- AnsiString asExeName,
- AnsiString as_download_type
- );
- };
- //---------------------------------------------------------------------------
- extern PACKAGE TfrmMMIDataDownload *frmMMIDataDownload;
- //---------------------------------------------------------------------------
- #endif