Interface.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. AnsiString HelpKeyword;
  55. };
  56. enum TQueryType { qtConfirmation, qtWarning, qtError, qtInformation };
  57. enum TPromptKind
  58. {
  59. pkPrompt,
  60. pkUserName,
  61. pkPassphrase,
  62. pkTIS,
  63. pkCryptoCard,
  64. pkKeybInteractive,
  65. pkPassword,
  66. pkNewPassword
  67. };
  68. bool __fastcall IsAuthenticationPrompt(TPromptKind Kind);
  69. //---------------------------------------------------------------------------
  70. #endif