

                         LAN Manager User Interface
                               Design Overview
                        Server Manager Property Sheet
                            Keith Moore (KeithMo)
                          Revision 0.1 21-Jun-1991



1.  SCOPE

    This document provides a general design overview of the Server Manager
    Property Sheet implementation.  It describes the class declarations,
    the flow of information, and the general algorithms used.


2.  REFERENCES

    LAN Manager 3.0 Server Manager Functional Specification

    LAN Manager Server Manager Subproperty Sheet CDD

    BLT Specification


3.  OVERVIEW

    The Server Manager Main Property Sheet (PS) is the central focus for
    the administration of server properties.  The PS allows the user to
    change the server comment on the target server.  In addition, the PS
    is the launching point for a number of Subproperty Sheets (SPS).  See
    the Server Manager Subproperty Sheet CDD for details.


4.  CLASS OVERVIEW

    The SERVER_PROPERTIES class implements the PS dialog.  It contains code
    for reading & writing the target server comment.  It displays a number
    of current usage statistics.  It also contains a button-bar for
    launching the subproperty sheets.

    SERVER_PROPERTIES is contained in a wrapper class, PROPERTY_SHEET.
    The PROPERTY_SHEET class is responsible for validating that the user
    has sufficient privilege to administer the target server.  Only if the
    user has sufficient privilege will the SERVER_PROPERTIES dialog be
    invoked.


5.  CLASS DETAILS

    This section details the interfaces to the above described classes.
    Note that only the public: and protected: sections of the class
    declarations are given.

    5.1	SERVER_PROPERTIES

	The SERVER_PROPERTIES class is declared as follows:

	class SERVER_PROPERTIES : public DIALOG_WINDOW
	{
	protected:
            BOOL OnCommand( CID cid, ULONG lParam );

            BOOL OnOK( VOID );

	public:
	    SERVER_PROPERTIES( HWND	  hWndOwner,
			       SERVER_2	* psrv2 );

	    ~SERVER_PROPERTIES();

	};  // class SERVER_PROPERTIES

	    Note:  There are current plans to subclass DIALOG_WINDOW
	    (or VALIDATED_WINDOW) into PROPERTY_WINDOW and
	    SUBPROPERTY_WINDOW.  SERVER_PROPERTIES will inherit from
	    PROPERTY_WINDOW when this class becomes available.

        The OnCommand() method is responsible for handling all action
        items from the Graphical Button Bar.

        OnOK() is responsible for updating all information at the server,
        including the dreaded domain role transitions.

	    Note:  There will be a Refresh() method provided when
	    the design for dialog refresh is stable.


    5.2	PROPERTY_SHEET

	The PROPERTY_SHEET class is declared as follows:

	class PROPERTY_SHEET
	{
	public:
	    PROPERTY_SHEET( HWND       hWndOwner,
			    SERVER_2 * psrv2 );

	    ~PROPERTY_SHEET();

	};  // class PROPERTY_SHEET

	PROPERTY_SHEET is just a wrapper for the SERVER_PROPERTIES class.


6.  OPERATION

    After the user indicates that a property sheet should be invoked, the
    following steps are performed:

        The Server Manager Main Window (SrvMain) constructs a SERVER_2
	using the name of the selected server.  Note that this object
	is simply constructed.  None of this objects methods (including
	GetInfo()) are invoked by SrvMain.

        SrvMain creates a PROPERTY_SHEET object, passing to the
        constructor an HWND window handle to the main window and a
	pointer to the newly created SERVER_2 object.

    The PROPERTY_SHEET class performs the following operations:

	Invoking the SERVER_2 object's GetInfo() method will issue a
	level 2 NetServerGetInfo() API.  Since this infolevel requires
	admin privileges, the result of this method is used for privilege
	verification.  If the user has insufficient privilege, an
	appropriate error message is displayed and the PROPERTY_SHEET
	constructor is terminated.  If the GetInfo() method fails for
	any other reason (server malfunction??) then an appropriate error
	message is displayed and the PROPERTY_SHEET constructor is
	terminated.

	    Note:  What about share level servers?  The current
	    Server Manager Functional Specification does not address
	    share level servers.

	At this point, we know that the server exists, is responding
	properly to API, and the user has admin privileges.

	PROPERTY_SHEET now creats a SERVER_PROPERTIES class, passing
	to the constructer the HWND and SERVER_2 pointer it received
	from SrvMain.

    The SINGLE_PROPERTIES class performs the following steps:

        Retrieve all necessary information from the server.  The
        major/minor version numbers and server comment are retrieved
        from a SERVER_1 LMOBJ object.  The domain role is retrieved
        from a SERVER_2 LMOBJ object.

	    Note:  The LMOBJ specs state that SERVER_2 should inherit
	    directly from SERVER_1.  Currently, they both inherit
	    from the COMPUTER class.  If SERVER_2 was redesigned to
	    inherit from SERVER_1, then SERVER_PROPERTIES could
	    retrieve all of its information from a SERVER_2 object.

        Setup the graphical button bar.

        Display all "dynamic" data (data that can be refreshed during
        the lifetime of the dialog).  This data is retrieved via the
        function GetCurrentUsage() in PROPUTIL.C.  This module will
        eventually be converted to C++ as the necessary classes are
        created.  The following API are used for retrieving the
	current usage statistics:

	    NetFileEnum2()	- Open Files, File Locks,
				  Open Named Pipes
	    NetSessionEnum()	- Sessions
	    NetCharDevQEnum()	- Open Comm Ports
	    DosPrintQEnum()	- Print Jobs

        During OnOK() processing, SERVER_PROPERTIES::WriteInfoToServer()
        is invoked to update the server comment.  If a domain role
        transition was requested, this is performed next after displaying
        an appropriate warning message popup.


7.  OPEN ISSUES

    Servers running share level security.

    Updating LANMAN.INI on a server running LanMan < 2.1.

    Domain role transitions.


8.  REVISION HISTORY

    Rev	    Who         When            What
    ---	    ---		----            ----
    0.0	    KeithMo	12-Jun-1991	Created this document.

    0.1	    KeithMo	21-Jun-1991	Ripped out all references to DS and
					multiple-select properties.
