From fb123f93f9f5ce42c8e5785d2f8e0edaf951740e Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Wed, 26 Mar 2014 19:21:20 +0000 Subject: Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2. --- src/VBox/Main/include/HostPower.h | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) (limited to 'src/VBox/Main/include/HostPower.h') 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 @@ -28,27 +27,16 @@ # include #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 > mConsoles; + protected: + VirtualBox *mVirtualBox; + std::vector > 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. */ -- cgit v1.2.1