TGitCache test application basic work.
[TortoiseGit.git] / test / Cache / CacheDlg.h
blob56d87e337c575fc98ba993a252d119eba31b7c12
1 // TortoiseSVN - a Windows shell extension for easy version control
3 // Copyright (C) 2003-2006 - Stefan Kueng
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #pragma once
20 #include "TGitPath.h"
22 // CCacheDlg dialog
23 class CCacheDlg : public CDialog
25 // Construction
26 public:
27 CCacheDlg(CWnd* pParent = NULL); // standard constructor
29 // Dialog Data
30 enum { IDD = IDD_CACHE_DIALOG };
32 protected:
33 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
36 // Implementation
37 protected:
38 HICON m_hIcon;
40 // Generated message map functions
41 virtual BOOL OnInitDialog();
42 afx_msg void OnPaint();
43 afx_msg HCURSOR OnQueryDragIcon();
44 afx_msg void OnBnClickedOk();
45 afx_msg void OnBnClickedWatchtestbutton();
47 DECLARE_MESSAGE_MAP()
49 CString m_sRootPath;
50 CStringArray m_filelist;
51 HANDLE m_hPipe;
52 OVERLAPPED m_Overlapped;
53 HANDLE m_hEvent;
54 CComCriticalSection m_critSec;
55 static UINT TestThreadEntry(LPVOID pVoid);
56 UINT TestThread();
57 void ClosePipe();
58 bool EnsurePipeOpen();
59 bool GetStatusFromRemoteCache(const CTGitPath& Path, bool bRecursive);
60 void RemoveFromCache(const CString& path);
62 void TouchFile(const CString& path);
63 void CopyRemoveCopy(const CString& path);
65 static UINT WatchTestThreadEntry(LPVOID pVoid);
66 UINT WatchTestThread();
67 public: