Changeset 85683 in vbox
- Timestamp:
- Aug 11, 2020 11:03:42 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/Config.kmk
r85665 r85683 46 46 man_VBoxManage-cloud.xml \ 47 47 man_VBoxManage-cloudprofile.xml \ 48 man_VBoxManage-signova.xml 48 man_VBoxManage-signova.xml \ 49 man_VBoxManage-updatecheck.xml 49 50 50 51 ## List of user manual XML files. -
trunk/doc/manual/en_US/user_VBoxManage.xml
r85669 r85683 8964 8964 <xi:include href="user_man_VBoxManage-signova.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> 8965 8965 8966 <xi:include href="user_man_VBoxManage-updatecheck.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> 8967 8966 8968 <!-- TODO: Figure out how we can handle other manpages. The xml is bolted to 8967 8969 sect1, so it's not possible to have them "in place" --> -
trunk/include/VBox/log.h
r85576 r85683 477 477 /** Main group, IHost. */ 478 478 LOG_GROUP_MAIN_HOST, 479 /** Main group, IHostUpdate. */ 480 LOG_GROUP_MAIN_HOSTUPDATE, 479 481 /** Main group, IHostNetworkInterface. */ 480 482 LOG_GROUP_MAIN_HOSTNETWORKINTERFACE, … … 979 981 "MAIN_GUESTSESSIONEVENT", \ 980 982 "MAIN_HOST", \ 983 "MAIN_HOSTUPDATE", \ 981 984 "MAIN_HOSTNETWORKINTERFACE", \ 982 985 "MAIN_HOSTUSBDEVICE", \ -
trunk/include/VBox/settings.h
r82968 r85683 325 325 uint32_t uLogHistoryCount; 326 326 bool fExclusiveHwVirt; 327 bool fVBoxUpdateEnabled; 328 uint32_t uVBoxUpdateCount; 329 uint32_t uVBoxUpdateFrequency; 330 uint32_t uVBoxUpdateTarget; /**< VBoxUpdateTarget_T */ 331 com::Utf8Str strVBoxUpdateLastCheckDate; 327 332 }; 328 333 -
trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk
r85143 r85683 97 97 VBoxManageSnapshot.cpp \ 98 98 VBoxManageStorageController.cpp \ 99 VBoxManageUpdateCheck.cpp \ 99 100 VBoxManageUSB.cpp \ 100 101 $(if $(VBOX_WITH_NAT_SERVICE),VBoxManageNATNetwork.cpp,) \ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r85665 r85683 162 162 { "usbdevsource", USAGE_USBDEVSOURCE, VBMG_CMD_TODO, handleUSBDevSource, 0 }, 163 163 { "cloudprofile", USAGE_S_NEWCMD, HELP_CMD_CLOUDPROFILE, handleCloudProfile, 0 }, 164 { "cloud", USAGE_S_NEWCMD, HELP_CMD_CLOUD, handleCloud, 0 } 164 { "cloud", USAGE_S_NEWCMD, HELP_CMD_CLOUD, handleCloud, 0 }, 165 { "updatecheck", USAGE_UPDATECHECK, HELP_CMD_UPDATECHECK, handleUpdateCheck, 0 } 165 166 }; 166 167 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r85665 r85683 110 110 USAGE_USBDEVSOURCE, 111 111 USAGE_CLOUDPROFILE, 112 USAGE_UPDATECHECK, 112 113 /* Insert new entries before this line, but only if it is not an option 113 114 * to go for the new style command and help handling (see e.g. extpack, … … 339 340 RTEXITCODE handleCloud(HandlerArg *a); 340 341 342 /* VBoxManageUpdateCheck.cpp */ 343 RTEXITCODE handleUpdateCheck(HandlerArg *a); 344 341 345 #endif /* !VBOX_ONLY_DOCS */ 342 346 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r85665 r85683 1238 1238 } 1239 1239 1240 if (enmCommand == USAGE_UPDATECHECK || enmCommand == USAGE_S_ALL) 1241 { 1242 RTStrmPrintf(pStrm, 1243 "%s updatecheck %s perform\n" 1244 "%s updatecheck %s getsettings\n" 1245 "%s updatecheck %s modifysettings [--enable|--disable]\n" 1246 " [--target=stable|withbetas|allreleases]\n" 1247 " [--frequency=<days>]\n" 1248 "\n", SEP, SEP, SEP); 1249 } 1250 1240 1251 #ifndef VBOX_ONLY_DOCS /* Converted to man page, not needed. */ 1241 1252 if (enmCommand == USAGE_S_ALL) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r85579 r85683 827 827 systemProperties->COMGETTER(ProxyURL)(str.asOutParam()); 828 828 RTPrintf("Proxy URL: %ls\n", str.raw()); 829 systemProperties->COMGETTER(VBoxUpdateEnabled)(&fValue); 830 RTPrintf("Update check enabled: %s\n", fValue ? "yes" : "no"); 831 systemProperties->COMGETTER(VBoxUpdateCount)(&ulValue); 832 RTPrintf("Update check count: %u\n", ulValue); 833 systemProperties->COMGETTER(VBoxUpdateFrequency)(&ulValue); 834 if (ulValue == 0) 835 RTPrintf("Update check frequency: never\n"); 836 else if (ulValue == 1) 837 RTPrintf("Update check frequency: every day\n"); 838 else 839 RTPrintf("Update check frequency: every %u days\n", ulValue); 840 VBoxUpdateTarget_T enmVBoxUpdateTarget; 841 systemProperties->COMGETTER(VBoxUpdateTarget)(&enmVBoxUpdateTarget); 842 switch (enmVBoxUpdateTarget) 843 { 844 case VBoxUpdateTarget_Stable: 845 psz = "Stable: new minor and maintenance releases"; 846 break; 847 case VBoxUpdateTarget_AllReleases: 848 psz = "All releases: new minor, maintenance, and major releases"; 849 break; 850 case VBoxUpdateTarget_WithBetas: 851 psz = "With Betas: new minor, maintenance, major, and beta releases"; 852 break; 853 default: 854 psz = "Unset"; 855 break; 856 } 857 RTPrintf("Update check target: %s\n", psz); 858 systemProperties->COMGETTER(VBoxUpdateLastCheckDate)(str.asOutParam()); 859 RTPrintf("Last check date: %ls\n", str.raw()); 860 829 861 return S_OK; 830 862 } -
trunk/src/VBox/Main/Makefile.kmk
r85574 r85683 579 579 src-server/HostNetworkInterfaceImpl.cpp \ 580 580 src-server/HostPower.cpp \ 581 src-server/HostUpdateImpl.cpp \ 581 582 src-server/HostVideoInputDeviceImpl.cpp \ 582 583 src-server/MachineImpl.cpp \ -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r85574 r85683 10225 10225 </interface> 10226 10226 10227 <enum 10228 name="UpdateCheckType" 10229 uuid="ac34bb91-6739-4791-b30f-ce84e57928bb" 10230 > 10231 <desc> 10232 Which type of software to check whether a new version exists. 10233 </desc> 10234 <const name="None" value="0"> 10235 <desc>No flags specified. Do not use this.</desc> 10236 </const> 10237 <const name="VirtualBox" value="1"/> 10238 <const name="ExtensionPack" value="2"/> 10239 <const name="GuestAdditions" value="3"/> 10240 </enum> 10241 10227 10242 <interface 10228 10243 name="IHostUpdate" extends="$unknown" … … 10236 10251 by <link to="IHost::update" /> attribute). 10237 10252 </desc> 10253 10254 <method name="updateCheck"> 10255 <desc> 10256 Check for a newer version of software based on the 'checkType' value. 10257 </desc> 10258 <param name="checkType" type="UpdateCheckType" dir="in"> 10259 <desc>The type of software to check.</desc> 10260 </param> 10261 <param name="progress" type="IProgress" dir="return"> 10262 <desc>Progress object to track operation completion.</desc> 10263 </param> 10264 </method> 10265 10266 <attribute name="updateResponse" type="boolean" readonly="yes"> 10267 <desc> 10268 The response from the <link to="IHostUpdate::updateCheck"/> method. 10269 </desc> 10270 </attribute> 10271 10272 <attribute name="updateVersion" type="wstring" readonly="yes"> 10273 <desc> 10274 The newer version of the software returned by calling the update check 10275 <link to="IHostUpdate::updateCheck"/> method. 10276 </desc> 10277 </attribute> 10278 10279 <attribute name="updateURL" type="wstring" readonly="yes"> 10280 <desc> 10281 The download URL of the newer software version returned by calling the 10282 update check <link to="IHostUpdate::updateCheck"/> method. 10283 </desc> 10284 </attribute> 10285 10286 <attribute name="updateCheckNeeded" type="boolean" readonly="yes"> 10287 <desc> 10288 Is it time to check for a newer version of software? 10289 </desc> 10290 </attribute> 10238 10291 10239 10292 </interface> … … 10740 10793 10741 10794 <attribute name="update" type="IHostUpdate" readonly="yes"> 10742 <desc> List of floppy drives available on the host.</desc>10795 <desc>The check for newer software object (singleton).</desc> 10743 10796 </attribute> 10744 10797 … … 10786 10839 </enum> 10787 10840 10841 <enum name="VBoxUpdateTarget" uuid="900d4a76-7b08-4af8-a453-f331e783eaee"> 10842 <desc> The preferred release type used for determining whether a newer version of VirtualBox is available. <link to="ISystemProperties::VBoxUpdateTarget"/></desc> 10843 <const name="Stable" value="0"> 10844 <desc>Stable releases: new maintenance and minor releases within the same major release version. This is the default.</desc> 10845 </const> 10846 <const name="AllReleases" value="1"> 10847 <desc>All releases: new maintenance, minor, and major releases.</desc> 10848 </const> 10849 <const name="WithBetas" value="2"> 10850 <desc>With betas: new maintenance, minor, and major releases as well as beta releases.</desc> 10851 </const> 10852 </enum> 10853 10788 10854 <interface 10789 10855 name="ISystemProperties" … … 11315 11381 Returns an array of officially supported values for enum <link to="ChipsetType"/>, 11316 11382 in the sense of what is e.g. worth offering in the VirtualBox GUI. 11383 </desc> 11384 </attribute> 11385 11386 <attribute name="VBoxUpdateEnabled" type="boolean" readyonly="no"> 11387 <desc> Is the VirtualBox update check enabled?</desc> 11388 </attribute> 11389 11390 <attribute name="VBoxUpdateFrequency" type="unsigned long" readonly="no"> 11391 <desc> How often should a check for a newer version of VirtualBox be made? (in days)</desc> 11392 </attribute> 11393 11394 <attribute name="VBoxUpdateLastCheckDate" type="wstring" readonly="no"> 11395 <desc> 11396 When was the update check last performed? If updating this attribute the 11397 string must be in ISO 8601 format (e.g. 2020-05-11T21:13:39.348416000Z). 11398 </desc> 11399 </attribute> 11400 11401 <attribute name="VBoxUpdateTarget" type="VBoxUpdateTarget" readonly="no"> 11402 <desc> The preferred release type used for determining whether a newer version of VirtualBox is available.</desc> 11403 </attribute> 11404 11405 <attribute name="VBoxUpdateCount" type="unsigned long" readonly="no"> 11406 <desc> The count of update check attempts.</desc> 11407 </attribute> 11408 11409 <attribute name="supportedVBoxUpdateTargetTypes" type="VBoxUpdateTarget" safearray="yes" readonly="yes"> 11410 <desc> 11411 Returns an array of officially supported values for enum <link to="VBoxUpdateTarget"/>. 11317 11412 </desc> 11318 11413 </attribute> -
trunk/src/VBox/Main/include/HostImpl.h
r82968 r85683 117 117 HRESULT getVideoInputDevices(std::vector<ComPtr<IHostVideoInputDevice> > &aVideoInputDevices); 118 118 HRESULT getUpdate(ComPtr<IHostUpdate> &aUpdate); 119 HRESULT getUpdateResponse(BOOL *aUpdateNeeded); 120 HRESULT getUpdateVersion(com::Utf8Str &aUpdateVersion); 121 HRESULT getUpdateURL(com::Utf8Str &aUpdateURL); 122 HRESULT getUpdateCheckNeeded(BOOL *aUpdateCheckNeeded); 119 123 120 124 // wrapped IHost methods … … 161 165 162 166 HRESULT removeUSBDeviceSource(const com::Utf8Str &aId); 167 HRESULT UpdateCheck(UpdateCheckType_T aCheckType, 168 ComPtr<IProgress> &aProgress); 163 169 164 170 // Internal Methods. -
trunk/src/VBox/Main/include/SystemPropertiesImpl.h
r85574 r85683 142 142 HRESULT getSupportedStorageControllerTypes(std::vector<StorageControllerType_T> &aSupportedStorageControllerTypes) RT_OVERRIDE; 143 143 HRESULT getSupportedChipsetTypes(std::vector<ChipsetType_T> &aSupportedChipsetTypes) RT_OVERRIDE; 144 HRESULT getSupportedVBoxUpdateTargetTypes(std::vector<VBoxUpdateTarget_T> &aSupportedVBoxUpdateTargetTypes) RT_OVERRIDE; 145 HRESULT getVBoxUpdateEnabled(BOOL *aVBoxUpdateEnabled) RT_OVERRIDE; 146 HRESULT setVBoxUpdateEnabled(BOOL aVBoxUpdateEnabled) RT_OVERRIDE; 147 HRESULT getVBoxUpdateFrequency(ULONG *aVBoxUpdateFrequency) RT_OVERRIDE; 148 HRESULT setVBoxUpdateFrequency(ULONG aVBoxUpdateFrequency) RT_OVERRIDE; 149 HRESULT getVBoxUpdateLastCheckDate(com::Utf8Str &aVBoxUpdateLastCheckDate) RT_OVERRIDE; 150 HRESULT setVBoxUpdateLastCheckDate(const com::Utf8Str &aVBoxUpdateLastCheckDate) RT_OVERRIDE; 151 HRESULT getVBoxUpdateTarget(VBoxUpdateTarget_T *aVBoxUpdateTarget) RT_OVERRIDE; 152 HRESULT setVBoxUpdateTarget(VBoxUpdateTarget_T aVBoxUpdateTarget) RT_OVERRIDE; 153 HRESULT getVBoxUpdateCount(ULONG *aVBoxUpdateCount) RT_OVERRIDE; 154 HRESULT setVBoxUpdateCount(ULONG aVBoxUpdateCount) RT_OVERRIDE; 144 155 145 156 // wrapped ISystemProperties methods … … 185 196 HRESULT i_setDefaultAdditionsISO(const com::Utf8Str &aPath); 186 197 HRESULT i_setDefaultFrontend(const com::Utf8Str &aDefaultFrontend); 198 HRESULT i_setVBoxUpdateLastCheckDate(const com::Utf8Str &aVBoxUpdateLastCheckDate); 187 199 188 200 VirtualBox * const mParent; -
trunk/src/VBox/Main/src-server/HostImpl.cpp
r85266 r85683 46 46 #include "LoggingNew.h" 47 47 #include "Performance.h" 48 #include "HostUpdateImpl.h" 48 49 49 50 #include "MediumImpl.h" … … 229 230 /** Startup syncing of persistent config in extra data */ 230 231 bool fPersistentConfigUpToDate; 232 233 /** The reference to the update check handler singleton. */ 234 const ComObjPtr<HostUpdate> pHostUpdate; 231 235 }; 232 236 … … 284 288 285 289 m->hostDnsMonitorProxy.init(m->pParent); 290 291 hrc = unconst(m->pHostUpdate).createObject(); 292 if (SUCCEEDED(hrc)) 293 hrc = m->pHostUpdate->init(m->pParent); 294 AssertComRCReturn(hrc, hrc); 286 295 287 296 #if defined(RT_OS_WINDOWS) … … 467 476 468 477 m->hostDnsMonitorProxy.uninit(); 478 479 if (m->pHostUpdate) 480 { 481 m->pHostUpdate->uninit(); 482 unconst(m->pHostUpdate).setNull(); 483 } 469 484 470 485 #ifdef VBOX_WITH_USB … … 1940 1955 HRESULT Host::getUpdate(ComPtr<IHostUpdate> &aUpdate) 1941 1956 { 1942 RT_NOREF(aUpdate);1943 ReturnComNotImplemented();1957 HRESULT hrc = m->pHostUpdate.queryInterfaceTo(aUpdate.asOutParam()); 1958 return hrc; 1944 1959 } 1945 1960 -
trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
r85574 r85683 115 115 m->fExclusiveHwVirt = true; 116 116 #endif 117 118 m->fVBoxUpdateEnabled = true; 119 m->uVBoxUpdateCount = 0; 120 m->uVBoxUpdateFrequency = 1; // daily is the default 121 m->uVBoxUpdateTarget = VBoxUpdateTarget_Stable; 117 122 118 123 HRESULT rc = S_OK; … … 1808 1813 } 1809 1814 1815 HRESULT SystemProperties::getSupportedVBoxUpdateTargetTypes(std::vector<VBoxUpdateTarget_T> &aSupportedVBoxUpdateTargetTypes) 1816 { 1817 static const VBoxUpdateTarget_T aVBoxUpdateTargetTypes[] = 1818 { 1819 VBoxUpdateTarget_Stable, 1820 VBoxUpdateTarget_AllReleases, 1821 VBoxUpdateTarget_WithBetas 1822 }; 1823 aSupportedVBoxUpdateTargetTypes.assign(aVBoxUpdateTargetTypes, 1824 aVBoxUpdateTargetTypes + RT_ELEMENTS(aVBoxUpdateTargetTypes)); 1825 return S_OK; 1826 } 1827 1810 1828 1811 1829 // public methods only for internal purposes … … 1841 1859 m->uProxyMode = data.uProxyMode; 1842 1860 m->strProxyUrl = data.strProxyUrl; 1861 1862 m->fVBoxUpdateEnabled = data.fVBoxUpdateEnabled; 1863 m->uVBoxUpdateFrequency = data.uVBoxUpdateFrequency; 1864 m->strVBoxUpdateLastCheckDate = data.strVBoxUpdateLastCheckDate; 1865 m->uVBoxUpdateTarget = data.uVBoxUpdateTarget; 1866 m->uVBoxUpdateCount = data.uVBoxUpdateCount; 1843 1867 1844 1868 rc = i_setAutostartDatabasePath(data.strAutostartDatabasePath); … … 2182 2206 } 2183 2207 2208 HRESULT SystemProperties::i_setVBoxUpdateLastCheckDate(const com::Utf8Str &aVBoxUpdateLastCheckDate) 2209 { 2210 m->strVBoxUpdateLastCheckDate = aVBoxUpdateLastCheckDate; 2211 2212 return S_OK; 2213 } 2214 2215 HRESULT SystemProperties::getVBoxUpdateEnabled(BOOL *aVBoxUpdateEnabled) 2216 { 2217 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 2218 2219 *aVBoxUpdateEnabled = m->fVBoxUpdateEnabled; 2220 2221 return S_OK; 2222 } 2223 2224 HRESULT SystemProperties::setVBoxUpdateEnabled(BOOL aVBoxUpdateEnabled) 2225 { 2226 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 2227 m->fVBoxUpdateEnabled = !!aVBoxUpdateEnabled; 2228 alock.release(); 2229 2230 // VirtualBox::i_saveSettings() needs vbox write lock 2231 AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS); 2232 HRESULT rc = mParent->i_saveSettings(); 2233 2234 return rc; 2235 } 2236 2237 HRESULT SystemProperties::getVBoxUpdateCount(ULONG *VBoxUpdateCount) 2238 { 2239 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 2240 2241 *VBoxUpdateCount = m->uVBoxUpdateCount; 2242 2243 return S_OK; 2244 } 2245 2246 HRESULT SystemProperties::setVBoxUpdateCount(ULONG VBoxUpdateCount) 2247 { 2248 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 2249 m->uVBoxUpdateCount = VBoxUpdateCount; 2250 alock.release(); 2251 2252 // VirtualBox::i_saveSettings() needs vbox write lock 2253 AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS); 2254 HRESULT rc = mParent->i_saveSettings(); 2255 2256 return rc; 2257 } 2258 2259 HRESULT SystemProperties::getVBoxUpdateFrequency(ULONG *aVBoxUpdateFrequency) 2260 { 2261 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 2262 2263 *aVBoxUpdateFrequency = m->uVBoxUpdateFrequency; 2264 2265 return S_OK; 2266 } 2267 2268 HRESULT SystemProperties::setVBoxUpdateFrequency(ULONG aVBoxUpdateFrequency) 2269 { 2270 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 2271 m->uVBoxUpdateFrequency = aVBoxUpdateFrequency; 2272 alock.release(); 2273 2274 // VirtualBox::i_saveSettings() needs vbox write lock 2275 AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS); 2276 HRESULT rc = mParent->i_saveSettings(); 2277 2278 return rc; 2279 } 2280 2281 HRESULT SystemProperties::getVBoxUpdateTarget(VBoxUpdateTarget_T *aVBoxUpdateTarget) 2282 { 2283 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 2284 VBoxUpdateTarget_T enmTarget = *aVBoxUpdateTarget = (VBoxUpdateTarget_T)m->uVBoxUpdateTarget; 2285 AssertMsgReturn(enmTarget == VBoxUpdateTarget_Stable || 2286 enmTarget == VBoxUpdateTarget_AllReleases || 2287 enmTarget == VBoxUpdateTarget_WithBetas, 2288 ("enmTarget=%d\n", enmTarget), E_UNEXPECTED); 2289 return S_OK; 2290 } 2291 2292 HRESULT SystemProperties::setVBoxUpdateTarget(VBoxUpdateTarget_T aVBoxUpdateTarget) 2293 { 2294 /* Validate input. */ 2295 switch (aVBoxUpdateTarget) 2296 { 2297 case VBoxUpdateTarget_Stable: 2298 case VBoxUpdateTarget_AllReleases: 2299 case VBoxUpdateTarget_WithBetas: 2300 break; 2301 default: 2302 return setError(E_INVALIDARG, tr("Invalid Target value: %d"), (int)aVBoxUpdateTarget); 2303 } 2304 2305 /* Set and write out settings. */ 2306 { 2307 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 2308 m->uVBoxUpdateTarget = aVBoxUpdateTarget; 2309 } 2310 AutoWriteLock alock(mParent COMMA_LOCKVAL_SRC_POS); /* required for saving. */ 2311 return mParent->i_saveSettings(); 2312 } 2313 2314 HRESULT SystemProperties::getVBoxUpdateLastCheckDate(com::Utf8Str &aVBoxUpdateLastCheckDate) 2315 { 2316 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 2317 aVBoxUpdateLastCheckDate = m->strVBoxUpdateLastCheckDate; 2318 return S_OK; 2319 } 2320 2321 HRESULT SystemProperties::setVBoxUpdateLastCheckDate(const com::Utf8Str &aVBoxUpdateLastCheckDate) 2322 { 2323 /* 2324 * Validate input. 2325 */ 2326 Utf8Str const *pLastCheckDate = &aVBoxUpdateLastCheckDate; 2327 RTTIMESPEC TimeSpec; 2328 2329 if (pLastCheckDate->isEmpty() || !RTTimeSpecFromString(&TimeSpec, pLastCheckDate->c_str())) 2330 return setErrorBoth(E_INVALIDARG, VERR_INVALID_PARAMETER, 2331 tr("Invalid LastCheckDate value: '%s'. " 2332 "Must be in ISO 8601 format (e.g. 2020-05-11T21:13:39.348416000Z)"), pLastCheckDate->c_str()); 2333 2334 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 2335 HRESULT rc = i_setVBoxUpdateLastCheckDate(aVBoxUpdateLastCheckDate); 2336 alock.release(); 2337 if (SUCCEEDED(rc)) 2338 { 2339 // VirtualBox::i_saveSettings() needs vbox write lock 2340 AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS); 2341 rc = mParent->i_saveSettings(); 2342 } 2343 2344 return rc; 2345 } -
trunk/src/VBox/Main/xml/Settings.cpp
r85285 r85683 1602 1602 , uLogHistoryCount(3) 1603 1603 , fExclusiveHwVirt(true) 1604 , fVBoxUpdateEnabled(true) 1605 , uVBoxUpdateCount(0) 1606 , uVBoxUpdateFrequency(1) 1607 , uVBoxUpdateTarget(VBoxUpdateTarget_Stable) 1604 1608 { 1605 1609 #if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS) || defined(RT_OS_SOLARIS) … … 2246 2250 fCopyProxySettingsFromExtraData = true; 2247 2251 pelmGlobalChild->getAttributeValue("proxyUrl", systemProperties.strProxyUrl); 2252 pelmGlobalChild->getAttributeValue("VBoxUpdateEnabled", systemProperties.fVBoxUpdateEnabled); 2253 pelmGlobalChild->getAttributeValue("VBoxUpdateCount", systemProperties.uVBoxUpdateCount); 2254 pelmGlobalChild->getAttributeValue("VBoxUpdateFrequency", systemProperties.uVBoxUpdateFrequency); 2255 pelmGlobalChild->getAttributeValue("VBoxUpdateTarget", systemProperties.uVBoxUpdateTarget); 2256 pelmGlobalChild->getAttributeValue("VBoxUpdateLastCheckDate", 2257 systemProperties.strVBoxUpdateLastCheckDate); 2248 2258 } 2249 2259 else if (pelmGlobalChild->nameEquals("ExtraData")) … … 2458 2468 pelmSysProps->setAttribute("proxyMode", systemProperties.uProxyMode); 2459 2469 pelmSysProps->setAttribute("exclusiveHwVirt", systemProperties.fExclusiveHwVirt); 2470 pelmSysProps->setAttribute("VBoxUpdateEnabled", systemProperties.fVBoxUpdateEnabled); 2471 pelmSysProps->setAttribute("VBoxUpdateCount", systemProperties.uVBoxUpdateCount); 2472 pelmSysProps->setAttribute("VBoxUpdateFrequency", systemProperties.uVBoxUpdateFrequency); 2473 pelmSysProps->setAttribute("VBoxUpdateTarget", systemProperties.uVBoxUpdateTarget); 2474 if (systemProperties.strVBoxUpdateLastCheckDate.length()) 2475 pelmSysProps->setAttribute("VBoxUpdateLastCheckDate", systemProperties.strVBoxUpdateLastCheckDate); 2460 2476 2461 2477 buildUSBDeviceFilters(*pelmGlobal->createChild("USBDeviceFilters"),
Note:
See TracChangeset
for help on using the changeset viewer.