1 // TortoiseSVN - a Windows shell extension for easy version control
\r
3 // External Cache Copyright (C) 2005 - 2006 - Will Dean, Stefan Kueng
\r
5 // This program is free software; you can redistribute it and/or
\r
6 // modify it under the terms of the GNU General Public License
\r
7 // as published by the Free Software Foundation; either version 2
\r
8 // of the License, or (at your option) any later version.
\r
10 // This program is distributed in the hope that it will be useful,
\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 // GNU General Public License for more details.
\r
15 // You should have received a copy of the GNU General Public License
\r
16 // along with this program; if not, write to the Free Software Foundation,
\r
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\r
21 struct TSVNCacheResponse;
\r
22 #define CACHETIMEOUT 0x7FFFFFFF
\r
23 extern DWORD cachetimeout;
\r
25 #include "GitStatus.h"
\r
28 * \ingroup TSVNCache
\r
29 * Holds all the status data of one file or folder.
\r
31 class CStatusCacheEntry
\r
34 CStatusCacheEntry();
\r
35 CStatusCacheEntry(const git_wc_status2_t* pGitStatus, __int64 lastWriteTime, bool bReadOnly, DWORD validuntil = 0);
\r
36 bool HasExpired(long now) const;
\r
37 void BuildCacheResponse(TSVNCacheResponse& response, DWORD& responseLength) const;
\r
38 bool IsVersioned() const;
\r
39 bool DoesFileTimeMatch(__int64 testTime) const;
\r
40 bool ForceStatus(git_wc_status_kind forcedStatus);
\r
41 git_wc_status_kind GetEffectiveStatus() const { return m_highestPriorityLocalStatus; }
\r
42 bool IsKindKnown() const { return true;/*((m_kind != git_node_none)&&(m_kind != git_node_unknown));*/ }
\r
43 void SetStatus(const git_wc_status2_t* pGitStatus);
\r
44 bool HasBeenSet() const;
\r
46 bool IsDirectory() const {return true; /*((m_kind == git_node_dir)&&(m_highestPriorityLocalStatus != git_wc_status_ignored));*/}
\r
47 bool SaveToDisk(FILE * pFile);
\r
48 bool LoadFromDisk(FILE * pFile);
\r
49 // void SetKind(git_node_kind_t kind) {m_kind = kind;}
\r
51 void SetAsUnversioned();
\r
54 long m_discardAtTime;
\r
55 git_wc_status_kind m_highestPriorityLocalStatus;
\r
56 git_wc_status2_t m_GitStatus;
\r
57 __int64 m_lastWriteTime;
\r
59 // git_node_kind_t m_kind;
\r
62 // Values copied from the 'entries' structure
\r
63 bool m_bSVNEntryFieldSet;
\r
67 CStringA m_sPresentProps;
\r
68 git_revnum_t m_commitRevision;
\r
70 // friend class CGitStatusCache;
\r