unit uIdTCPServer;

interface

uses Classes, Rubies;

var
  cIdTCPServer: Tvalue;

function ap_cIdTCPServer: Tvalue;
procedure Init_IdTCPServer;

implementation

uses
  SysUtils, uDefUtils, Pythia, IdTCPServer, IdHandle, uIndy, uIdTCPConnection;

function ap_cIdTCPServer: Tvalue;
begin
  result := cIdTCPServer;
end;

procedure IdTCPServer_setup(obj: Tvalue; real: TIdTCPServer);
begin
end;

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

procedure Init_IdTCPServer;
begin
  cIdTCPServer := rb_define_class_under(mIndy, 'IdTCPServer', cIdTCPConnection);
  DefineProp(cIdTCPServer, TIdTCPServer);
  rb_define_method(cIdTCPServer, 'event_handle', @IdTCPServer_event_handle, 1);
end;

end.
