with String_Utilities;
with Subsystem_Pathname;
with Compilation;
with System_Utilities;
with Cmvc;
with Profile;
with Check_Authorization;
with Log;
with Directory_Tools;
with Directory;
with Access_List;
with Check_Out_Ok;
package body Local_Cmvc is

    function Is_Local (What_Object : String) return Boolean is

        package Su renames String_Utilities;
        package Naming renames Directory_Tools.Naming;
        package Object renames Directory_Tools.Object;

        Obj : Object.Handle := Naming.Resolution (What_Object);

    begin

        -- did we resolve correctly?
        if not Object.Is_Bad (Obj) then

            -- is this a ba3 object?
            declare
                Full_Name : constant String := Naming.Full_Name (Obj);
            begin

                if Full_Name'Length >= Subsystem_Pathname'Length and then
                   Full_Name (1 .. Subsystem_Pathname'Length) =
                      Subsystem_Pathname then
                    return True;
                else
                    return False;
                end if;
            end;
        else
            return False;
        end if;
    end Is_Local;

    procedure Check_Out (What_Object : String := "<CURSOR>";
                         Comments : String := "";
                         Allow_Demotion : Boolean := False;
                         Allow_Implicit_Accept_Changes : Boolean := True;
                         Expected_Check_In_Time : String := "<TOMORROW>";
                         Work_Order : String := "<DEFAULT>";
                         Response : String := "<PROFILE>") is
        Obj : Directory.Object;
        Status : Directory.Error_Status;
    begin
        -- set the userid checking this unit out to be the only user with
        -- write access to this object.
        -- check in must remove this write access
        if Is_Local (What_Object) then

            -- check for proper authorization to check out in
            -- this view.
            if Check_Authorization (What_Object) then

                -- allowed to check out in this view.
                Cmvc.Check_Out (What_Object => What_Object,
                                Comments => Comments,
                                Allow_Implicit_Accept_Changes =>
                                   Allow_Implicit_Accept_Changes,
                                Expected_Check_In_Time =>
                                   Expected_Check_In_Time,
                                Work_Order => Work_Order,
                                Response => Response);

                -- if the object is now checked out to me, the check
                -- out must have worked.  So now we can set the
                -- ACL to give only myself rw access.
                if Check_Out_Ok (What_Object) then
                    Access_List.Add (To_List =>
                                        System_Utilities.User_Name & " => RW",
                                     For_Object => What_Object,
                                     Response => Response);
                end if;
            else

                Directory_Tools.Object.Low_Level.Get_Object
                   (Directory_Tools.Naming.Resolution (What_Object),
                    Obj, Status);
                Log.Put_Line
                   (Object1 => Obj,
                    Message => " Not authorized to check out in this library",
                    Kind => Profile.Error_Msg);
            end if;
        else

            -- not interested, so do the normal check out
            Cmvc.Check_Out (What_Object => What_Object,
                            Comments => Comments,
                            Allow_Implicit_Accept_Changes =>
                               Allow_Implicit_Accept_Changes,
                            Expected_Check_In_Time => Expected_Check_In_Time,
                            Work_Order => Work_Order,
                            Response => Response);


        end if;





    end Check_Out;

    procedure Check_In (What_Object : String := "<CURSOR>";
                        Comments : String := "";
                        Work_Order : String := "<DEFAULT>";
                        Response : String := "<PROFILE>") is
        Obj : Directory.Object;
        Status : Directory.Error_Status;

    begin
        -- reset the units in ba3 to have NETWORK_PUBLIC => RW
        if Is_Local (What_Object) then

            -- allow 'em to check in only if they checked it out
            if Check_Out_Ok (What_Object) then


                Cmvc.Check_In (What_Object => What_Object,
                               Comments => Comments,
                               Work_Order => Work_Order,
                               Response => Response);

                -- if check in worked OK then reset the acl
                if not Check_Out_Ok (What_Object) then
                    Access_List.Set (To_List => "Network_Public => RW",
                                     For_Object => What_Object,
                                     Response => Response);
                end if;
            else
                Directory_Tools.Object.Low_Level.Get_Object
                   (Directory_Tools.Naming.Resolution (What_Object),
                    Obj, Status);
                Log.Put_Line
                   (Object1 => Obj,
                    Message => "Not allowed to check in unit that is not" &
                                  "checked out to you.",
                    Kind => Profile.Error_Msg);
            end if;
        else

            -- handle all other cases as usual
            Cmvc.Check_In (What_Object => What_Object,
                           Comments => Comments,
                           Work_Order => Work_Order,
                           Response => Response);
        end if;
    end Check_In;

    procedure Accept_Changes (Destination : String := "<CURSOR>";
                              Source : String := "<LATEST>";
                              Allow_Demotion : Boolean := False;
                              Comments : String := "";
                              Work_Order : String := "<DEFAULT>";
                              Response : String := "<PROFILE>") is
    begin
        Cmvc.Accept_Changes (Destination => Destination,
                             Source => Source,
                             Allow_Demotion => Allow_Demotion,
                             Comments => Comments,
                             Work_Order => Work_Order,
                             Response => Response);
    end Accept_Changes;

    procedure Abandon_Reservation (What_Object : String := "<SELECTION>";
                                   Comments : String := "";
                                   Work_Order : String := "<DEFAULT>";
                                   Response : String := "<PROFILE>") is
    begin
        Cmvc.Abandon_Reservation (What_Object => What_Object,
                                  Comments => Comments,
                                  Work_Order => Work_Order,
                                  Response => Response);
    end Abandon_Reservation;

    procedure Revert (What_Object : String := "<SELECTION>";
                      To_Generation : Integer := -1;
                      Make_Latest_Generation : Boolean := False;
                      Comments : String := "";
                      Work_Order : String := "<DEFAULT>";
                      Response : String := "<PROFILE>") is
    begin
        Cmvc.Revert (What_Object => What_Object,
                     To_Generation => To_Generation,
                     Make_Latest_Generation => Make_Latest_Generation,
                     Comments => Comments,
                     Work_Order => Work_Order,
                     Response => Response);
    end Revert;

    procedure Get_Notes (To_File : String := "<WINDOW>";
                         What_Object : String := "<CURSOR>";
                         Response : String := "<PROFILE>") is
    begin
        Cmvc.Get_Notes (To_File => To_File,
                        What_Object => What_Object,
                        Response => Response);
    end Get_Notes;

    procedure Put_Notes (From_File : String := "<WINDOW>";
                         What_Object : String := "<CURSOR>";
                         Response : String := "<PROFILE>") is
    begin
        Cmvc.Put_Notes (From_File => From_File,
                        What_Object => What_Object,
                        Response => Response);
    end Put_Notes;

    procedure Append_Notes (Note : String := "<WINDOW>";
                            What_Object : String := "<CURSOR>";
                            Response : String := "<PROFILE>") is
    begin
        Cmvc.Append_Notes (Note => Note,
                           What_Object => What_Object,
                           Response => Response);
    end Append_Notes;

    procedure Create_Empty_Note_Window (What_Object : String := "<CURSOR>";
                                        Response : String := "<PROFILE>") is
    begin
        Cmvc.Create_Empty_Note_Window
           (What_Object => What_Object, Response => Response);
    end Create_Empty_Note_Window;

    procedure Make_Controlled
                 (What_Object : String := "<CURSOR>";
                  Reservation_Token_Name : String := "<AUTO_GENERATE>";
                  Join_With_View : String := "<NONE>";
                  Comments : String := "";
                  Work_Order : String := "<DEFAULT>";
                  Response : String := "<PROFILE>") is
    begin
        Cmvc.Make_Controlled (What_Object => What_Object,
                              Reservation_Token_Name => Reservation_Token_Name,
                              Join_With_View => Join_With_View,
                              Comments => Comments,
                              Work_Order => Work_Order,
                              Response => Response);
    end Make_Controlled;

    procedure Make_Uncontrolled (What_Object : String := "<CURSOR>";
                                 Comments : String := "";
                                 Work_Order : String := "<DEFAULT>";
                                 Response : String := "<PROFILE>") is
    begin
        Cmvc.Make_Uncontrolled (What_Object => What_Object,
                                Comments => Comments,
                                Work_Order => Work_Order,
                                Response => Response);
    end Make_Uncontrolled;

    procedure Sever (What_Objects : String := "<SELECTION>";
                     New_Reservation_Token_Name : String := "<AUTO_GENERATE>";
                     Comments : String := "";
                     Work_Order : String := "<DEFAULT>";
                     Response : String := "<PROFILE>") is
    begin
        Cmvc.Sever (What_Object => What_Objects,
                    New_Reservation_Token_Name => New_Reservation_Token_Name,
                    Comments => Comments,
                    Work_Order => Work_Order,
                    Response => Response);
    end Sever;

    procedure Join (What_Object : String := "<SELECTION>";
                    To_Which_View : String := ">>VIEW NAME<<";
                    Comments : String := "";
                    Work_Order : String := "<DEFAULT>";
                    Response : String := "<PROFILE>") is
    begin
        Cmvc.Join (What_Object => What_Object,
                   To_Which_View => To_Which_View,
                   Comments => Comments,
                   Work_Order => Work_Order,
                   Response => Response);
    end Join;

    procedure Merge_Changes (Destination_Object : String := "<SELECTION>";
                             Source_View : String := ">>VIEW_NAME<<";
                             Report_File : String := "";
                             Fail_If_Conflicts_Found : Boolean := False;
                             Comments : String := "";
                             Work_Order : String := "<DEFAULT>";
                             Response : String := "<PROFILE>") is
    begin
        Cmvc.Merge_Changes (Destination_Object => Destination_Object,
                            Source_View => Source_View,
                            Report_File => Report_File,
                            Fail_If_Conflicts_Found => Fail_If_Conflicts_Found,
                            Comments => Comments,
                            Work_Order => Work_Order,
                            Response => Response);
    end Merge_Changes;

    function Imported_Views (Of_View : String := "<CURSOR>";
                             Include_Import_Closure : Boolean := False;
                             Include_Importer : Boolean := False;
                             Response : String := "<WARN>") return String is
    begin
        return Cmvc.Imported_Views
                  (Of_View => Of_View,
                   Include_Import_Closure => Include_Import_Closure,
                   Include_Importer => Include_Importer,
                   Response => Response);
    end Imported_Views;

    procedure Release (From_Working_View : String := "<CURSOR>";
                       Release_Name : String := "<AUTO_GENERATE>";
                       Level : Natural := 0;
                       Views_To_Import : String := "<INHERIT_IMPORTS>";
                       Create_Configuration_Only : Boolean := False;
                       Compile_The_View : Boolean := True;
                       Goal : Compilation.Unit_State := Compilation.Coded;
                       Comments : String := "";
                       Work_Order : String := "<DEFAULT>";
                       Volume : Natural := 0;
                       Response : String := "<PROFILE>") is
    begin
        Cmvc.Release (From_Working_View => From_Working_View,
                      Release_Name => Release_Name,
                      Level => Level,
                      Views_To_Import => Views_To_Import,
                      Create_Configuration_Only => Create_Configuration_Only,
                      Compile_The_View => Compile_The_View,
                      Goal => Goal,
                      Comments => Comments,
                      Work_Order => Work_Order,
                      Volume => Volume,
                      Response => Response);
    end Release;

    procedure Copy (From_View : String := "<CURSOR>";
                    New_Working_View : String := ">>SUB/PATH NAME<<";
                    View_To_Modify : String := "";
                    View_To_Import : String := "<INHERIT_IMPORTS>";
                    Only_Change_Imports : Boolean := True;
                    Join_Views : Boolean := True;
                    Reservation_Token_Name : String := "";
                    Construct_Subpath_Name : Boolean := False;
                    Create_Spec_View : Boolean := False;
                    Level_For_Spec_View : Natural := 0;
                    Model : String := "<INHERIT_MODEL>";
                    Remake_Demoted_Units : Boolean := True;
                    Goal : Compilation.Unit_State := Compilation.Coded;
                    Comments : String := "";
                    Work_Order : String := "<DEFAULT>";
                    Volume : Natural := 0;
                    Response : String := "<PROFILE>") is
    begin
        Cmvc.Copy (From_View => From_View,
                   New_Working_View => New_Working_View,
                   View_To_Modify => View_To_Modify,
                   View_To_Import => View_To_Import,
                   Only_Change_Imports => Only_Change_Imports,
                   Join_Views => Join_Views,
                   Reservation_Token_Name => Reservation_Token_Name,
                   Construct_Subpath_Name => Construct_Subpath_Name,
                   Create_Spec_View => Create_Spec_View,
                   Level_For_Spec_View => Level_For_Spec_View,
                   Model => Model,
                   Remake_Demoted_Units => Remake_Demoted_Units,
                   Goal => Goal,
                   Comments => Comments,
                   Work_Order => Work_Order,
                   Volume => Volume,
                   Response => Response);
    end Copy;

    procedure Make_Path (From_Path : String := "<CURSOR>";
                         New_Path_Name : String := ">>PATH NAME<<";
                         View_To_Modify : String := "";
                         View_To_Import : String := "<INHERIT_IMPORTS>";
                         Only_Change_Imports : Boolean := True;
                         Model : String := "<INHERIT_MODEL>";
                         Join_Paths : Boolean := True;
                         Remake_Demoted_Units : Boolean := True;
                         Goal : Compilation.Unit_State := Compilation.Coded;
                         Comments : String := "";
                         Work_Order : String := "<DEFAULT>";
                         Volume : Natural := 0;
                         Response : String := "<PROFILE>") is
    begin
        Cmvc.Make_Path (From_Path => From_Path,
                        New_Path_Name => New_Path_Name,
                        View_To_Modify => View_To_Modify,
                        View_To_Import => View_To_Import,
                        Only_Change_Imports => Only_Change_Imports,
                        Model => Model,
                        Join_Paths => Join_Paths,
                        Remake_Demoted_Units => Remake_Demoted_Units,
                        Goal => Goal,
                        Comments => Comments,
                        Work_Order => Work_Order,
                        Volume => Volume,
                        Response => Response);
    end Make_Path;

    procedure Make_Subpath (From_Path : String := "<CURSOR>";
                            New_Subpath_Extension : String := ">>SUBPATH<<";
                            View_To_Modify : String := "";
                            View_To_Import : String := "<INHERIT_IMPORTS>";
                            Only_Change_Imports : Boolean := True;
                            Remake_Demoted_Units : Boolean := True;
                            Goal : Compilation.Unit_State := Compilation.Coded;
                            Comments : String := "";
                            Work_Order : String := "<DEFAULT>";
                            Volume : Natural := 0;
                            Response : String := "<PROFILE>") is
    begin
        Cmvc.Make_Subpath (From_Path => From_Path,
                           New_Subpath_Extension => New_Subpath_Extension,
                           View_To_Modify => View_To_Modify,
                           View_To_Import => View_To_Import,
                           Only_Change_Imports => Only_Change_Imports,
                           Remake_Demoted_Units => Remake_Demoted_Units,
                           Goal => Goal,
                           Comments => Comments,
                           Work_Order => Work_Order,
                           Volume => Volume,
                           Response => Response);
    end Make_Subpath;

    procedure Make_Spec_View
                 (From_Path : String := "<CURSOR>";
                  Spec_View_Prefix : String := ">>PREFIX<<";
                  Level : Natural := 0;
                  View_To_Modify : String := "";
                  View_To_Import : String := "<INHERIT_IMPORTS>";
                  Only_Change_Imports : Boolean := True;
                  Remake_Demoted_Units : Boolean := True;
                  Goal : Compilation.Unit_State := Compilation.Coded;
                  Comments : String := "";
                  Work_Order : String := "<DEFAULT>";
                  Volume : Natural := 0;
                  Response : String := "<PROFILE>") is
    begin
        Cmvc.Make_Spec_View (From_Path => From_Path,
                             Spec_View_Prefix => Spec_View_Prefix,
                             Level => Level,
                             View_To_Modify => View_To_Modify,
                             View_To_Import => View_To_Import,
                             Only_Change_Imports => Only_Change_Imports,
                             Remake_Demoted_Units => Remake_Demoted_Units,
                             Goal => Goal,
                             Comments => Comments,
                             Work_Order => Work_Order,
                             Volume => Volume,
                             Response => Response);
    end Make_Spec_View;

    procedure Import (View_To_Import : String := "<REGION>";
                      Into_View : String := "<CURSOR>";
                      Only_Change_Imports : Boolean := False;
                      Import_Closure : Boolean := False;
                      Remake_Demoted_Units : Boolean := True;
                      Goal : Compilation.Unit_State := Compilation.Coded;
                      Comments : String := "";
                      Work_Order : String := "<DEFAULT>";
                      Response : String := "<PROFILE>") is
    begin
        Cmvc.Import (View_To_Import => View_To_Import,
                     Into_View => Into_View,
                     Only_Change_Imports => Only_Change_Imports,
                     Import_Closure => Import_Closure,
                     Remake_Demoted_Units => Remake_Demoted_Units,
                     Goal => Goal,
                     Comments => Comments,
                     Work_Order => Work_Order,
                     Response => Response);
    end Import;

    procedure Remove_Import (View : String := ">>VIEW NAME<<";
                             From_View : String := "<CURSOR>";
                             Comments : String := "";
                             Work_Order : String := "<DEFAULT>";
                             Response : String := "<PROFILE>") is
    begin
        Cmvc.Remove_Import (View => View,
                            From_View => From_View,
                            Comments => Comments,
                            Work_Order => Work_Order,
                            Response => Response);
    end Remove_Import;

    procedure Remove_Unused_Imports (From_View : String := "<CURSOR>";
                                     Comments : String := "";
                                     Work_Order : String := "<DEFAULT>";
                                     Response : String := "<PROFILE>") is
    begin
        Cmvc.Remove_Unused_Imports (From_View => From_View,
                                    Comments => Comments,
                                    Work_Order => Work_Order,
                                    Response => Response);
    end Remove_Unused_Imports;

    procedure Replace_Model (New_Model : String := ">>NEW MODEL NAME<<";
                             In_View : String := "<CURSOR>";
                             Comments : String := "";
                             Work_Order : String := "<DEFAULT>";
                             Response : String := "<PROFILE>") is
    begin
        Cmvc.Replace_Model (New_Model => New_Model,
                            In_View => In_View,
                            Comments => Comments,
                            Work_Order => Work_Order,
                            Response => Response);
    end Replace_Model;

    procedure Initial (Subsystem : String := ">>SUBSYSTEM NAME<<";
                       Working_View_Base_Name : String := "Rev1";
                       Subsystem_Type : Subsystem_Type_Enum :=
                          Local_Cmvc.Spec_Load;
                       View_To_Import : String := "";
                       Model : String := "R1000";
                       Comments : String := "";
                       Work_Order : String := "<DEFAULT>";
                       Volume : Natural := 0;
                       Response : String := "<PROFILE>") is
    begin
        Cmvc.Initial (System_Object => Subsystem,
                      Working_View_Base_Name => Working_View_Base_Name,
                      System_Object_Type =>
                         Cmvc.System_Object_Enum'Value
                            (Local_Cmvc.Subsystem_Type_Enum'Image
                                (Subsystem_Type)),
                      View_To_Import => View_To_Import,
                      Model => Model,
                      Comments => Comments,
                      Work_Order => Work_Order,
                      Volume => Volume,
                      Response => Response);
    end Initial;

    procedure Information (For_View : String := "<CURSOR>";
                           Show_Model : Boolean := True;
                           Show_Whether_Frozen : Boolean := True;
                           Show_View_Kind : Boolean := True;
                           Show_Creation_Time : Boolean := True;
                           Show_Imports : Boolean := True;
                           Show_Referencers : Boolean := True;
                           Show_Unit_Summary : Boolean := True;
                           Show_Controlled_Objects : Boolean := False;
                           Show_Last_Release_Numbers : Boolean := False;
                           Show_Path_Name : Boolean := False;
                           Show_Subpath_Name : Boolean := False;
                           Show_Switches : Boolean := False;
                           Show_Exported_Units : Boolean := False;
                           Response : String := "<PROFILE>") is
    begin
        Cmvc.Information (For_View => For_View,
                          Show_Model => Show_Model,
                          Show_Whether_Frozen => Show_Whether_Frozen,
                          Show_View_Kind => Show_View_Kind,
                          Show_Creation_Time => Show_Creation_Time,
                          Show_Imports => Show_Imports,
                          Show_Referencers => Show_Referencers,
                          Show_Unit_Summary => Show_Unit_Summary,
                          Show_Controlled_Objects => Show_Controlled_Objects,
                          Show_Last_Release_Numbers =>
                             Show_Last_Release_Numbers,
                          Show_Path_Name => Show_Path_Name,
                          Show_Subpath_Name => Show_Subpath_Name,
                          Show_Switches => Show_Switches,
                          Show_Exported_Units => Show_Exported_Units,
                          Response => Response);
    end Information;

    procedure Destroy_View (What_View : String := "<SELECTION>";
                            Demote_Clients : Boolean := False;
                            Destroy_Configuration_Also : Boolean := False;
                            Comments : String := "";
                            Work_Order : String := "<DEFAULT>";
                            Response : String := "<PROFILE>") is
    begin
        Cmvc.Destroy_View (What_View => What_View,
                           Demote_Clients => Demote_Clients,
                           Destroy_Configuration_Also =>
                              Destroy_Configuration_Also,
                           Comments => Comments,
                           Work_Order => Work_Order,
                           Response => Response);
    end Destroy_View;

    procedure Destroy_Subsystem (What_Subsystem : String := "<SELECTION>";
                                 Comments : String := "";
                                 Work_Order : String := "<DEFAULT>";
                                 Response : String := "<PROFILE>") is
    begin
        Cmvc.Destroy_Subsystem (What_Subsystem => What_Subsystem,
                                Comments => Comments,
                                Work_Order => Work_Order,
                                Response => Response);
    end Destroy_Subsystem;

    procedure Build (Configuration : String := ">>CONFIGURATION NAME<<";
                     View_To_Import : String := "";
                     Model : String := "R1000";
                     Goal : Compilation.Unit_State := Compilation.Installed;
                     Limit : String := "<WORLDS>";
                     Comments : String := "";
                     Work_Order : String := "<DEFAULT>";
                     Volume : Natural := 0;
                     Response : String := "<PROFILE>") is
    begin
        Cmvc.Build (Configuration => Configuration,
                    View_To_Import => View_To_Import,
                    Model => Model,
                    Goal => Goal,
                    Limit => Limit,
                    Comments => Comments,
                    Work_Order => Work_Order,
                    Volume => Volume,
                    Response => Response);
    end Build;

    procedure Show_History (For_Objects : String := "<CURSOR>";
                            Display_Change_Regions : Boolean := True;
                            Starting_Generation : String := "<CURSOR>";
                            Ending_Generation : String := "";
                            Response : String := "<PROFILE>") is
    begin
        Cmvc.Show_History (For_Objects => For_Objects,
                           Display_Change_Regions => Display_Change_Regions,
                           Starting_Generation => Starting_Generation,
                           Ending_Generation => Ending_Generation,
                           Response => Response);
    end Show_History;

    procedure Show_History_By_Generation
                 (For_Objects : String := "<CURSOR>";
                  Display_Change_Regions : Boolean := True;
                  Starting_Generation : Natural := 1;
                  Ending_Generation : Natural := Natural'Last;
                  Response : String := "<PROFILE>") is
    begin
        Cmvc.Show_History_By_Generation
           (For_Objects => For_Objects,
            Display_Change_Regions => Display_Change_Regions,
            Starting_Generation => Starting_Generation,
            Ending_Generation => Ending_Generation,
            Response => Response);
    end Show_History_By_Generation;

    procedure Show_All_Uncontrolled (Object_Or_View : String := "<CURSOR>";
                                     Response : String := "<PROFILE>") is
    begin
        Cmvc.Show_All_Uncontrolled
           (In_View => Object_Or_View, Response => Response);
    end Show_All_Uncontrolled;

    procedure Show_Image_Of_Generation (Object : String := "<CURSOR>";
                                        Generation : Integer := -1;
                                        Output_Goes_To : String := "<WINDOW>";
                                        Response : String := "<PROFILE>") is
    begin
        Cmvc.Show_Image_Of_Generation (Object => Object,
                                       Generation => Generation,
                                       Output_Goes_To => Output_Goes_To,
                                       Response => Response);
    end Show_Image_Of_Generation;

    procedure Show (Objects : String := "<CURSOR>";
                    Response : String := "<PROFILE>") is
    begin
        Cmvc.Show (Objects => Objects, Response => Response);
    end Show;

    procedure Show_All_Checked_Out (In_View : String := "<CURSOR>";
                                    Response : String := "<PROFILE>") is
    begin
        Cmvc.Show_All_Checked_Out (In_View => In_View, Response => Response);
    end Show_All_Checked_Out;

    procedure Show_Checked_Out_In_View (In_View : String := "<CURSOR>";
                                        Response : String := "<PROFILE>") is
    begin
        Cmvc.Show_Checked_Out_In_View
           (In_View => In_View, Response => Response);
    end Show_Checked_Out_In_View;

    procedure Show_Checked_Out_By_User
                 (In_View : String := "<CURSOR>";
                  Who : String := System_Utilities.User_Name;
                  Response : String := "<PROFILE>") is
    begin
        Cmvc.Show_Checked_Out_By_User
           (In_View => In_View, Who => Who, Response => Response);
    end Show_Checked_Out_By_User;

    procedure Show_Out_Of_Date_Objects (In_View : String := "<CURSOR>";
                                        Response : String := "<PROFILE>") is
    begin
        Cmvc.Show_Out_Of_Date_Objects
           (In_View => In_View, Response => Response);
    end Show_Out_Of_Date_Objects;

    procedure Show_All_Controlled (In_View : String := "<CURSOR>";
                                   Response : String := "<PROFILE>") is
    begin
        Cmvc.Show_All_Controlled (In_View => In_View, Response => Response);
    end Show_All_Controlled;

    procedure Make_Code_View (From_View : String := "<CURSOR>";
                              Code_View_Name : String := "";
                              Comments : String := "";
                              Work_Order : String := "<DEFAULT>";
                              Volume : Natural := 0;
                              Response : String := "<PROFILE>") is
    begin
        Cmvc.Make_Code_View (From_View => From_View,
                             Code_View_Name => Code_View_Name,
                             Comments => Comments,
                             Work_Order => Work_Order,
                             Volume => Volume,
                             Response => Response);
    end Make_Code_View;
end Local_Cmvc;