Configuration.h 23 KB

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