Changeset 14527 in vbox for trunk/src/VBox/Main/include
- Timestamp:
- Nov 24, 2008 4:04:15 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 39815
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/HostPower.h
r13713 r14527 5 5 6 6 /* 7 * Copyright (C) 2006-200 7Sun Microsystems, Inc.7 * Copyright (C) 2006-2008 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 27 27 28 28 #include <vector> 29 30 #ifdef RT_OS_DARWIN 31 # include <IOKit/pwr_mgt/IOPMLib.h> 32 # include <Carbon/Carbon.h> 33 #endif /* RT_OS_DARWIN */ 29 34 30 35 class VirtualBox; … … 72 77 RTTHREAD mThread; 73 78 }; 74 # endif /* RT_OS_WINDOWS */ 79 # elif defined(RT_OS_DARWIN) /* RT_OS_WINDOWS */ 80 /** 81 * The Darwin hosted Power Service. 82 */ 83 class HostPowerServiceDarwin : public HostPowerService 84 { 85 public: 86 87 HostPowerServiceDarwin (VirtualBox *aVirtualBox); 88 virtual ~HostPowerServiceDarwin(); 89 90 private: 91 92 static DECLCALLBACK(int) powerChangeNotificationThread (RTTHREAD ThreadSelf, void *pInstance); 93 static void powerChangeNotificationHandler (void *pData, io_service_t service, natural_t messageType, void *pMessageArgument); 94 static OSErr lowPowerEventHandler (const AppleEvent * theAppleEvent, AppleEvent * replyAppleEvent, long refCon); 95 96 /* Private member vars */ 97 RTTHREAD mThread; /* Our message thread. */ 98 99 io_connect_t mRootPort; /* A reference to the Root Power Domain IOService */ 100 IONotificationPortRef mNotifyPort; /* Notification port allocated by IORegisterForSystemPower */ 101 io_object_t mNotifierObject; /* Notifier object, used to deregister later */ 102 CFRunLoopRef mRunLoop; /* A reference to the local thread run loop */ 103 }; 104 # endif /* RT_OS_DARWIN */ 75 105 76 106 #endif /* !____H_HOSTPOWER */
Note:
See TracChangeset
for help on using the changeset viewer.