DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦ca4802b29⟧ Ada Source

    Length: 8192 (0x2000)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Multi_Requests, seg_00f32c

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Profile;
with Simple_Status;
with Device_Independent_Io;

pragma Private_Eyes_Only;
with Remote_Operations;

generic
    Nb_Max_Connections : Positive;
    Idle_Time_Out : Duration;
package Multi_Requests is

    type Object_Id is private;

    procedure Init_Object (Object : in out Object_Id; Machine : in String);

    procedure Disconnect (C : in out Object_Id;
                          Status : out Simple_Status.Condition);

    -- Explicit termination of all connexions.
    procedure Shut_Down;


    procedure Create (Object : in Object_Id;
                      Remote_File : in String;
                      Is_Directory : in Boolean := False;
                      Status : out Simple_Status.Condition);
    -- Create the specified remote file. If necessary, directories in the path
    -- to the remote file are created. If Is_Directory is true, then
    -- Remote_File is itself a Directory.

    procedure Put (Object : in Object_Id;
                   From_Local_File : in String;
                   To_Remote_File : in String;
                   Status : out Simple_Status.Condition);
    procedure Put (Object : in Object_Id;
                   From_Local_File : in Device_Independent_Io.File_Type;
                   To_Remote_File : in String;
                   Status : out Simple_Status.Condition);
    -- Copy the content of the local file to the remote file. This will
    -- overlay an existing remote file. If the remote file does not exist,
    -- it will be created as long as all the enclosing directories in its
    -- path exist. (See Create, above, to ensure this).
    -- The local_file can either be a string_name or an already opened
    -- for reading Device_Independent_Io.File_Type.
    -- If the local has been opened by the caller, no close is applied

    procedure Get (Object : in Object_Id;
                   From_Remote_File : in String;
                   To_Local_File : in String;
                   Append_To_File : in Boolean;
                   Status : out Simple_Status.Condition);
    procedure Get (Object : in Object_Id;
                   From_Remote_File : in String;
                   To_Local_File : in Device_Independent_Io.File_Type;
                   Status : out Simple_Status.Condition);
    -- Copy the content of the remote file to the local file. This will overlay
    -- an existing local file or create an non existing local file.
    -- The local_file can either be a string_name or an already opened for
    -- writing Device_Independent_Io.File_Type.
    -- If the local has been opened by the caller, no close is applied

    procedure Last_Update (Object : in Object_Id;
                           Of_Remote_File : in String;
                           In_Seconds : out Integer;
                           Status : out Simple_Status.Condition);
    -- Return the last time the remote file was updated. May be used by clients
    -- to determine if Get/Put is really required.

    procedure Copy (Object : in Object_Id;
                    From_Remote_File : in String;
                    To_Remote_File : in String;
                    Link : in Boolean := False;
                    Status : out Simple_Status.Condition);
    -- Copy one remote file to another. If link is true, simulate the
    -- copy via a file system link (if supported by the remote file
    -- system). Otherwise, make a distinct physical copy (the default).

    procedure Delete (Object : in Object_Id;
                      Remote_File : in String;
                      Expunge : in Boolean := False;
                      Status : out Simple_Status.Condition);
    -- Remove the specified remote file. If expunge is true, remove all
    -- versions of the remote file (if supported by the remote file system).
    -- Expunge is not yet implemented for Unix.
    -- Remote_File can be a directory, in this case the directory is deleted
    -- only if it is empty.

    procedure Move (Object : in Object_Id;
                    From_Remote_File : in String;
                    To_Remote_File : in String;
                    Status : out Simple_Status.Condition);
    -- Functionnaly equivalent to Copy/Delete, but might be implemented
    -- more efficiently as a single operation on some remote file systems.

    -- procedure Ls (Object : in Object_Id;
    --               From_Remote_Directory : in String;
    --               Level : in Natural;
    --               To_Local_File : in String;
    --               Append_To_File : in Boolean;
    --               Status : out Simple_Status.Condition);
    -- procedure Ls (Object : in Object_Id;
    --               From_Remote_Directory : in String;
    --               Level : in Natural;
    --               To_Local_File : in Device_Independent_Io.File_Type;
    --               Status : out Simple_Status.Condition);
    -- -- Writes in the specified Local_File the content of the specified
    -- -- Remote_Directory in a "ls -lgR" like format. If level is zero, all
    -- -- levels are displayed. The local file can either be a string_name
    -- -- (which will be created if non existent).
    -- -- If the local has been opened by the caller, no close is applied

    procedure Input_To_Remote_Shell (Object : in Object_Id;
                                     Input : in String;
                                     Timeout : in Integer;
                                     Status : out Simple_Status.Condition);

    -- procedure Signal_To_Shell (Object : in Object_Id;
    --                            Signal : in Natural;
    --                            Status : out Simple_Status.Condition);
    -- -- send a signal to the remote shell.
    -- -- as the previous "input_to_shell" is synchronous, this call is not
    -- -- very useful but could, at least, be used to kill a current remote shell
    -- -- that won't be accessed any more to reduce to the remote machine load.

private

    type Object_Id is
        record
            Connection : Remote_Operations.Context;
            Open_Error : Simple_Status.Condition;
        end record;

    -- type Object_Id is
    --     record
    --         Lg_Machine : Natural := 0;
    --         Machine : String (1 .. 20);
    --         Lg_User_Name : Natural := 0;
    --         User_Name : String (1 .. 20);
    --         Lg_Password : Natural := 0;
    --         Password : String (1 .. 20);
    --     end record;

end Multi_Requests;

E3 Meta Data

    nblk1=7
    nid=0
    hdr6=e
        [0x00] rec0=21 rec1=00 rec2=01 rec3=04e
        [0x01] rec0=12 rec1=00 rec2=02 rec3=054
        [0x02] rec0=12 rec1=00 rec2=03 rec3=008
        [0x03] rec0=12 rec1=00 rec2=04 rec3=08e
        [0x04] rec0=15 rec1=00 rec2=05 rec3=026
        [0x05] rec0=11 rec1=00 rec2=06 rec3=014
        [0x06] rec0=15 rec1=00 rec2=07 rec3=000
    tail 0x2150b3218822a65c63809 0x42a00088462060003