- Timestamp:
- Dec 5, 2018 12:08:09 PM (6 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/DragAndDrop/service.cpp
r75953 r75969 164 164 pTable->pfnLoadState = NULL; /* construction done before restoring suffices */ 165 165 pTable->pfnRegisterExtension = svcRegisterExtension; 166 pTable->pfnNotify = NULL; 166 167 167 168 /* Drag'n drop mode is disabled by default. */ -
trunk/src/VBox/HostServices/GuestControl/service.cpp
r75894 r75969 2440 2440 pTable->pfnLoadState = GstCtrlService::svcLoadState; 2441 2441 pTable->pfnRegisterExtension = GstCtrlService::svcRegisterExtension; 2442 pTable->pfnNotify = NULL; 2442 2443 2443 2444 /* Service specific initialization. */ -
trunk/src/VBox/HostServices/GuestProperties/service.cpp
r75773 r75969 45 45 #include <iprt/asm.h> 46 46 #include <iprt/assert.h> 47 #include <iprt/buildconfig.h> 47 48 #include <iprt/cpp/autores.h> 48 49 #include <iprt/cpp/utils.h> … … 54 55 #include <iprt/time.h> 55 56 #include <VBox/vmm/dbgf.h> 57 #include <VBox/version.h> 56 58 57 59 #include <string> … … 97 99 uint32_t u32Flags) 98 100 : mName(name), mValue(value), mTimestamp(u64Timestamp), 99 mFlags(u32Flags) {} 101 mFlags(u32Flags) 102 {} 100 103 101 104 /** Does the property name match one of a set of patterns? */ … … 195 198 * values: {(mPrevTimestamp - mcTimestampAdjustments), ..., mPrevTimestamp} */ 196 199 uint64_t mcTimestampAdjustments; 200 /** For helping setting host version properties _after_ restoring VMs. */ 201 bool m_fSetHostVersionProps; 197 202 198 203 /** … … 311 316 , mPrevTimestamp(0) 312 317 , mcTimestampAdjustments(0) 318 , m_fSetHostVersionProps(false) 313 319 #ifdef ASYNC_HOST_NOTIFY 314 320 , mhThreadNotifyHost(NIL_RTTHREAD) … … 409 415 } 410 416 417 void setHostVersionProps(); 418 static DECLCALLBACK(void) svcNotify(void *pvService, HGCMNOTIFYEVENT enmEvent); 419 411 420 int initialize(); 412 421 … … 419 428 int getProperty(uint32_t cParms, VBOXHGCMSVCPARM paParms[]); 420 429 int setProperty(uint32_t cParms, VBOXHGCMSVCPARM paParms[], bool isGuest); 430 int setPropertyInternal(const char *pcszName, const char *pcszValue, uint32_t fFlags, uint64_t nsTimestamp, bool fIsGuest); 421 431 int delProperty(uint32_t cParms, VBOXHGCMSVCPARM paParms[], bool isGuest); 422 432 int enumProps(uint32_t cParms, VBOXHGCMSVCPARM paParms[]); … … 749 759 750 760 /* 761 * Hand it over to the internal setter method. 762 */ 763 rc = setPropertyInternal(pcszName, pcszValue, fFlags, u64TimeNano, isGuest); 764 765 LogFlowThisFunc(("%s=%s, rc=%Rrc\n", pcszName, pcszValue, rc)); 766 return rc; 767 } 768 769 /** 770 * Internal property setter. 771 * 772 * @returns VBox status code. 773 * @param pcszName The property name. 774 * @param pcszValue The new value. 775 * @param fFlags The flags. 776 * @param nsTimestamp The timestamp. 777 * @param fIsGuest Is it the guest calling. 778 * @throws std::bad_alloc if an out of memory condition occurs 779 * @thread HGCM 780 */ 781 int Service::setPropertyInternal(const char *pcszName, const char *pcszValue, uint32_t fFlags, uint64_t nsTimestamp, bool fIsGuest) 782 { 783 /* 751 784 * If the property already exists, check its flags to see if we are allowed 752 785 * to change it. 753 786 */ 754 787 Property *pProp = getPropertyInternal(pcszName); 755 rc = checkPermission(pProp ? pProp->mFlags : GUEST_PROP_F_NILFLAG, isGuest);788 int rc = checkPermission(pProp ? pProp->mFlags : GUEST_PROP_F_NILFLAG, fIsGuest); 756 789 /* 757 790 * Handle names which are read-only for the guest. … … 759 792 if (rc == VINF_SUCCESS && checkHostReserved(pcszName)) 760 793 { 761 if ( isGuest)794 if (fIsGuest) 762 795 rc = VERR_PERMISSION_DENIED; 763 796 else … … 772 805 { 773 806 pProp->mValue = pcszValue; 774 pProp->mTimestamp = u64TimeNano;807 pProp->mTimestamp = nsTimestamp; 775 808 pProp->mFlags = fFlags; 776 809 } … … 780 813 { 781 814 /* Create a new string space record. */ 782 pProp = new Property(pcszName, pcszValue, u64TimeNano, fFlags);815 pProp = new Property(pcszName, pcszValue, nsTimestamp, fFlags); 783 816 AssertPtr(pProp); 784 817 … … 804 837 * Send a notification to the guest and host and return. 805 838 */ 806 // if ( isGuest)/* Notify the host even for properties that the host839 // if (fIsGuest) /* Notify the host even for properties that the host 807 840 // * changed. Less efficient, but ensures consistency. */ 808 int rc2 = doNotifications(pcszName, u64TimeNano);841 int rc2 = doNotifications(pcszName, nsTimestamp); 809 842 if (RT_SUCCESS(rc)) 810 843 rc = rc2; … … 1564 1597 } 1565 1598 1599 1600 /** 1601 * Sets the VBoxVer, VBoxVerExt and VBoxRev properties. 1602 */ 1603 void Service::setHostVersionProps() 1604 { 1605 uint64_t nsTimestamp = getCurrentTimestamp(); 1606 1607 /* Set the raw VBox version string as a guest property. Used for host/guest 1608 * version comparison. */ 1609 setPropertyInternal("/VirtualBox/HostInfo/VBoxVer", VBOX_VERSION_STRING_RAW, 1610 GUEST_PROP_F_TRANSIENT | GUEST_PROP_F_RDONLYGUEST, nsTimestamp, false /*fIsGuest*/); 1611 1612 /* Set the full VBox version string as a guest property. Can contain vendor-specific 1613 * information/branding and/or pre-release tags. */ 1614 setPropertyInternal("/VirtualBox/HostInfo/VBoxVerExt", VBOX_VERSION_STRING, 1615 GUEST_PROP_F_TRANSIENT | GUEST_PROP_F_RDONLYGUEST, nsTimestamp, false /*fIsGuest*/); 1616 1617 /* Set the VBox SVN revision as a guest property */ 1618 setPropertyInternal("/VirtualBox/HostInfo/VBoxRev", RTBldCfgRevisionStr(), 1619 GUEST_PROP_F_TRANSIENT | GUEST_PROP_F_RDONLYGUEST, nsTimestamp, false /*fIsGuest*/); 1620 } 1621 1622 1623 /** 1624 * @interface_method_impl{VBOXHGCMSVCFNTABLE,pfnNotify} 1625 */ 1626 /*static*/ DECLCALLBACK(void) Service::svcNotify(void *pvService, HGCMNOTIFYEVENT enmEvent) 1627 { 1628 SELF *pThis = reinterpret_cast<SELF *>(pvService); 1629 AssertPtrReturnVoid(pThis); 1630 1631 /* Make sure the host version properties have been touched and are 1632 up-to-date after a restore: */ 1633 if ( !pThis->m_fSetHostVersionProps 1634 && (enmEvent == HGCMNOTIFYEVENT_RESUME || enmEvent == HGCMNOTIFYEVENT_POWER_ON)) 1635 { 1636 pThis->setHostVersionProps(); 1637 pThis->m_fSetHostVersionProps = true; 1638 } 1639 1640 /** @todo add suspend/resume property? */ 1641 /** @todo add reset counter? */ 1642 } 1643 1644 1566 1645 #ifdef ASYNC_HOST_NOTIFY 1567 1646 … … 1602 1681 int Service::initialize() 1603 1682 { 1683 /* 1684 * Insert standard host properties. 1685 */ 1686 try 1687 { 1688 /* The host version will but updated again on power on or resume 1689 (after restore), however we need the properties now for restored 1690 guest notification/wait calls. */ 1691 setHostVersionProps(); 1692 1693 /* Sysprep execution by VBoxService (host is allowed to change these). */ 1694 uint64_t nsTimestamp = getCurrentTimestamp(); 1695 setPropertyInternal("/VirtualBox/HostGuest/SysprepExec", "", GUEST_PROP_F_TRANSIENT | GUEST_PROP_F_RDONLYGUEST, 1696 nsTimestamp, false /*fIsGuest*/); 1697 setPropertyInternal("/VirtualBox/HostGuest/SysprepArgs", "", GUEST_PROP_F_TRANSIENT | GUEST_PROP_F_RDONLYGUEST, 1698 nsTimestamp, false /*fIsGuest*/); 1699 } 1700 catch (std::bad_alloc &) 1701 { 1702 return VERR_NO_MEMORY; 1703 } 1704 1604 1705 #ifdef ASYNC_HOST_NOTIFY 1605 1706 /* The host notification thread and queue. */ … … 1728 1829 ptable->pfnLoadState = NULL; /* construction done before restoring suffices */ 1729 1830 ptable->pfnRegisterExtension = Service::svcRegisterExtension; 1831 ptable->pfnNotify = Service::svcNotify; 1730 1832 ptable->pvService = pService; 1731 1833 -
trunk/src/VBox/HostServices/SharedClipboard/service.cpp
r75853 r75969 1035 1035 ptable->pfnLoadState = svcLoadState; 1036 1036 ptable->pfnRegisterExtension = svcRegisterExtension; 1037 ptable->pfnNotify = NULL; 1037 1038 ptable->pvService = NULL; 1038 1039 -
trunk/src/VBox/HostServices/SharedFolders/service.cpp
r75853 r75969 1747 1747 ptable->pfnSaveState = svcSaveState; 1748 1748 ptable->pfnLoadState = svcLoadState; 1749 ptable->pfnNotify = NULL; 1749 1750 ptable->pvService = NULL; 1750 1751 } -
trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp
r75853 r75969 1547 1547 ptable->pfnSaveState = svcSaveState; 1548 1548 ptable->pfnLoadState = svcLoadState; 1549 ptable->pfnNotify = NULL; 1549 1550 ptable->pvService = NULL; 1550 1551 -
trunk/src/VBox/Main/include/HGCM.h
r75853 r75969 47 47 48 48 int HGCMHostCall(const char *pszServiceName, uint32_t function, uint32_t cParms, VBOXHGCMSVCPARM aParms[]); 49 int HGCMBroadcastEvent(HGCMNOTIFYEVENT enmEvent); 49 50 50 51 #ifdef VBOX_WITH_CRHGSMI -
trunk/src/VBox/Main/include/VMMDev.h
r75955 r75969 78 78 # endif 79 79 #endif 80 81 80 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, const char *pszIID); 82 81 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags); 83 82 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 84 83 static DECLCALLBACK(void) drvReset(PPDMDRVINS pDrvIns); 84 static DECLCALLBACK(void) drvPowerOn(PPDMDRVINS pDrvIns); 85 static DECLCALLBACK(void) drvPowerOff(PPDMDRVINS pDrvIns); 86 static DECLCALLBACK(void) drvSuspend(PPDMDRVINS pDrvIns); 87 static DECLCALLBACK(void) drvResume(PPDMDRVINS pDrvIns); 85 88 86 89 Console * const mParent; -
trunk/src/VBox/Main/src-client/HGCM.cpp
r75853 r75969 176 176 177 177 int HostCall(uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM *paParms); 178 static void BroadcastNotify(HGCMNOTIFYEVENT enmEvent); 179 void Notify(HGCMNOTIFYEVENT enmEvent); 178 180 179 181 #ifdef VBOX_WITH_CRHGSMI … … 401 403 */ 402 404 403 #define SVC_MSG_LOAD (0) /* Load the service library and call VBOX_HGCM_SVCLOAD_NAME entry point. */ 404 #define SVC_MSG_UNLOAD (1) /* call pfnUnload and unload the service library. */ 405 #define SVC_MSG_CONNECT (2) /* pfnConnect */ 406 #define SVC_MSG_DISCONNECT (3) /* pfnDisconnect */ 407 #define SVC_MSG_GUESTCALL (4) /* pfnGuestCall */ 408 #define SVC_MSG_HOSTCALL (5) /* pfnHostCall */ 409 #define SVC_MSG_LOADSTATE (6) /* pfnLoadState. */ 410 #define SVC_MSG_SAVESTATE (7) /* pfnSaveState. */ 411 #define SVC_MSG_QUIT (8) /* Terminate the thread. */ 412 #define SVC_MSG_REGEXT (9) /* pfnRegisterExtension */ 413 #define SVC_MSG_UNREGEXT (10) /* pfnRegisterExtension */ 405 #define SVC_MSG_LOAD (0) /**< Load the service library and call VBOX_HGCM_SVCLOAD_NAME entry point. */ 406 #define SVC_MSG_UNLOAD (1) /**< call pfnUnload and unload the service library. */ 407 #define SVC_MSG_CONNECT (2) /**< pfnConnect */ 408 #define SVC_MSG_DISCONNECT (3) /**< pfnDisconnect */ 409 #define SVC_MSG_GUESTCALL (4) /**< pfnGuestCall */ 410 #define SVC_MSG_HOSTCALL (5) /**< pfnHostCall */ 411 #define SVC_MSG_LOADSTATE (6) /**< pfnLoadState. */ 412 #define SVC_MSG_SAVESTATE (7) /**< pfnSaveState. */ 413 #define SVC_MSG_QUIT (8) /**< Terminate the thread. */ 414 #define SVC_MSG_REGEXT (9) /**< pfnRegisterExtension */ 415 #define SVC_MSG_UNREGEXT (10) /**< pfnRegisterExtension */ 416 #define SVC_MSG_NOTIFY (11) /**< pfnNotify */ 414 417 #ifdef VBOX_WITH_CRHGSMI 415 418 # define SVC_MSG_HOSTFASTCALLASYNC (21) /* pfnHostCall */ … … 522 525 /* Handle of the registered extension. */ 523 526 HGCMSVCEXTHANDLE handle; 527 }; 528 529 class HGCMMsgNotify: public HGCMMsgCore 530 { 531 public: 532 /** The event. */ 533 HGCMNOTIFYEVENT enmEvent; 524 534 }; 525 535 … … 555 565 case SVC_MSG_REGEXT: return new HGCMMsgSvcRegisterExtension(); 556 566 case SVC_MSG_UNREGEXT: return new HGCMMsgSvcUnregisterExtension(); 567 case SVC_MSG_NOTIFY: return new HGCMMsgNotify(); 557 568 default: 558 569 AssertReleaseMsgFailed(("Msg id = %08X\n", u32MsgId)); … … 812 823 } break; 813 824 825 case SVC_MSG_NOTIFY: 826 { 827 HGCMMsgNotify *pMsg = (HGCMMsgNotify *)pMsgCore; 828 829 LogFlowFunc(("SVC_MSG_NOTIFY enmEvent = %d\n", pMsg->enmEvent)); 830 831 pSvc->m_fntable.pfnNotify(pSvc->m_fntable.pvService, pMsg->enmEvent); 832 } break; 833 814 834 default: 815 835 { … … 1794 1814 } 1795 1815 1816 /** Posts a broadcast notification event to all interested services. 1817 * 1818 * @param enmEvent The notification event. 1819 */ 1820 /*static*/ void HGCMService::BroadcastNotify(HGCMNOTIFYEVENT enmEvent) 1821 { 1822 for (HGCMService *pService = sm_pSvcListHead; pService != NULL; pService = pService->m_pSvcNext) 1823 { 1824 pService->Notify(enmEvent); 1825 } 1826 } 1827 1828 /** Posts a broadcast notification event to the service. 1829 * 1830 * @param enmEvent The notification event. 1831 */ 1832 void HGCMService::Notify(HGCMNOTIFYEVENT enmEvent) 1833 { 1834 LogFlowFunc(("%s enmEvent=%d pfnNotify=%p\n", m_pszSvcName, enmEvent, m_fntable.pfnNotify)); 1835 if (m_fntable.pfnNotify) 1836 { 1837 HGCMMsgCore *pCoreMsg; 1838 int rc = hgcmMsgAlloc(m_pThread, &pCoreMsg, SVC_MSG_NOTIFY, hgcmMessageAllocSvc); 1839 if (RT_SUCCESS(rc)) 1840 { 1841 HGCMMsgNotify *pMsg = (HGCMMsgNotify *)pCoreMsg; 1842 pMsg->enmEvent = enmEvent; 1843 1844 rc = hgcmMsgPost(pMsg, NULL); 1845 AssertRC(rc); 1846 } 1847 } 1848 } 1849 1796 1850 #ifdef VBOX_WITH_CRHGSMI 1797 1851 … … 1856 1910 1857 1911 /* Messages processed by the main HGCM thread. */ 1858 #define HGCM_MSG_CONNECT (10) /* Connect a client to a service. */ 1859 #define HGCM_MSG_DISCONNECT (11) /* Disconnect the specified client id. */ 1860 #define HGCM_MSG_LOAD (12) /* Load the service. */ 1861 #define HGCM_MSG_HOSTCALL (13) /* Call the service. */ 1862 #define HGCM_MSG_LOADSTATE (14) /* Load saved state for the specified service. */ 1863 #define HGCM_MSG_SAVESTATE (15) /* Save state for the specified service. */ 1864 #define HGCM_MSG_RESET (16) /* Disconnect all clients from the specified service. */ 1865 #define HGCM_MSG_QUIT (17) /* Unload all services and terminate the thread. */ 1866 #define HGCM_MSG_REGEXT (18) /* Register a service extension. */ 1867 #define HGCM_MSG_UNREGEXT (19) /* Unregister a service extension. */ 1912 #define HGCM_MSG_CONNECT (10) /**< Connect a client to a service. */ 1913 #define HGCM_MSG_DISCONNECT (11) /**< Disconnect the specified client id. */ 1914 #define HGCM_MSG_LOAD (12) /**< Load the service. */ 1915 #define HGCM_MSG_HOSTCALL (13) /**< Call the service. */ 1916 #define HGCM_MSG_LOADSTATE (14) /**< Load saved state for the specified service. */ 1917 #define HGCM_MSG_SAVESTATE (15) /**< Save state for the specified service. */ 1918 #define HGCM_MSG_RESET (16) /**< Disconnect all clients from the specified service. */ 1919 #define HGCM_MSG_QUIT (17) /**< Unload all services and terminate the thread. */ 1920 #define HGCM_MSG_REGEXT (18) /**< Register a service extension. */ 1921 #define HGCM_MSG_UNREGEXT (19) /**< Unregister a service extension. */ 1922 #define HGCM_MSG_BRD_NOTIFY (20) /**< Broadcast notification event (VM state change). */ 1868 1923 #ifdef VBOX_WITH_CRHGSMI 1869 # define HGCM_MSG_SVCAQUIRE (30) /*Acquire a service handle (for fast host calls) */1870 # define HGCM_MSG_SVCRELEASE (31) /*Release a service */1924 # define HGCM_MSG_SVCAQUIRE (30) /**< Acquire a service handle (for fast host calls) */ 1925 # define HGCM_MSG_SVCRELEASE (31) /**< Release a service */ 1871 1926 #endif 1872 1927 … … 1953 2008 }; 1954 2009 2010 class HGCMMsgMainBroadcastNotify: public HGCMMsgCore 2011 { 2012 public: 2013 /** The notification event. */ 2014 HGCMNOTIFYEVENT enmEvent; 2015 }; 2016 1955 2017 #ifdef VBOX_WITH_CRHGSMI 1956 2018 class HGCMMsgMainSvcAcquire: public HGCMMsgCore … … 1986 2048 case HGCM_MSG_REGEXT: return new HGCMMsgMainRegisterExtension(); 1987 2049 case HGCM_MSG_UNREGEXT: return new HGCMMsgMainUnregisterExtension(); 2050 case HGCM_MSG_BRD_NOTIFY: return new HGCMMsgMainBroadcastNotify(); 1988 2051 #ifdef VBOX_WITH_CRHGSMI 1989 2052 case HGCM_MSG_SVCAQUIRE: return new HGCMMsgMainSvcAcquire(); … … 2100 2163 pService->ReleaseService(); 2101 2164 } 2165 } break; 2166 2167 case HGCM_MSG_BRD_NOTIFY: 2168 { 2169 HGCMMsgMainBroadcastNotify *pMsg = (HGCMMsgMainBroadcastNotify *)pMsgCore; 2170 2171 LogFlowFunc(("HGCM_MSG_BRD_NOTIFY enmEvent=%d\n", pMsg->enmEvent)); 2172 2173 HGCMService::BroadcastNotify(pMsg->enmEvent); 2102 2174 } break; 2103 2175 … … 2147 2219 2148 2220 HGCMService::Reset(); 2221 2222 HGCMService::BroadcastNotify(HGCMNOTIFYEVENT_RESET); 2149 2223 } break; 2150 2224 … … 2551 2625 } 2552 2626 2553 /* The host calls the service.2627 /** The host calls the service. 2554 2628 * 2555 2629 * @param pszServiceName The service name to be called. … … 2557 2631 * @param cParms Number of parameters. 2558 2632 * @param paParms Pointer to array of parameters. 2633 * @param fWait Whether to wait for the call to complete (default), 2634 * or just post it and return immediately. 2559 2635 * @return VBox rc. 2560 2636 */ … … 2597 2673 } 2598 2674 2675 /** Posts a notification event to all services. 2676 * 2677 * @param enmEvent The notification event. 2678 * @return VBox rc. 2679 */ 2680 int HGCMBroadcastEvent(HGCMNOTIFYEVENT enmEvent) 2681 { 2682 LogFlowFunc(("enmEvent=%d\n", enmEvent)); 2683 2684 HGCMMsgCore *pCoreMsg; 2685 int rc = hgcmMsgAlloc(g_pHgcmThread, &pCoreMsg, HGCM_MSG_BRD_NOTIFY, hgcmMainMessageAlloc); 2686 2687 if (RT_SUCCESS(rc)) 2688 { 2689 HGCMMsgMainBroadcastNotify *pMsg = (HGCMMsgMainBroadcastNotify *)pCoreMsg; 2690 2691 pMsg->enmEvent = enmEvent; 2692 2693 rc = hgcmMsgPost(pMsg, NULL); 2694 } 2695 2696 LogFlowFunc(("rc = %Rrc\n", rc)); 2697 return rc; 2698 } 2699 2700 2599 2701 #ifdef VBOX_WITH_CRHGSMI 2600 2702 int HGCMHostSvcHandleCreate(const char *pszServiceName, HGCMCVSHANDLE * phSvc) -
trunk/src/VBox/Main/src-client/VMMDevInterface.cpp
r75955 r75969 29 29 #include <VBox/shflsvc.h> 30 30 #include <iprt/asm.h> 31 #include <iprt/buildconfig.h>32 31 33 32 #ifdef VBOX_WITH_HGCM … … 36 35 # if defined(RT_OS_DARWIN) && defined(VBOX_WITH_CROGL) 37 36 # include <VBox/HostServices/VBoxCrOpenGLSvc.h> 38 # endif39 # ifdef VBOX_WITH_GUEST_PROPS40 # include <VBox/version.h>41 37 # endif 42 38 #endif … … 770 766 771 767 /** 768 * @interface_method_impl{PDMDRVREG,pfnSuspend} 769 */ 770 /*static*/ DECLCALLBACK(void) VMMDev::drvSuspend(PPDMDRVINS pDrvIns) 771 { 772 RT_NOREF(pDrvIns); 773 #ifdef VBOX_WITH_HGCM 774 HGCMBroadcastEvent(HGCMNOTIFYEVENT_SUSPEND); 775 #endif 776 } 777 778 /** 779 * @interface_method_impl{PDMDRVREG,pfnResume} 780 */ 781 /*static*/ DECLCALLBACK(void) VMMDev::drvResume(PPDMDRVINS pDrvIns) 782 { 783 RT_NOREF(pDrvIns); 784 #ifdef VBOX_WITH_HGCM 785 HGCMBroadcastEvent(HGCMNOTIFYEVENT_RESUME); 786 #endif 787 } 788 789 /** 790 * @interface_method_impl{PDMDRVREG,pfnPowerOff} 791 */ 792 /*static*/ DECLCALLBACK(void) VMMDev::drvPowerOff(PPDMDRVINS pDrvIns) 793 { 794 RT_NOREF(pDrvIns); 795 #ifdef VBOX_WITH_HGCM 796 HGCMBroadcastEvent(HGCMNOTIFYEVENT_POWER_ON); 797 #endif 798 } 799 800 /** 801 * @interface_method_impl{PDMDRVREG,pfnPowerOn} 802 */ 803 /*static*/ DECLCALLBACK(void) VMMDev::drvPowerOn(PPDMDRVINS pDrvIns) 804 { 805 RT_NOREF(pDrvIns); 806 #ifdef VBOX_WITH_HGCM 807 HGCMBroadcastEvent(HGCMNOTIFYEVENT_POWER_ON); 808 #endif 809 } 810 811 /** 772 812 * @interface_method_impl{PDMDRVREG,pfnReset} 773 813 */ … … 778 818 #ifdef VBOX_WITH_HGCM 779 819 HGCMHostReset(); 780 #endif /* VBOX_WITH_HGCM */820 #endif 781 821 } 782 822 … … 883 923 AssertReturn(ptrConsole.isNotNull(), VERR_INVALID_POINTER); 884 924 885 /* Load the service */ 925 /* 926 * Load the service 927 */ 886 928 int rc = hgcmLoadService("VBoxGuestPropSvc", "VBoxGuestPropSvc"); 887 929 if (RT_FAILURE(rc)) … … 890 932 return VINF_SUCCESS; /* That is not a fatal failure. */ 891 933 } 892 /*893 * Initialize built-in properties that can be changed and saved.894 *895 * These are typically transient properties that the guest cannot896 * change.897 */898 899 /* Sysprep execution by VBoxService. */900 i_guestPropSet("/VirtualBox/HostGuest/SysprepExec", "", "TRANSIENT, RDONLYGUEST");901 i_guestPropSet("/VirtualBox/HostGuest/SysprepArgs", "", "TRANSIENT, RDONLYGUEST");902 934 903 935 /* … … 964 996 965 997 /* 966 * These properties have to be set before pulling over the properties967 * from the machine XML, to ensure that properties saved in the XML968 * will override them.969 */970 /* Set the raw VBox version string as a guest property. Used for host/guest971 * version comparison. */972 i_guestPropSet("/VirtualBox/HostInfo/VBoxVer", VBOX_VERSION_STRING_RAW, "TRANSIENT, RDONLYGUEST");973 /* Set the full VBox version string as a guest property. Can contain vendor-specific974 * information/branding and/or pre-release tags. */975 i_guestPropSet("/VirtualBox/HostInfo/VBoxVerExt", VBOX_VERSION_STRING, "TRANSIENT, RDONLYGUEST");976 /* Set the VBox SVN revision as a guest property */977 i_guestPropSet("/VirtualBox/HostInfo/VBoxRev", RTBldCfgRevisionStr(), "TRANSIENT, RDONLYGUEST");978 979 /*980 998 * Register the host notification callback 981 999 */ … … 1178 1196 NULL, 1179 1197 /* pfnPowerOn */ 1180 NULL,1198 VMMDev::drvPowerOn, 1181 1199 /* pfnReset */ 1182 1200 VMMDev::drvReset, 1183 1201 /* pfnSuspend */ 1184 NULL,1202 VMMDev::drvSuspend, 1185 1203 /* pfnResume */ 1186 NULL,1204 VMMDev::drvResume, 1187 1205 /* pfnAttach */ 1188 1206 NULL, … … 1190 1208 NULL, 1191 1209 /* pfnPowerOff */ 1192 NULL,1210 VMMDev::drvPowerOff, 1193 1211 /* pfnSoftReset */ 1194 1212 NULL,
Note:
See TracChangeset
for help on using the changeset viewer.