DEFINITION MODULE FtpdINI;

        (************************************************************)
        (*                                                          *)
        (*               FtpServer INI file operations              *)
        (*   This module opens and closes the FtpServer INI file    *)
        (*   The actual INI file operations are done by RINIData    *)
        (*                                                          *)
        (*      Started:        28 January 2002                     *)
        (*      Last edited:    5 February 2015                     *)
        (*      Status:         OK                                  *)
        (*                                                          *)
        (************************************************************)


FROM INIData IMPORT (* type *) HINI;

PROCEDURE SetINIFileName (name: ARRAY OF CHAR;  TNImode: BOOLEAN);

    (* Specifies the name of the file to be opened by OpenINIFile. *)

PROCEDURE GetINIFileName (VAR (*OUT*) name: ARRAY OF CHAR;
                               VAR (*OUT*) TNImode: BOOLEAN);

    (* Returns the name of the INI or TNI file. *)

PROCEDURE INIFileExists(): BOOLEAN;

    (* Returns TRUE iff the INI (or TNI, if appropriate) file exists. *)

PROCEDURE OpenINIFile(): HINI;

    (* Opens our INI file, returns the handle. *)

PROCEDURE CloseINIFile (hini: HINI);

    (* Closes an INI file. *)

PROCEDURE SetHashMax (value: CARDINAL);

    (* Sets the number of extra INI files to be used for the "large     *)
    (* number of users" case.  If value=0 then we revert to the default *)
    (* of using a single INI file.  Otherwise, it is recommended that   *)
    (* value be a prime number.                                         *)

PROCEDURE OpenINIForUser (name: ARRAY OF CHAR;
                                CreateIfNotExists: BOOLEAN): HINI;

    (* Opens the INI file that contains the data for the named user. *)

END FtpdINI.

