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

⟦e9f1e4c82⟧ Ada Source

    Length: 51200 (0xc800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Dtia_Client, pragma Module_Name 4 3997, pragma Subsystem Tools_Integration, seg_00f29f

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 Action;
with Device_Independent_Io;
with Directory;
with Gateway_Object;
with Profile;
with Simple_Status;
with System;
with System_Utilities;
package Dtia_Client is

    -- This is the package that provides the interface from DTIA
    -- integration products and the DTIA mechanisms themselves.
    -- Integration products instantiate the generic.  Environment
    -- operations will then call the generic formals when various
    -- common commands are executed from the environment.

    type Error_Counts is
        record
            Warnings : Natural := 0;
            Errors   : Natural := 0;
            Fatal    : Boolean := False;
        end record;
    --
    -- Error_Counts is used to accumulate errors made on successive calls
    -- to certain operations.  It provides a convenient way to store
    -- error counts for later examination.  You can set Fatal to indicate
    -- that the operation should stop.


    -- Types and constants for server termination operation.  See
    -- Dtia_Client_Operations.Terminate_Server for details.
    --
    subtype Termination_Condition is Natural range 0 .. 63;
    --
    Unknown_Condition         : constant Termination_Condition := 0;
    Session_Ends              : constant Termination_Condition := 1;
    Gateway_Class_Deactivated : constant Termination_Condition := 2;

    function Image (C : Termination_Condition) return String;


    type Image_Id is private;
    Nil_Image : constant Image_Id;
    --
    -- Identifies an image.  Passed to each operation to identify the
    -- image from which the command is being issued.  Can be used only for
    -- the lifetime of that call.

    type Cursor    is private;
    type Selection is private;

    Nil_Cursor    : constant Cursor;
    Nil_Selection : constant Selection;


    -- Image_Identity is used to uniquely identify images so that the editor
    -- can find out if it already has a particular image.  The general use
    -- is to set I1 to the Directory.Unique of the object if there is one
    -- and to set I2 to zero or some number if there are variants of the
    -- image that are to be treated as separate images.
    -- If the image is not based on a directory object, then some number
    -- is chosen for I1 and I2 such that the same numbers are chosen each
    -- time the specific variant of the display is specified.

    type Image_Identity is
        record
            I1, I2 : Long_Integer;
        end record;


    -- Editor image access
    --
    -- Lines in the image are numbered starting at 1
    --
    -- A Cursor identifies a point in the image.
    -- A Selection is a region of the image starting and ending at some points.

    function Line (C : Cursor) return Integer;
    -- Returns line corresponding to cursor; negative if in header,
    -- positive if in rest of image, 0 if nil.
    -- The line's text is obtained via Header_Contents (-result)
    -- or Line_Contents (result) as appropriate.



    function Column        (C : Cursor)                return Natural;
    function Line_Contents (Id : Image_Id; C : Cursor) return String;
    -- function Line_Contents (Id : Image_Id; Line : Positive) return String;
    -- Return the specified line of the image.  Return null string if
    -- past the end of the image.
    -- function Header_Contents (Id : Image_Id; Line : Positive) return String;
    -- Return the specified line of the header.  Return null string if
    -- past the end of the header.

    function Selection_Start    (S : Selection)                return Cursor;
    function Selection_End      (S : Selection)                return Cursor;
    function Selection_Contents (Id : Image_Id; S : Selection) return String;
    function Selection_Is_Line  (S : Selection)                return Boolean;

    type Booleans is array (Positive range <>) of Boolean;

    procedure Insert_Lines
                 (Image : Image_Id; After_Line : in out Natural; Text : String);
    --
    -- Insert text into image after After_Line.  Subsequent lines
    -- are "pushed down".
    -- Use After_Line = 0 to insert text at the beginning of the image.
    -- Use After_Line = Natural'Last to append text to end of image.
    --
    -- On return, After_Line is the line number of the last inserted line.
    -- A subsequent call using the returned After_Line will insert
    -- text just after the text inserted by
    -- this call.

    procedure Insert_Enhanced_Lines (Image      :        Image_Id;
                                     After_Line : in out Natural;
                                     Text       :        String;
                                     Underlines :        Booleans;
                                     Prompts    :        Booleans);
    -- Same as Insert_Lines except that the characters inserted can be
    -- underlined or emprompted.  Underlines and Prompts are in 1-1
    -- correspondence with Text and each element indicates whether
    -- to underline or enprompt the corresponding character of Text.
    --
    -- Within Text, Ascii.lf denotes a line break.  The Ascii.lf does not
    -- appear in the image.  Other control characters appear as inverse
    -- video.  Underlining and emprompting of Ascii.Lf characters
    -- is ignored.
    --
    -- One line will be inserted, plus 1 line for every Ascii.lf in Text.

    procedure Replace_Header (Image : Image_Id; Header : String);
    --
    -- Place the string as a non-editable header at the top of the image;
    -- replaces any previous header line(s).  Note that line 0 from the
    -- Insert_ and Replace_ operations always follow this header, or,
    -- equivalently, lines in the header are not numbered.
    --
    -- If Header is null, no header lines will be added, having the effect
    -- of deleting any existing header.
    -- Otherwise, 1 header line will be added, plus 1 line for every Ascii.lf
    -- in Header.

    procedure Append (Image : Image_Id; Text : String);
    -- Append the string as editable text to the bottom of the image; does
    -- not replace any text.


    procedure Delete_Lines (Image           : Image_Id;
                            Starting_Line   : Positive;
                            Number_Of_Lines : Natural);
    -- Delete the specified lines.

    procedure Replace_Lines (Image           : Image_Id;
                             Starting_Line   : Positive;
                             Number_Of_Lines : Natural;
                             New_Text        : String);
    -- Replaces number_of_lines starting with starting_line with New_Text.
    -- First deletes Number_Of_Lines starting with Starting_Line; then,
    -- inserts the new text at Starting_Line.


    procedure Replace_With_Enhanced_Lines (Image           : Image_Id;
                                           Starting_Line   : Positive;
                                           Number_Of_Lines : Natural;
                                           New_Text        : String;
                                           Underlines      : Booleans;
                                           Prompts         : Booleans);
    -- Deletes Number_Of_Lines starting with Starting_Line;
    -- inserts New_Text in their place.
    -- One line will be inserted, plus 1 line for every Ascii.lf in New_Text.

    function Is_Read_Only (Image : Image_Id) return Boolean;
    -- return true if image is read-only

    procedure Make_Read_Only (Image : Image_Id);
    -- set image's editor state to read-only


    subtype Gateway_Handle is Gateway_Object.Handle;

    function Objects_Name (Image : Image_Id) return String;
    -- Return the name of the underlying object being displayed,
    -- if any.  Returns null string if none.

    function Object_Id (Image : Image_Id) return Directory.Object;
    -- Similar to Object_Name but returns Directory.Object of
    -- the gateway object.


    -- Default 'Undefined' instantiation parameters for the
    -- operations generic.

    procedure Undefined (Handle              :     Gateway_Handle;
                         Visible             :     Boolean;
                         Read_Only           :     Boolean;
                         No_Image            : out Boolean;
                         Show_Property_Image : out Boolean;
                         Id                  : out Image_Identity);

    procedure Undefined (Handle            :        Gateway_Handle;
                         Visible           :        Boolean;
                         In_Place          :        Boolean;
                         First_Time        :        Boolean;
                         Read_Only         : in out Boolean;
                         Image             :        Image_Id;
                         No_Image          : out    Boolean;
                         Underlying_Object : out    Directory.Object);

    procedure Undefined (Handle : Gateway_Handle;  
                         Image  : Image_Id);

    procedure Undefined (Handle : Gateway_Handle;
                         Image  : Image_Id;
                         S      : Selection;
                         C      : Cursor);

    procedure Undefined (Handle    : Gateway_Handle;
                         Image     : Image_Id;
                         S         : Selection;
                         C         : Cursor;
                         Predicate : Boolean);

    procedure Undefined_In_Place (Handle    : Gateway_Handle;
                                  Image     : Image_Id;
                                  S         : Selection;
                                  C         : Cursor;
                                  Predicate : Boolean;
                                  In_Place  : Boolean);

    procedure Undefined (Handle     :     Gateway_Handle;
                         Image      :     Image_Id;
                         S          :     Selection;
                         C          :     Cursor;
                         Visible    :     Boolean;
                         Allow_Edit : out Boolean);

    procedure Undefined (Handle : Gateway_Handle;
                         Image  : Image_Id;
                         S      : Selection;
                         C      : Cursor;
                         Count  : Integer);

    procedure Undefined_Deletion  
                 (Handle    :     Gateway_Handle;
                  Image     :     Image_Id;
                  S         :     Selection;
                  C         :     Cursor;
                  Predicate : out Boolean);

    procedure Undefined (Handle    :        Gateway_Handle;
                         Subobject :        Directory.Object;
                         Response  :        Profile.Response_Profile;
                         Action_Id :        Action.Id;
                         Errors    : in out Dtia_Client.Error_Counts);

    procedure Undefined_Check_Out (Handle : Gateway_Handle;
                                   Subobject : Directory.Object;
                                   Allow_Implicit_Accept_Changes : Boolean;
                                   Response : Profile.Response_Profile;
                                   Action_Id : Action.Id;
                                   Errors : in out Dtia_Client.Error_Counts);

    procedure Undefined (Handle           :        Gateway_Handle;
                         Subobject        :        Directory.Object;
                         Release          :        Boolean;  
                         Controlled       :        Boolean;
                         Joined           :        Boolean;
                         Source_View      :        Directory.Object;
                         Destination_View :        Directory.Object;
                         First_Call       :        Boolean;
                         Do_Not_Copy      : out    Boolean;
                         Response         :        Profile.Response_Profile;
                         Action_Id        :        Action.Id;
                         Errors           : in out Dtia_Client.Error_Counts);

    procedure Undefined (Handle           :        Gateway_Handle;
                         Subobject        :        Directory.Object;
                         Source_Object    :        Directory.Object;
                         Release          :        Boolean;  
                         Controlled       :        Boolean;
                         Joined           :        Boolean;
                         Source_View      :        Directory.Object;
                         Destination_View :        Directory.Object;
                         First_Call       :        Boolean;
                         Response         :        Profile.Response_Profile;
                         Action_Id        :        Action.Id;
                         Errors           : in out Dtia_Client.Error_Counts);

    procedure Undefined (Handle           :        Gateway_Handle;
                         Subobject        :        Directory.Object;
                         Save_Source      :        Boolean;
                         Allow_Controlled : out    Boolean;
                         Response         :        Profile.Response_Profile;
                         Action_Id        :        Action.Id;
                         Errors           : in out Dtia_Client.Error_Counts);


    -- Default actuals for I/O related generic formals.  Each
    -- of these operations raises an appropriate exception if
    -- called as a result of specifying 'External' for I/O
    -- operations in the gateway's operation map.

    procedure Undefined (File      : in out Device_Independent_Io.File_Type;
                         Mode      :        Device_Independent_Io.File_Mode;
                         Handle    :        Gateway_Handle;
                         Form      :        String;
                         Action_Id :        Action.Id);

    procedure Undefined (File  :     Device_Independent_Io.File_Type;
                         Item  : out System.Byte_String;
                         Count : out Natural);
    procedure Undefined (File  :     Device_Independent_Io.File_Type;  
                         Item  : out String;
                         Count : out Natural);

    procedure Undefined (File : Device_Independent_Io.File_Type;  
                         Item : System.Byte_String);
    procedure Undefined (File : Device_Independent_Io.File_Type;  
                         Item : String);

    function Undefined (File : Device_Independent_Io.File_Type) return Boolean;

    procedure Undefined (File : in out Device_Independent_Io.File_Type);
    procedure Undefined (File : in out Device_Independent_Io.File_Type;
                         Mode :        Device_Independent_Io.File_Mode);


    generic

        Class_Name : String;    -- Name of the class instantiation is
        -- handling.

        Session_Server : Boolean;  -- True if the instantiation is to
        -- handle only requests from the specific session on which this
        -- package is elaborated.

        -- When these operations are invoked, the Handle parameter
        -- will refer to the gateway object under which the editor
        -- is running an image.
        --
        -- Note that these operation are invoked by a task that has
        -- the invoking user's login identity.  Thus, for access control
        -- purposes, they run with the same access as the user.
        --
        -- For editor operations, the editor will release
        -- its read lock on the object underlying the image (if any)
        -- during the execution of the generic formals below.  The same
        -- is not true of the gateway handle.  If the gateway object is
        -- to be updated, it must first be closed, and then reopened
        -- for update.  If the underlying object is updated, it must be
        -- closed prior to return of the generic formal procedure after
        -- which the editor will automatically redraw the image.


        with procedure Image_Name (Handle : Gateway_Handle;
                                   Visible : Boolean;
                                   Read_Only : Boolean;
                                   No_Image : out Boolean;
                                   Show_Property_Image : out Boolean;
                                   Id : out Image_Identity) is Undefined;
        --
        -- Called when an image is to be created for the specified Gateway.
        -- If no image is to be built, set No_Image.  If No_Image is
        -- true, Show_Property_Image can be set true to cause the editor
        -- to bring up the gateway property image directly.  Build_Image
        -- will not be called in this case.  Otherwise, Build_Image will be
        -- called to create the image or run workstation tools.
        --
        -- Read_Only indicates that the image is ro be read only when made.
        -- It is false when the image is being constructed as a result of
        -- Common.Edit being run.

        with procedure Build_Image (Handle            : Gateway_Handle;
                                    Visible           : Boolean;
                                    In_Place          : Boolean;
                                    First_Time        : Boolean;
                                    Read_Only         : in out Boolean;
                                    Image             : Image_Id;
                                    No_Image          : out Boolean;
                                    Underlying_Object : out Directory.Object) is
           Undefined;
        --
        -- Called when an image is to be created for the object designated by
        -- Handle (First_Time = true) or re-built as part of the Revert
        -- operation (First_Time = false).
        -- Visible is from the definition or edit command.
        -- In_Place indicates that the current window should be used and
        -- this applies in the case when some other environment operation
        -- ends up being called.  Read_Only is true if the image is a result
        -- of Definition or Gateway.Edit, and not Common.Edit.
        -- No_Image should be set the same as Image_Name.  If there is
        -- an underlying object for the image, set Underlying_Object
        -- to this value.  If not, set it to Directory.Nil.

        -- If Read_Only is false on entry, Build_Image checks that the class
        -- allows editing, and sets Read_Only to true if it does not.

        with procedure Post_Commit (Handle : Gateway_Handle;  
                                    Image  : Image_Id) is Undefined;
        --
        -- Called after a commit operation is run.  If the object was
        -- actually open for update, the update is committed and the
        -- object is available at the time this procedure is called.
        -- If the image was constructed by the instantiation of Build_Image
        -- then this procedure is responsible for saving any changes that
        -- need to be saved.

        with procedure Semanticize (Handle : Gateway_Handle;
                                    Image  : Image_Id;
                                    S      : Selection;
                                    C      : Cursor) is Undefined;
        --
        -- Called when Common.Semanticize is run on the image.
        -- The image can be modified by calling operations in the
        -- Image_Update package below.

        with procedure Complete (Handle : Gateway_Handle;
                                 Image  : Image_Id;
                                 S      : Selection;
                                 C      : Cursor;
                                 Menu   : Boolean) is Undefined;
        --
        -- Called when Common.Complete is called, Menu is the parameter
        -- passed to Common.Complete.

        with procedure Edit (Handle     :     Gateway_Handle;
                             Image      :     Image_Id;
                             S          :     Selection;
                             C          :     Cursor;
                             Visible    :     Boolean;
                             Allow_Edit : out Boolean) is Undefined;
        --
        -- Called when Edit is run from the image.  Does not apply when
        -- edit is run from some other way (such as LOE image).
        -- Visible is as passed to the command.
        --
        -- On return, Allow_Edit is used to determine if the image should
        -- be allowed to be edited.  Note that this is ignored if the
        -- class forbids editing.

        with procedure Definition (Handle   : Gateway_Handle;
                                   Image    : Image_Id;
                                   S        : Selection;
                                   C        : Cursor;
                                   Visible  : Boolean;
                                   In_Place : Boolean) is Undefined_In_Place;
        --
        -- If a new window is to be brought up,  call the normal
        -- definition operation to do it.  In_Place indicates that,
        -- if a new R1000 window is to be brought up, it should
        -- overwrite this one.

        with procedure Enclosing_Object (Handle   : Gateway_Handle;
                                         Image    : Image_Id;
                                         S        : Selection;
                                         C        : Cursor;
                                         Library  : Boolean;
                                         In_Place : Boolean) is
           Undefined_In_Place;
        -- Bring up the enclosing object as appropriate.  If a new
        -- R1000 window is to be brought up, In_Place indicates that
        -- it should replace the current window.

        with procedure Elide (Handle : Gateway_Handle;
                              Image  : Image_Id;
                              S      : Selection;
                              C      : Cursor;
                              Repeat : Positive) is Undefined;

        with procedure Expand (Handle : Gateway_Handle;
                               Image  : Image_Id;
                               S      : Selection;
                               C      : Cursor;
                               Repeat : Positive) is Undefined;

        with procedure Undo (Handle : Gateway_Handle;
                             Image  : Image_Id;
                             S      : Selection;
                             C      : Cursor;
                             Repeat : Positive) is Undefined;

        with procedure Redo (Handle : Gateway_Handle;
                             Image  : Image_Id;
                             S      : Selection;
                             C      : Cursor;
                             Repeat : Positive) is Undefined;

        with procedure Promote (Handle : Gateway_Handle;
                                Image  : Image_Id;
                                S      : Selection;
                                C      : Cursor) is Undefined;

        with procedure Demote (Handle : Gateway_Handle;
                               Image  : Image_Id;
                               S      : Selection;
                               C      : Cursor) is Undefined;

        with procedure Format (Handle : Gateway_Handle;
                               Image  : Image_Id;
                               S      : Selection;
                               C      : Cursor) is Undefined;

        with procedure Revert (Handle : Gateway_Handle;
                               Image  : Image_Id;
                               S      : Selection;
                               C      : Cursor) is Undefined;
        -- Called when the Common.Revert is executed.  Following
        -- execution of this procedure (the Revert actual), the image will
        -- be regenerated by taking the Build_Image action as defined
        -- in the operations map for the gateway class.  If this action
        -- is external, then the Build_Image actual will be called.
        --
        -- This procedure should delete the current image contents if the
        -- subsequent actions cannot deal with there being previous
        -- image contents.  Deletion is not required for images automatically
        -- regenerated from an object (i.e., not via the Build_Image
        -- procedure).
        --
        -- In addition, Revert should take whatever action is required to
        -- get the data "up to date" as defined by the integration
        -- product semantics for revert.

        with procedure Sort_Image (Handle : Gateway_Handle;
                                   Image  : Image_Id;
                                   S      : Selection;
                                   C      : Cursor;
                                   Format : Integer) is Undefined;

        with procedure Delete (Handle       :     Gateway_Handle;
                               Image        :     Image_Id;
                               S            :     Selection;
                               C            :     Cursor;
                               Remove_Image : out Boolean) is  
           Undefined_Deletion;

        with procedure Pre_Check_In
                          (Handle    :        Gateway_Handle;
                           Subobject :        Directory.Object;
                           Response  :        Profile.Response_Profile;
                           Action_Id :        Action.Id;
                           Errors    : in out Dtia_Client.Error_Counts) is
           Undefined;
        --
        -- Called during CMVC.Check_In prior to the object actually
        -- being checked_in.   This operation may update the
        -- R1000 or workstation object as desired.
        --
        -- Set Errors.Fatal to true to cause the check in to terminate.
        -- Messages should be written to Log_File using Log.Put_Line.
        -- This is the log file being generated by CMVC.
        -- Action is an action_id that will be abandoned if the overall
        -- Check_In operation fails and committed if it succeeds.

        with procedure Post_Check_In
                          (Handle    :        Gateway_Handle;
                           Subobject :        Directory.Object;
                           Response  :        Profile.Response_Profile;
                           Action_Id :        Action.Id;
                           Errors    : in out Dtia_Client.Error_Counts) is
           Undefined;
        --
        -- Called during CMVC.Check_In after the object is
        -- checked_in.   This operation may not update the
        -- R1000 object, but may update the workstation object as desired.
        -- Note, however, that the action has not been committed at this
        -- point so that there is no guarantee the the object will
        -- in fact end up checked-in.
        --
        -- Set Errors.Fatal to true to cause the check in to terminate.
        -- Messages should be written to Log_File using Log.Put_Line.
        -- This is the log file being generated by CMVC.
        -- Action is an action_id that will be abandoned if the overall
        -- Check_In operation fails and committed if it succeeds.

        with procedure Pre_Check_Out
                          (Handle : Gateway_Handle;
                           Subobject : Directory.Object;
                           Allow_Implicit_Accept_Changes : Boolean;
                           Response : Profile.Response_Profile;
                           Action_Id : Action.Id;
                           Errors : in out Dtia_Client.Error_Counts) is
           Undefined_Check_Out;
        --
        -- Called during Cmvc.Check_Out prior to the object actually
        -- being checked out.  Allows placement of messages
        -- into log prior to check_out and forbidding of check_out.  Set
        -- Errors.Fatal to true to cause the check_out to not happen.
        -- Messages should be written to the log file using Log.Put_Line
        -- with response profile Response.  This is the log file being
        -- generated by CMVC.
        -- Allow_Implicit_Accept_Changes is the parameter as passed to
        -- Cmvc.Check_Out.
        -- Action is an action_id that will be abandoned if the overall
        -- Check_Out operation fails and committed if it succeeds.

        with procedure Post_Check_Out
                          (Handle : Gateway_Handle;
                           Subobject : Directory.Object;
                           Allow_Implicit_Accept_Changes : Boolean;
                           Response : Profile.Response_Profile;
                           Action_Id : Action.Id;
                           Errors : in out Dtia_Client.Error_Counts) is
           Undefined_Check_Out;
        --
        -- Called after cmvc.check_out.  Allows placement of messages
        -- into log after check out.  Set Errors.Fatal to true to cause
        -- the check out to be abandoned.  This should be done only in
        -- the case of serious, thought-to-be unrecoverable problems.
        -- The gateway object can be modified at this time.
        --
        -- Messages should be written to the log file using Log.Put_Line
        -- with response profile Response.  This is the log file being
        -- generated by CMVC.
        -- Allow_Implicit_Accept_Changes is the parameter as passed to
        -- Cmvc.Check_Out.
        -- Action is an action_id that will be abandoned if the overall
        -- Check_Out operation fails and committed if it succeeds.


        with procedure Pre_Cmvc_Copy
                          (Handle : Gateway_Handle;
                           Subobject : Directory.Object;
                           Release : Boolean;
                           Controlled : Boolean;
                           Joined : Boolean;
                           Source_View : Directory.Object;
                           Destination_View : Directory.Object;
                           First_Call : Boolean;
                           Do_Not_Copy : out Boolean;
                           Response : Profile.Response_Profile;
                           Action_Id : Action.Id;
                           Errors : in out Dtia_Client.Error_Counts) is
           Undefined;
        --
        -- Called prior to Cmvc.Copy of any form that is copying this
        -- gateway object.
        --
        -- Warning or error messages should be written to Log_File
        -- using Log.Put_Line.  This is the log file being generated
        -- by CMVC.
        --
        -- Parameters and their meaning:
        --      Release => the operation is a release operation in which
        --                 the object will end up frozen.
        --      Controlled => the object being copied is Cmvc controlled.
        --      Joined     => the object being copied will be joined to
        --                    source view.  (This is always the same for
        --                    all objects copied in a single view copy.)
        --      Source_View = View being copied.
        --      Destination_View = view being created with copies from
        --                         Source_View.
        --      First_Call  => This is the first object being copied by
        --                     this Cmvc copy operation.  False other times.       --
        -- If the object should not be copied, then set Do_Not_Copy to
        -- true, else to false.
        --
        -- Action is an action_id that will be abandoned if the overall
        -- Copy operation fails and committed if it succeeds.

        with procedure Post_Cmvc_Copy
                          (Handle : Gateway_Handle;
                           Subobject : Directory.Object;
                           Source_Object : Directory.Object;
                           Release : Boolean;  
                           Controlled : Boolean;
                           Joined : Boolean;
                           Source_View : Directory.Object;
                           Destination_View : Directory.Object;
                           First_Call : Boolean;
                           Response : Profile.Response_Profile;
                           Action_Id : Action.Id;
                           Errors : in out Dtia_Client.Error_Counts) is
           Undefined;
        --
        -- Called after Cmvc.Copy has copied a gateway object.  Handle
        -- is the gateway object in the newly created view.
        -- The operation may be a release and the object will be frozen
        -- but at this point, it is not yet frozen.  This is an opportunity
        -- to modify the object before the copy/release is completed.
        -- If objects or information needs to be added to the
        -- copy, it can be done at this time.  If it needs to be
        -- removed from the source, this can also be done at this time.
        --
        -- Warning or error messages should be written using Log.Put_Line
        -- with response profile Response.  This is the log file being
        -- generated by CMVC.   Set Errors.Fatal to true to prevent
        -- copy from completing.
        --
        -- Parameters and their meaning:
        --      Release => the operation is a release operation in which
        --                 the object will end up frozen.
        --      Controlled => the object being copied is Cmvc controlled.
        --      Joined     => the object being copied will be joined to
        --                    source view.  (This is always the same for
        --                    all objects copied in a single view copy.)
        --      Source_View = View being copied.
        --      Destination_View = view being created with copies from
        --                         Source_View.
        --      First_Call  => This is the first object being copied by
        --                     this Cmvc copy operation.  False other times.
        --
        -- Action is an action_id that will be abandoned if the overall
        -- Copy operation fails and committed if it succeeds.

        with procedure Pre_Make_Controlled
                          (Handle : Gateway_Handle;
                           Subobject : Directory.Object;
                           Save_Source : Boolean;
                           Allow_Controlled : out Boolean;
                           Response : Profile.Response_Profile;
                           Action_Id : Action.Id;
                           Errors : in out Dtia_Client.Error_Counts) is
           Undefined;
        --
        -- Called when, but before, the object designated by Handle is
        -- to be made controlled.  Set Allow_Controlled if it is ok to
        -- proceed with this object.  If not, emit error messages to
        -- Log_File, and indicate an error or warning in Errors (warning
        -- would be best), and set Allow_Controlled to false.
        -- Save_Source is the value of the parameter to the Cmvc
        -- command and indicates if the source is to be saved in the
        -- CMVC database.


        --------------------------
        -- Input/Output Formals --
        --------------------------
        --
        -- Client applications should provide non-default actuals       -- for the following formals when non-standard I/O control
        -- on gateway objects is required.
        --
        -- These operations are called whenever I/O operations
        -- are applied to a gateway object whose Dispatch_Map or
        -- Io.Form_Map property specifies the value 'External'.
        --
        -- Each of these formals operate on the File_Type object
        -- declared in Device_Independent_Io and should behave
        -- in a way consistent with the corresponding operations
        -- in that package.  This includes the propagation of
        -- exceptions, which must be limited to those exported
        -- from Device_Independent_Io.
        --
        -- N.B. A Device_Independent_Io.Device_Specific control block
        --      is associated with the File objects passed to these
        --      formals.  Clients must restrict their use of control
        --      blocks to Device_Independent_Io.Client_Specific, if
        --      they need to associate client specific attributes with
        --      the File object.

        with procedure Io_Create (File : in out Device_Independent_Io.File_Type;
                                  Mode : Device_Independent_Io.File_Mode;
                                  Handle : Gateway_Handle;
                                  Form : String;
                                  Action_Id : Action.Id) is  
           Undefined;
        --
        -- Called when a Create operation is applied to a gateway
        -- object as specified above.  The client must initialize
        -- the File object such that Is_Open (File) = True and
        -- Mode (File) = Mode.  When this is not possible, an
        -- exception from Device_Independent_Io suitable for
        -- Create should be raised.

        with procedure Io_Open (File : in out Device_Independent_Io.File_Type;
                                Mode : Device_Independent_Io.File_Mode;
                                Handle : Gateway_Handle;
                                Form : String;
                                Action_Id : Action.Id) is  
           Undefined;
        --
        -- Called when an Open operation is applied to a gateway
        -- object as specified above.  The client must initialize
        -- the File object such that Is_Open (File) = True and
        -- Mode (File) = Mode.  When this is not possible, an
        -- exception from Device_Independent_Io suitable for Open
        -- should be raised.

        with procedure Io_Read_Bytes (File  : Device_Independent_Io.File_Type;
                                      Item  : out System.Byte_String;
                                      Count : out Natural) is  
           Undefined;
        --
        -- Called when an I/O request to read bytes from File is made.
        -- Clients may supply Device_Independent_Io.Read for this formal
        -- if File was initialized to a directly accessible file during
        -- Io_Create or Io_Open above.

        with procedure Io_Read_String (File  : Device_Independent_Io.File_Type;
                                       Item  : out String;
                                       Count : out Natural) is  
           Undefined;
        --
        -- Called when an I/O request to read characters from File is
        -- made.  Clients may supply Device_Independent_Io.Read for this
        -- formal if File was initialized to a directly accessible file
        -- during Io_Create or Io_Open above.

        with procedure Io_Write_Bytes (File : Device_Independent_Io.File_Type;  
                                       Item : System.Byte_String) is  
           Undefined;
        --
        -- Called when an I/O request to write bytes to File is made.
        -- Clients may supply Device_Independent_Io.Write for this
        -- formal if File was initialized to a directly accessible file
        -- during Io_Create or Io_Open above.

        with procedure Io_Write_String (File : Device_Independent_Io.File_Type;  
                                        Item : String) is  
           Undefined;
        --
        -- Called when an I/O request to write characters to File is
        -- made.  Clients may supply Device_Independent_Io.Write for
        -- this formal if File was initialized to a directly accessible
        -- file during Io_Create or Io_Open above.

        with function Io_End_Of_File (File : Device_Independent_Io.File_Type)
                                     return Boolean is Undefined;
        --
        -- Called when an end of file query is made on File.  Clients
        -- may supply Device_Independent_Io.End_Of_File for this formal
        -- if File was initialized to a directly accessible file during
        -- Io_Create or Io_Open above.

        with procedure Io_Delete
                          (File : in out Device_Independent_Io.File_Type) is  
           Undefined;
        --
        -- Called when an I/O request to delete File is made.  Clients
        -- may supply Device_Independent_Io.Delete for this formal if
        -- File was initialized to a directly accessible file during
        -- Io_Create or Io_Open above and no additional reclamation of
        -- resources is required.

        with procedure Io_Reset (File : in out Device_Independent_Io.File_Type;
                                 Mode : Device_Independent_Io.File_Mode) is  
           Undefined;
        --
        -- Called when an I/O request to reset File is made.  Clients
        -- may supply Device_Independent_Io.Reset for this formal if
        -- File was initialized to a directly accessible file during
        -- Io_Create or Io_Open above and no additional reclamation of
        -- resources is required.

        with procedure Io_Close
                          (File : in out Device_Independent_Io.File_Type) is  
           Undefined;
        --
        -- Called when an I/O request to close File is made.  Clients
        -- may supply Device_Independent_Io.Close for this formal if
        -- File was initialized to a directly accessible file during
        -- Io_Create or Io_Open above and no additional reclamation of
        -- resources is required.


        ------------------------
        -- Server Termination --
        ------------------------

        with procedure Terminate_Server (Reason : Termination_Condition);
        --
        -- Called when the server should terminate.  Reason indicates
        -- why.   In general, the server should close down its connections
        -- and terminate when this call is made.  The work that
        -- can be done by this call is limited to 5 minutes of elapsed
        -- time.
        --
        -- The reasons are:
        --  Session_Ends: There are no more jobs started from the session
        --                that started the server and hence, no more calles
        --                can occur.
        --  Gateway_Class_Deactivated:  The gateway class is being
        --                deactivated and the server should terminate
        --                (whether there are outstanding requests or not).


    package Dtia_Client_Operations is

        -- Here are things that the generic formal procedures can do
        -- when they are called:
        --
        --  1. Send (error) messages to Io.Current_Error.
        --  2. Send output to current output.  This is not typically
        --     done for the editor-style commands.
        --  3. Send Log.Put_Line messages to the log file.
        --  4. Modify the image using procedures above.
        --  5. Perform external operations, possibly contacting the
        --     workstation and possibly updating the object that
        --     underlies the image.
        --

        procedure Check_If_Registration_Succeeded
                     (Status : in out Simple_Status.Condition);
        -- Returns an error status indicating if the instantiation and
        -- registration of the client was successful, and, if not,
        -- what the error was.  Common errors indicated below.

    end Dtia_Client_Operations;

    Gateway_Class_Not_Active : constant String := "Gateway class not active";
    Server_Already_Exists    : constant String := "Server already exists";


    function Line_Contents (Id : Image_Id; Line : Positive) return String;
    -- Return the specified line of the image.  Return null string if
    -- past the end of the image.

    function Header_Contents (Id : Image_Id; Line : Positive) return String;
    -- Return the specified line of the header.  Return null string if
    -- past the end of the header.

    function Last_Line (Id : Image_Id) return Natural;
    -- Return the number of the last line of the image, 0 if none.

    function Last_Header_Line (Id : Image_Id) return Natural;
    -- Return the number of the last header line of the image, 0 if none.

    function Is_Modified (Image : Image_Id) return Boolean;
    -- return true if image is modified

    procedure Commit (Image : Image_Id; Success : out Boolean);
    -- equivalent to Common.Commit:
    -- If Image is modified, writes the image to the underlying object and
    -- call Dispatch.Post_Commit; set Success false if any problem.
    -- Otherwise, set Success true.

    pragma Subsystem (Tools_Integration);
    pragma Module_Name (4, 3997);
    pragma Bias_Key (29);

end Dtia_Client;

E3 Meta Data

    nblk1=31
    nid=0
    hdr6=62
        [0x00] rec0=1f rec1=00 rec2=01 rec3=030
        [0x01] rec0=00 rec1=00 rec2=31 rec3=00a
        [0x02] rec0=1b rec1=00 rec2=02 rec3=062
        [0x03] rec0=00 rec1=00 rec2=30 rec3=032
        [0x04] rec0=19 rec1=00 rec2=03 rec3=00c
        [0x05] rec0=15 rec1=00 rec2=04 rec3=024
        [0x06] rec0=02 rec1=00 rec2=2f rec3=004
        [0x07] rec0=11 rec1=00 rec2=05 rec3=084
        [0x08] rec0=16 rec1=00 rec2=06 rec3=026
        [0x09] rec0=15 rec1=00 rec2=07 rec3=082
        [0x0a] rec0=17 rec1=00 rec2=08 rec3=02c
        [0x0b] rec0=14 rec1=00 rec2=09 rec3=08c
        [0x0c] rec0=18 rec1=00 rec2=0a rec3=062
        [0x0d] rec0=17 rec1=00 rec2=0b rec3=036
        [0x0e] rec0=11 rec1=00 rec2=0c rec3=018
        [0x0f] rec0=0f rec1=00 rec2=0d rec3=076
        [0x10] rec0=13 rec1=00 rec2=0e rec3=044
        [0x11] rec0=14 rec1=00 rec2=0f rec3=060
        [0x12] rec0=17 rec1=00 rec2=10 rec3=08c
        [0x13] rec0=12 rec1=00 rec2=11 rec3=030
        [0x14] rec0=12 rec1=00 rec2=12 rec3=006
        [0x15] rec0=11 rec1=00 rec2=13 rec3=042
        [0x16] rec0=13 rec1=00 rec2=14 rec3=054
        [0x17] rec0=15 rec1=00 rec2=15 rec3=054
        [0x18] rec0=13 rec1=00 rec2=16 rec3=014
        [0x19] rec0=16 rec1=00 rec2=17 rec3=004
        [0x1a] rec0=15 rec1=00 rec2=18 rec3=06a
        [0x1b] rec0=11 rec1=00 rec2=19 rec3=076
        [0x1c] rec0=15 rec1=00 rec2=1a rec3=008
        [0x1d] rec0=12 rec1=00 rec2=1b rec3=070
        [0x1e] rec0=13 rec1=00 rec2=1c rec3=07a
        [0x1f] rec0=13 rec1=00 rec2=1d rec3=02a
        [0x20] rec0=11 rec1=00 rec2=1e rec3=08c
        [0x21] rec0=16 rec1=00 rec2=1f rec3=00c
        [0x22] rec0=12 rec1=00 rec2=20 rec3=002
        [0x23] rec0=14 rec1=00 rec2=21 rec3=014
        [0x24] rec0=12 rec1=00 rec2=22 rec3=038
        [0x25] rec0=11 rec1=00 rec2=23 rec3=05c
        [0x26] rec0=16 rec1=00 rec2=24 rec3=002
        [0x27] rec0=12 rec1=00 rec2=25 rec3=01e
        [0x28] rec0=13 rec1=00 rec2=26 rec3=032
        [0x29] rec0=13 rec1=00 rec2=27 rec3=082
        [0x2a] rec0=14 rec1=00 rec2=28 rec3=04a
        [0x2b] rec0=15 rec1=00 rec2=29 rec3=00e
        [0x2c] rec0=14 rec1=00 rec2=2a rec3=026
        [0x2d] rec0=17 rec1=00 rec2=2b rec3=05e
        [0x2e] rec0=17 rec1=00 rec2=2c rec3=01e
        [0x2f] rec0=16 rec1=00 rec2=2d rec3=05e
        [0x30] rec0=11 rec1=00 rec2=2e rec3=000
    tail 0x2150b2dbc822a62a13241 0x42a00088462065003