123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- //---------------------------------------------------------------------------
- #ifndef InterfaceH
- #define InterfaceH
- //---------------------------------------------------------------------------
- #include "Configuration.h"
- #include "SessionData.h"
- #define HELP_NONE ""
- //---------------------------------------------------------------------------
- TConfiguration * __fastcall CreateConfiguration();
- void __fastcall ShowExtendedException(Exception * E);
- UnicodeString __fastcall GetRegistryKey();
- void __fastcall Busy(bool Start);
- UnicodeString __fastcall AppNameString();
- UnicodeString __fastcall SshVersionString();
- void __fastcall CopyToClipboard(UnicodeString Text);
- int __fastcall StartThread(void * SecurityAttributes, unsigned StackSize,
- TThreadFunc ThreadFunc, void * Parameter, unsigned CreationFlags,
- TThreadID & ThreadId);
- // Order of the values also define order of the buttons/answers on the prompts
- // MessageDlg relies on these to be <= 0x0000FFFF
- const unsigned int qaYes = 0x00000001;
- // MessageDlg relies that answer do not conflict with mrCancel (=0x2)
- const unsigned int qaNo = 0x00000004;
- const unsigned int qaOK = 0x00000008;
- const unsigned int qaCancel = 0x00000010;
- const unsigned int qaYesToAll = 0x00000020;
- const unsigned int qaNoToAll = 0x00000040;
- const unsigned int qaAbort = 0x00000080;
- const unsigned int qaRetry = 0x00000100;
- const unsigned int qaIgnore = 0x00000200;
- const unsigned int qaSkip = 0x00000400;
- const unsigned int qaAll = 0x00000800;
- const unsigned int qaHelp = 0x00001000;
- const unsigned int qaReport = 0x00002000;
- const unsigned int qaFirst = qaYes;
- const unsigned int qaLast = qaReport;
- const unsigned int qaNeverAskAgain = 0x00010000;
- const int qpFatalAbort = 0x01;
- const int qpNeverAskAgainCheck = 0x02;
- const int qpAllowContinueOnError = 0x04;
- const int qpIgnoreAbort = 0x08;
- struct TQueryButtonAlias
- {
- TQueryButtonAlias();
- unsigned int Button;
- UnicodeString Alias;
- TNotifyEvent OnClick;
- int GroupWith;
- TShiftState GrouppedShiftState;
- };
- typedef void __fastcall (__closure *TQueryParamsTimerEvent)(unsigned int & Result);
- struct TQueryParams
- {
- TQueryParams(unsigned int AParams = 0, UnicodeString AHelpKeyword = HELP_NONE);
- TQueryParams(const TQueryParams & Source);
- void Assign(const TQueryParams & Source);
- const TQueryButtonAlias * Aliases;
- unsigned int AliasesCount;
- unsigned int Params;
- unsigned int Timer;
- TQueryParamsTimerEvent TimerEvent;
- UnicodeString TimerMessage;
- unsigned int TimerAnswers;
- unsigned int Timeout;
- unsigned int TimeoutAnswer;
- unsigned int NoBatchAnswers;
- UnicodeString HelpKeyword;
- };
- enum TQueryType { qtConfirmation, qtWarning, qtError, qtInformation };
- enum TPromptKind
- {
- pkPrompt,
- pkFileName,
- pkUserName,
- pkPassphrase,
- pkTIS,
- pkCryptoCard,
- pkKeybInteractive,
- pkPassword,
- pkNewPassword
- };
- enum TPromptUserParam { pupEcho = 0x01, pupRemember = 0x02 };
- bool __fastcall IsAuthenticationPrompt(TPromptKind Kind);
- //---------------------------------------------------------------------------
- typedef void __fastcall (__closure *TFileFoundEvent)
- (TTerminal * Terminal, const UnicodeString FileName, const TRemoteFile * File,
- bool & Cancel);
- typedef void __fastcall (__closure *TFindingFileEvent)
- (TTerminal * Terminal, const UnicodeString Directory, bool & Cancel);
- //---------------------------------------------------------------------------
- #endif
|