Interface.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. UnicodeString __fastcall GetRegistryKey();
  12. void __fastcall Busy(bool Start);
  13. UnicodeString __fastcall AppNameString();
  14. UnicodeString __fastcall SshVersionString();
  15. void __fastcall CopyToClipboard(UnicodeString Text);
  16. int __fastcall StartThread(void * SecurityAttributes, unsigned StackSize,
  17. TThreadFunc ThreadFunc, void * Parameter, unsigned CreationFlags,
  18. TThreadID & 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. UnicodeString Alias;
  41. TNotifyEvent OnClick;
  42. int GroupWith;
  43. TShiftState GrouppedShiftState;
  44. };
  45. typedef void __fastcall (__closure *TQueryParamsTimerEvent)(unsigned int & Result);
  46. struct TQueryParams
  47. {
  48. TQueryParams(unsigned int AParams = 0, UnicodeString AHelpKeyword = HELP_NONE);
  49. const TQueryButtonAlias * Aliases;
  50. unsigned int AliasesCount;
  51. unsigned int Params;
  52. unsigned int Timer;
  53. TQueryParamsTimerEvent TimerEvent;
  54. UnicodeString TimerMessage;
  55. unsigned int TimerAnswers;
  56. unsigned int Timeout;
  57. unsigned int TimeoutAnswer;
  58. unsigned int NoBatchAnswers;
  59. UnicodeString HelpKeyword;
  60. };
  61. enum TQueryType { qtConfirmation, qtWarning, qtError, qtInformation };
  62. enum TPromptKind
  63. {
  64. pkPrompt,
  65. pkFileName,
  66. pkUserName,
  67. pkPassphrase,
  68. pkTIS,
  69. pkCryptoCard,
  70. pkKeybInteractive,
  71. pkPassword,
  72. pkNewPassword
  73. };
  74. enum TPromptUserParam { pupEcho = 0x01, pupRemember = 0x02 };
  75. bool __fastcall IsAuthenticationPrompt(TPromptKind Kind);
  76. //---------------------------------------------------------------------------
  77. typedef void __fastcall (__closure *TFileFoundEvent)
  78. (TTerminal * Terminal, const UnicodeString FileName, const TRemoteFile * File,
  79. bool & Cancel);
  80. typedef void __fastcall (__closure *TFindingFileEvent)
  81. (TTerminal * Terminal, const UnicodeString Directory, bool & Cancel);
  82. //---------------------------------------------------------------------------
  83. #endif