DEFINITION MODULE WPSERVER;

(***************************************************************************
  OS/2 2.1 Workplace class interface for WPServer

  Copyright (c) 1994 by Juergen Neuhoff
****************************************************************************)

(*$XL+       Modula-2 language extensions: '_' allowed for symbol names *)
(*$CDECL+    C-style procedures                                         *)
(*$A         default alignment for record fields                        *)

IMPORT SOM;
IMPORT WPFOLDER;
IMPORT OS2DEF;

TYPE PSOMClass              = SOM.PSOMClass;
TYPE INTEGER4               = SOM.INTEGER4;
TYPE somMToken              = SOM.somMToken;
TYPE somDToken              = SOM.somDToken;
TYPE somMethodProc          = SOM.somMethodProc;
TYPE PWPServer              = POINTER TO WPServer;
TYPE PM_WPServer            = POINTER TO M_WPServer;

(************************************************************************
  Additional TYPE- and CONST-declarations supporting WPServer
*************************************************************************)

TYPE HWND                   = OS2DEF.HWND;
TYPE PSZ                    = OS2DEF.PSZ;

(*************************************************************************
  SOM class API for WPServer, including type-bound procedures
**************************************************************************)

CONST
  WPServer_MajorVersion     = 1;
  WPServer_MinorVersion     = 2;

TYPE
  WPServerClassDataStructure     = RECORD
    classObject                    : PSOMClass;
    wpAddServerPage                : somMToken;
    wpQuerySrvrIdentity            : somMToken;
                                   END;

VAR
  WPServerClassData : WPServerClassDataStructure;

TYPE
  (*$SOM+ *)
  WPServer = RECORD( WPFOLDER.WPFolder ) END;
  (*$SOM- *)


PROCEDURE WPServerNewClass
(
  majorVersion  : INTEGER4;
  minorVersion  : INTEGER4
)               : PSOMClass;

PROCEDURE( Self : PWPServer ) wpAddServerPage
(
  hwndNotebook  : HWND 
)               : LONGCARD;

PROCEDURE( Self : PWPServer ) wpQuerySrvrIdentity( ) : PSZ;


(*************************************************************************
  SOM class API for M_WPServer, including type-bound procedures
**************************************************************************)

CONST
  M_WPServer_MajorVersion   = 1;
  M_WPServer_MinorVersion   = 2;

TYPE
  M_WPServerClassDataStructure   = RECORD
    classObject                    : PSOMClass;
                                   END;

VAR
  M_WPServerClassData : M_WPServerClassDataStructure;

TYPE
  (*$SOM+ *)
  M_WPServer = RECORD( WPFOLDER.M_WPFolder ) END;
  (*$SOM- *)


PROCEDURE M_WPServerNewClass
(
  majorVersion : INTEGER4;
  minorVersion : INTEGER4
)              : PSOMClass;


END WPSERVER.
