put pull, push and fetch to external manual.
[TortoiseGit.git] / src / TortoiseShell / ShellCache.h
blob14c9da6764f1875235b8fec3783d20159ee43de5
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2003-2008 - 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 "registry.h"
21 #include "Globals.h"
22 #include "GitAdminDir.h"
23 #include "Git.h"
25 #define REGISTRYTIMEOUT 2000
26 #define EXCLUDELISTTIMEOUT 5000
27 #define ADMINDIRTIMEOUT 10000
28 #define DRIVETYPETIMEOUT 300000 // 5 min
29 #define NUMBERFMTTIMEOUT 300000
30 #define MENUTIMEOUT 100
32 typedef CComCritSecLock<CComCriticalSection> Locker;
34 /**
35 * \ingroup TortoiseShell
36 * Helper class which caches access to the registry. Also provides helper methods
37 * for checks against the settings stored in the registry.
39 class ShellCache
41 public:
42 enum CacheType
44 none,
45 exe,
46 dll,
47 dllFull,// same as dll except it uses commandline git tool with all status modes supported
49 ShellCache()
51 cachetype = CRegStdWORD(_T("Software\\TortoiseGit\\CacheType"), GetSystemMetrics(SM_REMOTESESSION) ? dll : exe);
52 showrecursive = CRegStdWORD(_T("Software\\TortoiseGit\\RecursiveOverlay"), TRUE);
53 folderoverlay = CRegStdWORD(_T("Software\\TortoiseGit\\FolderOverlay"), TRUE);
54 driveremote = CRegStdWORD(_T("Software\\TortoiseGit\\DriveMaskRemote"));
55 drivefixed = CRegStdWORD(_T("Software\\TortoiseGit\\DriveMaskFixed"), TRUE);
56 drivecdrom = CRegStdWORD(_T("Software\\TortoiseGit\\DriveMaskCDROM"));
57 driveremove = CRegStdWORD(_T("Software\\TortoiseGit\\DriveMaskRemovable"));
58 drivefloppy = CRegStdWORD(_T("Software\\TortoiseGit\\DriveMaskFloppy"));
59 driveram = CRegStdWORD(_T("Software\\TortoiseGit\\DriveMaskRAM"));
60 driveunknown = CRegStdWORD(_T("Software\\TortoiseGit\\DriveMaskUnknown"));
61 excludelist = CRegStdString(_T("Software\\TortoiseGit\\OverlayExcludeList"));
62 includelist = CRegStdString(_T("Software\\TortoiseGit\\OverlayIncludeList"));
63 simplecontext = CRegStdWORD(_T("Software\\TortoiseGit\\SimpleContext"), FALSE);
64 unversionedasmodified = CRegStdWORD(_T("Software\\TortoiseGit\\UnversionedAsModified"), FALSE);
65 showunversionedoverlay = CRegStdWORD(_T("Software\\TortoiseGit\\ShowUnversionedOverlay"), TRUE);
66 showignoredoverlay = CRegStdWORD(_T("Software\\TortoiseGit\\ShowIgnoredOverlay"), TRUE);
67 getlocktop = CRegStdWORD(_T("Software\\TortoiseGit\\GetLockTop"), TRUE);
68 excludedasnormal = CRegStdWORD(_T("Software\\TortoiseGit\\ShowExcludedAsNormal"), TRUE);
69 cachetypeticker = GetTickCount();
70 recursiveticker = cachetypeticker;
71 folderoverlayticker = cachetypeticker;
72 driveticker = cachetypeticker;
73 drivetypeticker = cachetypeticker;
74 langticker = cachetypeticker;
75 columnrevformatticker = cachetypeticker;
76 excludelistticker = cachetypeticker;
77 includelistticker = cachetypeticker;
78 simplecontextticker = cachetypeticker;
79 unversionedasmodifiedticker = cachetypeticker;
80 showunversionedoverlayticker = cachetypeticker;
81 showignoredoverlayticker = cachetypeticker;
82 admindirticker = cachetypeticker;
83 columnseverywhereticker = cachetypeticker;
84 getlocktopticker = cachetypeticker;
85 excludedasnormalticker = cachetypeticker;
86 excontextticker = cachetypeticker;
87 menulayoutlow = CRegStdWORD(_T("Software\\TortoiseGit\\ContextMenuEntries"), MENUSYNC|MENUCREATEREPOS|MENUCLONE|MENUCOMMIT);
88 menulayouthigh = CRegStdWORD(_T("Software\\TortoiseGit\\ContextMenuEntrieshigh"), (MENUSYNC|MENUCREATEREPOS|MENUCLONE|MENUCOMMIT)>>32);
90 unsigned __int64 ext=(MENUSVNIGNORE|MENUREFLOG|MENUREFBROWSE|MENUSTASHAPPLY|MENUDELUNVERSIONED|MENUSUBSYNC|MENUCREATEPATCH|MENUPULL|MENUPUSH|MENUFETCH);
91 menuextlow = CRegStdWORD(_T("Software\\TortoiseGit\\ContextMenuExtEntriesLow"), ext&0xFFFFFFFF );
92 menuexthigh = CRegStdWORD(_T("Software\\TortoiseGit\\ContextMenuExtEntriesHigh"), ext>>32 );
94 menumasklow_lm = CRegStdWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskLow"), 0, FALSE, HKEY_LOCAL_MACHINE);
95 menumaskhigh_lm = CRegStdWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskHigh"), 0, FALSE, HKEY_LOCAL_MACHINE);
96 menumasklow_cu = CRegStdWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskLow"), 0);
97 menumaskhigh_cu = CRegStdWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskHigh"), 0);
98 langid = CRegStdWORD(_T("Software\\TortoiseGit\\LanguageID"), 1033);
99 blockstatus = CRegStdWORD(_T("Software\\TortoiseGit\\BlockStatus"), 0);
100 columnseverywhere = CRegStdWORD(_T("Software\\TortoiseGit\\ColumnsEveryWhere"), FALSE);
101 for (int i=0; i<27; i++)
103 drivetypecache[i] = (UINT)-1;
105 // A: and B: are floppy disks
106 drivetypecache[0] = DRIVE_REMOVABLE;
107 drivetypecache[1] = DRIVE_REMOVABLE;
108 TCHAR szBuffer[5];
109 columnrevformatticker = GetTickCount();
110 SecureZeroMemory(&columnrevformat, sizeof(NUMBERFMT));
111 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, &szDecSep[0], sizeof(szDecSep));
112 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, &szThousandsSep[0], sizeof(szThousandsSep));
113 columnrevformat.lpDecimalSep = szDecSep;
114 columnrevformat.lpThousandSep = szThousandsSep;
115 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SGROUPING, &szBuffer[0], sizeof(szBuffer));
116 columnrevformat.Grouping = _ttoi(szBuffer);
117 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_INEGNUMBER, &szBuffer[0], sizeof(szBuffer));
118 columnrevformat.NegativeOrder = _ttoi(szBuffer);
119 sAdminDirCacheKey.reserve(MAX_PATH); // MAX_PATH as buffer reservation ok.
120 nocontextpaths = CRegStdString(_T("Software\\TortoiseGit\\NoContextPaths"), _T(""));
121 m_critSec.Init();
123 void ForceRefresh()
125 cachetype.read();
126 showrecursive.read();
127 folderoverlay.read();
128 driveremote.read();
129 drivefixed.read();
130 drivecdrom.read();
131 driveremove.read();
132 drivefloppy.read();
133 driveram.read();
134 driveunknown.read();
135 excludelist.read();
136 includelist.read();
137 simplecontext.read();
138 unversionedasmodified.read();
139 showunversionedoverlay.read();
140 showignoredoverlay.read();
141 excludedasnormal.read();
142 menulayoutlow.read();
143 menulayouthigh.read();
144 langid.read();
145 blockstatus.read();
146 columnseverywhere.read();
147 getlocktop.read();
148 menumasklow_lm.read();
149 menumaskhigh_lm.read();
150 menumasklow_cu.read();
151 menumaskhigh_cu.read();
152 nocontextpaths.read();
154 CacheType GetCacheType()
156 if ((GetTickCount() - REGISTRYTIMEOUT) > cachetypeticker)
158 cachetypeticker = GetTickCount();
159 cachetype.read();
161 return CacheType(DWORD((cachetype)));
163 DWORD BlockStatus()
165 if ((GetTickCount() - REGISTRYTIMEOUT) > blockstatusticker)
167 blockstatusticker = GetTickCount();
168 blockstatus.read();
170 return (blockstatus);
172 unsigned __int64 GetMenuLayout()
174 if ((GetTickCount() - REGISTRYTIMEOUT) > layoutticker)
176 layoutticker = GetTickCount();
177 menulayoutlow.read();
178 menulayouthigh.read();
180 unsigned __int64 temp = unsigned __int64(DWORD(menulayouthigh))<<32;
181 temp |= unsigned __int64(DWORD(menulayoutlow));
182 return temp;
185 unsigned __int64 GetMenuExt()
187 if ((GetTickCount() - REGISTRYTIMEOUT) > exticker)
189 exticker = GetTickCount();
190 menuextlow.read();
191 menuexthigh.read();
193 unsigned __int64 temp = unsigned __int64(DWORD(menuexthigh))<<32;
194 temp |= unsigned __int64(DWORD(menuextlow));
195 return temp;
198 unsigned __int64 GetMenuMask()
200 if ((GetTickCount() - REGISTRYTIMEOUT) > menumaskticker)
202 menumaskticker = GetTickCount();
203 menumasklow_lm.read();
204 menumaskhigh_lm.read();
205 menumasklow_cu.read();
206 menumaskhigh_cu.read();
208 DWORD low = (DWORD)menumasklow_lm | (DWORD)menumasklow_cu;
209 DWORD high = (DWORD)menumaskhigh_lm | (DWORD)menumaskhigh_cu;
210 unsigned __int64 temp = unsigned __int64(high)<<32;
211 temp |= unsigned __int64(low);
212 return temp;
214 BOOL IsRecursive()
216 if ((GetTickCount() - REGISTRYTIMEOUT)>recursiveticker)
218 recursiveticker = GetTickCount();
219 showrecursive.read();
221 return (showrecursive);
223 BOOL IsFolderOverlay()
225 if ((GetTickCount() - REGISTRYTIMEOUT)>folderoverlayticker)
227 folderoverlayticker = GetTickCount();
228 folderoverlay.read();
230 return (folderoverlay);
232 BOOL IsSimpleContext()
234 if ((GetTickCount() - REGISTRYTIMEOUT)>simplecontextticker)
236 simplecontextticker = GetTickCount();
237 simplecontext.read();
239 return (simplecontext!=0);
241 BOOL IsUnversionedAsModified()
243 if ((GetTickCount() - REGISTRYTIMEOUT)>unversionedasmodifiedticker)
245 unversionedasmodifiedticker = GetTickCount();
246 unversionedasmodified.read();
248 return (unversionedasmodified);
250 BOOL ShowUnversionedOverlay()
252 if ((GetTickCount() - REGISTRYTIMEOUT)>showunversionedoverlayticker)
254 showunversionedoverlayticker = GetTickCount();
255 showunversionedoverlay.read();
257 return (showunversionedoverlay);
259 BOOL ShowIgnoredOverlay()
261 if ((GetTickCount() - REGISTRYTIMEOUT)>showignoredoverlayticker)
263 showignoredoverlayticker = GetTickCount();
264 showignoredoverlay.read();
266 return (showignoredoverlay);
268 BOOL IsGetLockTop()
270 if ((GetTickCount() - REGISTRYTIMEOUT)>getlocktopticker)
272 getlocktopticker = GetTickCount();
273 getlocktop.read();
275 return (getlocktop);
277 BOOL ShowExcludedAsNormal()
279 if ((GetTickCount() - REGISTRYTIMEOUT)>excludedasnormalticker)
281 excludedasnormalticker = GetTickCount();
282 excludedasnormal.read();
284 return (excludedasnormal);
286 BOOL IsRemote()
288 DriveValid();
289 return (driveremote);
291 BOOL IsFixed()
293 DriveValid();
294 return (drivefixed);
296 BOOL IsCDRom()
298 DriveValid();
299 return (drivecdrom);
301 BOOL IsRemovable()
303 DriveValid();
304 return (driveremove);
306 BOOL IsRAM()
308 DriveValid();
309 return (driveram);
311 BOOL IsUnknown()
313 DriveValid();
314 return (driveunknown);
316 BOOL IsContextPathAllowed(LPCTSTR path)
318 Locker lock(m_critSec);
319 ExcludeContextValid();
320 for (std::vector<stdstring>::iterator I = excontextvector.begin(); I != excontextvector.end(); ++I)
322 if (I->empty())
323 continue;
324 if (I->size() && I->at(I->size()-1)=='*')
326 stdstring str = I->substr(0, I->size()-1);
327 if (_tcsnicmp(str.c_str(), path, str.size())==0)
328 return FALSE;
330 else if (_tcsicmp(I->c_str(), path)==0)
331 return FALSE;
333 return TRUE;
335 BOOL IsPathAllowed(LPCTSTR path)
337 Locker lock(m_critSec);
338 IncludeListValid();
339 for (std::vector<stdstring>::iterator I = invector.begin(); I != invector.end(); ++I)
341 if (I->empty())
342 continue;
343 if (I->at(I->size()-1)=='*')
345 stdstring str = I->substr(0, I->size()-1);
346 if (_tcsnicmp(str.c_str(), path, str.size())==0)
347 return TRUE;
348 if (str.size() && (str.at(str.size()-1) == '\\') && (_tcsnicmp(str.c_str(), path, str.size()-1)==0))
349 return TRUE;
351 else if (_tcsicmp(I->c_str(), path)==0)
352 return TRUE;
353 else if ((I->at(I->size()-1) == '\\') &&
354 ((_tcsnicmp(I->c_str(), path, I->size())==0) || (_tcsicmp(I->c_str(), path)==0)) )
355 return TRUE;
358 UINT drivetype = 0;
359 int drivenumber = PathGetDriveNumber(path);
360 if ((drivenumber >=0)&&(drivenumber < 25))
362 drivetype = drivetypecache[drivenumber];
363 if ((drivetype == -1)||((GetTickCount() - DRIVETYPETIMEOUT)>drivetypeticker))
365 if ((drivenumber == 0)||(drivenumber == 1))
366 drivetypecache[drivenumber] = DRIVE_REMOVABLE;
367 else
369 drivetypeticker = GetTickCount();
370 TCHAR pathbuf[MAX_PATH+4]; // MAX_PATH ok here. PathStripToRoot works with partial paths too.
371 _tcsncpy_s(pathbuf, MAX_PATH+4, path, MAX_PATH+3);
372 PathStripToRoot(pathbuf);
373 PathAddBackslash(pathbuf);
374 ATLTRACE2(_T("GetDriveType for %s, Drive %d\n"), pathbuf, drivenumber);
375 drivetype = GetDriveType(pathbuf);
376 drivetypecache[drivenumber] = drivetype;
380 else
382 TCHAR pathbuf[MAX_PATH+4]; // MAX_PATH ok here. PathIsUNCServer works with partial paths too.
383 _tcsncpy_s(pathbuf, MAX_PATH+4, path, MAX_PATH+3);
384 if (PathIsUNCServer(pathbuf))
385 drivetype = DRIVE_REMOTE;
386 else
388 PathStripToRoot(pathbuf);
389 PathAddBackslash(pathbuf);
390 if (_tcsncmp(pathbuf, drivetypepathcache, MAX_PATH-1)==0) // MAX_PATH ok.
391 drivetype = drivetypecache[26];
392 else
394 ATLTRACE2(_T("GetDriveType for %s\n"), pathbuf);
395 drivetype = GetDriveType(pathbuf);
396 drivetypecache[26] = drivetype;
397 _tcsncpy_s(drivetypepathcache, MAX_PATH, pathbuf, MAX_PATH); // MAX_PATH ok.
401 if ((drivetype == DRIVE_REMOVABLE)&&(!IsRemovable()))
402 return FALSE;
403 if ((drivetype == DRIVE_REMOVABLE)&&(drivefloppy == 0)&&((drivenumber==0)||(drivenumber==1)))
404 return FALSE;
405 if ((drivetype == DRIVE_FIXED)&&(!IsFixed()))
406 return FALSE;
407 if (((drivetype == DRIVE_REMOTE)||(drivetype == DRIVE_NO_ROOT_DIR))&&(!IsRemote()))
408 return FALSE;
409 if ((drivetype == DRIVE_CDROM)&&(!IsCDRom()))
410 return FALSE;
411 if ((drivetype == DRIVE_RAMDISK)&&(!IsRAM()))
412 return FALSE;
413 if ((drivetype == DRIVE_UNKNOWN)&&(IsUnknown()))
414 return FALSE;
416 ExcludeListValid();
417 for (std::vector<stdstring>::iterator I = exvector.begin(); I != exvector.end(); ++I)
419 if (I->empty())
420 continue;
421 if (I->size() && I->at(I->size()-1)=='*')
423 stdstring str = I->substr(0, I->size()-1);
424 if (_tcsnicmp(str.c_str(), path, str.size())==0)
425 return FALSE;
427 else if (_tcsicmp(I->c_str(), path)==0)
428 return FALSE;
430 return TRUE;
432 DWORD GetLangID()
434 if ((GetTickCount() - REGISTRYTIMEOUT) > langticker)
436 langticker = GetTickCount();
437 langid.read();
439 return (langid);
441 NUMBERFMT * GetNumberFmt()
443 if ((GetTickCount() - NUMBERFMTTIMEOUT) > columnrevformatticker)
445 TCHAR szBuffer[5];
446 columnrevformatticker = GetTickCount();
447 SecureZeroMemory(&columnrevformat, sizeof(NUMBERFMT));
448 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, &szDecSep[0], sizeof(szDecSep));
449 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, &szThousandsSep[0], sizeof(szThousandsSep));
450 columnrevformat.lpDecimalSep = szDecSep;
451 columnrevformat.lpThousandSep = szThousandsSep;
452 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SGROUPING, &szBuffer[0], sizeof(szBuffer));
453 columnrevformat.Grouping = _ttoi(szBuffer);
454 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_INEGNUMBER, &szBuffer[0], sizeof(szBuffer));
455 columnrevformat.NegativeOrder = _ttoi(szBuffer);
457 return &columnrevformat;
459 BOOL HasSVNAdminDir(LPCTSTR path, BOOL bIsDir, CString *ProjectTopDir = NULL)
461 size_t len = _tcslen(path);
462 TCHAR * buf = new TCHAR[len+1];
463 _tcscpy_s(buf, len+1, path);
464 if (! bIsDir)
466 TCHAR * ptr = _tcsrchr(buf, '\\');
467 if (ptr != 0)
469 *ptr = 0;
472 if ((GetTickCount() - ADMINDIRTIMEOUT) < admindirticker)
474 std::map<stdstring, AdminDir_s>::iterator iter;
475 sAdminDirCacheKey.assign(buf);
476 if ((iter = admindircache.find(sAdminDirCacheKey)) != admindircache.end())
478 delete [] buf;
479 if (ProjectTopDir && iter->second.bHasAdminDir)
480 *ProjectTopDir = iter->second.sProjectRoot.c_str();
481 return iter->second.bHasAdminDir;
484 CString sProjectRoot;
485 BOOL hasAdminDir = g_GitAdminDir.HasAdminDir(buf, true, &sProjectRoot);
486 admindirticker = GetTickCount();
487 Locker lock(m_critSec);
489 AdminDir_s &ad = admindircache[buf];
490 ad.bHasAdminDir = hasAdminDir;
491 if (hasAdminDir)
493 ad.sProjectRoot.assign(sProjectRoot);
495 if (ProjectTopDir)
496 *ProjectTopDir = sProjectRoot;
499 delete [] buf;
500 return hasAdminDir;
502 bool IsColumnsEveryWhere()
504 if ((GetTickCount() - REGISTRYTIMEOUT) > columnseverywhereticker)
506 columnseverywhereticker = GetTickCount();
507 columnseverywhere.read();
509 return !!(DWORD)columnseverywhere;
511 private:
512 void DriveValid()
514 if ((GetTickCount() - REGISTRYTIMEOUT)>driveticker)
516 driveticker = GetTickCount();
517 driveremote.read();
518 drivefixed.read();
519 drivecdrom.read();
520 driveremove.read();
521 drivefloppy.read();
524 void ExcludeContextValid()
526 if ((GetTickCount() - EXCLUDELISTTIMEOUT)>excontextticker)
528 Locker lock(m_critSec);
529 excontextticker = GetTickCount();
530 nocontextpaths.read();
531 if (excludecontextstr.compare((stdstring)nocontextpaths)==0)
532 return;
533 excludecontextstr = (stdstring)nocontextpaths;
534 excontextvector.clear();
535 size_t pos = 0, pos_ant = 0;
536 pos = excludecontextstr.find(_T("\n"), pos_ant);
537 while (pos != stdstring::npos)
539 stdstring token = excludecontextstr.substr(pos_ant, pos-pos_ant);
540 excontextvector.push_back(token);
541 pos_ant = pos+1;
542 pos = excludecontextstr.find(_T("\n"), pos_ant);
544 if (!excludecontextstr.empty())
546 excontextvector.push_back(excludecontextstr.substr(pos_ant, excludecontextstr.size()-1));
548 excludecontextstr = (stdstring)nocontextpaths;
551 void ExcludeListValid()
553 if ((GetTickCount() - EXCLUDELISTTIMEOUT)>excludelistticker)
555 Locker lock(m_critSec);
556 excludelistticker = GetTickCount();
557 excludelist.read();
558 if (excludeliststr.compare((stdstring)excludelist)==0)
559 return;
560 excludeliststr = (stdstring)excludelist;
561 exvector.clear();
562 size_t pos = 0, pos_ant = 0;
563 pos = excludeliststr.find(_T("\n"), pos_ant);
564 while (pos != stdstring::npos)
566 stdstring token = excludeliststr.substr(pos_ant, pos-pos_ant);
567 exvector.push_back(token);
568 pos_ant = pos+1;
569 pos = excludeliststr.find(_T("\n"), pos_ant);
571 if (!excludeliststr.empty())
573 exvector.push_back(excludeliststr.substr(pos_ant, excludeliststr.size()-1));
575 excludeliststr = (stdstring)excludelist;
578 void IncludeListValid()
580 if ((GetTickCount() - EXCLUDELISTTIMEOUT)>includelistticker)
582 Locker lock(m_critSec);
583 includelistticker = GetTickCount();
584 includelist.read();
585 if (includeliststr.compare((stdstring)includelist)==0)
586 return;
587 includeliststr = (stdstring)includelist;
588 invector.clear();
589 size_t pos = 0, pos_ant = 0;
590 pos = includeliststr.find(_T("\n"), pos_ant);
591 while (pos != stdstring::npos)
593 stdstring token = includeliststr.substr(pos_ant, pos-pos_ant);
594 invector.push_back(token);
595 pos_ant = pos+1;
596 pos = includeliststr.find(_T("\n"), pos_ant);
598 if (!includeliststr.empty())
600 invector.push_back(includeliststr.substr(pos_ant, includeliststr.size()-1));
602 includeliststr = (stdstring)includelist;
606 struct AdminDir_s
608 BOOL bHasAdminDir;
609 stdstring sProjectRoot;
611 public:
612 CRegStdWORD cachetype;
613 CRegStdWORD blockstatus;
614 CRegStdWORD langid;
615 CRegStdWORD showrecursive;
616 CRegStdWORD folderoverlay;
617 CRegStdWORD getlocktop;
618 CRegStdWORD driveremote;
619 CRegStdWORD drivefixed;
620 CRegStdWORD drivecdrom;
621 CRegStdWORD driveremove;
622 CRegStdWORD drivefloppy;
623 CRegStdWORD driveram;
624 CRegStdWORD driveunknown;
625 CRegStdWORD menulayoutlow; /* Fist level mask */
626 CRegStdWORD menulayouthigh;
627 CRegStdWORD menuextlow; /* ext menu mask */
628 CRegStdWORD menuexthigh;
629 CRegStdWORD simplecontext;
630 CRegStdWORD menumasklow_lm;
631 CRegStdWORD menumaskhigh_lm;
632 CRegStdWORD menumasklow_cu;
633 CRegStdWORD menumaskhigh_cu;
634 CRegStdWORD unversionedasmodified;
635 CRegStdWORD showunversionedoverlay;
636 CRegStdWORD showignoredoverlay;
637 CRegStdWORD excludedasnormal;
638 CRegStdString excludelist;
639 CRegStdWORD columnseverywhere;
640 stdstring excludeliststr;
641 std::vector<stdstring> exvector;
642 CRegStdString includelist;
643 stdstring includeliststr;
644 std::vector<stdstring> invector;
645 DWORD cachetypeticker;
646 DWORD recursiveticker;
647 DWORD folderoverlayticker;
648 DWORD getlocktopticker;
649 DWORD driveticker;
650 DWORD drivetypeticker;
651 DWORD layoutticker;
652 DWORD exticker;
653 DWORD menumaskticker;
654 DWORD langticker;
655 DWORD blockstatusticker;
656 DWORD columnrevformatticker;
657 DWORD excludelistticker;
658 DWORD includelistticker;
659 DWORD simplecontextticker;
660 DWORD unversionedasmodifiedticker;
661 DWORD showunversionedoverlayticker;
662 DWORD showignoredoverlayticker;
663 DWORD excludedasnormalticker;
664 DWORD columnseverywhereticker;
665 UINT drivetypecache[27];
666 TCHAR drivetypepathcache[MAX_PATH]; // MAX_PATH ok.
667 NUMBERFMT columnrevformat;
668 TCHAR szDecSep[5];
669 TCHAR szThousandsSep[5];
670 std::map<stdstring, AdminDir_s> admindircache;
671 stdstring sAdminDirCacheKey;
672 CRegStdString nocontextpaths;
673 stdstring excludecontextstr;
674 std::vector<stdstring> excontextvector;
675 DWORD excontextticker;
676 DWORD admindirticker;
677 CComCriticalSection m_critSec;