VirtualBox

Ignore:
Timestamp:
Oct 8, 2008 1:40:19 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
37564
Message:

added getGuestEnteredACPIMode()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r12904 r13079  
    16591659    LogFlowThisFuncLeave();
    16601660    return rc;
     1661}
     1662
     1663STDMETHODIMP Console::GetGuestEnteredACPIMode(BOOL *aEntered)
     1664{
     1665    LogFlowThisFuncEnter();
     1666
     1667    if (!aEntered)
     1668        return E_POINTER;
     1669
     1670    *aEntered = FALSE;
     1671
     1672    AutoCaller autoCaller (this);
     1673
     1674    AutoWriteLock alock (this);
     1675
     1676    if (mMachineState != MachineState_Running)
     1677        return E_FAIL;
     1678
     1679    /* protect mpVM */
     1680    AutoVMCaller autoVMCaller (this);
     1681    CheckComRCReturnRC (autoVMCaller.rc());
     1682
     1683    PPDMIBASE pBase;
     1684    int vrc = PDMR3QueryDeviceLun (mpVM, "acpi", 0, 0, &pBase);
     1685    bool entered = false;
     1686    if (RT_SUCCESS (vrc))
     1687    {
     1688        Assert (pBase);
     1689        PPDMIACPIPORT pPort =
     1690            (PPDMIACPIPORT) pBase->pfnQueryInterface(pBase, PDMINTERFACE_ACPI_PORT);
     1691        vrc = pPort ? pPort->pfnGetGuestEnteredACPIMode(pPort, &entered) : VERR_INVALID_POINTER;
     1692    }
     1693
     1694    *aEntered = RT_SUCCESS (vrc) ? entered : false;
     1695
     1696    LogFlowThisFuncLeave();
     1697    return S_OK;
    16611698}
    16621699
Note: See TracChangeset for help on using the changeset viewer.

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