VirtualBox

Changeset 46775 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
Jun 25, 2013 12:37:57 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
86706
Message:

Main/Host(HostPower)+Session+Console: convert HostPower code to signal pause/resume/savestate through internal methods, conveying information why the method was called, preparing for VM/PDM passing this information to devices and drivers

Location:
trunk/src/VBox/Main/src-server
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/HostPower.cpp

    r44528 r46775  
    55
    66/*
    7  * Copyright (C) 2006-2011 Oracle Corporation
     7 * Copyright (C) 2006-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2727
    2828#include "VirtualBoxImpl.h"
     29#include "MachineImpl.h"
    2930
    3031#include <iprt/mem.h>
    3132
    32 HostPowerService::HostPowerService (VirtualBox *aVirtualBox)
     33HostPowerService::HostPowerService(VirtualBox *aVirtualBox)
    3334{
    3435    Assert(aVirtualBox != NULL);
     
    4041}
    4142
    42 void HostPowerService::notify(HostPowerEvent aEvent)
     43void HostPowerService::notify(Reason_T aReason)
    4344{
    4445    SessionMachinesList machines;
     
    4748    HRESULT rc = S_OK;
    4849
    49     switch (aEvent)
     50    switch (aReason)
    5051    {
    51         case HostPowerEvent_Suspend:
     52        case Reason_HostSuspend:
    5253        {
    53             LogFunc (("SUSPEND\n"));
     54            LogFunc(("SUSPEND\n"));
    5455
    5556#ifdef VBOX_WITH_RESOURCE_USAGE_API
     
    6970                ComPtr<IInternalSessionControl> pControl = *it;
    7071
    71                 /* get the remote console */
    72                 ComPtr<IConsole> console;
    73                 rc = pControl->GetRemoteConsole(console.asOutParam());
    74                 /* the VM could have been powered down and closed or whatever */
    75                 if (FAILED(rc))
    76                     continue;
    77 
    78                 /* note that Pause() will simply return a failure if the VM is
    79                  * in an inappropriate state */
    80                 rc = console->Pause();
     72                /* PauseWithReason() will simply return a failure if
     73                 * the VM is in an inappropriate state */
     74                rc = pControl->PauseWithReason(Reason_HostSuspend);
    8175                if (FAILED(rc))
    8276                    continue;
    8377
    8478                /* save the control to un-pause the VM later */
    85                 mConsoles.push_back(console);
     79                mSessionControls.push_back(pControl);
    8680            }
    8781
    88             LogFunc (("Suspended %d VMs\n", mConsoles.size()));
     82            LogFunc(("Suspended %d VMs\n", mSessionControls.size()));
    8983
    9084            break;
    9185        }
    9286
    93         case HostPowerEvent_Resume:
     87        case Reason_HostResume:
    9488        {
    95             LogFunc (("RESUME\n"));
     89            LogFunc(("RESUME\n"));
    9690
    9791            size_t resumed = 0;
    9892
    9993            /* go through VMs we paused on Suspend */
    100             for (size_t i = 0; i < mConsoles.size(); ++i)
     94            for (size_t i = 0; i < mSessionControls.size(); ++i)
    10195            {
    10296                /* note that Resume() will simply return a failure if the VM is
     
    10498                 * been somehow closed by this time already so that the
    10599                 * console reference we have is dead) */
    106                 rc = mConsoles[i]->Resume();
     100                rc = mSessionControls[i]->ResumeWithReason(Reason_HostResume);
    107101                if (FAILED(rc))
    108102                    continue;
    109103
    110                 ++ resumed;
     104                ++resumed;
    111105            }
    112106
    113             LogFunc (("Resumed %d VMs\n", resumed));
     107            LogFunc(("Resumed %d VMs\n", resumed));
    114108
    115109#ifdef VBOX_WITH_RESOURCE_USAGE_API
     
    121115#endif
    122116
    123             mConsoles.clear();
     117            mSessionControls.clear();
    124118
    125119            break;
    126120        }
    127121
    128         case HostPowerEvent_BatteryLow:
     122        case Reason_HostBatteryLow:
    129123        {
    130             LogFunc (("BATTERY LOW\n"));
     124            LogFunc(("BATTERY LOW\n"));
    131125
    132126            mVirtualBox->getOpenedMachines(machines, &controls);
     
    140134            {
    141135                ComPtr<IInternalSessionControl> pControl = *it;
    142                 /* get the remote console */
    143                 ComPtr<IConsole> console;
    144                 rc = pControl->GetRemoteConsole (console.asOutParam());
    145                 /* the VM could have been powered down and closed or whatever */
    146                 if (FAILED(rc))
    147                     continue;
    148136
    149137                ComPtr<IProgress> progress;
    150138
    151                 /* note that SaveState() will simply return a failure if the VM
    152                  * is in an inappropriate state */
    153                 rc = console->SaveState (progress.asOutParam());
     139                /* note that SaveStateWithReason() will simply return a failure
     140                 * if the VM is in an inappropriate state */
     141                rc = pControl->SaveStateWithReason(Reason_HostBatteryLow, progress.asOutParam());
    154142                if (FAILED(rc))
    155143                    continue;
     
    164152                }
    165153
    166                 AssertMsg (SUCCEEDED(rc), ("SaveState WaitForCompletion "
    167                                             "failed with %Rhrc (%#08X)\n", rc, rc));
     154                AssertMsg(SUCCEEDED(rc), ("SaveState WaitForCompletion failed with %Rhrc (%#08X)\n", rc, rc));
    168155
    169156                if (SUCCEEDED(rc))
    170                     ++ saved;
     157                    ++saved;
    171158            }
    172159
    173             LogFunc (("Saved %d VMs\n", saved));
     160            LogFunc(("Saved %d VMs\n", saved));
    174161
    175162            break;
    176163        }
     164
     165        default:
     166            /* nothing */;
    177167    }
    178168}
  • trunk/src/VBox/Main/src-server/darwin/HostPowerDarwin.cpp

    r44529 r46775  
    55
    66/*
    7  * Copyright (C) 2008-2010 Oracle Corporation
     7 * Copyright (C) 2008-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2626#define POWER_SOURCE_BATTERY 2
    2727
    28 HostPowerServiceDarwin::HostPowerServiceDarwin (VirtualBox *aVirtualBox)
    29   : HostPowerService (aVirtualBox)
    30   , mThread (NULL)
    31   , mRootPort (MACH_PORT_NULL)
    32   , mNotifyPort (nil)
    33   , mRunLoop (nil)
    34   , mCritical (false)
     28HostPowerServiceDarwin::HostPowerServiceDarwin(VirtualBox *aVirtualBox)
     29  : HostPowerService(aVirtualBox)
     30  , mThread(NULL)
     31  , mRootPort(MACH_PORT_NULL)
     32  , mNotifyPort(nil)
     33  , mRunLoop(nil)
     34  , mCritical(false)
    3535{
    3636    /* Create the new worker thread. */
    37     int rc = RTThreadCreate (&mThread, HostPowerServiceDarwin::powerChangeNotificationThread, this, 65536,
    38                              RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, "MainPower");
     37    int rc = RTThreadCreate(&mThread, HostPowerServiceDarwin::powerChangeNotificationThread, this, 65536,
     38                            RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, "MainPower");
    3939
    4040    if (RT_FAILURE(rc))
    41         LogFlow (("RTThreadCreate failed with %Rrc\n", rc));
     41        LogFlow(("RTThreadCreate failed with %Rrc\n", rc));
    4242}
    4343
     
    4545{
    4646    /* Jump out of the run loop. */
    47     CFRunLoopStop (mRunLoop);
     47    CFRunLoopStop(mRunLoop);
    4848    /* Remove the sleep notification port from the application runloop. */
    49     CFRunLoopRemoveSource (CFRunLoopGetCurrent(),
    50                            IONotificationPortGetRunLoopSource (mNotifyPort),
    51                            kCFRunLoopCommonModes);
     49    CFRunLoopRemoveSource(CFRunLoopGetCurrent(),
     50                          IONotificationPortGetRunLoopSource(mNotifyPort),
     51                          kCFRunLoopCommonModes);
    5252    /* Deregister for system sleep notifications. */
    53     IODeregisterForSystemPower (&mNotifierObject);
     53    IODeregisterForSystemPower(&mNotifierObject);
    5454    /* IORegisterForSystemPower implicitly opens the Root Power Domain
    5555     * IOService so we close it here. */
    56     IOServiceClose (mRootPort);
     56    IOServiceClose(mRootPort);
    5757    /* Destroy the notification port allocated by IORegisterForSystemPower */
    58     IONotificationPortDestroy (mNotifyPort);
    59 }
    60 
    61 
    62 DECLCALLBACK(int) HostPowerServiceDarwin::powerChangeNotificationThread (RTTHREAD /* ThreadSelf */, void *pInstance)
    63 {
    64     HostPowerServiceDarwin *pPowerObj = static_cast<HostPowerServiceDarwin *> (pInstance);
     58    IONotificationPortDestroy(mNotifyPort);
     59}
     60
     61
     62DECLCALLBACK(int) HostPowerServiceDarwin::powerChangeNotificationThread(RTTHREAD /* ThreadSelf */, void *pInstance)
     63{
     64    HostPowerServiceDarwin *pPowerObj = static_cast<HostPowerServiceDarwin *>(pInstance);
    6565
    6666    /* We have to initial set the critical state of the battery, cause we want
     
    7070
    7171    /* Register to receive system sleep notifications */
    72     pPowerObj->mRootPort = IORegisterForSystemPower (pPowerObj, &pPowerObj->mNotifyPort,
    73                                                      HostPowerServiceDarwin::powerChangeNotificationHandler,
    74                                                      &pPowerObj->mNotifierObject);
     72    pPowerObj->mRootPort = IORegisterForSystemPower(pPowerObj, &pPowerObj->mNotifyPort,
     73                                                    HostPowerServiceDarwin::powerChangeNotificationHandler,
     74                                                    &pPowerObj->mNotifierObject);
    7575    if (pPowerObj->mRootPort == MACH_PORT_NULL)
    7676    {
    77         LogFlow (("IORegisterForSystemPower failed\n"));
     77        LogFlow(("IORegisterForSystemPower failed\n"));
    7878        return VERR_NOT_SUPPORTED;
    7979    }
    8080    pPowerObj->mRunLoop = CFRunLoopGetCurrent();
    8181    /* Add the notification port to the application runloop */
    82     CFRunLoopAddSource (pPowerObj->mRunLoop,
    83                         IONotificationPortGetRunLoopSource (pPowerObj->mNotifyPort),
    84                         kCFRunLoopCommonModes);
     82    CFRunLoopAddSource(pPowerObj->mRunLoop,
     83                       IONotificationPortGetRunLoopSource(pPowerObj->mNotifyPort),
     84                       kCFRunLoopCommonModes);
    8585
    8686    /* Register for all battery change events. The handler will check for low
     
    9797}
    9898
    99 void HostPowerServiceDarwin::powerChangeNotificationHandler (void *pvData, io_service_t /* service */, natural_t messageType, void *pMessageArgument)
    100 {
    101     HostPowerServiceDarwin *pPowerObj = static_cast<HostPowerServiceDarwin *> (pvData);
    102     Log (( "powerChangeNotificationHandler: messageType %08lx, arg %08lx\n", (long unsigned int)messageType, (long unsigned int)pMessageArgument));
     99void HostPowerServiceDarwin::powerChangeNotificationHandler(void *pvData, io_service_t /* service */, natural_t messageType, void *pMessageArgument)
     100{
     101    HostPowerServiceDarwin *pPowerObj = static_cast<HostPowerServiceDarwin *>(pvData);
     102    Log(( "powerChangeNotificationHandler: messageType %08lx, arg %08lx\n", (long unsigned int)messageType, (long unsigned int)pMessageArgument));
    103103
    104104    switch (messageType)
     
    114114                 * IOAllowPowerChange or IOCancelPowerChange, the system will
    115115                 * wait 30 seconds then go to sleep. */
    116                 IOAllowPowerChange (pPowerObj->mRootPort, reinterpret_cast<long> (pMessageArgument));
     116                IOAllowPowerChange(pPowerObj->mRootPort, reinterpret_cast<long>(pMessageArgument));
    117117                break;
    118118            }
     
    120120            {
    121121                /* The system will go for sleep. */
    122                 pPowerObj->notify (HostPowerEvent_Suspend);
     122                pPowerObj->notify(Reason_HostSuspend);
    123123                /* If you do not call IOAllowPowerChange or IOCancelPowerChange to
    124124                 * acknowledge this message, sleep will be delayed by 30 seconds.
    125125                 * NOTE: If you call IOCancelPowerChange to deny sleep it returns
    126126                 * kIOReturnSuccess, however the system WILL still go to sleep. */
    127                 IOAllowPowerChange (pPowerObj->mRootPort, reinterpret_cast<long> (pMessageArgument));
     127                IOAllowPowerChange(pPowerObj->mRootPort, reinterpret_cast<long>(pMessageArgument));
    128128                break;
    129129            }
     
    136136            {
    137137                /* System has finished the wake up process. */
    138                 pPowerObj->notify (HostPowerEvent_Resume);
     138                pPowerObj->notify(Reason_HostResume);
    139139                break;
    140140            }
     
    144144}
    145145
    146 void HostPowerServiceDarwin::lowPowerHandler (void *pvData)
    147 {
    148     HostPowerServiceDarwin *pPowerObj = static_cast<HostPowerServiceDarwin *> (pvData);
    149 
    150     /* Following role for sending the BatteryLow event (5% is critical):
     146void HostPowerServiceDarwin::lowPowerHandler(void *pvData)
     147{
     148    HostPowerServiceDarwin *pPowerObj = static_cast<HostPowerServiceDarwin *>(pvData);
     149
     150    /* Following role for sending the BatteryLow event(5% is critical):
    151151     * - Not at VM start even if the battery is in an critical state already.
    152152     * - When the power cord is removed so the power supply change from AC to
     
    157157     *   normal triggers nothing. */
    158158    bool fCriticalStateChanged = false;
    159     pPowerObj->checkBatteryCriticalLevel (&fCriticalStateChanged);
     159    pPowerObj->checkBatteryCriticalLevel(&fCriticalStateChanged);
    160160    if (fCriticalStateChanged)
    161         pPowerObj->notify (HostPowerEvent_BatteryLow);
    162 }
    163 
    164 void HostPowerServiceDarwin::checkBatteryCriticalLevel (bool *pfCriticalChanged)
     161        pPowerObj->notify(Reason_HostBatteryLow);
     162}
     163
     164void HostPowerServiceDarwin::checkBatteryCriticalLevel(bool *pfCriticalChanged)
    165165{
    166166    CFTypeRef pBlob = IOPSCopyPowerSourcesInfo();
    167     CFArrayRef pSources = IOPSCopyPowerSourcesList (pBlob);
     167    CFArrayRef pSources = IOPSCopyPowerSourcesList(pBlob);
    168168
    169169    CFDictionaryRef pSource = NULL;
     
    173173    bool critical = false;
    174174
    175     if (CFArrayGetCount (pSources) > 0)
     175    if (CFArrayGetCount(pSources) > 0)
    176176    {
    177         for (int i = 0; i < CFArrayGetCount (pSources); ++i)
     177        for (int i = 0; i < CFArrayGetCount(pSources); ++i)
    178178        {
    179             pSource = IOPSGetPowerSourceDescription (pBlob, CFArrayGetValueAtIndex (pSources, i));
     179            pSource = IOPSGetPowerSourceDescription(pBlob, CFArrayGetValueAtIndex(pSources, i));
    180180            /* If the source is empty skip over to the next one. */
    181181            if (!pSource)
     
    183183            /* Skip all power sources which are currently not present like a
    184184             * second battery. */
    185             if (CFDictionaryGetValue (pSource, CFSTR (kIOPSIsPresentKey)) == kCFBooleanFalse)
     185            if (CFDictionaryGetValue(pSource, CFSTR(kIOPSIsPresentKey)) == kCFBooleanFalse)
    186186                continue;
    187187            /* Only internal power types are of interest. */
    188             result = CFDictionaryGetValueIfPresent (pSource, CFSTR (kIOPSTransportTypeKey), &psValue);
     188            result = CFDictionaryGetValueIfPresent(pSource, CFSTR(kIOPSTransportTypeKey), &psValue);
    189189            if (result &&
    190                 CFStringCompare ((CFStringRef)psValue, CFSTR (kIOPSInternalType), 0) == kCFCompareEqualTo)
     190                CFStringCompare((CFStringRef)psValue, CFSTR(kIOPSInternalType), 0) == kCFCompareEqualTo)
    191191            {
    192192                /* First check which power source we are connect on. */
    193                 result = CFDictionaryGetValueIfPresent (pSource, CFSTR (kIOPSPowerSourceStateKey), &psValue);
     193                result = CFDictionaryGetValueIfPresent(pSource, CFSTR(kIOPSPowerSourceStateKey), &psValue);
    194194                if (result &&
    195                     CFStringCompare ((CFStringRef)psValue, CFSTR (kIOPSACPowerValue), 0) == kCFCompareEqualTo)
     195                    CFStringCompare((CFStringRef)psValue, CFSTR(kIOPSACPowerValue), 0) == kCFCompareEqualTo)
    196196                    powerSource = POWER_SOURCE_OUTLET;
    197197                else if (result &&
    198                          CFStringCompare ((CFStringRef)psValue, CFSTR (kIOPSBatteryPowerValue), 0) == kCFCompareEqualTo)
     198                         CFStringCompare((CFStringRef)psValue, CFSTR(kIOPSBatteryPowerValue), 0) == kCFCompareEqualTo)
    199199                    powerSource = POWER_SOURCE_BATTERY;
    200200
     
    204204
    205205                /* Fetch the current capacity value of the power source */
    206                 result = CFDictionaryGetValueIfPresent (pSource, CFSTR (kIOPSCurrentCapacityKey), &psValue);
     206                result = CFDictionaryGetValueIfPresent(pSource, CFSTR(kIOPSCurrentCapacityKey), &psValue);
    207207                if (result)
    208                     CFNumberGetValue ((CFNumberRef)psValue, kCFNumberSInt32Type, &curCapacity);
     208                    CFNumberGetValue((CFNumberRef)psValue, kCFNumberSInt32Type, &curCapacity);
    209209                /* Fetch the maximum capacity value of the power source */
    210                 result = CFDictionaryGetValueIfPresent (pSource, CFSTR (kIOPSMaxCapacityKey), &psValue);
     210                result = CFDictionaryGetValueIfPresent(pSource, CFSTR(kIOPSMaxCapacityKey), &psValue);
    211211                if (result)
    212                     CFNumberGetValue ((CFNumberRef)psValue, kCFNumberSInt32Type, &maxCapacity);
     212                    CFNumberGetValue((CFNumberRef)psValue, kCFNumberSInt32Type, &maxCapacity);
    213213
    214214                /* Calculate the remaining capacity in percent */
     
    217217                /* Check for critical. 5 percent is default. */
    218218                int criticalValue = 5;
    219                 result = CFDictionaryGetValueIfPresent (pSource, CFSTR (kIOPSDeadWarnLevelKey), &psValue);
     219                result = CFDictionaryGetValueIfPresent(pSource, CFSTR(kIOPSDeadWarnLevelKey), &psValue);
    220220                if (result)
    221                     CFNumberGetValue ((CFNumberRef)psValue, kCFNumberSInt32Type, &criticalValue);
     221                    CFNumberGetValue((CFNumberRef)psValue, kCFNumberSInt32Type, &criticalValue);
    222222                critical = (remCapacity < criticalValue);
    223223                /* We have to take action only if we are on battery, the
     
    229229                    pfCriticalChanged)
    230230                    *pfCriticalChanged = true;
    231                 Log (("checkBatteryCriticalLevel: Remains: %d.%d%% Critical: %d Critical State Changed: %d\n", (int)remCapacity, (int)(remCapacity * 10) % 10, critical, pfCriticalChanged?*pfCriticalChanged:-1));
     231                Log(("checkBatteryCriticalLevel: Remains: %d.%d%% Critical: %d Critical State Changed: %d\n", (int)remCapacity, (int)(remCapacity * 10) % 10, critical, pfCriticalChanged?*pfCriticalChanged:-1));
    232232            }
    233233        }
     
    236236    mCritical = critical;
    237237
    238     CFRelease (pBlob);
    239     CFRelease (pSources);
    240 }
    241 
     238    CFRelease(pBlob);
     239    CFRelease(pSources);
     240}
     241
  • trunk/src/VBox/Main/src-server/win/HostPowerWin.cpp

    r46722 r46775  
    55
    66/*
    7  * Copyright (C) 2006-2010 Oracle Corporation
     7 * Copyright (C) 2006-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3636    mHwnd = 0;
    3737
    38     int rc = RTThreadCreate (&mThread, HostPowerServiceWin::NotificationThread, this, 65536,
    39                              RTTHREADTYPE_GUI, RTTHREADFLAGS_WAITABLE, "MainPower");
     38    int rc = RTThreadCreate(&mThread, HostPowerServiceWin::NotificationThread, this, 65536,
     39                            RTTHREADTYPE_GUI, RTTHREADFLAGS_WAITABLE, "MainPower");
    4040
    4141    if (RT_FAILURE(rc))
     
    6363
    6464
    65 DECLCALLBACK(int) HostPowerServiceWin::NotificationThread (RTTHREAD ThreadSelf, void *pInstance)
     65DECLCALLBACK(int) HostPowerServiceWin::NotificationThread(RTTHREAD ThreadSelf, void *pInstance)
    6666{
    6767    HostPowerServiceWin *pPowerObj = (HostPowerServiceWin *)pInstance;
     
    7171    int rc = VINF_SUCCESS;
    7272
    73     HINSTANCE hInstance = (HINSTANCE)GetModuleHandle (NULL);
     73    HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(NULL);
    7474
    7575    /* Register the Window Class. */
     
    9797    {
    9898        /* Create the window. */
    99         hwnd = pPowerObj->mHwnd = CreateWindowEx (WS_EX_TOOLWINDOW | WS_EX_TRANSPARENT | WS_EX_TOPMOST,
    100                                                   gachWindowClassName, gachWindowClassName,
    101                                                   WS_POPUPWINDOW,
    102                                                  -200, -200, 100, 100, NULL, NULL, hInstance, NULL);
     99        hwnd = pPowerObj->mHwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TRANSPARENT | WS_EX_TOPMOST,
     100                                                 gachWindowClassName, gachWindowClassName,
     101                                                 WS_POPUPWINDOW,
     102                                                -200, -200, 100, 100, NULL, NULL, hInstance, NULL);
    103103
    104104        if (hwnd == NULL)
     
    124124    Log(("HostPowerServiceWin::NotificationThread: exit thread\n"));
    125125    if (hwnd)
    126         DestroyWindow (hwnd);
     126        DestroyWindow(hwnd);
    127127
    128128    if (atomWindowClass != 0)
    129129    {
    130         UnregisterClass (gachWindowClassName, hInstance);
     130        UnregisterClass(gachWindowClassName, hInstance);
    131131        atomWindowClass = 0;
    132132    }
     
    149149                {
    150150                case PBT_APMSUSPEND:
    151                     pPowerObj->notify(HostPowerEvent_Suspend);
     151                    pPowerObj->notify(Reason_HostSuspend);
    152152                    break;
    153153
    154154                case PBT_APMRESUMEAUTOMATIC:
    155                     pPowerObj->notify(HostPowerEvent_Resume);
     155                    pPowerObj->notify(Reason_HostResume);
    156156                    break;
    157157
     
    180180                                    &&  BatteryState.EstimatedTime < 60*5)
    181181                                {
    182                                     pPowerObj->notify(HostPowerEvent_BatteryLow);
     182                                    pPowerObj->notify(Reason_HostBatteryLow);
    183183                                }
    184184                            }
     
    187187                            if (SystemPowerStatus.BatteryFlag == 4      /* critical battery status; less than 5% */)
    188188                            {
    189                                 pPowerObj->notify(HostPowerEvent_BatteryLow);
     189                                pPowerObj->notify(Reason_HostBatteryLow);
    190190                            }
    191191                        }
     
    194194                }
    195195                default:
    196                     return DefWindowProc (hwnd, msg, wParam, lParam);
     196                    return DefWindowProc(hwnd, msg, wParam, lParam);
    197197                }
    198198            }
     
    201201
    202202        default:
    203             return DefWindowProc (hwnd, msg, wParam, lParam);
    204     }
    205 }
     203            return DefWindowProc(hwnd, msg, wParam, lParam);
     204    }
     205}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette