// FTPUploaderDlg.h : header file // #pragma once #include "afxcmn.h" #include "ListCtrlEx.h" #include "FTPThreadPool.h" #include "DlgUploadList.h" #include #include "afxwin.h" #include "TrayIcon.h" #include "akFileDB.h" #define UM_FTP_LOG (WM_USER + 100) #define UM_FTP_LOG_UP (WM_USER + 101) #define UM_FTP_NOTIFY_LOG (WM_USER + 102) #define UM_FTP_NOTIFY_LOG_UP (WM_USER + 103) #define UM_FTP_UPDATE_LIST (WM_USER + 104) #define UM_FTP_UPDATE_LIST_UP (WM_USER + 105) #define TIMER_BLANK_UPDOWNLOAD (WM_USER + 110) #define TIMER_SAVE_LOG_FILE (WM_USER + 111) #define TIMER_FTP_UPLOAD_INFO (WM_USER + 112) #define SHCU HKEY_CURRENT_USER #define KEY_FTP _T("Software\\DIT\\FTP\\") // ������Ʈ�� ���� ��μ��� #define CONFIGFILENAME _T("FTPUploader.cfg") #define FTP_LOG_FILE_PATH _T("D:\\DIT_LogData\\") #define FTP_LOG_FILE_NAME _T("logFTPUploader") #define BLANK_UPDOWNLOAD_PATH _T("D:\\Temp") #define BLANK_DOWNLOAD_FILE _T("!!!H_GLASS_ID_DOWN.IDX") #define BLANK_UPLOAD_FILE _T("!!!H_GLASS_ID_UP.IDX") enum emConfigMode { CM_Register = 0, CM_File }; #include #include typedef std::vector VecString; typedef std::vector::iterator VecStringIt; typedef std::vector::const_iterator constVecStringIt; // CFTPUploaderDlg dialog class CFTPUploaderDlg : public CDialog, public IFTPThreadPool2Parent, public IDlgUploadList2Parent { // Construction public: CFTPUploaderDlg(CWnd* pParent = NULL); // standard constructor virtual ~CFTPUploaderDlg(); // Dialog Data enum { IDD = IDD_FTPUPLOADER_DIALOG }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support // Implementation protected: HICON m_hIcon; void AddDownload(const CFTPCopyDataParam* pParam); void AddUpload(const CFTPCopyDataParam* pParam); BOOL LoadConfig(); // Generated message map functions virtual BOOL OnInitDialog(); afx_msg void OnSysCommand(UINT nID, LPARAM lParam); afx_msg void OnPaint(); afx_msg void OnTimer(UINT_PTR nIDEvent); afx_msg void OnDestroy(); afx_msg HCURSOR OnQueryDragIcon(); DECLARE_MESSAGE_MAP() protected: CRect m_rtOgrWindow; CRect m_rtAddWindow; VecString m_vecFTPLog; VecString m_vecFTPFailLog; CListBox m_ctlLogList; CListBox m_ctlLogList_Up; CIPAddressCtrl m_ctlIPAddress; CString m_strID; CString m_strPW; int m_nTimeOut; CString m_strHomePath; int m_nPort; CButton m_ctrlPassiveMode; BOOL m_bCheckAutoUpload; int m_nAutoUploadDelay; BOOL m_bPassiveMode; BOOL m_bWSIChk; BOOL m_bCheckBDIStackDown; CIPAddressCtrl m_ctlIPAddress2; CString m_strID2; CString m_strPW2; int m_nTimeOut2; CString m_strHomePath2; int m_nPort2; //201218 CJH - IP �߰� CIPAddressCtrl m_ctlIPAddress3; CString m_strID3; CString m_strPW3; int m_nTimeOut3; CString m_strHomePath3; int m_nPort3; CFTPThreadPool* m_pFTPThreadPool_Down; CFTPThreadPool* m_pFTPThreadPool_Up; CDlgUploadList* m_pDlgUploadList_Down; CDlgUploadList* m_pDlgUploadList_Up; CCriticalSection m_csFTPLog; CTrayIcon m_TrayIcon; emConfigMode m_nConfigMode; CakFileDB m_fileConfig; protected: virtual void IFTP2P_DisplayLogMessage(int nType, int nLogIndex); virtual void IFTP2P_DisplayNotifyMessage(int nType, int nNotifyType, int nLogIndex); virtual BOOL IDUL2P_GetReadyUploadParam(int nType, DeqFTPUploadParam& deqUploadParam); BOOL ReadString(HKEY hKey, LPCTSTR lpKey, LPCTSTR lpValue, LPBYTE lpRet, DWORD nSize); BOOL WriteString(HKEY hKey, LPCTSTR lpKey, LPCTSTR lpValue, LPSTR lpData); void Process_BlankFileCreate(); void Process_BlankUpDownload(); void Process_SaveFTPLog(); void Process_FtpUploaderInfo(); BOOL CreatePathDir(const CString& strFilename); public: afx_msg LRESULT OnFTPLog(WPARAM wParam, LPARAM lParam); afx_msg LRESULT OnFTPLog_Up(WPARAM wParam, LPARAM lParam); afx_msg LRESULT OnFTPNotifyLog(WPARAM wParam, LPARAM lParam); afx_msg LRESULT OnFTPNotifyLog_Up(WPARAM wParam, LPARAM lParam); afx_msg LRESULT OnTrayNotification(WPARAM wParam, LPARAM lParam); afx_msg void OnClose(); afx_msg void OnFileOpen(); afx_msg void OnFileClose(); afx_msg void OnBnClickedButtonTest(); afx_msg void OnBnClickedButtonConfigSave(); afx_msg void OnBnClickedCheckAutoUpload(); afx_msg BOOL OnCopyData(CWnd* pWnd, COPYDATASTRUCT* pCopyDataStruct); afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); afx_msg void OnBnClickedButtonDownloadList(); afx_msg void OnBnClickedButtonUploadList(); virtual BOOL DestroyWindow(); CButton m_chkWSI; afx_msg void OnBnClickedCheckBdiStackDownload(); afx_msg void OnBnClickedCheckWsi(); afx_msg void OnBnClickedCheckPassiveMode(); };