home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / wpjob.xh < prev    next >
Text File  |  1999-03-15  |  13KB  |  556 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: E:\cwpsh\rel\os2c\include\base\os2\wpjob.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.14
  7.  *     SOM Emitter emitxh: 2.43
  8.  */
  9.  
  10. /*
  11.  *   Module Header
  12.  * 
  13.  *   Module Name: WPJOB
  14.  * 
  15.  *   OS/2 Presentation Manager Workplace class definitions
  16.  * 
  17.  *   Copyright (c) International Business Machines Corporation 1991, 1992
  18.  * 
  19.  */
  20.  
  21.  
  22. #ifndef SOM_WPJob_xh
  23. #define SOM_WPJob_xh
  24.  
  25. class WPJob;
  26.  
  27. /*
  28.  *  CLASS: WPJob
  29.  * 
  30.  *  CLASS HIERARCHY:
  31.  *     SOMObject
  32.  *       └── WPObject
  33.  *             └── WPTransient
  34.  *                   └── WPJob
  35.  * 
  36.  *  DESCRIPTION:
  37.  *     This is the job object class.
  38.  *     An instance of this class is created by the Print Destination object
  39.  *     in its icon or detail view.
  40.  * 
  41.  */
  42.  
  43. #define WPJob_MajorVersion 1
  44. #define WPJob_MinorVersion 1
  45.  
  46. /*
  47.  * Passthru lines: File: "C.h", "before"
  48.  */
  49.  
  50. /* common context menu ids */
  51. #define WPPOICM_JOB_MENU            5000
  52. #define WPPOIDM_JOB_COPY            5001
  53. #define WPPOIDM_JOB_DEL             5002
  54. #define WPPOIDM_JOB_STATUS          5013
  55. #define WPPOIDM_JOB_HOLD            5009
  56. #define WPPOIDM_JOB_RELEASE         5008
  57. #define WPPOIDM_JOB_STARTAGAIN      5006
  58. #define WPPOIDM_JOB_PRINTNEXT       5007
  59. #define WPPOICM_JOB_OPENMENU        5050
  60. #define WPPOIDM_JOB_CONTENT         5011
  61.  
  62.  
  63. /* C++ SOM defs */
  64. #include <somcls.xh>
  65. #include <somcm.xh>
  66.  
  67. /* C++ parent defs */
  68. #ifndef SOM_WPTransient_xh
  69. #include <wptrans.xh>
  70. #endif
  71.  
  72. #ifndef WPJob_API
  73. #define WPJob_API
  74. /*
  75.  * -- The Class API
  76.  */
  77.  
  78. /*
  79.  * Start of bindings for IDL types
  80.  */
  81.  
  82. class SOMClass;
  83. class SOMObject;
  84. class WPFolder;
  85. class M_WPObject;
  86. class WPObject;
  87. class WPImageFile;
  88. class M_WPTransient;
  89. class WPPrinter;
  90. class M_WPJob;
  91.  
  92. /*
  93.  * End of bindings for IDL types.
  94.  */
  95.  
  96. /* A procedure to create the WPJob Class */
  97. class M_WPJob;
  98. SOMEXTERN M_WPJob * SOMLINK WPJobNewClass(
  99.         integer4 majorVersion,
  100.         integer4 minorVersion);
  101.  
  102. /* The API to the WPJob class object, and the methods it introduces. */
  103. SOMEXTERN struct WPJobClassDataStructure {
  104.     M_WPJob *classObject;
  105.     somMToken prtGetJobID;
  106.     somMToken prtSetJobID;
  107.     somMToken prtGetJobInfo2;
  108.     somMToken prtSetJobInfo2;
  109.     somMToken prtGetJobInfo3;
  110.     somMToken prtSetJobInfo3;
  111.     somMToken prtFreeJobInfo2;
  112.     somMToken prtFreeJobInfo3;
  113.     somMToken prtGetPDObject;
  114.     somMToken prtSetPDObject;
  115.     somMToken prtGetDocument;
  116.     somMToken prtSetDocument;
  117.     somMToken prtDupJobInfo2;
  118.     somMToken prtDupJobInfo3;
  119.     somMToken wpDeleteJob;
  120.     somMToken wpHoldJob;
  121.     somMToken wpReleaseJob;
  122.     somMToken wpPrintJobNext;
  123.     somMToken wpStartJobAgain;
  124.     somMToken wpQueryPrintObject;
  125.     somMToken wpQueryJobId;
  126.     somMToken wpQueryJobFile;
  127.     somMToken wpQueryJobType;
  128.     somMToken prtGetJobInfo4;
  129.     somMToken prtSetJobInfo4;
  130.     somMToken prtFreeJobInfo4;
  131.     somMToken prtDupJobInfo4;
  132.     somMToken wpMoveJobObject;
  133.     somMToken prtSetOutputPortname;
  134.     somMToken prtSetJobState;
  135.     somMToken prtQueryJobState;
  136. } SOMDLINK WPJobClassData;
  137. #define _WPJob WPJobClassData.classObject
  138.  
  139. /* The API to parentMtabs for WPJob, and the instance data it introduces. */
  140. SOMEXTERN struct WPJobCClassDataStructure {
  141.     somMethodTabs parentMtab;
  142.     somDToken              instanceDataToken;
  143. } SOMDLINK WPJobCClassData;
  144.  
  145. /*
  146.  * -- Typedefs for WPJob Method Procedures
  147.  */
  148. SOMEXTERN {
  149. typedef BOOL   SOMLINK somTP_WPJob_wpDeleteJob(WPJob *somSelf);
  150. typedef somTP_WPJob_wpDeleteJob *somTD_WPJob_wpDeleteJob;
  151. typedef BOOL   SOMLINK somTP_WPJob_wpHoldJob(WPJob *somSelf);
  152. typedef somTP_WPJob_wpHoldJob *somTD_WPJob_wpHoldJob;
  153. typedef BOOL   SOMLINK somTP_WPJob_wpReleaseJob(WPJob *somSelf);
  154. typedef somTP_WPJob_wpReleaseJob *somTD_WPJob_wpReleaseJob;
  155. typedef BOOL   SOMLINK somTP_WPJob_wpPrintJobNext(WPJob *somSelf);
  156. typedef somTP_WPJob_wpPrintJobNext *somTD_WPJob_wpPrintJobNext;
  157. typedef BOOL   SOMLINK somTP_WPJob_wpStartJobAgain(WPJob *somSelf);
  158. typedef somTP_WPJob_wpStartJobAgain *somTD_WPJob_wpStartJobAgain;
  159. typedef WPObject*   SOMLINK somTP_WPJob_wpQueryPrintObject(WPJob *somSelf);
  160. typedef somTP_WPJob_wpQueryPrintObject *somTD_WPJob_wpQueryPrintObject;
  161. typedef ULONG   SOMLINK somTP_WPJob_wpQueryJobId(WPJob *somSelf);
  162. typedef somTP_WPJob_wpQueryJobId *somTD_WPJob_wpQueryJobId;
  163. typedef BOOL   SOMLINK somTP_WPJob_wpQueryJobFile(WPJob *somSelf, 
  164.         PSZ pBuf, 
  165.         PULONG pcbBuf);
  166. typedef somTP_WPJob_wpQueryJobFile *somTD_WPJob_wpQueryJobFile;
  167. typedef BOOL   SOMLINK somTP_WPJob_wpQueryJobType(WPJob *somSelf, 
  168.         PSZ pBuf, 
  169.         PULONG pcbBuf);
  170. typedef somTP_WPJob_wpQueryJobType *somTD_WPJob_wpQueryJobType;
  171. typedef BOOL   SOMLINK somTP_WPJob_wpMoveJobObject(WPJob *somSelf, 
  172.         WPPrinter* DestPrinter, 
  173.         ULONG ulReserved);
  174. typedef somTP_WPJob_wpMoveJobObject *somTD_WPJob_wpMoveJobObject;
  175.  
  176. /*
  177.  * -- Typedefs for Reintroduced Wrapper Methods
  178.  */
  179. typedef M_WPJob*   SOMLINK somTP_WPJob_somGetClass(WPJob *somSelf);
  180. typedef somTP_WPJob_somGetClass *somTD_WPJob_somGetClass;
  181. }
  182.  
  183. #endif /* WPJob_API */
  184.  
  185.  
  186. /*
  187.  * -- This emitter normally treats Method Tokens as Thunks,
  188.  * -- but the sc modifier "nothunks" was used, so somResolve will be called.
  189.  */
  190. #undef somresolve_
  191. #define somresolve_(obj,mToken) (somResolve(obj,mToken))
  192.  
  193. /*
  194.  * -- The C++ Wrapper Class for WPJob
  195.  */
  196. class WPJob : public WPTransient
  197. {
  198. /*
  199.  *  CLASS: WPJob
  200.  * 
  201.  *  CLASS HIERARCHY:
  202.  *     SOMObject
  203.  *       └── WPObject
  204.  *             └── WPTransient
  205.  *                   └── WPJob
  206.  * 
  207.  *  DESCRIPTION:
  208.  *     This is the job object class.
  209.  *     An instance of this class is created by the Print Destination object
  210.  *     in its icon or detail view.
  211.  * 
  212.  */
  213. public:
  214.  
  215. // WPJob::new creates the class object if necessary, and then uses somNewNoInit
  216. // to allocate memory and create the object. Initialization is in ctors.
  217. void *operator new(size_t)
  218. {
  219.    if (!_WPJob) WPJobNewClass(WPJob_MajorVersion,WPJob_MinorVersion);
  220.    return (void*)
  221.       SOM_Resolve(_WPJob,SOMClass,somNewNoInit)
  222.          ((SOMClass *)((void*)_WPJob));
  223. }
  224.  
  225. // WPJob::delete uses somDestruct.
  226. void operator delete(void * obj)
  227. {
  228.    if (obj && *(void**)obj) {
  229.       SOM_Resolve(obj,SOMObject,somDestruct)
  230.          ((SOMObject*)obj, 1, 0);
  231.    }
  232. }
  233.  
  234. WPJob& operator=(WPJob& fromObj)
  235. {
  236.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  237.    return *this;
  238. }
  239.  
  240. WPJob()
  241. {
  242.    if (*(void**)this != 
  243.        ((somParentMtabStructPtr)
  244.         (WPJobCClassData.parentMtab))->mtab)
  245.       return;
  246.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  247. }
  248.  
  249. WPJob(WPJob* fromObj)
  250. {
  251.    if (*(void**)this != 
  252.        ((somParentMtabStructPtr)
  253.         (WPJobCClassData.parentMtab))->mtab)
  254.       return;
  255.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  256. }
  257.  
  258. WPJob(const WPJob* fromObj)
  259. {
  260.    if (*(void**)this != 
  261.        ((somParentMtabStructPtr)
  262.         (WPJobCClassData.parentMtab))->mtab)
  263.       return;
  264.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  265. }
  266.  
  267.  
  268. /* method: wpDeleteJob */
  269. BOOL   wpDeleteJob()
  270. {
  271. /*
  272.  *  Delete a job object
  273.  */
  274.    return SOM_ResolveD(this,WPJob,WPJob,wpDeleteJob)
  275.     (this);
  276. }
  277.  
  278.  
  279. /* method: wpHoldJob */
  280. BOOL   wpHoldJob()
  281. {
  282. /*
  283.  *  Hold printing a job object
  284.  */
  285.    return SOM_ResolveD(this,WPJob,WPJob,wpHoldJob)
  286.     (this);
  287. }
  288.  
  289.  
  290. /* method: wpReleaseJob */
  291. BOOL   wpReleaseJob()
  292. {
  293. /*
  294.  *  Release printing a job object
  295.  */
  296.    return SOM_ResolveD(this,WPJob,WPJob,wpReleaseJob)
  297.     (this);
  298. }
  299.  
  300.  
  301. /* method: wpPrintJobNext */
  302. BOOL   wpPrintJobNext()
  303. {
  304. /*
  305.  *  Move this job object to be printed next
  306.  */
  307.    return SOM_ResolveD(this,WPJob,WPJob,wpPrintJobNext)
  308.     (this);
  309. }
  310.  
  311.  
  312. /* method: wpStartJobAgain */
  313. BOOL   wpStartJobAgain()
  314. {
  315. /*
  316.  *  Start the job again
  317.  */
  318.    return SOM_ResolveD(this,WPJob,WPJob,wpStartJobAgain)
  319.     (this);
  320. }
  321.  
  322.  
  323. /* method: wpQueryPrintObject */
  324. WPObject*   wpQueryPrintObject()
  325. {
  326. /*
  327.  *  Return a pointer to the PrintObject this job is in.
  328.  */
  329.    return SOM_ResolveD(this,WPJob,WPJob,wpQueryPrintObject)
  330.     (this);
  331. }
  332.  
  333.  
  334. /* method: wpQueryJobId */
  335. ULONG   wpQueryJobId()
  336. {
  337. /*
  338.  *  Returns the JobId of this job
  339.  */
  340.    return SOM_ResolveD(this,WPJob,WPJob,wpQueryJobId)
  341.     (this);
  342. }
  343.  
  344.  
  345. /* method: wpQueryJobFile */
  346. BOOL   wpQueryJobFile(PSZ pBuf, 
  347.         PULONG pcbBuf)
  348. {
  349. /*
  350.  *  Return the spool file name in the pBuf
  351.  */
  352.    return SOM_ResolveD(this,WPJob,WPJob,wpQueryJobFile)
  353.     (this,pBuf,pcbBuf);
  354. }
  355.  
  356.  
  357. /* method: wpQueryJobType */
  358. BOOL   wpQueryJobType(PSZ pBuf, 
  359.         PULONG pcbBuf)
  360. {
  361. /*
  362.  *  Return the job type int pBuf
  363.  */
  364.    return SOM_ResolveD(this,WPJob,WPJob,wpQueryJobType)
  365.     (this,pBuf,pcbBuf);
  366. }
  367.  
  368.  
  369. /* method: wpMoveJobObject */
  370. BOOL   wpMoveJobObject(WPPrinter* DestPrinter, 
  371.         ULONG ulReserved)
  372. {
  373.    return SOM_ResolveD(this,WPJob,WPJob,wpMoveJobObject)
  374.     (this,DestPrinter,ulReserved);
  375. }
  376.  
  377.  
  378. /*
  379.  * Reintroduce inherited methods
  380.  */
  381.  
  382. /* method: somGetClass */
  383. M_WPJob*  somGetClass()
  384. {
  385. /*
  386.  *  Return the receiver's class.
  387.  */
  388.    return SOM_ResolveD(this,WPJob,SOMObject,somGetClass)
  389.     (this);
  390. }
  391.  
  392.  
  393.  
  394. };   /* WPJob */
  395.  
  396.  
  397.  
  398. #endif       /* SOM_WPJob_xh */
  399.  
  400. #ifndef SOM_M_WPJob_xh
  401. #define SOM_M_WPJob_xh
  402.  
  403. class M_WPJob;
  404.  
  405. #define M_WPJob_MajorVersion 1
  406. #define M_WPJob_MinorVersion 1
  407.  
  408. /* C++ SOM defs */
  409. #include <somcls.xh>
  410. #include <somcm.xh>
  411.  
  412. /* C++ parent defs */
  413. #ifndef SOM_M_WPTransient_xh
  414. #include <wptrans.xh>
  415. #endif
  416.  
  417. #ifndef M_WPJob_API
  418. #define M_WPJob_API
  419. /*
  420.  * -- The Class API
  421.  */
  422.  
  423. /*
  424.  * Start of bindings for IDL types
  425.  */
  426.  
  427.  
  428. /*
  429.  * End of bindings for IDL types.
  430.  */
  431.  
  432. /*
  433.  * -- M_WPJob is a metaclass for WPJob. Make sure WPJob is known.
  434.  */
  435. class WPJob;
  436.  
  437.  
  438. /* A procedure to create the M_WPJob Class */
  439. SOMEXTERN SOMClass * SOMLINK M_WPJobNewClass(
  440.         integer4 majorVersion,
  441.         integer4 minorVersion);
  442.  
  443. /* The API to the M_WPJob class object, and the methods it introduces. */
  444. SOMEXTERN struct M_WPJobClassDataStructure {
  445.     SOMClass *classObject;
  446.     somMToken prtclsManageSelected;
  447. } SOMDLINK M_WPJobClassData;
  448. #define _M_WPJob M_WPJobClassData.classObject
  449.  
  450. /* The API to parentMtabs for M_WPJob, and the instance data it introduces. */
  451. SOMEXTERN struct M_WPJobCClassDataStructure {
  452.     somMethodTabs parentMtab;
  453.     somDToken              instanceDataToken;
  454. } SOMDLINK M_WPJobCClassData;
  455.  
  456. /*
  457.  * -- Typedefs for M_WPJob Method Procedures
  458.  */
  459. SOMEXTERN {
  460.  
  461. /*
  462.  * -- Typedefs for Reintroduced Wrapper Methods
  463.  */
  464. typedef WPJob*   SOMLINK somTP_M_WPJob_somNew(M_WPJob *somSelf);
  465. typedef somTP_M_WPJob_somNew *somTD_M_WPJob_somNew;
  466. }
  467.  
  468. #endif /* M_WPJob_API */
  469.  
  470.  
  471. /*
  472.  * -- This emitter normally treats Method Tokens as Thunks,
  473.  * -- but the sc modifier "nothunks" was used, so somResolve will be called.
  474.  */
  475. #undef somresolve_
  476. #define somresolve_(obj,mToken) (somResolve(obj,mToken))
  477.  
  478. /*
  479.  * -- The C++ Wrapper Class for M_WPJob
  480.  */
  481. class M_WPJob : public M_WPTransient
  482. {
  483. public:
  484.  
  485. // M_WPJob::new creates the class object if necessary, and then uses somNewNoInit
  486. // to allocate memory and create the object. Initialization is in ctors.
  487. void *operator new(size_t)
  488. {
  489.    if (!_M_WPJob) M_WPJobNewClass(M_WPJob_MajorVersion,M_WPJob_MinorVersion);
  490.    return (void*)
  491.       SOM_Resolve(_M_WPJob,SOMClass,somNewNoInit)
  492.          ((SOMClass *)((void*)_M_WPJob));
  493. }
  494.  
  495. // M_WPJob::delete uses somDestruct.
  496. void operator delete(void * obj)
  497. {
  498.    if (obj && *(void**)obj) {
  499.       SOM_Resolve(obj,SOMObject,somDestruct)
  500.          ((SOMObject*)obj, 1, 0);
  501.    }
  502. }
  503.  
  504. M_WPJob& operator=(M_WPJob& fromObj)
  505. {
  506.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  507.    return *this;
  508. }
  509.  
  510. M_WPJob()
  511. {
  512.    if (*(void**)this != 
  513.        ((somParentMtabStructPtr)
  514.         (M_WPJobCClassData.parentMtab))->mtab)
  515.       return;
  516.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  517. }
  518.  
  519. M_WPJob(M_WPJob* fromObj)
  520. {
  521.    if (*(void**)this != 
  522.        ((somParentMtabStructPtr)
  523.         (M_WPJobCClassData.parentMtab))->mtab)
  524.       return;
  525.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  526. }
  527.  
  528. M_WPJob(const M_WPJob* fromObj)
  529. {
  530.    if (*(void**)this != 
  531.        ((somParentMtabStructPtr)
  532.         (M_WPJobCClassData.parentMtab))->mtab)
  533.       return;
  534.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  535. }
  536.  
  537.  
  538. /*
  539.  * Reintroduce inherited methods
  540.  */
  541.  
  542. /* method: somNew */
  543. WPJob*  somNew()
  544. {
  545.    return SOM_ResolveD(this,M_WPJob,SOMClass,somNew)
  546.     (this);
  547. }
  548.  
  549.  
  550.  
  551. };   /* M_WPJob */
  552.  
  553.  
  554.  
  555. #endif       /* SOM_M_WPJob_xh */
  556.