4.2.42. GNATCOLL.Remote

package GNATCOLL.Remote is

   --  Server definition

   type Server_Record is interface;
   type Server_Access is access all Server_Record'Class;

   function Nickname
     (Server : Server_Record) return String is abstract;
   function Shell_FS
     (Server : Server_Record) return FS_Type is abstract;

   procedure Execute_Remotely
     (Server              : access Server_Record;
      Args                : GNAT.Strings.String_List;
      Status              : out Boolean;
      Execution_Directory : FS_String := "") is abstract;
   procedure Execute_Remotely
     (Server              : access Server_Record;
      Args                : GNAT.Strings.String_List;
      Result              : out GNAT.Strings.String_Access;
      Status              : out Boolean;
      Execution_Directory : FS_String := "") is abstract;
   --  You must override this subprogram to do the actual spawn of a command on
   --  the specified remote host.

   --  Execution_Directory is the directory in which the command must be run.
   --  The command to execute is passed as the first parameter in Args. Args
   --  must not be freed by these procedure.

   procedure Spawn_Remotely
     (Server              : access Server_Record;
      Descriptor          : out GNAT.Expect.Process_Descriptor_Access;
      Args                : GNAT.Strings.String_List) is abstract;
   --  Spawn a process on the remote machine.
   --  As opposed to Execute_Remotely, this one does not wait until the
   --  process as terminated. Instead, it allows users to interact with the
   --  process by sending commands to it and fetching its output.

end GNATCOLL.Remote;