unit uIdIntercept;

interface

uses Classes, Rubies;

var
  cIdConnectionIntercept: Tvalue;

function ap_cIdConnectionIntercept: Tvalue;
procedure Init_IdIntercept;

implementation

uses
  SysUtils, uDefUtils, Pythia, IdIntercept, IdHandle, uIndy;

function ap_cIdConnectionIntercept: Tvalue;
begin
  result := cIdConnectionIntercept;
end;

procedure IdConnectionIntercept_setup(obj: Tvalue; real: TIdConnectionIntercept);
begin
end;

function IdConnectionIntercept_event_handle(This, name: Tvalue): Tvalue; cdecl;
begin
  EventHandle(This, name, [Handle, PhiGetHandle]);
  result := Qnil;
end;

procedure Init_IdIntercept;
begin
  cIdConnectionIntercept := rb_define_class_under(mIndy, 'IdConnectionIntercept', ap_cComponent);
  DefineProp(cIdConnectionIntercept, TIdConnectionIntercept);
  rb_define_method(cIdConnectionIntercept, 'event_handle', @IdConnectionIntercept_event_handle, 1);
end;

end.
