Interface.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. pkUserName,
  63. pkPassphrase,
  64. pkTIS,
  65. pkCryptoCard,
  66. pkKeybInteractive,
  67. pkPassword,
  68. pkNewPassword
  69. };
  70. bool __fastcall IsAuthenticationPrompt(TPromptKind Kind);
  71. //---------------------------------------------------------------------------
  72. typedef void __fastcall (__closure *TFileFoundEvent)
  73. (TTerminal * Terminal, const AnsiString FileName, const TRemoteFile * File,
  74. bool & Cancel);
  75. typedef void __fastcall (__closure *TFindingFileEvent)
  76. (TTerminal * Terminal, const AnsiString Directory, bool & Cancel);
  77. //---------------------------------------------------------------------------
  78. #endif