with File_Transfer;
with Ftp_Defs;
with Profile;
package Ftp_Interface is

    type Channel is private;  -- handle for remote connection.

    procedure Open (Chan : out Channel;
                    To_Machine : String;
                    Status : out Ftp_Defs.Status_Code;
                    Log_Responses : Boolean := False;
                    Response : Profile.Response_Profile := Profile.Get);

    procedure Connect (Chan : in out Channel;
                       To_Machine : String;
                       For_User : String;
                       With_Password : String;
                       Status : out Ftp_Defs.Status_Code;
                       Log_Responses : Boolean := False;
                       Response : Profile.Response_Profile := Profile.Get);

    procedure Open (Chan : out Channel;
                    To_Machine : String;
                    For_User : String;
                    With_Password : String;
                    Status : out Ftp_Defs.Status_Code;
                    Log_Responses : Boolean := False;
                    Response : Profile.Response_Profile := Profile.Get);

    ---  Opens connection to remote machine using user and password
    ---  information supplied.
    ---  STATUS returns final outcome of open.
    ---  A status of Ftp_defs.Successful indicates open worked.
    ---
    ---  LOG_RESPONSES - if true will log messages which will be filtered
    ---  according to the response profile.
    ---
    ---  If Log_responses if false not logging occurs.
    ---
    ---  RESPONSE - specifes logging filter values



    procedure Close (Chan : Channel);

    ---- Closes remote connection.


    procedure Abandon (Chan : Channel);

    ---- abandons remote connection




    type Transfer_Direction is (Send_To_Remote, Receive_From_Remote);


    procedure Transfer_File
                 (Chan : Channel;
                  Direction : Transfer_Direction;
                  Local_File_Name : String;
                  Remote_File_Name : String;
                  Status : out Ftp_Defs.Status_Code;
                  Log_Responses : Boolean := False;
                  Response : Profile.Response_Profile := Profile.Get);

    ---- Transfer file TO/FROM remote.

    ---- A status of FTP_DEFS.TRANSFER_COMPLETE indicates a
    ---- successful transfer.


    procedure Send (Chan : Channel; Who : String; Message : String);

    ---- place message in message_window of specified user (who)


    procedure Get_Status (Chan : Channel;
                          Cmd_Status : out Ftp_Defs.Status_Code;
                          Xfer_Status : out Ftp_Defs.Transfer_Status);

    ----
    ---- return command and transfer status of latest command.
    ----


private
    type Channel is new File_Transfer.Connect_Id;


end Ftp_Interface;