Interface.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. const int qpIgnoreAbort = 0x08;
  36. struct TQueryButtonAlias
  37. {
  38. TQueryButtonAlias();
  39. unsigned int Button;
  40. AnsiString Alias;
  41. TNotifyEvent OnClick;
  42. };
  43. typedef void __fastcall (__closure *TQueryParamsTimerEvent)(unsigned int & Result);
  44. struct TQueryParams
  45. {
  46. TQueryParams(unsigned int AParams = 0, AnsiString AHelpKeyword = HELP_NONE);
  47. const TQueryButtonAlias * Aliases;
  48. unsigned int AliasesCount;
  49. unsigned int Params;
  50. unsigned int Timer;
  51. TQueryParamsTimerEvent TimerEvent;
  52. AnsiString TimerMessage;
  53. unsigned int TimerAnswers;
  54. unsigned int Timeout;
  55. unsigned int TimeoutAnswer;
  56. unsigned int NoBatchAnswers;
  57. AnsiString HelpKeyword;
  58. };
  59. enum TQueryType { qtConfirmation, qtWarning, qtError, qtInformation };
  60. enum TPromptKind
  61. {
  62. pkPrompt,
  63. pkFileName,
  64. pkUserName,
  65. pkPassphrase,
  66. pkTIS,
  67. pkCryptoCard,
  68. pkKeybInteractive,
  69. pkPassword,
  70. pkNewPassword
  71. };
  72. bool __fastcall IsAuthenticationPrompt(TPromptKind Kind);
  73. //---------------------------------------------------------------------------
  74. typedef void __fastcall (__closure *TFileFoundEvent)
  75. (TTerminal * Terminal, const AnsiString FileName, const TRemoteFile * File,
  76. bool & Cancel);
  77. typedef void __fastcall (__closure *TFindingFileEvent)
  78. (TTerminal * Terminal, const AnsiString Directory, bool & Cancel);
  79. //---------------------------------------------------------------------------
  80. #endif