Configuration.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. //---------------------------------------------------------------------------
  2. #ifndef ConfigurationH
  3. #define ConfigurationH
  4. #include <set>
  5. #include "RemoteFiles.h"
  6. #include "FileBuffer.h"
  7. #include "HierarchicalStorage.h"
  8. #include "Usage.h"
  9. //---------------------------------------------------------------------------
  10. #define SET_CONFIG_PROPERTY_EX(PROPERTY, APPLY) \
  11. if (PROPERTY != value) { F ## PROPERTY = value; Changed(); APPLY; }
  12. #define SET_CONFIG_PROPERTY(PROPERTY) \
  13. SET_CONFIG_PROPERTY_EX(PROPERTY, )
  14. //---------------------------------------------------------------------------
  15. extern const wchar_t * AutoSwitchNames;
  16. extern const wchar_t * NotAutoSwitchNames;
  17. enum TAutoSwitch { asOn, asOff, asAuto }; // Has to match PuTTY FORCE_ON, FORCE_OFF, AUTO
  18. //---------------------------------------------------------------------------
  19. class TStoredSessionList;
  20. class TCopyParamType;
  21. //---------------------------------------------------------------------------
  22. class TConfiguration : public TObject
  23. {
  24. private:
  25. bool FDontSave;
  26. bool FForceSave;
  27. bool FChanged;
  28. int FUpdating;
  29. TNotifyEvent FOnChange;
  30. void * FApplicationInfo;
  31. TUsage * FUsage;
  32. bool FLogging;
  33. bool FPermanentLogging;
  34. UnicodeString FLogFileName;
  35. UnicodeString FPermanentLogFileName;
  36. int FLogWindowLines;
  37. bool FLogFileAppend;
  38. bool FLogSensitive;
  39. bool FPermanentLogSensitive;
  40. __int64 FLogMaxSize;
  41. __int64 FPermanentLogMaxSize;
  42. int FLogMaxCount;
  43. int FPermanentLogMaxCount;
  44. int FLogProtocol;
  45. int FPermanentLogProtocol;
  46. int FActualLogProtocol;
  47. bool FLogActions;
  48. bool FPermanentLogActions;
  49. bool FLogActionsRequired;
  50. UnicodeString FActionsLogFileName;
  51. UnicodeString FPermanentActionsLogFileName;
  52. bool FConfirmOverwriting;
  53. bool FConfirmResume;
  54. bool FAutoReadDirectoryAfterOp;
  55. int FSessionReopenAuto;
  56. int FSessionReopenBackground;
  57. int FSessionReopenTimeout;
  58. int FSessionReopenAutoStall;
  59. UnicodeString FCustomIniFileStorageName;
  60. UnicodeString FIniFileStorageName;
  61. UnicodeString FVirtualIniFileStorageName;
  62. std::unique_ptr<TStrings> FOptionsStorage;
  63. int FProgramIniPathWrittable;
  64. int FTunnelLocalPortNumberLow;
  65. int FTunnelLocalPortNumberHigh;
  66. int FCacheDirectoryChangesMaxSize;
  67. bool FShowFtpWelcomeMessage;
  68. UnicodeString FDefaultRandomSeedFile;
  69. UnicodeString FRandomSeedFile;
  70. UnicodeString FPuttyRegistryStorageKey;
  71. UnicodeString FExternalIpAddress;
  72. int FLocalPortNumberMin;
  73. int FLocalPortNumberMax;
  74. bool FTryFtpWhenSshFails;
  75. int FParallelDurationThreshold;
  76. bool FScripting;
  77. UnicodeString FMimeTypes;
  78. int FDontReloadMoreThanSessions;
  79. int FScriptProgressFileNameLimit;
  80. int FKeyVersion;
  81. UnicodeString FCertificateStorage;
  82. UnicodeString FChecksumCommands;
  83. bool FDisablePasswordStoring;
  84. bool FForceBanners;
  85. bool FDisableAcceptingHostKeys;
  86. bool FDefaultCollectUsage;
  87. TVSFixedFileInfo *__fastcall GetFixedApplicationInfo();
  88. void * __fastcall GetApplicationInfo();
  89. virtual UnicodeString __fastcall GetVersionStr();
  90. virtual UnicodeString __fastcall GetVersion();
  91. UnicodeString __fastcall GetProductVersion();
  92. UnicodeString __fastcall GetProductName();
  93. UnicodeString __fastcall GetCompanyName();
  94. UnicodeString __fastcall GetFileVersion(TVSFixedFileInfo * Info);
  95. UnicodeString __fastcall GetStoredSessionsSubKey();
  96. UnicodeString __fastcall DoGetPuttySessionsKey();
  97. UnicodeString __fastcall GetPuttySessionsSubKey();
  98. void __fastcall SetRandomSeedFile(UnicodeString value);
  99. UnicodeString __fastcall GetRandomSeedFileName();
  100. void __fastcall SetPuttyRegistryStorageKey(UnicodeString value);
  101. UnicodeString __fastcall GetSshHostKeysSubKey();
  102. UnicodeString __fastcall GetRootKeyStr();
  103. UnicodeString __fastcall GetConfigurationSubKey();
  104. TEOLType __fastcall GetLocalEOLType();
  105. void __fastcall SetLogging(bool value);
  106. bool __fastcall GetLogging();
  107. void __fastcall SetLogFileName(UnicodeString value);
  108. UnicodeString __fastcall GetLogFileName();
  109. bool __fastcall GetLogToFile();
  110. void __fastcall SetLogFileAppend(bool value);
  111. void __fastcall SetLogSensitive(bool value);
  112. void __fastcall SetLogMaxSize(__int64 value);
  113. __int64 __fastcall GetLogMaxSize();
  114. void __fastcall SetLogMaxCount(int value);
  115. int __fastcall GetLogMaxCount();
  116. void __fastcall SetLogProtocol(int value);
  117. void __fastcall SetLogActions(bool value);
  118. bool __fastcall GetLogActions();
  119. void __fastcall SetActionsLogFileName(UnicodeString value);
  120. UnicodeString __fastcall GetPermanentActionsLogFileName();
  121. UnicodeString __fastcall GetActionsLogFileName();
  122. UnicodeString __fastcall GetDefaultLogFileName();
  123. UnicodeString __fastcall GetTimeFormat();
  124. UnicodeString __fastcall GetRegistryStorageKey();
  125. UnicodeString __fastcall GetIniFileStorageNameForReadingWriting();
  126. UnicodeString __fastcall GetIniFileStorageNameForReading();
  127. UnicodeString __fastcall GetIniFileStorageName(bool ReadingOnly);
  128. void __fastcall SetOptionsStorage(TStrings * value);
  129. TStrings * __fastcall GetOptionsStorage();
  130. UnicodeString __fastcall GetPartialExt() const;
  131. UnicodeString __fastcall GetFileInfoString(const UnicodeString Key);
  132. void __fastcall SetSessionReopenAuto(int value);
  133. void __fastcall SetSessionReopenBackground(int value);
  134. void __fastcall SetSessionReopenTimeout(int value);
  135. void __fastcall SetSessionReopenAutoStall(int value);
  136. void __fastcall SetTunnelLocalPortNumberLow(int value);
  137. void __fastcall SetTunnelLocalPortNumberHigh(int value);
  138. void __fastcall SetCacheDirectoryChangesMaxSize(int value);
  139. void __fastcall SetShowFtpWelcomeMessage(bool value);
  140. int __fastcall GetCompoundVersion();
  141. void __fastcall UpdateActualLogProtocol();
  142. void __fastcall SetExternalIpAddress(UnicodeString value);
  143. void __fastcall SetTryFtpWhenSshFails(bool value);
  144. void __fastcall SetParallelDurationThreshold(int value);
  145. void __fastcall SetMimeTypes(UnicodeString value);
  146. void SetCertificateStorage(const UnicodeString & value);
  147. UnicodeString GetCertificateStorageExpanded();
  148. bool __fastcall GetCollectUsage();
  149. void __fastcall SetCollectUsage(bool value);
  150. bool __fastcall GetIsUnofficial();
  151. bool __fastcall GetPersistent();
  152. void SetLocalPortNumberMin(int value);
  153. void SetLocalPortNumberMax(int value);
  154. protected:
  155. TStorage FStorage;
  156. TCriticalSection * FCriticalSection;
  157. virtual TStorage __fastcall GetStorage();
  158. virtual void __fastcall Changed();
  159. virtual void __fastcall SaveData(THierarchicalStorage * Storage, bool All);
  160. virtual void __fastcall LoadData(THierarchicalStorage * Storage);
  161. virtual void __fastcall LoadFrom(THierarchicalStorage * Storage);
  162. virtual void __fastcall CopyData(THierarchicalStorage * Source, THierarchicalStorage * Target);
  163. virtual void __fastcall LoadAdmin(THierarchicalStorage * Storage);
  164. virtual UnicodeString __fastcall GetDefaultKeyFile();
  165. virtual void __fastcall Saved();
  166. void __fastcall CleanupRegistry(const UnicodeString & RegistryPath);
  167. void __fastcall CopyAllStringsInSubKey(
  168. THierarchicalStorage * Source, THierarchicalStorage * Target, const UnicodeString & Name);
  169. bool __fastcall CopySubKey(THierarchicalStorage * Source, THierarchicalStorage * Target, const UnicodeString & Name);
  170. UnicodeString __fastcall BannerHash(const UnicodeString & Banner);
  171. void __fastcall SetBannerData(const UnicodeString & SessionKey, const UnicodeString & BannerHash, unsigned int Params);
  172. void __fastcall GetBannerData(const UnicodeString & SessionKey, UnicodeString & BannerHash, unsigned int & Params);
  173. static UnicodeString __fastcall PropertyToKey(const UnicodeString & Property);
  174. virtual void __fastcall DoSave(bool All, bool Explicit);
  175. UnicodeString __fastcall FormatFingerprintKey(const UnicodeString & SiteKey, const UnicodeString & FingerprintType);
  176. THierarchicalStorage * OpenDirectoryStatisticsCache(bool CanCreate);
  177. UnicodeString __fastcall GetDirectoryStatisticsCacheKey(
  178. const UnicodeString & SessionKey, const UnicodeString & Path, const TCopyParamType & CopyParam);
  179. virtual bool __fastcall GetConfirmOverwriting();
  180. virtual void __fastcall SetConfirmOverwriting(bool value);
  181. bool __fastcall GetConfirmResume();
  182. void __fastcall SetConfirmResume(bool value);
  183. bool __fastcall GetAutoReadDirectoryAfterOp();
  184. void __fastcall SetAutoReadDirectoryAfterOp(bool value);
  185. virtual bool __fastcall GetRememberPassword();
  186. UnicodeString __fastcall GetReleaseType();
  187. UnicodeString __fastcall LoadCustomIniFileStorageName();
  188. void __fastcall SaveCustomIniFileStorageName();
  189. UnicodeString __fastcall GetRegistryStorageOverrideKey();
  190. TStrings * GetCaches();
  191. virtual UnicodeString __fastcall ModuleFileName();
  192. UnicodeString __fastcall GetFileFileInfoString(const UnicodeString Key,
  193. const UnicodeString FileName, bool AllowEmpty = false);
  194. void * __fastcall GetFileApplicationInfo(const UnicodeString FileName);
  195. UnicodeString __fastcall GetFileProductVersion(const UnicodeString FileName);
  196. UnicodeString __fastcall GetFileProductName(const UnicodeString FileName);
  197. UnicodeString __fastcall GetFileCompanyName(const UnicodeString FileName);
  198. __property bool PermanentLogging = { read=GetLogging, write=SetLogging };
  199. __property UnicodeString PermanentLogFileName = { read=GetLogFileName, write=SetLogFileName };
  200. __property bool PermanentLogActions = { read=GetLogActions, write=SetLogActions };
  201. __property UnicodeString PermanentActionsLogFileName = { read=GetPermanentActionsLogFileName, write=SetActionsLogFileName };
  202. __property int PermanentLogProtocol = { read=FPermanentLogProtocol, write=SetLogProtocol };
  203. __property bool PermanentLogSensitive = { read=FPermanentLogSensitive, write=SetLogSensitive };
  204. __property __int64 PermanentLogMaxSize = { read=GetLogMaxSize, write=SetLogMaxSize };
  205. __property int PermanentLogMaxCount = { read=GetLogMaxCount, write=SetLogMaxCount };
  206. public:
  207. __fastcall TConfiguration();
  208. virtual __fastcall ~TConfiguration();
  209. virtual void __fastcall Default();
  210. virtual void __fastcall UpdateStaticUsage();
  211. void __fastcall Load(THierarchicalStorage * Storage);
  212. void __fastcall Save();
  213. void __fastcall SaveExplicit();
  214. void __fastcall MoveStorage(TStorage AStorage, const UnicodeString & ACustomIniFileStorageName);
  215. void __fastcall ScheduleCustomIniFileStorageUse(const UnicodeString & ACustomIniFileStorageName);
  216. void __fastcall SetExplicitIniFileStorageName(const UnicodeString & FileName);
  217. void __fastcall SetNulStorage();
  218. UnicodeString __fastcall GetAutomaticIniFileStorageName(bool ReadingOnly);
  219. UnicodeString __fastcall GetDefaultIniFileExportPath();
  220. UnicodeString __fastcall GetIniFileParamValue();
  221. void __fastcall Export(const UnicodeString & FileName);
  222. void __fastcall Import(const UnicodeString & FileName);
  223. void __fastcall CleanupConfiguration();
  224. void __fastcall CleanupIniFile();
  225. void __fastcall CleanupCaches();
  226. bool __fastcall HasAnyCache();
  227. void __fastcall CleanupRandomSeedFile();
  228. void __fastcall BeginUpdate();
  229. void __fastcall EndUpdate();
  230. void __fastcall DontSave();
  231. void __fastcall LoadDirectoryChangesCache(const UnicodeString SessionKey,
  232. TRemoteDirectoryChangesCache * DirectoryChangesCache);
  233. void __fastcall SaveDirectoryChangesCache(const UnicodeString SessionKey,
  234. TRemoteDirectoryChangesCache * DirectoryChangesCache);
  235. TStrings * __fastcall LoadDirectoryStatisticsCache(
  236. const UnicodeString & SessionKey, const UnicodeString & Path, const TCopyParamType & CopyParam);
  237. void __fastcall SaveDirectoryStatisticsCache(
  238. const UnicodeString & SessionKey, const UnicodeString & Path, const TCopyParamType & CopyParam, TStrings * DataList);
  239. bool __fastcall ShowBanner(const UnicodeString & SessionKey, const UnicodeString & Banner, unsigned int & Params);
  240. void __fastcall NeverShowBanner(const UnicodeString & SessionKey, const UnicodeString & Banner);
  241. void __fastcall SetBannerParams(const UnicodeString & SessionKey, unsigned int Params);
  242. void __fastcall RememberLastFingerprint(const UnicodeString & SiteKey, const UnicodeString & FingerprintType, const UnicodeString & Fingerprint);
  243. UnicodeString __fastcall LastFingerprint(const UnicodeString & SiteKey, const UnicodeString & FingerprintType);
  244. THierarchicalStorage * CreateConfigStorage();
  245. THierarchicalStorage * CreateConfigRegistryStorage();
  246. virtual THierarchicalStorage * CreateScpStorage(bool & SessionList);
  247. void __fastcall TemporaryLogging(const UnicodeString ALogFileName);
  248. void __fastcall TemporaryActionsLogging(const UnicodeString ALogFileName);
  249. void __fastcall TemporaryLogProtocol(int ALogProtocol);
  250. void __fastcall TemporaryLogSensitive(bool ALogSensitive);
  251. void __fastcall TemporaryLogMaxSize(__int64 ALogMaxSize);
  252. void __fastcall TemporaryLogMaxCount(int ALogMaxCount);
  253. virtual RawByteString __fastcall EncryptPassword(UnicodeString Password, UnicodeString Key);
  254. virtual UnicodeString __fastcall DecryptPassword(RawByteString Password, UnicodeString Key);
  255. virtual RawByteString __fastcall StronglyRecryptPassword(RawByteString Password, UnicodeString Key);
  256. UnicodeString __fastcall GetFileDescription(const UnicodeString & FileName);
  257. UnicodeString __fastcall GetFileVersion(const UnicodeString & FileName);
  258. UnicodeString __fastcall GetFileMimeType(const UnicodeString & FileName);
  259. bool RegistryPathExists(const UnicodeString & RegistryPath);
  260. bool HasLocalPortNumberLimits();
  261. virtual UnicodeString TemporaryDir(bool Mask = false) = 0;
  262. UnicodeString FormatVersionStr(bool IncludeOfficialBuildNumber);
  263. TStoredSessionList * __fastcall SelectFilezillaSessionsForImport(
  264. TStoredSessionList * Sessions, UnicodeString & Error);
  265. bool __fastcall AnyFilezillaSessionForImport(TStoredSessionList * Sessions);
  266. TStoredSessionList * __fastcall SelectKnownHostsSessionsForImport(
  267. TStoredSessionList * Sessions, UnicodeString & Error);
  268. TStoredSessionList * __fastcall SelectKnownHostsSessionsForImport(
  269. TStrings * Lines, TStoredSessionList * Sessions, UnicodeString & Error);
  270. TStoredSessionList * SelectOpensshSessionsForImport(TStoredSessionList * Sessions, UnicodeString & Error);
  271. UnicodeString GetPuttySessionsKey(const UnicodeString & RootKey);
  272. __property TVSFixedFileInfo *FixedApplicationInfo = { read=GetFixedApplicationInfo };
  273. __property void * ApplicationInfo = { read=GetApplicationInfo };
  274. __property TUsage * Usage = { read = FUsage };
  275. __property bool CollectUsage = { read = GetCollectUsage, write = SetCollectUsage };
  276. __property UnicodeString StoredSessionsSubKey = {read=GetStoredSessionsSubKey};
  277. __property UnicodeString PuttyRegistryStorageKey = { read=FPuttyRegistryStorageKey, write=SetPuttyRegistryStorageKey };
  278. __property UnicodeString PuttySessionsKey = { read=DoGetPuttySessionsKey };
  279. __property UnicodeString PuttySessionsSubKey = { read=GetPuttySessionsSubKey };
  280. __property UnicodeString RandomSeedFile = { read=FRandomSeedFile, write=SetRandomSeedFile };
  281. __property UnicodeString RandomSeedFileName = { read=GetRandomSeedFileName };
  282. __property UnicodeString SshHostKeysSubKey = { read=GetSshHostKeysSubKey };
  283. __property UnicodeString RootKeyStr = { read=GetRootKeyStr };
  284. __property UnicodeString ConfigurationSubKey = { read=GetConfigurationSubKey };
  285. __property TEOLType LocalEOLType = { read = GetLocalEOLType };
  286. __property UnicodeString VersionStr = { read=GetVersionStr };
  287. __property UnicodeString Version = { read=GetVersion };
  288. __property int CompoundVersion = { read=GetCompoundVersion };
  289. __property UnicodeString ProductVersion = { read=GetProductVersion };
  290. __property UnicodeString ProductName = { read=GetProductName };
  291. __property UnicodeString CompanyName = { read=GetCompanyName };
  292. __property bool IsUnofficial = { read = GetIsUnofficial };
  293. __property bool Logging = { read=FLogging, write=SetLogging };
  294. __property UnicodeString LogFileName = { read=FLogFileName, write=SetLogFileName };
  295. __property bool LogToFile = { read=GetLogToFile };
  296. __property bool LogFileAppend = { read=FLogFileAppend, write=SetLogFileAppend };
  297. __property bool LogSensitive = { read=FLogSensitive, write=SetLogSensitive };
  298. __property __int64 LogMaxSize = { read=FLogMaxSize, write=SetLogMaxSize };
  299. __property int LogMaxCount = { read=FLogMaxCount, write=SetLogMaxCount };
  300. __property int LogProtocol = { read=FLogProtocol, write=SetLogProtocol };
  301. __property int ActualLogProtocol = { read=FActualLogProtocol };
  302. __property bool LogActions = { read=FLogActions, write=SetLogActions };
  303. __property bool LogActionsRequired = { read=FLogActionsRequired, write=FLogActionsRequired };
  304. __property UnicodeString ActionsLogFileName = { read=GetActionsLogFileName, write=SetActionsLogFileName };
  305. __property UnicodeString DefaultLogFileName = { read=GetDefaultLogFileName };
  306. __property TNotifyEvent OnChange = { read = FOnChange, write = FOnChange };
  307. __property bool ConfirmOverwriting = { read = GetConfirmOverwriting, write = SetConfirmOverwriting};
  308. __property bool ConfirmResume = { read = GetConfirmResume, write = SetConfirmResume};
  309. __property bool AutoReadDirectoryAfterOp = { read = GetAutoReadDirectoryAfterOp, write = SetAutoReadDirectoryAfterOp};
  310. __property bool RememberPassword = { read = GetRememberPassword };
  311. __property UnicodeString PartialExt = {read=GetPartialExt};
  312. __property int SessionReopenAuto = { read = FSessionReopenAuto, write = SetSessionReopenAuto };
  313. __property int SessionReopenBackground = { read = FSessionReopenBackground, write = SetSessionReopenBackground };
  314. __property int SessionReopenTimeout = { read = FSessionReopenTimeout, write = SetSessionReopenTimeout };
  315. __property int SessionReopenAutoStall = { read = FSessionReopenAutoStall, write = SetSessionReopenAutoStall };
  316. __property int TunnelLocalPortNumberLow = { read = FTunnelLocalPortNumberLow, write = SetTunnelLocalPortNumberLow };
  317. __property int TunnelLocalPortNumberHigh = { read = FTunnelLocalPortNumberHigh, write = SetTunnelLocalPortNumberHigh };
  318. __property int CacheDirectoryChangesMaxSize = { read = FCacheDirectoryChangesMaxSize, write = SetCacheDirectoryChangesMaxSize };
  319. __property bool ShowFtpWelcomeMessage = { read = FShowFtpWelcomeMessage, write = SetShowFtpWelcomeMessage };
  320. __property UnicodeString ExternalIpAddress = { read = FExternalIpAddress, write = SetExternalIpAddress };
  321. __property UnicodeString CertificateStorage = { read = FCertificateStorage, write = SetCertificateStorage };
  322. __property UnicodeString CertificateStorageExpanded = { read = GetCertificateStorageExpanded };
  323. __property UnicodeString ChecksumCommands = { read = FChecksumCommands };
  324. __property int LocalPortNumberMin = { read = FLocalPortNumberMin, write = SetLocalPortNumberMin };
  325. __property int LocalPortNumberMax = { read = FLocalPortNumberMax, write = SetLocalPortNumberMax };
  326. __property bool TryFtpWhenSshFails = { read = FTryFtpWhenSshFails, write = SetTryFtpWhenSshFails };
  327. __property int ParallelDurationThreshold = { read = FParallelDurationThreshold, write = SetParallelDurationThreshold };
  328. __property UnicodeString MimeTypes = { read = FMimeTypes, write = SetMimeTypes };
  329. __property int DontReloadMoreThanSessions = { read = FDontReloadMoreThanSessions, write = FDontReloadMoreThanSessions };
  330. __property int ScriptProgressFileNameLimit = { read = FScriptProgressFileNameLimit, write = FScriptProgressFileNameLimit };
  331. __property int KeyVersion = { read = FKeyVersion, write = FKeyVersion };
  332. __property UnicodeString TimeFormat = { read = GetTimeFormat };
  333. __property TStorage Storage = { read=GetStorage };
  334. __property UnicodeString RegistryStorageKey = { read=GetRegistryStorageKey };
  335. __property UnicodeString CustomIniFileStorageName = { read=FCustomIniFileStorageName };
  336. __property UnicodeString ExplicitIniFileStorageName = { read=FIniFileStorageName };
  337. __property UnicodeString IniFileStorageName = { read=GetIniFileStorageNameForReadingWriting };
  338. __property UnicodeString IniFileStorageNameForReading = { read=GetIniFileStorageNameForReading };
  339. __property TStrings * OptionsStorage = { read = GetOptionsStorage, write = SetOptionsStorage };
  340. __property bool Persistent = { read = GetPersistent };
  341. __property bool ForceSave = { read = FForceSave, write = FForceSave };
  342. __property bool Scripting = { read = FScripting, write = FScripting };
  343. __property UnicodeString DefaultKeyFile = { read = GetDefaultKeyFile };
  344. __property bool DisablePasswordStoring = { read = FDisablePasswordStoring };
  345. __property bool ForceBanners = { read = FForceBanners };
  346. __property bool DisableAcceptingHostKeys = { read = FDisableAcceptingHostKeys };
  347. };
  348. //---------------------------------------------------------------------------
  349. class TShortCuts
  350. {
  351. public:
  352. void __fastcall Add(TShortCut ShortCut);
  353. bool __fastcall Has(TShortCut ShortCut) const;
  354. private:
  355. std::set<TShortCut> FShortCuts;
  356. };
  357. //---------------------------------------------------------------------------
  358. extern const UnicodeString OriginalPuttyRegistryStorageKey;
  359. extern const UnicodeString KittyRegistryStorageKey;
  360. extern const UnicodeString OriginalPuttyExecutable;
  361. extern const UnicodeString KittyExecutable;
  362. //---------------------------------------------------------------------------
  363. extern const UnicodeString Sha1ChecksumAlg;
  364. extern const UnicodeString Sha224ChecksumAlg;
  365. extern const UnicodeString Sha256ChecksumAlg;
  366. extern const UnicodeString Sha384ChecksumAlg;
  367. extern const UnicodeString Sha512ChecksumAlg;
  368. extern const UnicodeString Md5ChecksumAlg;
  369. extern const UnicodeString Crc32ChecksumAlg;
  370. //---------------------------------------------------------------------------
  371. extern const UnicodeString SshFingerprintType;
  372. extern const UnicodeString TlsFingerprintType;
  373. //---------------------------------------------------------------------------
  374. extern const UnicodeString FtpsCertificateStorageKey;
  375. extern const UnicodeString HttpsCertificateStorageKey;
  376. //---------------------------------------------------------------------------
  377. extern const int BelowNormalLogLevels;
  378. //---------------------------------------------------------------------------
  379. extern const UnicodeString OpensshFolderName;
  380. extern const UnicodeString OpensshAuthorizedKeysFileName;
  381. //---------------------------------------------------------------------------
  382. #endif