
/*
 * This file was generated by the SOM Compiler.
 * FileName: G:\cwpsh\rel\os2c\include\base\os2\wpport.xh.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.14
 *     SOM Emitter emitxh: 2.43
 */

/*
 *   Module Header
 * 
 *   Module Name: WPPORT
 * 
 *   OS/2 Presentation Manager Workplace class definitions
 * 
 *   Copyright (c) International Business Machines Corporation 1991, 1992
 * 
 */


#ifndef SOM_WPPort_xh
#define SOM_WPPort_xh

class WPPort;

#define WPPort_MajorVersion 1
#define WPPort_MinorVersion 1

/*
 * Passthru lines: File: "C.h", "before"
 */

/* common context menu ids */
#define WPPOIDM_PORT_REDIRECT       7100
#define WPPOIDM_PORT_INSTALL        8001


/* C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>

/* C++ parent defs */
#ifndef SOM_WPTransient_xh
#include <wptrans.xh>
#endif

#ifndef WPPort_API
#define WPPort_API
/*
 * -- The Class API
 */

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class WPFolder;
class M_WPObject;
class WPObject;
class WPImageFile;
class M_WPTransient;
class M_WPPort;

/*
 * End of bindings for IDL types.
 */

/* A procedure to create the WPPort Class */
class M_WPPort;
SOMEXTERN M_WPPort * SOMLINK WPPortNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the WPPort class object, and the methods it introduces. */
SOMEXTERN struct WPPortClassDataStructure {
	M_WPPort *classObject;
	somMToken prtGetPortInfo;
	somMToken prtSetPortInfo;
	somMToken prtSettings;
	somMToken prtGetDeviceObject;
	somMToken prtSetPortDiscardhwndDlg;
	somMToken prtSetPortInstallhwndDlg;
	somMToken prtPrintPort;
	somMToken prtSetIcon;
	somMToken prtChangePort;
	somMToken prtGetStatus;
	somMToken prtGetComputername;
	somMToken prtSetStatus;
	somMToken prtGetPDSelf;
	somMToken prtSetPDSelf;
	somMToken prtSetUlStatus;
	somMToken prtGetUlStatus;
	somMToken prtGetPortName;
	somMToken prtGetPanelList;
	somMToken prtIncThreadCnt;
	somMToken prtDecThreadCnt;
	somMToken prtSetDevicename;
} SOMDLINK WPPortClassData;
#define _WPPort WPPortClassData.classObject

/* The API to parentMtabs for WPPort, and the instance data it introduces. */
SOMEXTERN struct WPPortCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK WPPortCClassData;

/*
 * -- Typedefs for WPPort Method Procedures
 */
SOMEXTERN {

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef M_WPPort*   SOMLINK somTP_WPPort_somGetClass(WPPort *somSelf);
typedef somTP_WPPort_somGetClass *somTD_WPPort_somGetClass;
}

#endif /* WPPort_API */


/*
 * -- This emitter normally treats Method Tokens as Thunks,
 * -- but the sc modifier "nothunks" was used, so somResolve will be called.
 */
#undef somresolve_
#define somresolve_(obj,mToken) (somResolve(obj,mToken))

/*
 * -- The C++ Wrapper Class for WPPort
 */
class WPPort : public WPTransient
{
public:

// WPPort::new creates the class object if necessary, and then uses somNewNoInit
// to allocate memory and create the object. Initialization is in ctors.
void *operator new(size_t)
{
   if (!_WPPort) WPPortNewClass(WPPort_MajorVersion,WPPort_MinorVersion);
   return (void*)
      SOM_Resolve(_WPPort,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_WPPort));
}

// WPPort::delete uses somDestruct.
void operator delete(void * obj)
{
   if (obj && *(void**)obj) {
      SOM_Resolve(obj,SOMObject,somDestruct)
         ((SOMObject*)obj, 1, 0);
   }
}

WPPort& operator=(WPPort& fromObj)
{
   this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
   return *this;
}

WPPort()
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (WPPortCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultInit(0);
}

WPPort(WPPort* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (WPPortCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
}

WPPort(const WPPort* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (WPPortCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}


/*
 * Reintroduce inherited methods
 */

/* method: somGetClass */
M_WPPort*  somGetClass()
{
/*
 *  Return the receiver's class.
 */
   return SOM_ResolveD(this,WPPort,SOMObject,somGetClass)
	(this);
}



};   /* WPPort */



#endif       /* SOM_WPPort_xh */

#ifndef SOM_M_WPPort_xh
#define SOM_M_WPPort_xh

class M_WPPort;

#define M_WPPort_MajorVersion 1
#define M_WPPort_MinorVersion 1

/* C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>

/* C++ parent defs */
#ifndef SOM_M_WPTransient_xh
#include <wptrans.xh>
#endif

#ifndef M_WPPort_API
#define M_WPPort_API
/*
 * -- The Class API
 */

/*
 * Start of bindings for IDL types
 */


/*
 * End of bindings for IDL types.
 */

/*
 * -- M_WPPort is a metaclass for WPPort. Make sure WPPort is known.
 */
class WPPort;


/* A procedure to create the M_WPPort Class */
SOMEXTERN SOMClass * SOMLINK M_WPPortNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the M_WPPort class object, and the methods it introduces. */
SOMEXTERN struct M_WPPortClassDataStructure {
	SOMClass *classObject;
} SOMDLINK M_WPPortClassData;
#define _M_WPPort M_WPPortClassData.classObject

/* The API to parentMtabs for M_WPPort, and the instance data it introduces. */
SOMEXTERN struct M_WPPortCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK M_WPPortCClassData;

/*
 * -- Typedefs for M_WPPort Method Procedures
 */
SOMEXTERN {

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef WPPort*   SOMLINK somTP_M_WPPort_somNew(M_WPPort *somSelf);
typedef somTP_M_WPPort_somNew *somTD_M_WPPort_somNew;
}

#endif /* M_WPPort_API */


/*
 * -- This emitter normally treats Method Tokens as Thunks,
 * -- but the sc modifier "nothunks" was used, so somResolve will be called.
 */
#undef somresolve_
#define somresolve_(obj,mToken) (somResolve(obj,mToken))

/*
 * -- The C++ Wrapper Class for M_WPPort
 */
class M_WPPort : public M_WPTransient
{
public:

// M_WPPort::new creates the class object if necessary, and then uses somNewNoInit
// to allocate memory and create the object. Initialization is in ctors.
void *operator new(size_t)
{
   if (!_M_WPPort) M_WPPortNewClass(M_WPPort_MajorVersion,M_WPPort_MinorVersion);
   return (void*)
      SOM_Resolve(_M_WPPort,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_M_WPPort));
}

// M_WPPort::delete uses somDestruct.
void operator delete(void * obj)
{
   if (obj && *(void**)obj) {
      SOM_Resolve(obj,SOMObject,somDestruct)
         ((SOMObject*)obj, 1, 0);
   }
}

M_WPPort& operator=(M_WPPort& fromObj)
{
   this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
   return *this;
}

M_WPPort()
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (M_WPPortCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultInit(0);
}

M_WPPort(M_WPPort* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (M_WPPortCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
}

M_WPPort(const M_WPPort* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (M_WPPortCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}


/*
 * Reintroduce inherited methods
 */

/* method: somNew */
WPPort*  somNew()
{
   return SOM_ResolveD(this,M_WPPort,SOMClass,somNew)
	(this);
}



};   /* M_WPPort */



#endif       /* SOM_M_WPPort_xh */
