Interface.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. //---------------------------------------------------------------------------
  2. #ifndef InterfaceH
  3. #define InterfaceH
  4. //---------------------------------------------------------------------------
  5. #include "Configuration.h"
  6. #include "SessionData.h"
  7. #define HELP_NONE ""
  8. //---------------------------------------------------------------------------
  9. TConfiguration * __fastcall CreateConfiguration();
  10. void __fastcall ShowExtendedException(Exception * E);
  11. AnsiString __fastcall GetRegistryKey();
  12. void __fastcall Busy(bool Start);
  13. AnsiString __fastcall AppNameString();
  14. AnsiString __fastcall SshVersionString();
  15. void __fastcall CopyToClipboard(AnsiString Text);
  16. int __fastcall StartThread(void * SecurityAttributes, unsigned StackSize,
  17. TThreadFunc ThreadFunc, void * Parameter, unsigned CreationFlags,
  18. unsigned & ThreadId);
  19. const unsigned int qaYes = 0x00000001;
  20. const unsigned int qaNo = 0x00000002;
  21. const unsigned int qaOK = 0x00000004;
  22. const unsigned int qaCancel = 0x00000008;
  23. const unsigned int qaAbort = 0x00000010;
  24. const unsigned int qaRetry = 0x00000020;
  25. const unsigned int qaIgnore = 0x00000040;
  26. const unsigned int qaAll = 0x00000080;
  27. const unsigned int qaNoToAll = 0x00000100;
  28. const unsigned int qaYesToAll = 0x00000200;
  29. const unsigned int qaHelp = 0x00000400;
  30. const unsigned int qaSkip = 0x00000800;
  31. const unsigned int qaNeverAskAgain = 0x00010000;
  32. const int qpFatalAbort = 0x01;
  33. const int qpNeverAskAgainCheck = 0x02;
  34. const int qpAllowContinueOnError = 0x04;
  35. struct TQueryButtonAlias
  36. {
  37. TQueryButtonAlias();
  38. unsigned int Button;
  39. AnsiString Alias;
  40. TNotifyEvent OnClick;
  41. };
  42. typedef void __fastcall (__closure *TQueryParamsTimerEvent)(unsigned int & Result);
  43. struct TQueryParams
  44. {
  45. TQueryParams(unsigned int AParams = 0, AnsiString AHelpKeyword = HELP_NONE);
  46. const TQueryButtonAlias * Aliases;
  47. unsigned int AliasesCount;
  48. unsigned int Params;
  49. unsigned int Timer;
  50. TQueryParamsTimerEvent TimerEvent;
  51. AnsiString TimerMessage;
  52. unsigned int TimerAnswers;
  53. unsigned int Timeout;
  54. unsigned int TimeoutAnswer;
  55. unsigned int NoBatchAnswers;
  56. AnsiString HelpKeyword;
  57. };
  58. enum TQueryType { qtConfirmation, qtWarning, qtError, qtInformation };
  59. enum TPromptKind
  60. {
  61. pkPrompt,
  62. pkFileName,
  63. pkUserName,
  64. pkPassphrase,
  65. pkTIS,
  66. pkCryptoCard,
  67. pkKeybInteractive,
  68. pkPassword,
  69. pkNewPassword
  70. };
  71. bool __fastcall IsAuthenticationPrompt(TPromptKind Kind);
  72. //---------------------------------------------------------------------------
  73. typedef void __fastcall (__closure *TFileFoundEvent)
  74. (TTerminal * Terminal, const AnsiString FileName, const TRemoteFile * File,
  75. bool & Cancel);
  76. typedef void __fastcall (__closure *TFindingFileEvent)
  77. (TTerminal * Terminal, const AnsiString Directory, bool & Cancel);
  78. //---------------------------------------------------------------------------
  79. #endif