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

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


#ifndef SOM_WPJob_xh
#define SOM_WPJob_xh

class WPJob;

/*
 *  CLASS: WPJob
 * 
 *  CLASS HIERARCHY:
 *     SOMObject
 *       ÀÄÄ WPObject
 *             ÀÄÄ WPTransient
 *                   ÀÄÄ WPJob
 * 
 *  DESCRIPTION:
 *     This is the job object class.
 *     An instance of this class is created by the Print Destination object
 *     in its icon or detail view.
 * 
 */

#define WPJob_MajorVersion 1
#define WPJob_MinorVersion 1

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

/* common context menu ids */
#define WPPOICM_JOB_MENU            5000
#define WPPOIDM_JOB_COPY            5001
#define WPPOIDM_JOB_DEL             5002
#define WPPOIDM_JOB_STATUS          5013
#define WPPOIDM_JOB_HOLD            5009
#define WPPOIDM_JOB_RELEASE         5008
#define WPPOIDM_JOB_STARTAGAIN      5006
#define WPPOIDM_JOB_PRINTNEXT       5007
#define WPPOICM_JOB_OPENMENU        5050
#define WPPOIDM_JOB_CONTENT         5011


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

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

#ifndef WPJob_API
#define WPJob_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 WPPrinter;
class M_WPJob;

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

/* A procedure to create the WPJob Class */
class M_WPJob;
SOMEXTERN M_WPJob * SOMLINK WPJobNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the WPJob class object, and the methods it introduces. */
SOMEXTERN struct WPJobClassDataStructure {
	M_WPJob *classObject;
	somMToken prtGetJobID;
	somMToken prtSetJobID;
	somMToken prtGetJobInfo2;
	somMToken prtSetJobInfo2;
	somMToken prtGetJobInfo3;
	somMToken prtSetJobInfo3;
	somMToken prtFreeJobInfo2;
	somMToken prtFreeJobInfo3;
	somMToken prtGetPDObject;
	somMToken prtSetPDObject;
	somMToken prtGetDocument;
	somMToken prtSetDocument;
	somMToken prtDupJobInfo2;
	somMToken prtDupJobInfo3;
	somMToken wpDeleteJob;
	somMToken wpHoldJob;
	somMToken wpReleaseJob;
	somMToken wpPrintJobNext;
	somMToken wpStartJobAgain;
	somMToken wpQueryPrintObject;
	somMToken wpQueryJobId;
	somMToken wpQueryJobFile;
	somMToken wpQueryJobType;
	somMToken prtGetJobInfo4;
	somMToken prtSetJobInfo4;
	somMToken prtFreeJobInfo4;
	somMToken prtDupJobInfo4;
	somMToken wpMoveJobObject;
	somMToken prtSetOutputPortname;
	somMToken prtSetJobState;
	somMToken prtQueryJobState;
} SOMDLINK WPJobClassData;
#define _WPJob WPJobClassData.classObject

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

/*
 * -- Typedefs for WPJob Method Procedures
 */
SOMEXTERN {
typedef BOOL   SOMLINK somTP_WPJob_wpDeleteJob(WPJob *somSelf);
typedef somTP_WPJob_wpDeleteJob *somTD_WPJob_wpDeleteJob;
typedef BOOL   SOMLINK somTP_WPJob_wpHoldJob(WPJob *somSelf);
typedef somTP_WPJob_wpHoldJob *somTD_WPJob_wpHoldJob;
typedef BOOL   SOMLINK somTP_WPJob_wpReleaseJob(WPJob *somSelf);
typedef somTP_WPJob_wpReleaseJob *somTD_WPJob_wpReleaseJob;
typedef BOOL   SOMLINK somTP_WPJob_wpPrintJobNext(WPJob *somSelf);
typedef somTP_WPJob_wpPrintJobNext *somTD_WPJob_wpPrintJobNext;
typedef BOOL   SOMLINK somTP_WPJob_wpStartJobAgain(WPJob *somSelf);
typedef somTP_WPJob_wpStartJobAgain *somTD_WPJob_wpStartJobAgain;
typedef WPObject*   SOMLINK somTP_WPJob_wpQueryPrintObject(WPJob *somSelf);
typedef somTP_WPJob_wpQueryPrintObject *somTD_WPJob_wpQueryPrintObject;
typedef ULONG   SOMLINK somTP_WPJob_wpQueryJobId(WPJob *somSelf);
typedef somTP_WPJob_wpQueryJobId *somTD_WPJob_wpQueryJobId;
typedef BOOL   SOMLINK somTP_WPJob_wpQueryJobFile(WPJob *somSelf, 
		PSZ pBuf, 
		PULONG pcbBuf);
typedef somTP_WPJob_wpQueryJobFile *somTD_WPJob_wpQueryJobFile;
typedef BOOL   SOMLINK somTP_WPJob_wpQueryJobType(WPJob *somSelf, 
		PSZ pBuf, 
		PULONG pcbBuf);
typedef somTP_WPJob_wpQueryJobType *somTD_WPJob_wpQueryJobType;
typedef BOOL   SOMLINK somTP_WPJob_wpMoveJobObject(WPJob *somSelf, 
		WPPrinter* DestPrinter, 
		ULONG ulReserved);
typedef somTP_WPJob_wpMoveJobObject *somTD_WPJob_wpMoveJobObject;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef M_WPJob*   SOMLINK somTP_WPJob_somGetClass(WPJob *somSelf);
typedef somTP_WPJob_somGetClass *somTD_WPJob_somGetClass;
}

#endif /* WPJob_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 WPJob
 */
class WPJob : public WPTransient
{
/*
 *  CLASS: WPJob
 * 
 *  CLASS HIERARCHY:
 *     SOMObject
 *       ÀÄÄ WPObject
 *             ÀÄÄ WPTransient
 *                   ÀÄÄ WPJob
 * 
 *  DESCRIPTION:
 *     This is the job object class.
 *     An instance of this class is created by the Print Destination object
 *     in its icon or detail view.
 * 
 */
public:

// WPJob::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 (!_WPJob) WPJobNewClass(WPJob_MajorVersion,WPJob_MinorVersion);
   return (void*)
      SOM_Resolve(_WPJob,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_WPJob));
}

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

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

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

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

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


/* method: wpDeleteJob */
BOOL   wpDeleteJob()
{
/*
 *  Delete a job object
 */
   return SOM_ResolveD(this,WPJob,WPJob,wpDeleteJob)
	(this);
}


/* method: wpHoldJob */
BOOL   wpHoldJob()
{
/*
 *  Hold printing a job object
 */
   return SOM_ResolveD(this,WPJob,WPJob,wpHoldJob)
	(this);
}


/* method: wpReleaseJob */
BOOL   wpReleaseJob()
{
/*
 *  Release printing a job object
 */
   return SOM_ResolveD(this,WPJob,WPJob,wpReleaseJob)
	(this);
}


/* method: wpPrintJobNext */
BOOL   wpPrintJobNext()
{
/*
 *  Move this job object to be printed next
 */
   return SOM_ResolveD(this,WPJob,WPJob,wpPrintJobNext)
	(this);
}


/* method: wpStartJobAgain */
BOOL   wpStartJobAgain()
{
/*
 *  Start the job again
 */
   return SOM_ResolveD(this,WPJob,WPJob,wpStartJobAgain)
	(this);
}


/* method: wpQueryPrintObject */
WPObject*   wpQueryPrintObject()
{
/*
 *  Return a pointer to the PrintObject this job is in.
 */
   return SOM_ResolveD(this,WPJob,WPJob,wpQueryPrintObject)
	(this);
}


/* method: wpQueryJobId */
ULONG   wpQueryJobId()
{
/*
 *  Returns the JobId of this job
 */
   return SOM_ResolveD(this,WPJob,WPJob,wpQueryJobId)
	(this);
}


/* method: wpQueryJobFile */
BOOL   wpQueryJobFile(PSZ pBuf, 
		PULONG pcbBuf)
{
/*
 *  Return the spool file name in the pBuf
 */
   return SOM_ResolveD(this,WPJob,WPJob,wpQueryJobFile)
	(this,pBuf,pcbBuf);
}


/* method: wpQueryJobType */
BOOL   wpQueryJobType(PSZ pBuf, 
		PULONG pcbBuf)
{
/*
 *  Return the job type int pBuf
 */
   return SOM_ResolveD(this,WPJob,WPJob,wpQueryJobType)
	(this,pBuf,pcbBuf);
}


/* method: wpMoveJobObject */
BOOL   wpMoveJobObject(WPPrinter* DestPrinter, 
		ULONG ulReserved)
{
   return SOM_ResolveD(this,WPJob,WPJob,wpMoveJobObject)
	(this,DestPrinter,ulReserved);
}


/*
 * Reintroduce inherited methods
 */

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



};   /* WPJob */



#endif       /* SOM_WPJob_xh */

#ifndef SOM_M_WPJob_xh
#define SOM_M_WPJob_xh

class M_WPJob;

#define M_WPJob_MajorVersion 1
#define M_WPJob_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_WPJob_API
#define M_WPJob_API
/*
 * -- The Class API
 */

/*
 * Start of bindings for IDL types
 */


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

/*
 * -- M_WPJob is a metaclass for WPJob. Make sure WPJob is known.
 */
class WPJob;


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

/* The API to the M_WPJob class object, and the methods it introduces. */
SOMEXTERN struct M_WPJobClassDataStructure {
	SOMClass *classObject;
	somMToken prtclsManageSelected;
} SOMDLINK M_WPJobClassData;
#define _M_WPJob M_WPJobClassData.classObject

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

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

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef WPJob*   SOMLINK somTP_M_WPJob_somNew(M_WPJob *somSelf);
typedef somTP_M_WPJob_somNew *somTD_M_WPJob_somNew;
}

#endif /* M_WPJob_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_WPJob
 */
class M_WPJob : public M_WPTransient
{
public:

// M_WPJob::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_WPJob) M_WPJobNewClass(M_WPJob_MajorVersion,M_WPJob_MinorVersion);
   return (void*)
      SOM_Resolve(_M_WPJob,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_M_WPJob));
}

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

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

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

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

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


/*
 * Reintroduce inherited methods
 */

/* method: somNew */
WPJob*  somNew()
{
   return SOM_ResolveD(this,M_WPJob,SOMClass,somNew)
	(this);
}



};   /* M_WPJob */



#endif       /* SOM_M_WPJob_xh */
