DEFINITION MODULE WPNETLNK;

(***************************************************************************
  OS/2 2.1 Workplace class interface for WPNetLink;

  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 WPSHADOW;
IMPORT OS2DEF;

TYPE PSOMClass              = SOM.PSOMClass;
TYPE INTEGER4               = SOM.INTEGER4;
TYPE somMToken              = SOM.somMToken;
TYPE somDToken              = SOM.somDToken;
TYPE somMethodProc          = SOM.somMethodProc;
TYPE PWPNetLink             = POINTER TO WPNetLink;
TYPE PM_WPNetLink           = POINTER TO M_WPNetLink;

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

TYPE PSZ                    = OS2DEF.PSZ;

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

CONST
  WPNetLink_MajorVersion     = 1;
  WPNetLink_MinorVersion     = 2;

TYPE
  WPNetLinkClassDataStructure  = RECORD
    classObject                  : PSOMClass;
    wpSetObjectNetId             : somMToken;
    wpQueryObjectNetId           : somMToken;
                                 END;

VAR
  WPNetLinkClassData : WPNetLinkClassDataStructure;

TYPE
  (*$SOM+ *)
  WPNetLink = RECORD( WPSHADOW.WPShadow ) END;
  (*$SOM- *)


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

PROCEDURE( Self : PWPNetLink ) wpSetObjectNetId
(
  szNetIdentity : ARRAY OF CHAR
)               : BOOLEAN;

PROCEDURE( Self : PWPNetLink ) wpQueryObjectNetId( ) : PSZ;


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

CONST
  M_WPNetLink_MajorVersion   = 1;
  M_WPNetLink_MinorVersion   = 2;

TYPE
  M_WPNetLinkClassDataStructure   = RECORD
    classObject                     : PSOMClass;
                                    END;

VAR
  M_WPNetLinkClassData : M_WPNetLinkClassDataStructure;

TYPE
  (*$SOM+ *)
  M_WPNetLink = RECORD( WPSHADOW.M_WPShadow ) END;
  (*$SOM- *)


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

END WPNETLNK.
