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

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: E:\cwpsh\rel\os2c\include\base\os2\wppower.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: WPPOWER
  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_WPPower_xh
  23. #define SOM_WPPower_xh
  24.  
  25. class WPPower;
  26.  
  27. #define WPPower_MajorVersion 1
  28. #define WPPower_MinorVersion 2
  29.  
  30. /*
  31.  * Passthru lines: File: "C.h", "before"
  32.  */
  33. #define OPEN_STATUS  131
  34.     #define OPEN_BATTERY 132
  35.  
  36.     #define APMLEVEL_NONE    0
  37.     #define APMLEVEL_UNKNOWN 1
  38.     #define APMLEVEL_10      2
  39.     #define APMLEVEL_11      3
  40.     #define APMLEVEL_12      4
  41.  
  42.  
  43.  
  44. /* C++ SOM defs */
  45. #include <somcls.xh>
  46. #include <somcm.xh>
  47.  
  48. /* C++ parent defs */
  49. #ifndef SOM_WPAbstract_xh
  50. #include <wpabs.xh>
  51. #endif
  52.  
  53. #ifndef WPPower_API
  54. #define WPPower_API
  55. /*
  56.  * -- The Class API
  57.  */
  58.  
  59. /*
  60.  * Start of bindings for IDL types
  61.  */
  62.  
  63. class SOMClass;
  64. class SOMObject;
  65. class WPFolder;
  66. class M_WPObject;
  67. class WPObject;
  68. class WPImageFile;
  69. class M_WPAbstract;
  70. class M_WPPower;
  71.  
  72. /*
  73.  * End of bindings for IDL types.
  74.  */
  75.  
  76. /* A procedure to create the WPPower Class */
  77. class M_WPPower;
  78. SOMEXTERN M_WPPower * SOMLINK WPPowerNewClass(
  79.         integer4 majorVersion,
  80.         integer4 minorVersion);
  81.  
  82. /* The API to the WPPower class object, and the methods it introduces. */
  83. SOMEXTERN struct WPPowerClassDataStructure {
  84.     M_WPPower *classObject;
  85.     somMToken wpChangePowerState;
  86.     somMToken wpSetPowerManagement;
  87.     somMToken wpQueryPowerManagement;
  88.     somMToken wpSetPowerConfirmation;
  89.     somMToken wpQueryPowerConfirmation;
  90.     somMToken wpAddPowerPage;
  91.     somMToken wpAddPowerViewPage;
  92.     somMToken wpSetAutoRefresh;
  93.     somMToken wpQueryAutoRefresh;
  94.     somMToken wpQueryRefreshRate;
  95.     somMToken wpSetRefreshRate;
  96.     somMToken wpPowerPrivate1;
  97.     somMToken wpPowerPrivate2;
  98.     somMToken wpQueryDefStatusView;
  99.     somMToken wpSetDefStatusView;
  100.     somMToken wpAddPowerResumePage;
  101.     somMToken wpPowerPrivate3;
  102.     somMToken wpQueryAPMLevel;
  103.     somMToken wpQueryBIOSPowerManagementSupport;
  104.     somMToken wpSetBIOSPowerManagementSupport;
  105.     somMToken wpQueryOS2PowerManagementSupport;
  106.     somMToken wpSetOS2PowerManagementSupport;
  107.     somMToken wpQueryTimerBasedRequests;
  108.     somMToken wpSetTimerBasedRequests;
  109.     somMToken wpQueryResumeOnRing;
  110.     somMToken wpSetResumeOnRing;
  111.     somMToken wpQueryResumeOnTimer;
  112.     somMToken wpSetResumeOnTimer;
  113.     somMToken wpQueryCapabilities;
  114.     somMToken wpPowerOff;
  115.     somMToken wpSuspend;
  116.     somMToken wpRefreshNotebookPages;
  117. } SOMDLINK WPPowerClassData;
  118. #define _WPPower WPPowerClassData.classObject
  119.  
  120. /* The API to parentMtabs for WPPower, and the instance data it introduces. */
  121. SOMEXTERN struct WPPowerCClassDataStructure {
  122.     somMethodTabs parentMtab;
  123.     somDToken              instanceDataToken;
  124. } SOMDLINK WPPowerCClassData;
  125.  
  126. /*
  127.  * -- Typedefs for WPPower Method Procedures
  128.  */
  129. SOMEXTERN {
  130. typedef ULONG   SOMLINK somTP_WPPower_wpAddPowerPage(WPPower *somSelf, 
  131.         HWND hwndNotebook);
  132. typedef somTP_WPPower_wpAddPowerPage *somTD_WPPower_wpAddPowerPage;
  133. typedef ULONG   SOMLINK somTP_WPPower_wpAddPowerResumePage(WPPower *somSelf, 
  134.         HWND hwndNotebook);
  135. typedef somTP_WPPower_wpAddPowerResumePage *somTD_WPPower_wpAddPowerResumePage;
  136. typedef ULONG   SOMLINK somTP_WPPower_wpAddPowerViewPage(WPPower *somSelf, 
  137.         HWND hwndNotebook);
  138. typedef somTP_WPPower_wpAddPowerViewPage *somTD_WPPower_wpAddPowerViewPage;
  139. typedef BOOL   SOMLINK somTP_WPPower_wpChangePowerState(WPPower *somSelf, 
  140.         ULONG ulParm1, 
  141.         ULONG ulParm2);
  142. typedef somTP_WPPower_wpChangePowerState *somTD_WPPower_wpChangePowerState;
  143. typedef BOOL   SOMLINK somTP_WPPower_wpPowerOff(WPPower *somSelf, 
  144.         BOOL bConfirm);
  145. typedef somTP_WPPower_wpPowerOff *somTD_WPPower_wpPowerOff;
  146. typedef ULONG   SOMLINK somTP_WPPower_wpQueryAPMLevel(WPPower *somSelf);
  147. typedef somTP_WPPower_wpQueryAPMLevel *somTD_WPPower_wpQueryAPMLevel;
  148. typedef BOOL   SOMLINK somTP_WPPower_wpQueryAutoRefresh(WPPower *somSelf);
  149. typedef somTP_WPPower_wpQueryAutoRefresh *somTD_WPPower_wpQueryAutoRefresh;
  150. typedef BOOL   SOMLINK somTP_WPPower_wpQueryBIOSPowerManagementSupport(WPPower *somSelf, 
  151.         BOOL* pbEnable);
  152. typedef somTP_WPPower_wpQueryBIOSPowerManagementSupport *somTD_WPPower_wpQueryBIOSPowerManagementSupport;
  153. typedef BOOL   SOMLINK somTP_WPPower_wpQueryCapabilities(WPPower *somSelf, 
  154.         ULONG* pulBatteryMax, 
  155.         ULONG* pulCapabilities);
  156. typedef somTP_WPPower_wpQueryCapabilities *somTD_WPPower_wpQueryCapabilities;
  157. typedef ULONG   SOMLINK somTP_WPPower_wpQueryDefStatusView(WPPower *somSelf);
  158. typedef somTP_WPPower_wpQueryDefStatusView *somTD_WPPower_wpQueryDefStatusView;
  159. typedef BOOL   SOMLINK somTP_WPPower_wpQueryOS2PowerManagementSupport(WPPower *somSelf, 
  160.         BOOL* pbEnable);
  161. typedef somTP_WPPower_wpQueryOS2PowerManagementSupport *somTD_WPPower_wpQueryOS2PowerManagementSupport;
  162. typedef BOOL   SOMLINK somTP_WPPower_wpQueryPowerConfirmation(WPPower *somSelf);
  163. typedef somTP_WPPower_wpQueryPowerConfirmation *somTD_WPPower_wpQueryPowerConfirmation;
  164. typedef BOOL   SOMLINK somTP_WPPower_wpQueryPowerManagement(WPPower *somSelf);
  165. typedef somTP_WPPower_wpQueryPowerManagement *somTD_WPPower_wpQueryPowerManagement;
  166. typedef ULONG   SOMLINK somTP_WPPower_wpQueryRefreshRate(WPPower *somSelf);
  167. typedef somTP_WPPower_wpQueryRefreshRate *somTD_WPPower_wpQueryRefreshRate;
  168. typedef BOOL   SOMLINK somTP_WPPower_wpQueryResumeOnRing(WPPower *somSelf, 
  169.         BOOL* pbEnable);
  170. typedef somTP_WPPower_wpQueryResumeOnRing *somTD_WPPower_wpQueryResumeOnRing;
  171. typedef BOOL   SOMLINK somTP_WPPower_wpQueryResumeOnTimer(WPPower *somSelf, 
  172.         BOOL* pbEnable, 
  173.         ULONG* pulYear, 
  174.         ULONG* pulMonth, 
  175.         ULONG* pulDay, 
  176.         ULONG* pulHour, 
  177.         ULONG* pulMinute, 
  178.         ULONG* pulSecond);
  179. typedef somTP_WPPower_wpQueryResumeOnTimer *somTD_WPPower_wpQueryResumeOnTimer;
  180. typedef BOOL   SOMLINK somTP_WPPower_wpQueryTimerBasedRequests(WPPower *somSelf, 
  181.         BOOL* pbEnable);
  182. typedef somTP_WPPower_wpQueryTimerBasedRequests *somTD_WPPower_wpQueryTimerBasedRequests;
  183. typedef void   SOMLINK somTP_WPPower_wpRefreshNotebookPages(WPPower *somSelf);
  184. typedef somTP_WPPower_wpRefreshNotebookPages *somTD_WPPower_wpRefreshNotebookPages;
  185. typedef void   SOMLINK somTP_WPPower_wpSetAutoRefresh(WPPower *somSelf, 
  186.         BOOL fAutoRefresh);
  187. typedef somTP_WPPower_wpSetAutoRefresh *somTD_WPPower_wpSetAutoRefresh;
  188. typedef BOOL   SOMLINK somTP_WPPower_wpSetBIOSPowerManagementSupport(WPPower *somSelf, 
  189.         BOOL bEnable);
  190. typedef somTP_WPPower_wpSetBIOSPowerManagementSupport *somTD_WPPower_wpSetBIOSPowerManagementSupport;
  191. typedef void   SOMLINK somTP_WPPower_wpSetDefStatusView(WPPower *somSelf, 
  192.         ULONG ulDefStatus);
  193. typedef somTP_WPPower_wpSetDefStatusView *somTD_WPPower_wpSetDefStatusView;
  194. typedef BOOL   SOMLINK somTP_WPPower_wpSetOS2PowerManagementSupport(WPPower *somSelf, 
  195.         BOOL bEnable);
  196. typedef somTP_WPPower_wpSetOS2PowerManagementSupport *somTD_WPPower_wpSetOS2PowerManagementSupport;
  197. typedef void   SOMLINK somTP_WPPower_wpSetPowerConfirmation(WPPower *somSelf, 
  198.         BOOL fConfirm);
  199. typedef somTP_WPPower_wpSetPowerConfirmation *somTD_WPPower_wpSetPowerConfirmation;
  200. typedef BOOL   SOMLINK somTP_WPPower_wpSetPowerManagement(WPPower *somSelf, 
  201.         BOOL fPower);
  202. typedef somTP_WPPower_wpSetPowerManagement *somTD_WPPower_wpSetPowerManagement;
  203. typedef BOOL   SOMLINK somTP_WPPower_wpSetRefreshRate(WPPower *somSelf, 
  204.         ULONG ulRefreshRate);
  205. typedef somTP_WPPower_wpSetRefreshRate *somTD_WPPower_wpSetRefreshRate;
  206. typedef BOOL   SOMLINK somTP_WPPower_wpSetResumeOnRing(WPPower *somSelf, 
  207.         BOOL bEnable);
  208. typedef somTP_WPPower_wpSetResumeOnRing *somTD_WPPower_wpSetResumeOnRing;
  209. typedef BOOL   SOMLINK somTP_WPPower_wpSetResumeOnTimer(WPPower *somSelf, 
  210.         BOOL bEnable, 
  211.         ULONG ulYear, 
  212.         ULONG ulMonth, 
  213.         ULONG ulDay, 
  214.         ULONG ulHour, 
  215.         ULONG ulMinute, 
  216.         ULONG ulSecond);
  217. typedef somTP_WPPower_wpSetResumeOnTimer *somTD_WPPower_wpSetResumeOnTimer;
  218. typedef BOOL   SOMLINK somTP_WPPower_wpSetTimerBasedRequests(WPPower *somSelf, 
  219.         BOOL bEnable);
  220. typedef somTP_WPPower_wpSetTimerBasedRequests *somTD_WPPower_wpSetTimerBasedRequests;
  221. typedef BOOL   SOMLINK somTP_WPPower_wpSuspend(WPPower *somSelf, 
  222.         BOOL bConfirm);
  223. typedef somTP_WPPower_wpSuspend *somTD_WPPower_wpSuspend;
  224.  
  225. /*
  226.  * -- Typedefs for Reintroduced Wrapper Methods
  227.  */
  228. typedef M_WPPower*   SOMLINK somTP_WPPower_somGetClass(WPPower *somSelf);
  229. typedef somTP_WPPower_somGetClass *somTD_WPPower_somGetClass;
  230. }
  231.  
  232. #endif /* WPPower_API */
  233.  
  234.  
  235. /*
  236.  * -- This emitter treats Method Tokens as Thunks by default.
  237.  * -- Use the sc modifier "nothunks" to change this default
  238.  */
  239. #undef somresolve_
  240. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  241.  
  242. /*
  243.  * -- The C++ Wrapper Class for WPPower
  244.  */
  245. class WPPower : public WPAbstract
  246. {
  247. public:
  248.  
  249. // WPPower::new creates the class object if necessary, and then uses somNewNoInit
  250. // to allocate memory and create the object. Initialization is in ctors.
  251. void *operator new(size_t)
  252. {
  253.    if (!_WPPower) WPPowerNewClass(WPPower_MajorVersion,WPPower_MinorVersion);
  254.    return (void*)
  255.       SOM_Resolve(_WPPower,SOMClass,somNewNoInit)
  256.          ((SOMClass *)((void*)_WPPower));
  257. }
  258.  
  259. // WPPower::delete uses somDestruct.
  260. void operator delete(void * obj)
  261. {
  262.    if (obj && *(void**)obj) {
  263.       SOM_Resolve(obj,SOMObject,somDestruct)
  264.          ((SOMObject*)obj, 1, 0);
  265.    }
  266. }
  267.  
  268. WPPower& operator=(WPPower& fromObj)
  269. {
  270.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  271.    return *this;
  272. }
  273.  
  274. WPPower()
  275. {
  276.    if (*(void**)this != 
  277.        ((somParentMtabStructPtr)
  278.         (WPPowerCClassData.parentMtab))->mtab)
  279.       return;
  280.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  281. }
  282.  
  283. WPPower(WPPower* fromObj)
  284. {
  285.    if (*(void**)this != 
  286.        ((somParentMtabStructPtr)
  287.         (WPPowerCClassData.parentMtab))->mtab)
  288.       return;
  289.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  290. }
  291.  
  292. WPPower(const WPPower* fromObj)
  293. {
  294.    if (*(void**)this != 
  295.        ((somParentMtabStructPtr)
  296.         (WPPowerCClassData.parentMtab))->mtab)
  297.       return;
  298.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  299. }
  300.  
  301.  
  302. /* method: wpAddPowerPage */
  303. ULONG   wpAddPowerPage(HWND hwndNotebook)
  304. {
  305.    return SOM_ResolveD(this,WPPower,WPPower,wpAddPowerPage)
  306.     (this,hwndNotebook);
  307. }
  308.  
  309.  
  310. /* method: wpAddPowerResumePage */
  311. ULONG   wpAddPowerResumePage(HWND hwndNotebook)
  312. {
  313.    return SOM_ResolveD(this,WPPower,WPPower,wpAddPowerResumePage)
  314.     (this,hwndNotebook);
  315. }
  316.  
  317.  
  318. /* method: wpAddPowerViewPage */
  319. ULONG   wpAddPowerViewPage(HWND hwndNotebook)
  320. {
  321.    return SOM_ResolveD(this,WPPower,WPPower,wpAddPowerViewPage)
  322.     (this,hwndNotebook);
  323. }
  324.  
  325.  
  326. /* method: wpChangePowerState */
  327. BOOL   wpChangePowerState(ULONG ulParm1, 
  328.         ULONG ulParm2)
  329. {
  330.    return SOM_ResolveD(this,WPPower,WPPower,wpChangePowerState)
  331.     (this,ulParm1,ulParm2);
  332. }
  333.  
  334.  
  335. /* method: wpPowerOff */
  336. BOOL   wpPowerOff(BOOL bConfirm)
  337. {
  338.    return SOM_ResolveD(this,WPPower,WPPower,wpPowerOff)
  339.     (this,bConfirm);
  340. }
  341.  
  342.  
  343. /* method: wpQueryAPMLevel */
  344. ULONG   wpQueryAPMLevel()
  345. {
  346.    return SOM_ResolveD(this,WPPower,WPPower,wpQueryAPMLevel)
  347.     (this);
  348. }
  349.  
  350.  
  351. /* method: wpQueryAutoRefresh */
  352. BOOL   wpQueryAutoRefresh()
  353. {
  354.    return SOM_ResolveD(this,WPPower,WPPower,wpQueryAutoRefresh)
  355.     (this);
  356. }
  357.  
  358.  
  359. /* method: wpQueryBIOSPowerManagementSupport */
  360. BOOL   wpQueryBIOSPowerManagementSupport(BOOL* pbEnable)
  361. {
  362.    return SOM_ResolveD(this,WPPower,WPPower,wpQueryBIOSPowerManagementSupport)
  363.     (this,pbEnable);
  364. }
  365.  
  366.  
  367. /* method: wpQueryCapabilities */
  368. BOOL   wpQueryCapabilities(ULONG* pulBatteryMax, 
  369.         ULONG* pulCapabilities)
  370. {
  371.    return SOM_ResolveD(this,WPPower,WPPower,wpQueryCapabilities)
  372.     (this,pulBatteryMax,pulCapabilities);
  373. }
  374.  
  375.  
  376. /* method: wpQueryDefStatusView */
  377. ULONG   wpQueryDefStatusView()
  378. {
  379.    return SOM_ResolveD(this,WPPower,WPPower,wpQueryDefStatusView)
  380.     (this);
  381. }
  382.  
  383.  
  384. /* method: wpQueryOS2PowerManagementSupport */
  385. BOOL   wpQueryOS2PowerManagementSupport(BOOL* pbEnable)
  386. {
  387.    return SOM_ResolveD(this,WPPower,WPPower,wpQueryOS2PowerManagementSupport)
  388.     (this,pbEnable);
  389. }
  390.  
  391.  
  392. /* method: wpQueryPowerConfirmation */
  393. BOOL   wpQueryPowerConfirmation()
  394. {
  395.    return SOM_ResolveD(this,WPPower,WPPower,wpQueryPowerConfirmation)
  396.     (this);
  397. }
  398.  
  399.  
  400. /* method: wpQueryPowerManagement */
  401. BOOL   wpQueryPowerManagement()
  402. {
  403.    return SOM_ResolveD(this,WPPower,WPPower,wpQueryPowerManagement)
  404.     (this);
  405. }
  406.  
  407.  
  408. /* method: wpQueryRefreshRate */
  409. ULONG   wpQueryRefreshRate()
  410. {
  411.    return SOM_ResolveD(this,WPPower,WPPower,wpQueryRefreshRate)
  412.     (this);
  413. }
  414.  
  415.  
  416. /* method: wpQueryResumeOnRing */
  417. BOOL   wpQueryResumeOnRing(BOOL* pbEnable)
  418. {
  419.    return SOM_ResolveD(this,WPPower,WPPower,wpQueryResumeOnRing)
  420.     (this,pbEnable);
  421. }
  422.  
  423.  
  424. /* method: wpQueryResumeOnTimer */
  425. BOOL   wpQueryResumeOnTimer(BOOL* pbEnable, 
  426.         ULONG* pulYear, 
  427.         ULONG* pulMonth, 
  428.         ULONG* pulDay, 
  429.         ULONG* pulHour, 
  430.         ULONG* pulMinute, 
  431.         ULONG* pulSecond)
  432. {
  433.    return SOM_ResolveD(this,WPPower,WPPower,wpQueryResumeOnTimer)
  434.     (this,pbEnable,pulYear,pulMonth,pulDay,pulHour,pulMinute,pulSecond);
  435. }
  436.  
  437.  
  438. /* method: wpQueryTimerBasedRequests */
  439. BOOL   wpQueryTimerBasedRequests(BOOL* pbEnable)
  440. {
  441.    return SOM_ResolveD(this,WPPower,WPPower,wpQueryTimerBasedRequests)
  442.     (this,pbEnable);
  443. }
  444.  
  445.  
  446. /* method: wpRefreshNotebookPages */
  447. void   wpRefreshNotebookPages()
  448. {
  449.    SOM_ResolveD(this,WPPower,WPPower,wpRefreshNotebookPages)
  450.     (this);
  451. }
  452.  
  453.  
  454. /* method: wpSetAutoRefresh */
  455. void   wpSetAutoRefresh(BOOL fAutoRefresh)
  456. {
  457.    SOM_ResolveD(this,WPPower,WPPower,wpSetAutoRefresh)
  458.     (this,fAutoRefresh);
  459. }
  460.  
  461.  
  462. /* method: wpSetBIOSPowerManagementSupport */
  463. BOOL   wpSetBIOSPowerManagementSupport(BOOL bEnable)
  464. {
  465.    return SOM_ResolveD(this,WPPower,WPPower,wpSetBIOSPowerManagementSupport)
  466.     (this,bEnable);
  467. }
  468.  
  469.  
  470. /* method: wpSetDefStatusView */
  471. void   wpSetDefStatusView(ULONG ulDefStatus)
  472. {
  473.    SOM_ResolveD(this,WPPower,WPPower,wpSetDefStatusView)
  474.     (this,ulDefStatus);
  475. }
  476.  
  477.  
  478. /* method: wpSetOS2PowerManagementSupport */
  479. BOOL   wpSetOS2PowerManagementSupport(BOOL bEnable)
  480. {
  481.    return SOM_ResolveD(this,WPPower,WPPower,wpSetOS2PowerManagementSupport)
  482.     (this,bEnable);
  483. }
  484.  
  485.  
  486. /* method: wpSetPowerConfirmation */
  487. void   wpSetPowerConfirmation(BOOL fConfirm)
  488. {
  489.    SOM_ResolveD(this,WPPower,WPPower,wpSetPowerConfirmation)
  490.     (this,fConfirm);
  491. }
  492.  
  493.  
  494. /* method: wpSetPowerManagement */
  495. BOOL   wpSetPowerManagement(BOOL fPower)
  496. {
  497.    return SOM_ResolveD(this,WPPower,WPPower,wpSetPowerManagement)
  498.     (this,fPower);
  499. }
  500.  
  501.  
  502. /* method: wpSetRefreshRate */
  503. BOOL   wpSetRefreshRate(ULONG ulRefreshRate)
  504. {
  505.    return SOM_ResolveD(this,WPPower,WPPower,wpSetRefreshRate)
  506.     (this,ulRefreshRate);
  507. }
  508.  
  509.  
  510. /* method: wpSetResumeOnRing */
  511. BOOL   wpSetResumeOnRing(BOOL bEnable)
  512. {
  513.    return SOM_ResolveD(this,WPPower,WPPower,wpSetResumeOnRing)
  514.     (this,bEnable);
  515. }
  516.  
  517.  
  518. /* method: wpSetResumeOnTimer */
  519. BOOL   wpSetResumeOnTimer(BOOL bEnable, 
  520.         ULONG ulYear, 
  521.         ULONG ulMonth, 
  522.         ULONG ulDay, 
  523.         ULONG ulHour, 
  524.         ULONG ulMinute, 
  525.         ULONG ulSecond)
  526. {
  527.    return SOM_ResolveD(this,WPPower,WPPower,wpSetResumeOnTimer)
  528.     (this,bEnable,ulYear,ulMonth,ulDay,ulHour,ulMinute,ulSecond);
  529. }
  530.  
  531.  
  532. /* method: wpSetTimerBasedRequests */
  533. BOOL   wpSetTimerBasedRequests(BOOL bEnable)
  534. {
  535.    return SOM_ResolveD(this,WPPower,WPPower,wpSetTimerBasedRequests)
  536.     (this,bEnable);
  537. }
  538.  
  539.  
  540. /* method: wpSuspend */
  541. BOOL   wpSuspend(BOOL bConfirm)
  542. {
  543.    return SOM_ResolveD(this,WPPower,WPPower,wpSuspend)
  544.     (this,bConfirm);
  545. }
  546.  
  547.  
  548. /*
  549.  * Reintroduce inherited methods
  550.  */
  551.  
  552. /* method: somGetClass */
  553. M_WPPower*  somGetClass()
  554. {
  555. /*
  556.  *  Return the receiver's class.
  557.  */
  558.    return SOM_ResolveD(this,WPPower,SOMObject,somGetClass)
  559.     (this);
  560. }
  561.  
  562.  
  563.  
  564. };   /* WPPower */
  565.  
  566.  
  567.  
  568. #endif       /* SOM_WPPower_xh */
  569.  
  570. #ifndef SOM_M_WPPower_xh
  571. #define SOM_M_WPPower_xh
  572.  
  573. class M_WPPower;
  574.  
  575. #define M_WPPower_MajorVersion 1
  576. #define M_WPPower_MinorVersion 2
  577.  
  578. /* C++ SOM defs */
  579. #include <somcls.xh>
  580. #include <somcm.xh>
  581.  
  582. /* C++ parent defs */
  583. #ifndef SOM_M_WPAbstract_xh
  584. #include <wpabs.xh>
  585. #endif
  586.  
  587. #ifndef M_WPPower_API
  588. #define M_WPPower_API
  589. /*
  590.  * -- The Class API
  591.  */
  592.  
  593. /*
  594.  * Start of bindings for IDL types
  595.  */
  596.  
  597.  
  598. /*
  599.  * End of bindings for IDL types.
  600.  */
  601.  
  602. /*
  603.  * -- M_WPPower is a metaclass for WPPower. Make sure WPPower is known.
  604.  */
  605. class WPPower;
  606.  
  607.  
  608. /* A procedure to create the M_WPPower Class */
  609. SOMEXTERN SOMClass * SOMLINK M_WPPowerNewClass(
  610.         integer4 majorVersion,
  611.         integer4 minorVersion);
  612.  
  613. /* The API to the M_WPPower class object, and the methods it introduces. */
  614. SOMEXTERN struct M_WPPowerClassDataStructure {
  615.     SOMClass *classObject;
  616. } SOMDLINK M_WPPowerClassData;
  617. #define _M_WPPower M_WPPowerClassData.classObject
  618.  
  619. /* The API to parentMtabs for M_WPPower, and the instance data it introduces. */
  620. SOMEXTERN struct M_WPPowerCClassDataStructure {
  621.     somMethodTabs parentMtab;
  622.     somDToken              instanceDataToken;
  623. } SOMDLINK M_WPPowerCClassData;
  624.  
  625. /*
  626.  * -- Typedefs for M_WPPower Method Procedures
  627.  */
  628. SOMEXTERN {
  629.  
  630. /*
  631.  * -- Typedefs for Reintroduced Wrapper Methods
  632.  */
  633. typedef WPPower*   SOMLINK somTP_M_WPPower_somNew(M_WPPower *somSelf);
  634. typedef somTP_M_WPPower_somNew *somTD_M_WPPower_somNew;
  635. }
  636.  
  637. #endif /* M_WPPower_API */
  638.  
  639.  
  640. /*
  641.  * -- This emitter treats Method Tokens as Thunks by default.
  642.  * -- Use the sc modifier "nothunks" to change this default
  643.  */
  644. #undef somresolve_
  645. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  646.  
  647. /*
  648.  * -- The C++ Wrapper Class for M_WPPower
  649.  */
  650. class M_WPPower : public M_WPAbstract
  651. {
  652. public:
  653.  
  654. // M_WPPower::new creates the class object if necessary, and then uses somNewNoInit
  655. // to allocate memory and create the object. Initialization is in ctors.
  656. void *operator new(size_t)
  657. {
  658.    if (!_M_WPPower) M_WPPowerNewClass(M_WPPower_MajorVersion,M_WPPower_MinorVersion);
  659.    return (void*)
  660.       SOM_Resolve(_M_WPPower,SOMClass,somNewNoInit)
  661.          ((SOMClass *)((void*)_M_WPPower));
  662. }
  663.  
  664. // M_WPPower::delete uses somDestruct.
  665. void operator delete(void * obj)
  666. {
  667.    if (obj && *(void**)obj) {
  668.       SOM_Resolve(obj,SOMObject,somDestruct)
  669.          ((SOMObject*)obj, 1, 0);
  670.    }
  671. }
  672.  
  673. M_WPPower& operator=(M_WPPower& fromObj)
  674. {
  675.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  676.    return *this;
  677. }
  678.  
  679. M_WPPower()
  680. {
  681.    if (*(void**)this != 
  682.        ((somParentMtabStructPtr)
  683.         (M_WPPowerCClassData.parentMtab))->mtab)
  684.       return;
  685.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  686. }
  687.  
  688. M_WPPower(M_WPPower* fromObj)
  689. {
  690.    if (*(void**)this != 
  691.        ((somParentMtabStructPtr)
  692.         (M_WPPowerCClassData.parentMtab))->mtab)
  693.       return;
  694.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  695. }
  696.  
  697. M_WPPower(const M_WPPower* fromObj)
  698. {
  699.    if (*(void**)this != 
  700.        ((somParentMtabStructPtr)
  701.         (M_WPPowerCClassData.parentMtab))->mtab)
  702.       return;
  703.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  704. }
  705.  
  706.  
  707. /*
  708.  * Reintroduce inherited methods
  709.  */
  710.  
  711. /* method: somNew */
  712. WPPower*  somNew()
  713. {
  714.    return SOM_ResolveD(this,M_WPPower,SOMClass,somNew)
  715.     (this);
  716. }
  717.  
  718.  
  719.  
  720. };   /* M_WPPower */
  721.  
  722.  
  723.  
  724. #endif       /* SOM_M_WPPower_xh */
  725.