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

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


#ifndef SOM_WPDisk_xh
#define SOM_WPDisk_xh

class WPDisk;

#define WPDisk_MajorVersion 1
#define WPDisk_MinorVersion 2

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

    #ifndef __cplusplus
      #ifndef WPRootFolder
        #define WPRootFolder SOMObject
      #endif
    #else
      class WPRootFolder;
    #endif

    #define OPEN_AUTO            120

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

/* C++ parent defs */
#ifndef SOM_WPAbstract_xh
#include <wpabs.xh>
#endif

#ifndef WPDisk_API
#define WPDisk_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_WPAbstract;
class WPRootFolder;
class M_WPDisk;

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

/* A procedure to create the WPDisk Class */
class M_WPDisk;
SOMEXTERN M_WPDisk * SOMLINK WPDiskNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the WPDisk class object, and the methods it introduces. */
SOMEXTERN struct WPDiskClassDataStructure {
	M_WPDisk *classObject;
	somMToken wpAddDiskDetailsPage;
	somMToken wpSetCorrectDiskIcon;
	somMToken wpQueryLogicalDrive;
	somMToken wpDiskPrivate1;
	somMToken wpQueryRootFolder;
	somMToken wpDiskPrivate2;
	somMToken wpDiskPrivate3;
	somMToken wpDiskPrivate4;
	somMToken wpQueryDriveLockStatus;
	somMToken wpEjectDisk;
	somMToken wpLockDrive;
} SOMDLINK WPDiskClassData;
#define _WPDisk WPDiskClassData.classObject

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

/*
 * -- Typedefs for WPDisk Method Procedures
 */
SOMEXTERN {
typedef ULONG   SOMLINK somTP_WPDisk_wpAddDiskDetailsPage(WPDisk *somSelf, 
		HWND hwndNotebook);
typedef somTP_WPDisk_wpAddDiskDetailsPage *somTD_WPDisk_wpAddDiskDetailsPage;
typedef ULONG   SOMLINK somTP_WPDisk_wpQueryDriveLockStatus(WPDisk *somSelf, 
		PULONG pulLockStatus, 
		PULONG pulLockCount);
typedef somTP_WPDisk_wpQueryDriveLockStatus *somTD_WPDisk_wpQueryDriveLockStatus;
typedef ULONG   SOMLINK somTP_WPDisk_wpEjectDisk(WPDisk *somSelf);
typedef somTP_WPDisk_wpEjectDisk *somTD_WPDisk_wpEjectDisk;
typedef ULONG   SOMLINK somTP_WPDisk_wpLockDrive(WPDisk *somSelf, 
		BOOL fLock);
typedef somTP_WPDisk_wpLockDrive *somTD_WPDisk_wpLockDrive;
typedef ULONG   SOMLINK somTP_WPDisk_wpQueryLogicalDrive(WPDisk *somSelf);
typedef somTP_WPDisk_wpQueryLogicalDrive *somTD_WPDisk_wpQueryLogicalDrive;
typedef WPRootFolder*   SOMLINK somTP_WPDisk_wpQueryRootFolder(WPDisk *somSelf);
typedef somTP_WPDisk_wpQueryRootFolder *somTD_WPDisk_wpQueryRootFolder;
typedef BOOL   SOMLINK somTP_WPDisk_wpSetCorrectDiskIcon(WPDisk *somSelf);
typedef somTP_WPDisk_wpSetCorrectDiskIcon *somTD_WPDisk_wpSetCorrectDiskIcon;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef M_WPDisk*   SOMLINK somTP_WPDisk_somGetClass(WPDisk *somSelf);
typedef somTP_WPDisk_somGetClass *somTD_WPDisk_somGetClass;
}

#endif /* WPDisk_API */


/*
 * -- This emitter treats Method Tokens as Thunks by default.
 * -- Use the sc modifier "nothunks" to change this default
 */
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))

/*
 * -- The C++ Wrapper Class for WPDisk
 */
class WPDisk : public WPAbstract
{
public:

// WPDisk::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 (!_WPDisk) WPDiskNewClass(WPDisk_MajorVersion,WPDisk_MinorVersion);
   return (void*)
      SOM_Resolve(_WPDisk,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_WPDisk));
}

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

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

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

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

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


/* method: wpAddDiskDetailsPage */
ULONG   wpAddDiskDetailsPage(HWND hwndNotebook)
{
   return SOM_ResolveD(this,WPDisk,WPDisk,wpAddDiskDetailsPage)
	(this,hwndNotebook);
}


/* method: wpQueryDriveLockStatus */
ULONG   wpQueryDriveLockStatus(PULONG pulLockStatus, 
		PULONG pulLockCount)
{
   return SOM_ResolveD(this,WPDisk,WPDisk,wpQueryDriveLockStatus)
	(this,pulLockStatus,pulLockCount);
}


/* method: wpEjectDisk */
ULONG   wpEjectDisk()
{
   return SOM_ResolveD(this,WPDisk,WPDisk,wpEjectDisk)
	(this);
}


/* method: wpLockDrive */
ULONG   wpLockDrive(BOOL fLock)
{
   return SOM_ResolveD(this,WPDisk,WPDisk,wpLockDrive)
	(this,fLock);
}


/* method: wpQueryLogicalDrive */
ULONG   wpQueryLogicalDrive()
{
   return SOM_ResolveD(this,WPDisk,WPDisk,wpQueryLogicalDrive)
	(this);
}


/* method: wpQueryRootFolder */
WPRootFolder*   wpQueryRootFolder()
{
   return SOM_ResolveD(this,WPDisk,WPDisk,wpQueryRootFolder)
	(this);
}


/* method: wpSetCorrectDiskIcon */
BOOL   wpSetCorrectDiskIcon()
{
   return SOM_ResolveD(this,WPDisk,WPDisk,wpSetCorrectDiskIcon)
	(this);
}


/*
 * Reintroduce inherited methods
 */

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



};   /* WPDisk */



#endif       /* SOM_WPDisk_xh */

#ifndef SOM_M_WPDisk_xh
#define SOM_M_WPDisk_xh

class M_WPDisk;

#define M_WPDisk_MajorVersion 1
#define M_WPDisk_MinorVersion 2

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

/* C++ parent defs */
#ifndef SOM_M_WPAbstract_xh
#include <wpabs.xh>
#endif

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

/*
 * Start of bindings for IDL types
 */


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

/*
 * -- M_WPDisk is a metaclass for WPDisk. Make sure WPDisk is known.
 */
class WPDisk;


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

/* The API to the M_WPDisk class object, and the methods it introduces. */
SOMEXTERN struct M_WPDiskClassDataStructure {
	SOMClass *classObject;
} SOMDLINK M_WPDiskClassData;
#define _M_WPDisk M_WPDiskClassData.classObject

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

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

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef WPDisk*   SOMLINK somTP_M_WPDisk_somNew(M_WPDisk *somSelf);
typedef somTP_M_WPDisk_somNew *somTD_M_WPDisk_somNew;
}

#endif /* M_WPDisk_API */


/*
 * -- This emitter treats Method Tokens as Thunks by default.
 * -- Use the sc modifier "nothunks" to change this default
 */
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))

/*
 * -- The C++ Wrapper Class for M_WPDisk
 */
class M_WPDisk : public M_WPAbstract
{
public:

// M_WPDisk::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_WPDisk) M_WPDiskNewClass(M_WPDisk_MajorVersion,M_WPDisk_MinorVersion);
   return (void*)
      SOM_Resolve(_M_WPDisk,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_M_WPDisk));
}

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

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

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

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

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


/*
 * Reintroduce inherited methods
 */

/* method: somNew */
WPDisk*  somNew()
{
   return SOM_ResolveD(this,M_WPDisk,SOMClass,somNew)
	(this);
}



};   /* M_WPDisk */



#endif       /* SOM_M_WPDisk_xh */
