FAT_Editor.cpp
上传用户:gelin96
上传日期:2017-01-08
资源大小:20993k
文件大小:22k
- /*****************************************************************************
- * 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:
- * ---------
- * FAT_Editor.cpp
- *
- * Project:
- * --------
- * Maui META APP
- *
- * Description:
- * ------------
- * FAT editor source
- *
- * 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!!
- *============================================================================
- ****************************************************************************/
- //---------------------------------------------------------------------------
- #include <IniFiles.hpp>
- #pragma hdrstop
- #ifndef _FAT_EDITOR_H_
- #include "FAT_Editor.h"
- #endif
- #ifndef _MAN_ACTIVE_H_
- #include "man_active.h"
- #endif
- #ifndef _MAN_FDM_H_
- #include "man_fdm.h"
- #endif
- #ifndef _META_UTILS_H_
- #include "meta_utils.h"
- #endif
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- //===========================================================================
- static CFATEDITOR* g_fat_editor_ptr;
- static bool g_bIsRunning = false;
- //===========================================================================
- static void Req_FAT_GetDiskInfo(void)
- {
- g_fat_editor_ptr->Req_FAT_GetDiskInfo();
- }
- //---------------------------------------------------------------------------
- static void Req_FAT_GetDirectoryInfo(void)
- {
- g_fat_editor_ptr->Req_FAT_GetDirectoryInfo();
- }
- //---------------------------------------------------------------------------
- static void Req_FAT_GetFileInfo(void)
- {
- g_fat_editor_ptr->Req_FAT_GetFileInfo();
- }
- //---------------------------------------------------------------------------
- static void Req_FAT_Read_To_File(void)
- {
- g_fat_editor_ptr->Req_FAT_Read_To_File();
- }
- //---------------------------------------------------------------------------
- static void Req_FAT_Write_By_File(void)
- {
- g_fat_editor_ptr->Req_FAT_Write_By_File();
- }
- //---------------------------------------------------------------------------
- static void Req_FAT_Delete(void)
- {
- g_fat_editor_ptr->Req_FAT_Delete();
- }
- //---------------------------------------------------------------------------
- static int __stdcall cbFATProgress(unsigned char percent, int sent_bytes, int total_bytes, const short token, void *usr_arg)
- {
- g_fat_editor_ptr->cbFATProgress(percent, sent_bytes, total_bytes, token, usr_arg);
- return 0;
- }
- //===========================================================================
- CFATEDITOR::CFATEDITOR(void)
- {
- g_bIsRunning = false;
- ConfirmCallback = NULL;
- }
- //---------------------------------------------------------------------------
- CFATEDITOR::~CFATEDITOR()
- {
- }
- //---------------------------------------------------------------------------
- void CFATEDITOR::REQ_Stop(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- META_Cancel_r(m_META_HANDLE_Obj.Get_MainHandle(), m_sToken);
- Confirm(METAAPP_STOP);
- }
- //---------------------------------------------------------------------------
- void CFATEDITOR::Confirm(E_METAAPP_RESULT_T confirm_state)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- g_bIsRunning = false;
- if (m_eConfirmState != METAAPP_SUCCESS)
- {
- META_Cancel_r(m_META_HANDLE_Obj.Get_MainHandle(), m_sToken);
- }
- if (NULL == ConfirmCallback)
- {
- return;
- }
- m_eConfirmState = confirm_state;
- ActiveMan->SetActiveFunction(ConfirmCallback);
- }
- //==============================================================================
- void CFATEDITOR::Req_FAT_GetDiskInfo_Start(const char DriveLetter)
- {
- g_fat_editor_ptr = this;
- g_bIsRunning = true;
- m_cDriveLetter = DriveLetter;
- ActiveMan->SetActiveFunction(::Req_FAT_GetDiskInfo);
- }
- //---------------------------------------------------------------------------
- void CFATEDITOR::Req_FAT_GetDiskInfo(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- META_RESULT MetaResult = META_FAT_GetDiskInfo_r(m_META_HANDLE_Obj.Get_MainHandle(), m_cDriveLetter, &m_sFatDiskInfo, NULL);
- if (MetaResult != META_SUCCESS)
- {
- Set_ErrorString(MetaResult);
- if (MetaResult != META_TIMEOUT)
- {
- Confirm(METAAPP_FAIL);
- }
- else
- {
- Confirm(METAAPP_TIMEOUT);
- }
- return;
- }
- Confirm(METAAPP_SUCCESS);
- }
- //=============================================================================
- void CFATEDITOR::Req_FAT_GetDirectoryInfo_Start(S_FAT_DIRECTORY_INFO_REQ_T fat_dir_info)
- {
- g_fat_editor_ptr = this;
- g_bIsRunning = true;
- m_sFatDirInfoReq = fat_dir_info;
- ActiveMan->SetActiveFunction(::Req_FAT_GetDirectoryInfo);
- }
- //---------------------------------------------------------------------------
- void CFATEDITOR::Req_FAT_GetDirectoryInfo(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- // erase vector
- if (!m_sFatDirInfoCnf.v_FATDirName.empty())
- {
- m_sFatDirInfoCnf.v_FATDirName.erase(m_sFatDirInfoCnf.v_FATDirName.begin(), m_sFatDirInfoCnf.v_FATDirName.end());
- }
- int fs_handle;
- META_RESULT MetaResult = META_FAT_Find_Start_r(m_META_HANDLE_Obj.Get_MainHandle(), m_sFatDirInfoReq.as_FAT_dir_path.c_str(), m_sFatDirInfoReq.as_FAT_dir_type.c_str(), FAT_FIND_DIR_RECURSIVE, &fs_handle, &m_sToken);
- if (MetaResult != META_SUCCESS)
- {
- Set_ErrorString(MetaResult);
- switch (MetaResult)
- {
- case META_TIMEOUT:
- {
- Confirm(METAAPP_TIMEOUT);
- }
- break;
- case META_FAT_FILE_NOT_FOUND:
- {
- Confirm(METAAPP_FAT_FILE_NOT_FOUND);
- }
- break;
- default:
- {
- Confirm(METAAPP_FAIL);
- }
- break;
- }
- return;
- }
- do
- {
- char c_fat_file_path[MAX_FILE_PATH_LEN];
- int i_fat_file_size;
- MetaResult = META_FAT_Find_GetFileInfo(fs_handle, c_fat_file_path, sizeof(c_fat_file_path), &i_fat_file_size);
- if (MetaResult != META_SUCCESS)
- {
- Set_ErrorString(MetaResult);
- if (MetaResult != META_TIMEOUT)
- {
- Confirm(METAAPP_FAIL);
- }
- else
- {
- Confirm(METAAPP_TIMEOUT);
- }
- return;
- }
- AnsiString as_fat_file_path(c_fat_file_path);
- m_sFatDirInfoCnf.v_FATDirName.push_back(as_fat_file_path);
- }
- while((MetaResult = META_FAT_Find_Next(fs_handle)) == META_SUCCESS);
- //FAT_filepath_size = i;
- MetaResult = META_FAT_Find_Close(&fs_handle);
- if (MetaResult != META_SUCCESS)
- {
- Set_ErrorString(MetaResult);
- if (MetaResult != META_TIMEOUT)
- {
- Confirm(METAAPP_FAIL);
- }
- else
- {
- Confirm(METAAPP_TIMEOUT);
- }
- return;
- }
- Confirm(METAAPP_SUCCESS);
- }
- //=============================================================================
- void CFATEDITOR::Req_FAT_GetFileInfo_Start(S_FAT_FILE_INFO_REQ_T fat_file_info)
- {
- g_fat_editor_ptr = this;
- g_bIsRunning = true;
- m_sFatFileInfoReq = fat_file_info;
- ActiveMan->SetActiveFunction(::Req_FAT_GetFileInfo);
- }
- //---------------------------------------------------------------------------
- void CFATEDITOR::Req_FAT_GetFileInfo(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- // erase vector
- if (!m_sFatFileInfoCnf.v_FATFileName.empty())
- {
- m_sFatFileInfoCnf.v_FATFileName.erase(m_sFatFileInfoCnf.v_FATFileName.begin(), m_sFatFileInfoCnf.v_FATFileName.end());
- }
- int fs_handle;
- META_RESULT MetaResult = META_FAT_Find_Start_r(m_META_HANDLE_Obj.Get_MainHandle(), m_sFatFileInfoReq.as_FAT_file_path.c_str(), m_sFatFileInfoReq.as_FAT_file_type.c_str(), m_sFatFileInfoReq.e_FAT_find_mode, &fs_handle, &m_sToken);
- if (MetaResult != META_SUCCESS)
- {
- Set_ErrorString(MetaResult);
- switch (MetaResult)
- {
- case META_TIMEOUT:
- {
- Confirm(METAAPP_TIMEOUT);
- }
- break;
- case META_FAT_FILE_NOT_FOUND:
- {
- Confirm(METAAPP_FAT_FILE_NOT_FOUND);
- }
- break;
- default:
- {
- Confirm(METAAPP_FAIL);
- }
- break;
- }
- return;
- }
- do
- {
- char c_fat_file_path[MAX_FILE_PATH_LEN];
- int i_fat_file_size;
- MetaResult = META_FAT_Find_GetFileInfo(fs_handle, c_fat_file_path, sizeof(c_fat_file_path), &i_fat_file_size);
- if (MetaResult != META_SUCCESS)
- {
- Set_ErrorString(MetaResult);
- if (MetaResult != META_TIMEOUT)
- {
- Confirm(METAAPP_FAIL);
- }
- else
- {
- Confirm(METAAPP_TIMEOUT);
- }
- return;
- }
- AnsiString as_fat_file_path(c_fat_file_path);
- m_sFatFileInfoCnf.v_FATFileName.push_back(as_fat_file_path);
- }
- while((MetaResult = META_FAT_Find_Next(fs_handle)) == META_SUCCESS);
- //FAT_filepath_size = i;
- MetaResult = META_FAT_Find_Close(&fs_handle);
- if (MetaResult != META_SUCCESS)
- {
- Set_ErrorString(MetaResult);
- if (MetaResult != META_TIMEOUT)
- {
- Confirm(METAAPP_FAIL);
- }
- else
- {
- Confirm(METAAPP_TIMEOUT);
- }
- return;
- }
- Confirm(METAAPP_SUCCESS);
- }
- //============================================================================
- void CFATEDITOR::Req_FAT_Read_To_File_Start(S_FAT_READ_T fat_read)
- {
- g_fat_editor_ptr = this;
- g_bIsRunning = true;
- m_sFatRead = fat_read;
- ActiveMan->SetActiveFunction(::Req_FAT_Read_To_File);
- }
- //---------------------------------------------------------------------
- void CFATEDITOR::Req_FAT_Read_To_File(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- m_sProgress.percent = 0;
- int fs_handle;
- vector<AnsiString>:: iterator iter;
- for (iter = m_sFatRead.v_FATFileName.begin(); iter != m_sFatRead.v_FATFileName.end(); iter++)
- {
- m_sProgress.as_file_name = *iter;
- // open FAT file handle
- META_RESULT MetaResult = META_FAT_Open_r(m_META_HANDLE_Obj.Get_MainHandle(), iter->c_str(), FAT_OPEN_READ, &fs_handle, &m_sToken);
- if (MetaResult != META_SUCCESS)
- {
- Set_ErrorString(MetaResult);
- if (MetaResult != META_TIMEOUT)
- {
- Confirm(METAAPP_FAIL);
- }
- else
- {
- Confirm(METAAPP_TIMEOUT);
- }
- return;
- }
- // read FAT file
- AnsiString as_FAT_filename;
- getFilenameFromStr(*iter, as_FAT_filename);
- MetaResult = META_FAT_Read_To_File_r(m_META_HANDLE_Obj.Get_MainHandle(), fs_handle, (m_sFatRead.as_LocalFilePath + as_FAT_filename).c_str(), ::cbFATProgress, NULL, &m_sToken);
- if (MetaResult != META_SUCCESS)
- {
- Set_ErrorString(MetaResult);
- MetaResult = META_FAT_Close_r(m_META_HANDLE_Obj.Get_MainHandle(), &fs_handle, &m_sToken);
- if (MetaResult != META_TIMEOUT)
- {
- Confirm(METAAPP_FAIL);
- }
- else
- {
- Confirm(METAAPP_TIMEOUT);
- }
- return;
- }
- // close FAT file handle
- MetaResult = META_FAT_Close_r(m_META_HANDLE_Obj.Get_MainHandle(), &fs_handle, &m_sToken);
- if (MetaResult != META_SUCCESS)
- {
- Set_ErrorString(MetaResult);
- if (MetaResult != META_TIMEOUT)
- {
- Confirm(METAAPP_FAIL);
- }
- else
- {
- Confirm(METAAPP_TIMEOUT);
- }
- return;
- }
- }
- Confirm(METAAPP_SUCCESS);
- }
- //-------------------------------------------------------------------------------------------------
- int __stdcall CFATEDITOR::cbFATProgress(unsigned char percent, int sent_bytes, int total_bytes, const short token, void *usr_arg)
- {
- m_sProgress.percent = percent;
- m_sProgress.sent_bytes = sent_bytes;
- m_sProgress.total_bytes = total_bytes;
- return 0;
- }
- //============================================================================
- void CFATEDITOR::Req_FAT_Write_By_File_Start(S_FAT_WRITE_T fat_write, S_FAT_FILE_INFO_REQ_T file_info)
- {
- g_fat_editor_ptr = this;
- g_bIsRunning = true;
- m_sFatWrite = fat_write;
- m_sFatFileInfoReq = file_info;
- ActiveMan->SetActiveFunction(::Req_FAT_Write_By_File);
- }
- //-------------------------------------------------------------------------------------------------
- void CFATEDITOR::Req_FAT_Write_By_File(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- m_sProgress.percent = 0;
- int fs_handle;
- vector<AnsiString>:: iterator iter;
- for (iter = m_sFatWrite.v_LocalFileName.begin(); iter != m_sFatWrite.v_LocalFileName.end(); iter++)
- {
- m_sProgress.as_file_name = *iter;
- // write FAT file
- FAT_FILE_INFO_REQ_T req;
- char cDriveLetter[1];
- strncpy(cDriveLetter, m_sFatWrite.as_FATFilePath.c_str(), 1);
- req.m_cDriveLetter = cDriveLetter[0];
- AnsiString as_LocalFilePathName(m_sFatWrite.as_LocalFilePath + *iter);
- req.m_pcfilepath = as_LocalFilePathName.c_str();
- META_RESULT MetaResult = META_FAT_CheckEnoughSpace_r(m_META_HANDLE_Obj.Get_MainHandle(), &req);
- if (MetaResult != META_SUCCESS)
- {
- Set_ErrorString(MetaResult);
- Confirm(METAAPP_FAT_DISK_NOT_ENOUGH);
- return;
- }
- // open FAT file handle
- AnsiString as_FATFilePathName(m_sFatWrite.as_FATFilePath + *iter);
- MetaResult = META_FAT_Open_r(m_META_HANDLE_Obj.Get_MainHandle(), as_FATFilePathName.c_str(), FAT_OPEN_WRITE, &fs_handle, &m_sToken);
- if (MetaResult != META_SUCCESS)
- {
- Set_ErrorString(MetaResult);
- if (MetaResult != META_TIMEOUT)
- {
- Confirm(METAAPP_FAIL);
- }
- else
- {
- Confirm(METAAPP_TIMEOUT);
- }
- return;
- }
- // write file to FAT
- MetaResult = META_FAT_Write_By_File_r(m_META_HANDLE_Obj.Get_MainHandle(), fs_handle, as_LocalFilePathName.c_str(), ::cbFATProgress, NULL, &m_sToken);
- if (MetaResult != META_SUCCESS)
- {
- Set_ErrorString(MetaResult);
- MetaResult = META_FAT_Close_r(m_META_HANDLE_Obj.Get_MainHandle(), &fs_handle, &m_sToken);
- if (MetaResult != META_TIMEOUT)
- {
- Confirm(METAAPP_FAIL);
- }
- else
- {
- Confirm(METAAPP_TIMEOUT);
- }
- return;
- }
- MetaResult = META_FAT_Close_r(m_META_HANDLE_Obj.Get_MainHandle(), &fs_handle, &m_sToken);
- if (MetaResult != META_SUCCESS)
- {
- Set_ErrorString(MetaResult);
- if (MetaResult != META_TIMEOUT)
- {
- Confirm(METAAPP_FAIL);
- }
- else
- {
- Confirm(METAAPP_TIMEOUT);
- }
- return;
- }
- }
- ActiveMan->SetActiveFunction(::Req_FAT_GetFileInfo);
- #if 0
- if( (m_eMetaResult = META_FAT_Find_Start_r( m_META_HANDLE_Obj.Get_MainHandle(), FAT_file_path, FAT_file_type, FAT_FIND_FILE_RECURSIVE, &fs_handle, &m_sToken)) == META_SUCCESS )
- {
- do
- {
- META_FAT_Find_GetFileInfo(fs_handle, filepath, sizeof(filepath), &filesize);
- strcpy(FAT_filepath[i], filepath);
- i++;
- }
- while( META_SUCCESS == META_FAT_Find_Next(fs_handle) );
- FAT_filepath_size = i;
- META_FAT_Find_Close(&fs_handle);
- }
- g_bIsRunning = false;
- return true;
- #endif
- }
- //==========================================================================
- void CFATEDITOR::Req_FAT_Delete_Start(S_FAT_DELETE_T fat_delete, S_FAT_FILE_INFO_REQ_T file_info)
- {
- g_fat_editor_ptr = this;
- g_bIsRunning = true;
- m_sFatDelete = fat_delete;
- m_sFatFileInfoReq = file_info;
- ActiveMan->SetActiveFunction(::Req_FAT_Delete);
- }
- //---------------------------------------------------------------------------------------------------------
- void CFATEDITOR::Req_FAT_Delete(void)
- {
- if (!g_bIsRunning)
- {
- return;
- }
- vector<AnsiString>:: iterator iter;
- for (iter = m_sFatDelete.v_FATFileName.begin(); iter != m_sFatDelete.v_FATFileName.end(); iter++)
- {
- m_sProgress.as_file_name = *iter;
- // delete FAT file
- META_RESULT MetaResult = META_FAT_Delete_r(m_META_HANDLE_Obj.Get_MainHandle(), iter->c_str(), &m_sToken);
- if (MetaResult != META_SUCCESS)
- {
- Set_ErrorString(MetaResult);
- if (MetaResult != META_TIMEOUT)
- {
- Confirm(METAAPP_FAIL);
- }
- else
- {
- Confirm(METAAPP_TIMEOUT);
- }
- return;
- }
- }
- ActiveMan->SetActiveFunction(::Req_FAT_GetFileInfo);
- // get FAT file list
- #if 0
- int i=0;
- if( ( m_eMetaResult = META_FAT_Find_Start_r( m_META_HANDLE_Obj.Get_MainHandle(), FAT_file_path, FAT_file_type, FAT_FIND_FILE_RECURSIVE, &fs_handle, &m_sToken)) == META_SUCCESS )
- {
- do{
- META_FAT_Find_GetFileInfo(fs_handle, filepath, sizeof(filepath), &filesize);
- strcpy(FAT_filepath[i], filepath);
- i++;
- }while( META_SUCCESS == META_FAT_Find_Next(fs_handle) );
- FAT_filepath_size = i;
- META_FAT_Find_Close(&fs_handle);
- }
- g_bIsRunning = false;
- return true;
- #endif
- ActiveMan->SetActiveFunction(::Req_FAT_GetFileInfo);
- }
- //===========================================================================
- //////////////////////////// Global information ///////////////////////////
- //===========================================================================
- E_METAAPP_RESULT_T CFATEDITOR::Get_ConfirmState(void)
- {
- return m_eConfirmState;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void CFATEDITOR::Get_Progress(S_FAT_PROGRESS_T &progress)
- {
- progress = m_sProgress;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void CFATEDITOR::Get_FatDiskInfo(FAT_DiskInfo_T& disk_info)
- {
- disk_info = m_sFatDiskInfo;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void CFATEDITOR::Get_FatDirInfo(S_FAT_DIRECTORY_INFO_CNF_T& dir_info)
- {
- dir_info = m_sFatDirInfoCnf;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void CFATEDITOR::Get_FatFileInfo(S_FAT_FILE_INFO_CNF_T& file_info)
- {
- file_info = m_sFatFileInfoCnf;
- }
- //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- void CFATEDITOR::Get_ErrorString(AnsiString& as_err)
- {
- as_err = m_asErrStr;
- }
- //--------------------------------------------------------------------------
- void CFATEDITOR::Set_ErrorString(META_RESULT MetaResult)
- {
- const char *ErrMsg;
- ErrMsg = META_GetErrorString(MetaResult);
- m_asErrStr = (AnsiString) ErrMsg;
- }