IdRegisterOpenSSL.pas 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 IdRegisterOpenSSL;
  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. {$IFDEF HAS_TSelectionEditor}
  31. type
  32. TIdOpenSSLSelectionEditor = class(TSelectionEditor)
  33. public
  34. procedure RequiresUnits(Proc: TGetStrProc); override;
  35. end;
  36. {$ENDIF}
  37. procedure Register;
  38. implementation
  39. uses
  40. IdDsnCoreResourceStrings, // for RSRegIndyIOHandlers in dclIndyCore package
  41. {$IFDEF FPC}
  42. IdDsnResourceStrings, // for RSProt in dclIndyProtocols package
  43. LResources,
  44. {$ENDIF}
  45. IdSSLOpenSSL;
  46. {$IFNDEF FPC}
  47. {$R IdRegisterOpenSSL.dcr}
  48. {$ENDIF}
  49. {$IFDEF HAS_TSelectionEditor}
  50. {TIdOpenSSLSelectionEditor}
  51. procedure TIdOpenSSLSelectionEditor.RequiresUnits(Proc: TGetStrProc);
  52. begin
  53. inherited RequiresUnits(Proc);
  54. //for new callback event
  55. Proc('IdCTypes'); {Do not localize}
  56. Proc('IdSSLOpenSSLHeaders'); {Do not localize}
  57. end;
  58. {$ENDIF}
  59. procedure Register;
  60. begin
  61. RegisterComponents(RSRegIndyIOHandlers{$IFDEF FPC}+RSProt{$ENDIF}, [
  62. TIdServerIOHandlerSSLOpenSSL,
  63. TIdSSLIOHandlerSocketOpenSSL
  64. ]);
  65. {$IFDEF HAS_TSelectionEditor}
  66. RegisterSelectionEditor(TIdServerIOHandlerSSLOpenSSL, TIdOpenSSLSelectionEditor);
  67. RegisterSelectionEditor(TIdSSLIOHandlerSocketOpenSSL, TIdOpenSSLSelectionEditor);
  68. {$ENDIF}
  69. end;
  70. {$IFDEF FPC}
  71. initialization
  72. {$i IdRegisterOpenSSL.lrs}
  73. {$ENDIF}
  74. end.