Interface.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 SshVersionString();
  14. void __fastcall CopyToClipboard(AnsiString Text);
  15. int __fastcall StartThread(void * SecurityAttributes, unsigned StackSize,
  16. TThreadFunc ThreadFunc, void * Parameter, unsigned CreationFlags,
  17. unsigned & ThreadId);
  18. const unsigned int qaYes = 0x00000001;
  19. const unsigned int qaNo = 0x00000002;
  20. const unsigned int qaOK = 0x00000004;
  21. const unsigned int qaCancel = 0x00000008;
  22. const unsigned int qaAbort = 0x00000010;
  23. const unsigned int qaRetry = 0x00000020;
  24. const unsigned int qaIgnore = 0x00000040;
  25. const unsigned int qaAll = 0x00000080;
  26. const unsigned int qaNoToAll = 0x00000100;
  27. const unsigned int qaYesToAll = 0x00000200;
  28. const unsigned int qaHelp = 0x00000400;
  29. const unsigned int qaSkip = 0x00000800;
  30. const unsigned int qaNeverAskAgain = 0x00010000;
  31. const int qpFatalAbort = 0x01;
  32. const int qpNeverAskAgainCheck = 0x02;
  33. const int qpAllowContinueOnError = 0x04;
  34. struct TQueryButtonAlias
  35. {
  36. TQueryButtonAlias();
  37. unsigned int Button;
  38. AnsiString Alias;
  39. TNotifyEvent OnClick;
  40. };
  41. typedef void __fastcall (__closure *TQueryParamsTimerEvent)(unsigned int & Result);
  42. struct TQueryParams
  43. {
  44. TQueryParams(unsigned int AParams = 0, AnsiString AHelpKeyword = HELP_NONE);
  45. const TQueryButtonAlias * Aliases;
  46. unsigned int AliasesCount;
  47. unsigned int Params;
  48. unsigned int Timer;
  49. TQueryParamsTimerEvent TimerEvent;
  50. AnsiString TimerMessage;
  51. unsigned int TimerAnswers;
  52. unsigned int Timeout;
  53. unsigned int TimeoutAnswer;
  54. unsigned int NoBatchAnswers;
  55. AnsiString HelpKeyword;
  56. };
  57. enum TQueryType { qtConfirmation, qtWarning, qtError, qtInformation };
  58. enum TPromptKind
  59. {
  60. pkPrompt,
  61. pkUserName,
  62. pkPassphrase,
  63. pkTIS,
  64. pkCryptoCard,
  65. pkKeybInteractive,
  66. pkPassword,
  67. pkNewPassword
  68. };
  69. bool __fastcall IsAuthenticationPrompt(TPromptKind Kind);
  70. //---------------------------------------------------------------------------
  71. #endif