summaryrefslogtreecommitdiff
path: root/src/VBox/Main/include/HostPower.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-03-26 19:21:20 +0000
committer <>2014-05-08 15:03:54 +0000
commitfb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch)
treec2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/Main/include/HostPower.h
parent58ed4748338f9466599adfc8a9171280ed99e23f (diff)
downloadVirtualBox-master.tar.gz
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/Main/include/HostPower.h')
-rw-r--r--src/VBox/Main/include/HostPower.h38
1 files changed, 13 insertions, 25 deletions
diff --git a/src/VBox/Main/include/HostPower.h b/src/VBox/Main/include/HostPower.h
index 0d7ba548..c7774c33 100644
--- a/src/VBox/Main/include/HostPower.h
+++ b/src/VBox/Main/include/HostPower.h
@@ -4,7 +4,7 @@
*/
/*
- * Copyright (C) 2006-2008 Oracle Corporation
+ * Copyright (C) 2006-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -19,7 +19,6 @@
#define ____H_HOSTPOWER
#include "VirtualBoxBase.h"
-#include "MachineImpl.h"
#include <vector>
@@ -28,27 +27,16 @@
# include <Carbon/Carbon.h>
#endif /* RT_OS_DARWIN */
-typedef enum
-{
- HostPowerEvent_Suspend,
- HostPowerEvent_Resume,
- HostPowerEvent_BatteryLow
-} HostPowerEvent;
-
class HostPowerService
{
-public:
-
- HostPowerService (VirtualBox *aVirtualBox);
+ public:
+ HostPowerService(VirtualBox *aVirtualBox);
virtual ~HostPowerService();
+ void notify(Reason_T aReason);
- void notify (HostPowerEvent aEvent);
-
-protected:
-
- VirtualBox *mVirtualBox;
-
- std::vector< ComPtr<IConsole> > mConsoles;
+ protected:
+ VirtualBox *mVirtualBox;
+ std::vector<ComPtr<IInternalSessionControl> > mSessionControls;
};
# ifdef RT_OS_WINDOWS
@@ -64,7 +52,7 @@ public:
private:
- static DECLCALLBACK(int) NotificationThread (RTTHREAD ThreadSelf, void *pInstance);
+ static DECLCALLBACK(int) NotificationThread(RTTHREAD ThreadSelf, void *pInstance);
static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
HWND mHwnd;
@@ -78,16 +66,16 @@ class HostPowerServiceDarwin : public HostPowerService
{
public:
- HostPowerServiceDarwin (VirtualBox *aVirtualBox);
+ HostPowerServiceDarwin(VirtualBox *aVirtualBox);
virtual ~HostPowerServiceDarwin();
private:
- static DECLCALLBACK(int) powerChangeNotificationThread (RTTHREAD ThreadSelf, void *pInstance);
- static void powerChangeNotificationHandler (void *pvData, io_service_t service, natural_t messageType, void *pMessageArgument);
- static void lowPowerHandler (void *pvData);
+ static DECLCALLBACK(int) powerChangeNotificationThread(RTTHREAD ThreadSelf, void *pInstance);
+ static void powerChangeNotificationHandler(void *pvData, io_service_t service, natural_t messageType, void *pMessageArgument);
+ static void lowPowerHandler(void *pvData);
- void checkBatteryCriticalLevel (bool *pfCriticalChanged = NULL);
+ void checkBatteryCriticalLevel(bool *pfCriticalChanged = NULL);
/* Private member vars */
RTTHREAD mThread; /* Our message thread. */