#pragma once
|
|
// CDirectoryChangeMgr command target
|
#define CMD_BACKUPDIR_DELETE _T("Delete")
|
#define CMD_BACKUPDIR_NEW _T("New")
|
#define CMD_BACKUPDIR_MODIFY _T("Modify")
|
#define CMD_BACKUPDIR_RENAME _T("Rename")
|
|
#define REG_DBSUBKEY _T( "Software\\Activesoft\\NetDiskDB" )
|
|
class CDirectoryChangeMgr : public CObject
|
{
|
public:
|
CDirectoryChangeMgr();
|
virtual ~CDirectoryChangeMgr();
|
// Attributers
|
public:
|
CStringArray m_arBackupDir;
|
CString m_strLogin; // User Login Name
|
CString m_strServerID; // Server ID
|
CString m_strDBFile; // DB File Name
|
CDBConnect m_AConnect; // Local Database
|
BOOL m_bOpenDB;
|
// Operations
|
public:
|
BOOL OpenDB( CString strLogin, CString strPassword, CString strServerID, BOOL bCheckFile = false );
|
void CloseDB();
|
CString GetTemplateDBFile( );
|
BOOL IsDBOpen(){return m_bOpenDB;};
|
public:
|
BOOL InsertChangeDir(CString strFilePath, CString strOperateType, CString strFileParam =_T(""));
|
static CString GetNetDiskDBWorkDir();
|
static CString GetModulePath();
|
static CString GetPathName( CString strFileName );
|
static BOOL ExistPath( CString strFilePath );
|
static BOOL ExistFile( CString strFileName );
|
CString GenerateGUIDString();
|
BOOL GetBackupDir(CStringArray &arBackupDir );
|
void WriteDBErrToFile( CString strErrInfo );
|
void WriteRowToFile(CString strFileName, CString strContent );
|
bool CStringToAnsi( LPCTSTR pszT, LPSTR *ppszA );
|
CString GetDBReplaceStr( CString strData );
|
};
|