IdDsnRegisterOpenSSL.pas 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {
  2. This file is part of the Indy (Internet Direct) project, and is offered
  3. under the dual-licensing agreement described on the Indy website.
  4. (http://www.indyproject.org/)
  5. Copyright:
  6. (c) 1993-2024, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
  7. }
  8. unit IdDsnRegisterOpenSSL;
  9. interface
  10. {$I IdCompilerDefines.inc}
  11. uses
  12. Classes,
  13. {$IFDEF DOTNET}
  14. Borland.Vcl.Design.DesignIntF,
  15. Borland.Vcl.Design.DesignEditors
  16. {$ELSE}
  17. {$IFDEF FPC}
  18. PropEdits,
  19. ComponentEditors
  20. {$ELSE}
  21. {$IFDEF VCL_6_OR_ABOVE}
  22. DesignIntf,
  23. DesignEditors
  24. {$ELSE}
  25. Dsgnintf
  26. {$ENDIF}
  27. {$ENDIF}
  28. {$ENDIF}
  29. ;
  30. type
  31. {$IFDEF HAS_TSelectionEditor}
  32. TIdOpenSSLSelectionEditor = class(TSelectionEditor)
  33. public
  34. procedure RequiresUnits(Proc: TGetStrProc); override;
  35. end;
  36. {$ENDIF}
  37. procedure Register;
  38. implementation
  39. {$IFDEF HAS_TSelectionEditor}
  40. uses
  41. IdSSLOpenSSL;
  42. {TIdOpenSSLSelectionEditor}
  43. procedure TIdOpenSSLSelectionEditor.RequiresUnits(Proc: TGetStrProc);
  44. begin
  45. inherited RequiresUnits(Proc);
  46. //for new callback event
  47. Proc('IdCTypes'); {Do not localize}
  48. Proc('IdSSLOpenSSLHeaders'); {Do not localize}
  49. end;
  50. {$ENDIF}
  51. procedure Register;
  52. begin
  53. {$IFDEF HAS_TSelectionEditor}
  54. RegisterSelectionEditor(TIdServerIOHandlerSSLOpenSSL, TIdOpenSSLSelectionEditor);
  55. RegisterSelectionEditor(TIdSSLIOHandlerSocketOpenSSL, TIdOpenSSLSelectionEditor);
  56. {$ENDIF}
  57. end;
  58. end.