-- This package supplies a way to store and retrieve defaults.
--
-- This package knows nothing about the proper syntax for defaults;
-- such checking must be done elsewhere.
--
-- All strings are returned in uppercase.
--
with Lines;
with Subtypes;
use Subtypes;
package Defaults is

    subtype Default is Lines.Line;

    function Catalog (For_User : in User_Name) return Default;
    --
    -- Returns the default catalog for the specified user.
    --
    -- Raises "IO_Failure" if a problem is encountered obtaining the
    -- default.

    function Catalog (For_User : in User_Name) return Simple_Name;
    --
    -- Returns the default catalog for the specified user.
    --
    -- Raises "IO_Failure" if a problem is encountered obtaining the
    -- default.

    function Full_Catalog (For_User : in User_Name) return Full_Name;
    --
    -- Returns the fully-qualified pathname of the default catalog
    -- for the specified user.

    function Version (For_User : in User_Name) return Default;
    --
    -- Returns the default version for the specified user.
    --
    -- Raises "IO_Failure" if a problem is encountered obtaining the
    -- default.

    function Version (For_User : in User_Name) return Simple_Name;
    --
    -- Returns the default version for the specified user.
    --
    -- Raises "IO_Failure" if a problem is encountered obtaining the
    -- default.

    function Full_Version (For_User : in User_Name) return Full_Name;
    --
    -- Returns the fully-qualified pathname of the default version
    -- of the default catalog for the specified user.

    procedure Set (For_User : in User_Name;
                   Catalog : in Simple_Name;
                   Version : in Simple_Name);
    --
    -- Sets the defaults for the specified user.
    --
    -- Raises "IO_Failure" if a problem is encountered saving the
    -- permanent representation of the defaults.

    Io_Failure : exception;

end Defaults;