DEFINITION MODULE WSUINI;

        (************************************************************)
        (*                                                          *)
        (*                    PM Setup for Weasel                   *)
        (*          This module reads/writes user INI data          *)
        (*                                                          *)
        (*      Started:        01 July 1999                        *)
        (*      Last edited:    1 May 2024                          *)
        (*      Status:         OK                                  *)
        (*                                                          *)
        (************************************************************)



FROM Names IMPORT (*type*) UserName;


PROCEDURE SetTNIMode (useTNI: BOOLEAN);

PROCEDURE SetMailroot (Mailroot: ARRAY OF CHAR);

    (* Lets this module know where the Mailroot directory is, in case   *)
    (* it has changed.                                                  *)

PROCEDURE SetDomain (domain: ARRAY OF CHAR);

    (* If domain = "", the INI file to be used will be WEASEL.INI in    *)
    (* our working directory.  Otherwise, the subdirectory 'domain' of  *)
    (* GlobalMailRoot, will be used, and the file name is DOMAIN.INI.   *)
    (* In TNI mode the files are TNI files rather than INI files.       *)

PROCEDURE OpenINIFile;

PROCEDURE OpenINIforDomain (domain: ARRAY OF CHAR);

    (* If domain = "", opens the main INI file.  Otherwise, opens the   *)
    (* DOMAIN.INI or DOMAIN.TNI for the specified domain.               *)
    (* Note that the current implementation allows only one INI file to *)
    (* be open at a time.  We assume that others are closed.            *)

PROCEDURE CloseINIFile;

PROCEDURE RemoveUser (user: UserName);

    (* Deletes one user from the currently active domain.  The user's   *)
    (* mail directory will also be deleted iff it is empty.             *)

END WSUINI.

