- Timestamp:
- Jun 26, 2009 2:38:55 PM (16 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r20928 r20977 1271 1271 extraDataKey = nextExtraDataKey; 1272 1272 1273 if (SUCCEEDED(rcEnum) && extraDataKey)1273 if (SUCCEEDED(rcEnum) && !extraDataKey.isEmpty()) 1274 1274 RTPrintf("Key: %lS, Value: %lS\n", nextExtraDataKey.raw(), nextExtraDataValue.raw()); 1275 } while ( extraDataKey);1275 } while (!extraDataKey.isEmpty()); 1276 1276 } 1277 1277 else … … 1279 1279 Bstr value; 1280 1280 CHECK_ERROR(a->virtualBox, GetExtraData(Bstr(a->argv[1]), value.asOutParam())); 1281 if ( value)1281 if (!value.isEmpty()) 1282 1282 RTPrintf("Value: %lS\n", value.raw()); 1283 1283 else … … 1310 1310 extraDataKey = nextExtraDataKey; 1311 1311 1312 if (SUCCEEDED(rcEnum) && extraDataKey)1312 if (SUCCEEDED(rcEnum) && !extraDataKey.isEmpty()) 1313 1313 { 1314 1314 RTPrintf("Key: %lS, Value: %lS\n", nextExtraDataKey.raw(), nextExtraDataValue.raw()); 1315 1315 } 1316 } while ( extraDataKey);1316 } while (!extraDataKey.isEmpty()); 1317 1317 } 1318 1318 else … … 1320 1320 Bstr value; 1321 1321 CHECK_ERROR(machine, GetExtraData(Bstr(a->argv[1]), value.asOutParam())); 1322 if ( value)1322 if (!value.isEmpty()) 1323 1323 RTPrintf("Value: %lS\n", value.raw()); 1324 1324 else -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp
r15664 r20977 160 160 if (!vbox.isOk()) 161 161 return; 162 // nullvalue means the key is absent. it is ok, the default will apply163 if (value.is Null())162 // empty value means the key is absent. it is ok, the default will apply 163 if (value.isEmpty()) 164 164 continue; 165 165 // try to set the property validating it against rx … … 242 242 void VBoxGlobalSettings::setPropertyPrivate (size_t index, const QString &value) 243 243 { 244 if (value.is Null())244 if (value.isEmpty()) 245 245 { 246 246 if (!gPropertyMap [index].canDelete) -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp
r19664 r20977 124 124 QString dlgsize = 125 125 mSession.GetMachine().GetExtraData (VBoxDefs::GUI_InfoDlgState); 126 if (dlgsize.is Null())126 if (dlgsize.isEmpty()) 127 127 { 128 128 mWidth = 400; -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r20727 r20977 2797 2797 Bstr tmpAddr, tmpMask; 2798 2798 hrc = virtualBox->GetExtraData(Bstr("HostOnly/vboxnet0/IPAddress"), tmpAddr.asOutParam()); 2799 if (SUCCEEDED(hrc) && !tmpAddr.is Null())2799 if (SUCCEEDED(hrc) && !tmpAddr.isEmpty()) 2800 2800 { 2801 2801 hrc = virtualBox->GetExtraData(Bstr("HostOnly/vboxnet0/IPNetMask"), tmpMask.asOutParam()); 2802 if (SUCCEEDED(hrc) && !tmp Addr.isEmpty())2802 if (SUCCEEDED(hrc) && !tmpMask.isEmpty()) 2803 2803 hrc = hostInterface->EnableStaticIpConfig(tmpAddr, tmpMask); 2804 else 2805 hrc = hostInterface->EnableStaticIpConfig(tmpAddr, 2806 Bstr(VBOXNET_IPV4MASK_DEFAULT)); 2804 2807 } 2805 2808 else … … 2811 2814 if (SUCCEEDED(hrc)) 2812 2815 hrc = virtualBox->GetExtraData(Bstr("HostOnly/vboxnet0/IPV6NetMask"), tmpMask.asOutParam()); 2813 if (SUCCEEDED(hrc) && !tmpAddr.isEmpty() )2816 if (SUCCEEDED(hrc) && !tmpAddr.isEmpty() && !tmpMask.isEmpty()) 2814 2817 hrc = hostInterface->EnableStaticIpConfigV6(tmpAddr, Utf8Str(tmpMask).toUInt32()); 2815 2818 #endif -
trunk/src/VBox/Main/HardDiskImpl.cpp
r20945 r20977 555 555 CheckComRCReturnRC (rc); 556 556 557 if (!error.is Null())557 if (!error.isEmpty()) 558 558 { 559 559 Bstr loc; … … 615 615 CheckComRCReturnRC (rc); 616 616 617 if (!error.is Null())617 if (!error.isEmpty()) 618 618 { 619 619 Bstr loc; … … 1326 1326 tr ("Property '%ls' does not exist"), aName); 1327 1327 1328 it->second.cloneTo (aValue); 1328 if (it->second.isEmpty()) 1329 Bstr("").cloneTo (aValue); 1330 else 1331 it->second.cloneTo (aValue); 1329 1332 1330 1333 return S_OK; … … 1355 1358 tr ("Property '%ls' does not exist"), aName); 1356 1359 1357 it->second = aValue; 1360 if (aValue && !*aValue) 1361 it->second = (const char *)NULL; 1362 else 1363 it->second = aValue; 1358 1364 1359 1365 HRESULT rc = mVirtualBox->saveSettings(); … … 1385 1391 { 1386 1392 it->first.cloneTo (&names [i]); 1387 it->second.cloneTo (&values [i]); 1393 if (it->second.isEmpty()) 1394 Bstr("").cloneTo(&values [i]); 1395 else 1396 it->second.cloneTo (&values [i]); 1388 1397 ++ i; 1389 1398 } … … 1424 1433 AssertReturn (it != mm.properties.end(), E_FAIL); 1425 1434 1426 it->second = values [i]; 1435 if (values[i] && !*values[i]) 1436 it->second = (const char *)NULL; 1437 else 1438 it->second = values [i]; 1427 1439 } 1428 1440 -
trunk/src/VBox/Main/HostDVDDriveImpl.cpp
r15051 r20977 61 61 62 62 unconst (mName) = aName; 63 unconst (mUdi) = aUdi; 64 unconst (mDescription) = aDescription; 63 if (!aUdi) 64 unconst (mUdi) = ""; 65 else 66 unconst (mUdi) = aUdi; 67 if (!aDescription) 68 unconst (mDescription) = ""; 69 else 70 unconst (mDescription) = aDescription; 65 71 66 72 /* Confirm the successful initialization */ -
trunk/src/VBox/Main/HostFloppyDriveImpl.cpp
r15051 r20977 61 61 62 62 unconst (mName) = aName; 63 unconst (mUdi) = aUdi; 64 unconst (mDescription) = aDescription; 63 if (!aUdi) 64 unconst (mUdi) = ""; 65 else 66 unconst (mUdi) = aUdi; 67 if (!aDescription) 68 unconst (mDescription) = ""; 69 else 70 unconst (mDescription) = aDescription; 65 71 66 72 /* Confirm the successful initialization */ -
trunk/src/VBox/Main/HostImpl.cpp
r20283 r20977 1083 1083 * @returns COM status code 1084 1084 * @param cpu id to get info for. 1085 * @param description address of result variable, NULL ifknown or aCpuId is invalid.1085 * @param description address of result variable, empty string if not known or aCpuId is invalid. 1086 1086 */ 1087 1087 STDMETHODIMP Host::GetProcessorDescription(ULONG /* aCpuId */, BSTR *aDescription) -
trunk/src/VBox/Main/MachineImpl.cpp
r20931 r20977 1619 1619 AutoReadLock alock (this); 1620 1620 1621 mData->mSession.mType.cloneTo (aSessionType); 1621 if (mData->mSession.mType.isNull()) 1622 Bstr("").cloneTo(aSessionType); 1623 else 1624 mData->mSession.mType.cloneTo (aSessionType); 1622 1625 1623 1626 return S_OK; … … 1676 1679 AutoReadLock alock (this); 1677 1680 1678 mSSData->mStateFilePath.cloneTo (aStateFilePath); 1681 if (mSSData->mStateFilePath.isEmpty()) 1682 Bstr("").cloneTo(aStateFilePath); 1683 else 1684 mSSData->mStateFilePath.cloneTo (aStateFilePath); 1679 1685 1680 1686 return S_OK; … … 2371 2377 CheckComRCReturnRC (autoCaller.rc()); 2372 2378 2373 /* serialize file access (prevent writes) */2374 AutoReadLock alock (this);2375 2376 2379 /* start with nothing found */ 2377 *aNextKey = NULL;2380 Bstr("").cloneTo(aNextKey); 2378 2381 if (aNextValue) 2379 *aNextValue = NULL;2382 Bstr("").cloneTo(aNextValue); 2380 2383 2381 2384 /* if we're ready and isConfigLocked() is FALSE then it means … … 2385 2388 2386 2389 HRESULT rc = S_OK; 2390 2391 Bstr bstrInKey(aKey); 2392 2393 /* serialize file access (prevent writes) */ 2394 AutoReadLock alock (this); 2387 2395 2388 2396 try … … 2413 2421 2414 2422 /* if we're supposed to return the first one */ 2415 if ( aKey == NULL)2423 if (bstrInKey.isEmpty()) 2416 2424 { 2417 2425 key.cloneTo (aNextKey); … … 2425 2433 2426 2434 /* did we find the key we're looking for? */ 2427 if (key == aKey)2435 if (key == bstrInKey) 2428 2436 { 2429 2437 ++ it; … … 2452 2460 * through to return NULLs and S_OK. */ 2453 2461 2454 if ( aKey != NULL)2462 if (!bstrInKey.isEmpty()) 2455 2463 return setError (VBOX_E_OBJECT_NOT_FOUND, 2456 tr ("Could not find the extra data key '%ls'"), aKey);2464 tr ("Could not find the extra data key '%ls'"), bstrInKey.raw()); 2457 2465 } 2458 2466 catch (...) … … 2479 2487 2480 2488 /* start with nothing found */ 2481 *aValue = NULL;2489 Bstr("").cloneTo(aValue); 2482 2490 2483 2491 /* if we're ready and isConfigLocked() is FALSE then it means … … 2559 2567 } 2560 2568 2569 Bstr val; 2570 if (!aValue) 2571 val = Bstr(""); 2572 else 2573 val = aValue; 2574 2575 2561 2576 bool changed = false; 2562 2577 HRESULT rc = S_OK; … … 2583 2598 2584 2599 const Utf8Str key = aKey; 2585 Bstr oldVal ;2600 Bstr oldVal(""); 2586 2601 2587 2602 Key machineNode = tree.rootKey().key ("Machine"); … … 2601 2616 } 2602 2617 2603 /* When no key is found, oldVal is null*/2604 changed = oldVal != aValue;2618 /* When no key is found, oldVal is empty string */ 2619 changed = oldVal != val; 2605 2620 2606 2621 if (changed) … … 2608 2623 /* ask for permission from all listeners */ 2609 2624 Bstr error; 2610 if (!mParent->onExtraDataCanChange (mData->mUuid, aKey, aValue, error))2625 if (!mParent->onExtraDataCanChange (mData->mUuid, aKey, val, error)) 2611 2626 { 2612 2627 const char *sep = error.isEmpty() ? "" : ": "; … … 2617 2632 tr ("Could not set extra data because someone refused " 2618 2633 "the requested change of '%ls' to '%ls'%s%ls"), 2619 aKey, aValue, sep, err);2634 aKey, val.raw(), sep, err); 2620 2635 } 2621 2636 2622 if ( aValue != NULL)2637 if (!val.isEmpty()) 2623 2638 { 2624 2639 if (extraDataItemNode.isNull()) … … 3049 3064 3050 3065 CheckComArgNotNull (aName); 3051 if ((aValue != NULL) && !VALID_PTR (aValue)) 3052 return E_INVALIDARG; 3066 CheckComArgNotNull (aValue); 3053 3067 if ((aFlags != NULL) && !VALID_PTR (aFlags)) 3054 3068 return E_INVALIDARG; … … 3119 3133 if (found && SUCCEEDED (rc)) 3120 3134 { 3121 if ( aValue != NULL)3135 if (*aValue) 3122 3136 { 3123 3137 RTTIMESPEC time; … … 3129 3143 } 3130 3144 } 3131 else if (SUCCEEDED (rc) && (aValue != NULL))3145 else if (SUCCEEDED (rc) && *aValue) 3132 3146 { 3133 3147 RTTIMESPEC time; … … 3769 3783 RTENV env = RTENV_DEFAULT; 3770 3784 3771 if (aEnvironment )3785 if (aEnvironment != NULL && *aEnvironment) 3772 3786 { 3773 3787 char *newEnvStr = NULL; -
trunk/src/VBox/Main/MediumImpl.cpp
r19239 r20977 75 75 AutoReadLock alock (this); 76 76 77 m.description.cloneTo (aDescription); 77 if (m.description.isEmpty()) 78 Bstr("").cloneTo(aDescription); 79 else 80 m.description.cloneTo (aDescription); 78 81 79 82 return S_OK; … … 199 202 AutoReadLock alock (this); 200 203 201 m.lastAccessError.cloneTo (aLastAccessError); 204 if (m.lastAccessError.isEmpty()) 205 Bstr("").cloneTo(aLastAccessError); 206 else 207 m.lastAccessError.cloneTo (aLastAccessError); 202 208 203 209 return S_OK; … … 969 975 /* if the image file is not accessible, it's not acceptable for the 970 976 * newly opened media so convert this into an error */ 971 if (!m.lastAccessError.is Null())977 if (!m.lastAccessError.isEmpty()) 972 978 rc = setError (VBOX_E_FILE_ERROR, Utf8Str (m.lastAccessError)); 973 979 } -
trunk/src/VBox/Main/NetworkAdapterImpl.cpp
r20704 r20977 318 318 * Are we supposed to generate a MAC? 319 319 */ 320 if (!aMACAddress )320 if (!aMACAddress || !*aMACAddress) 321 321 { 322 322 mData.backup(); -
trunk/src/VBox/Main/SharedFolderImpl.cpp
r16215 r20977 331 331 AutoReadLock alock (this); 332 332 333 m.lastAccessError.cloneTo (aLastAccessError); 333 if (m.lastAccessError.isEmpty()) 334 Bstr("").cloneTo(aLastAccessError); 335 else 336 m.lastAccessError.cloneTo (aLastAccessError); 334 337 335 338 return S_OK; -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r20842 r20977 791 791 792 792 CheckComArgStrNotEmptyOrNull (aName); 793 /** @todo tighten checks on aId? */ 793 794 CheckComArgOutPointerValid (aMachine); 794 795 … … 871 872 CheckComArgStrNotEmptyOrNull (aName); 872 873 CheckComArgStrNotEmptyOrNull (aSettingsFile); 874 /** @todo tighten checks on aId? */ 873 875 CheckComArgOutPointerValid (aMachine); 874 876 … … 1107 1109 IHardDisk **aHardDisk) 1108 1110 { 1109 CheckComArgStrNotEmptyOrNull (aFormat);1110 1111 CheckComArgOutPointerValid (aHardDisk); 1111 1112 … … 1454 1455 1455 1456 /* start with nothing found */ 1456 *aNextKey = NULL;1457 Bstr("").cloneTo(aNextKey); 1457 1458 if (aNextValue) 1458 *aNextValue = NULL;1459 Bstr("").cloneTo(aNextValue); 1459 1460 1460 1461 HRESULT rc = S_OK; … … 1555 1556 1556 1557 /* start with nothing found */ 1557 *aValue = NULL;1558 Bstr("").cloneTo(aValue); 1558 1559 1559 1560 HRESULT rc = S_OK; … … 1615 1616 1616 1617 Guid emptyGuid; 1618 Bstr val; 1619 if (!aValue) 1620 val = Bstr(""); 1621 else 1622 val = aValue; 1617 1623 1618 1624 bool changed = false; … … 1635 1641 1636 1642 const Utf8Str key = aKey; 1637 Bstr oldVal ;1643 Bstr oldVal(""); 1638 1644 1639 1645 Key globalNode = tree.rootKey().key ("Global"); … … 1653 1659 } 1654 1660 1655 /* When no key is found, oldVal is null*/1656 changed = oldVal != aValue;1661 /* When no key is found, oldVal is empty string */ 1662 changed = oldVal != val; 1657 1663 1658 1664 if (changed) … … 1660 1666 /* ask for permission from all listeners */ 1661 1667 Bstr error; 1662 if (!onExtraDataCanChange (Guid::Empty, aKey, aValue, error))1668 if (!onExtraDataCanChange (Guid::Empty, aKey, val, error)) 1663 1669 { 1664 1670 const char *sep = error.isEmpty() ? "" : ": "; … … 1669 1675 tr ("Could not set extra data because someone refused " 1670 1676 "the requested change of '%ls' to '%ls'%s%ls"), 1671 aKey, aValue, sep, err);1677 aKey, val.raw(), sep, err); 1672 1678 } 1673 1679 1674 if ( aValue != NULL)1680 if (!val.isEmpty()) 1675 1681 { 1676 1682 if (extraDataItemNode.isNull()) -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r20963 r20977 1881 1881 @a location is a not valid file name (for file-based formats only). 1882 1882 </result> 1883 <result name="E_INVALIDARG">1884 @a format is a @c null or empty string.1885 </result>1886 1883 </desc> 1887 1884 <param name="format" type="wstring" dir="in"> … … 2312 2309 Returns the global extra data key name following the supplied key. 2313 2310 2314 An error is returned if the supplied @a key does not exist. @c null is2315 returned in @a nextKey if the supplied key is the last key. When2311 An error is returned if the supplied @a key does not exist. An empty 2312 string is returned in @a nextKey if the supplied key is the last key. When 2316 2313 supplying @c null or an empty string for the @a key, the first key item 2317 2314 is returned in @a nextKey (if there is any). @a nextValue is an optional … … 2339 2336 2340 2337 If the requested data @a key does not exist, this function will 2341 succeed and return @c nullin the @a value argument.2338 succeed and return an empty string in the @a value argument. 2342 2339 2343 2340 <result name="VBOX_E_FILE_ERROR"> … … 2361 2358 Sets associated global extra data. 2362 2359 2363 If you pass @c null as a key @a value, the given @a key will be2364 deleted.2360 If you pass @c null or empty string as a key @a value, the given @a key 2361 will be deleted. 2365 2362 2366 2363 <note> … … 2538 2535 server's variable. If the value of the environment variable is 2539 2536 omitted, this variable will be removed from the resulting environment. 2540 If the environment string is @c null , the server environment is2541 i nherited by the started process as is.2537 If the environment string is @c null or emprty, the server environment 2538 is inherited by the started process as is. 2542 2539 2543 2540 <see>openExistingSession</see> … … 3736 3733 <desc> 3737 3734 Updates the flag whether saved state is removed on a machine state 3738 change from Saved to Power Off.3735 change from Saved to PoweredOff. 3739 3736 </desc> 3740 3737 <param name="aRemove" type="boolean" dir="in"/> … … 4442 4439 4443 4440 <note> 4444 Setting this property to @c null will restore the4445 initial value.4441 Setting this property to @c null or to an empty string will restore 4442 the initial value. 4446 4443 </note> 4447 4444 <note> … … 4573 4570 <link to="IVirtualBox::openSession"/>, or if 4574 4571 <link to="#sessionState"/> is SessionClosed, the value of this 4575 attribute is @c null.4572 attribute is an empty string. 4576 4573 </desc> 4577 4574 </attribute> … … 4606 4603 <note> 4607 4604 When the machine is not in the Saved state, this attribute is 4608 @c null.4605 an empty string. 4609 4606 </note> 4610 4607 </desc> … … 5033 5030 supplied key. 5034 5031 5035 An error is returned if the supplied @a key does not exist. @c null is 5036 returned in @a nextKey if the supplied key is the last key. When 5037 supplying @c null for the @a key, the first key item is returned in 5038 @a nextKey (if there is any). @a nextValue is an optional parameter and 5039 if supplied, the next key's value is returned in it. 5032 An error is returned if the supplied @a key does not exist. An empty 5033 string is returned in @a nextKey if the supplied key is the last key. 5034 When supplying @c null or an empty string for the @a key, the first key 5035 item is returned in @a nextKey (if there is any). @a nextValue is an 5036 optional parameter and if supplied, the next key's value is returned in 5037 it. 5040 5038 5041 5039 <result name="VBOX_E_OBJECT_NOT_FOUND"> … … 5060 5058 5061 5059 If the requested data @a key does not exist, this function will 5062 succeed and return @c nullin the @a value argument.5060 succeed and return an empty string in the @a value argument. 5063 5061 5064 5062 <result name="VBOX_E_FILE_ERROR"> … … 5082 5080 Sets associated machine-specific extra data. 5083 5081 5084 If you pass @c null as a key @a value, the given @a key will be5085 deleted.5082 If you pass @c null or an empty string as a key @a value, the given 5083 @a key will be deleted. 5086 5084 5087 5085 <note> … … 5537 5535 The new value of the property to set, change or delete. If the 5538 5536 property does not yet exist and value is non-empty, it will be 5539 created. If the value is empty, the key will be deleted if it5540 exists.5537 created. If the value is @null or empty, the property will be 5538 deleted if it exists. 5541 5539 </desc> 5542 5540 </param> … … 5575 5573 The new value of the property to set, change or delete. If the 5576 5574 property does not yet exist and value is non-empty, it will be 5577 created. If value is empty, the property will be deleted if it5578 exists.5575 created. If the value is @null or empty, the property will be 5576 deleted if it exists. 5579 5577 </desc> 5580 5578 </param> … … 6913 6911 <desc> 6914 6912 Returns a human readable description for the drive. This 6915 description usually contains the product and vendor name. A 6916 @c nullstring is returned if the description is not available.6913 description usually contains the product and vendor name. An 6914 empty string is returned if the description is not available. 6917 6915 </desc> 6918 6916 </attribute> … … 6922 6920 attribute is reserved for future use instead of 6923 6921 <link to="#name"/>. Currently it is not used and may return 6924 @c nullon some platforms.6922 an empty string on some platforms. 6925 6923 </desc> 6926 6924 </attribute> … … 6947 6945 <desc> 6948 6946 Returns a human readable description for the drive. This 6949 description usually contains the product and vendor name. A 6950 @c nullstring is returned if the description is not available.6947 description usually contains the product and vendor name. An 6948 empty string is returned if the description is not available. 6951 6949 </desc> 6952 6950 </attribute> … … 6956 6954 attribute is reserved for future use instead of 6957 6955 <link to="#name"/>. Currently it is not used and may return 6958 @c nullon some platforms.6956 an empty string on some platforms. 6959 6957 </desc> 6960 6958 </attribute> … … 7248 7246 <param name="description" type="wstring" dir="return"> 7249 7247 <desc> 7250 Model string. A @c nullstring is returned if value is not known or7248 Model string. An empty string is returned if value is not known or 7251 7249 @a cpuId is invalid. 7252 7250 </desc> … … 7324 7322 <desc> 7325 7323 Creates a new USB device filter. All attributes except 7326 the filter name are set to @c null(any match),7324 the filter name are set to empty (any match), 7327 7325 <i>active</i> is @c false (the filter is not active). 7328 7326 … … 7616 7614 7617 7615 <note> 7618 Setting this property to @c null will restore the7616 Setting this property to @c null or an empty string will restore the 7619 7617 initial value. 7620 7618 </note> … … 7654 7652 7655 7653 <note> 7656 Setting this property to @c null will restore the initial value. 7654 Setting this property to @c null or empty string will restore the 7655 initial value. 7657 7656 </note> 7658 7657 <note> … … 7726 7725 7727 7726 <note> 7728 Setting this property to @c null will restore the initial value. 7727 Setting this property to @c null or empty string will restore the 7728 initial value. 7729 7729 </note> 7730 7730 … … 7754 7754 7755 7755 <note> 7756 Setting this property to @c null will restore the7756 Setting this property to @c null or empty string will restore the 7757 7757 initial value. 7758 7758 </note> … … 7781 7781 is the same for the webservice as it is for VBoxVRDP. 7782 7782 7783 <note> 7784 Setting this property to @c null or empty string will restore the 7785 initial value. 7786 </note> 7783 7787 </desc> 7784 7788 </attribute> … … 8544 8548 <desc> 8545 8549 Optional description of the medium. For newly created media, the value 8546 of this attribute value is @c null.8550 of this attribute value is an empty string. 8547 8551 8548 8552 Media types that don't support this attribute will return E_NOTIMPL in … … 8651 8655 8652 8656 Accessibility checks are performed each time the <link to="#state"/> 8653 attribute is read. A @c nullstring is returned if the last8654 accessibility check was successful. A non- @c nullstring indicates a8657 attribute is read. An empty string is returned if the last 8658 accessibility check was successful. A non-empty string indicates a 8655 8659 failure and should normally describe a reason of the failure (for 8656 8660 example, a file read error). … … 9414 9418 be obtained with <link to="IHardDiskFormat::describeProperties"/>. 9415 9419 9416 Note that if this method returns a @c null @a value, the requested9417 property is supported but currently not assigned any value.9420 Note that if this method returns an empty string in @a value, the 9421 requested property is supported but currently not assigned any value. 9418 9422 9419 9423 <result name="VBOX_E_OBJECT_NOT_FOUND"> … … 9437 9441 be obtained with <link to="IHardDiskFormat::describeProperties"/>. 9438 9442 9439 Note that setting the property value to @c null is equivalent to 9440 deleting the existing value. A default value (if it is defined for this 9441 property) will be used by the format backend in this case. 9443 Note that setting the property value to @c null or an empty string is 9444 equivalent to deleting the existing value. A default value (if it is 9445 defined for this property) will be used by the format backend in this 9446 case. 9442 9447 9443 9448 <result name="VBOX_E_OBJECT_NOT_FOUND"> … … 9460 9465 The names of the properties to get are specified using the @a names 9461 9466 argument which is a list of comma-separated property names or 9462 @c nullif all properties are to be returned. Note that currently9467 an empty string if all properties are to be returned. Note that currently 9463 9468 the value of this argument is ignored and the method always returns all 9464 9469 existing properties. … … 9474 9479 9475 9480 Note that for properties that do not have assigned values, 9476 @c nullis returned at the appropriate index in the9481 an empty string is returned at the appropriate index in the 9477 9482 @a returnValues array. 9478 9483 … … 9512 9517 be obtained with <link to="IHardDiskFormat::describeProperties"/>. 9513 9518 9514 Note that setting the property value to @c null is equivalent to 9515 deleting the existing value. A default value (if it is defined for this 9516 property) will be used by the format backend in this case. 9519 Note that setting the property value to @c null or an empty string is 9520 equivalent to deleting the existing value. A default value (if it is 9521 defined for this property) will be used by the format backend in this 9522 case. 9517 9523 </desc> 9518 9524 <param name="names" type="wstring" safearray="yes" dir="in"> … … 11124 11130 <desc> 11125 11131 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting 11126 it to @c null , VirtualBox will generate a unique MAC address.11132 it to @c null or an empty string, VirtualBox will generate a unique MAC address. 11127 11133 </desc> 11128 11134 </attribute> … … 11561 11567 <desc> 11562 11568 Creates a new USB device filter. All attributes except 11563 the filter name are set to @c null(any match),11569 the filter name are set to empty (any match), 11564 11570 <i>active</i> is @c false (the filter is not active). 11565 11571 … … 12303 12309 12304 12310 Accessibility checks are performed each time the <link to="#accessible"/> 12305 attribute is read. A @c nullstring is returned if the last12306 accessibility check was successful. A non- @c nullstring indicates a12311 attribute is read. An empty string is returned if the last 12312 accessibility check was successful. A non-empty string indicates a 12307 12313 failure and should normally describe a reason of the failure (for 12308 12314 example, a file read error). … … 12577 12583 <link to="IConsole::detachUSBDevice"/>) has completed. 12578 12584 A @c null @a error object means success, otherwise it 12585 describes a failure. 12579 12586 12580 12587 <result name="VBOX_E_INVALID_VM_STATE"> -
trunk/src/VBox/Main/testcase/tstAPI.cpp
r20928 r20977 172 172 RTPrintf ("Extra data value: {%ls}\n", extraData.raw()); 173 173 } else { 174 if (extraData.isNull()) 175 RTPrintf ("No extra data exists\n"); 176 else 177 RTPrintf ("Extra data is empty\n"); 174 RTPrintf ("No extra data exists\n"); 178 175 } 179 176 … … 194 191 RTPrintf ("Extra data value: {%ls}\n", extraData.raw()); 195 192 } else { 196 if (extraData.isNull()) 197 RTPrintf ("No extra data exists\n"); 198 else 199 RTPrintf ("Extra data is empty\n"); 193 RTPrintf ("No extra data exists\n"); 200 194 } 201 195 }
Note:
See TracChangeset
for help on using the changeset viewer.