VirtualBox

Changeset 20977 in vbox for trunk


Ignore:
Timestamp:
Jun 26, 2009 2:38:55 PM (16 years ago)
Author:
vboxsync
Message:

API: weed out NULL strings, as many clients cannot use them

Location:
trunk/src/VBox
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r20928 r20977  
    12711271                extraDataKey = nextExtraDataKey;
    12721272
    1273                 if (SUCCEEDED(rcEnum) && extraDataKey)
     1273                if (SUCCEEDED(rcEnum) && !extraDataKey.isEmpty())
    12741274                    RTPrintf("Key: %lS, Value: %lS\n", nextExtraDataKey.raw(), nextExtraDataValue.raw());
    1275             } while (extraDataKey);
     1275            } while (!extraDataKey.isEmpty());
    12761276        }
    12771277        else
     
    12791279            Bstr value;
    12801280            CHECK_ERROR(a->virtualBox, GetExtraData(Bstr(a->argv[1]), value.asOutParam()));
    1281             if (value)
     1281            if (!value.isEmpty())
    12821282                RTPrintf("Value: %lS\n", value.raw());
    12831283            else
     
    13101310                    extraDataKey = nextExtraDataKey;
    13111311
    1312                     if (SUCCEEDED(rcEnum) && extraDataKey)
     1312                    if (SUCCEEDED(rcEnum) && !extraDataKey.isEmpty())
    13131313                    {
    13141314                        RTPrintf("Key: %lS, Value: %lS\n", nextExtraDataKey.raw(), nextExtraDataValue.raw());
    13151315                    }
    1316                 } while (extraDataKey);
     1316                } while (!extraDataKey.isEmpty());
    13171317            }
    13181318            else
     
    13201320                Bstr value;
    13211321                CHECK_ERROR(machine, GetExtraData(Bstr(a->argv[1]), value.asOutParam()));
    1322                 if (value)
     1322                if (!value.isEmpty())
    13231323                    RTPrintf("Value: %lS\n", value.raw());
    13241324                else
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp

    r15664 r20977  
    160160        if (!vbox.isOk())
    161161            return;
    162         // null value means the key is absent. it is ok, the default will apply
    163         if (value.isNull())
     162        // empty value means the key is absent. it is ok, the default will apply
     163        if (value.isEmpty())
    164164            continue;
    165165        // try to set the property validating it against rx
     
    242242void VBoxGlobalSettings::setPropertyPrivate (size_t index, const QString &value)
    243243{
    244     if (value.isNull())
     244    if (value.isEmpty())
    245245    {
    246246        if (!gPropertyMap [index].canDelete)
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp

    r19664 r20977  
    124124    QString dlgsize =
    125125        mSession.GetMachine().GetExtraData (VBoxDefs::GUI_InfoDlgState);
    126     if (dlgsize.isNull())
     126    if (dlgsize.isEmpty())
    127127    {
    128128        mWidth = 400;
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r20727 r20977  
    27972797                Bstr tmpAddr, tmpMask;
    27982798                hrc = virtualBox->GetExtraData(Bstr("HostOnly/vboxnet0/IPAddress"), tmpAddr.asOutParam());
    2799                 if (SUCCEEDED(hrc) && !tmpAddr.isNull())
     2799                if (SUCCEEDED(hrc) && !tmpAddr.isEmpty())
    28002800                {
    28012801                    hrc = virtualBox->GetExtraData(Bstr("HostOnly/vboxnet0/IPNetMask"), tmpMask.asOutParam());
    2802                     if (SUCCEEDED(hrc) && !tmpAddr.isEmpty())
     2802                    if (SUCCEEDED(hrc) && !tmpMask.isEmpty())
    28032803                        hrc = hostInterface->EnableStaticIpConfig(tmpAddr, tmpMask);
     2804                    else
     2805                        hrc = hostInterface->EnableStaticIpConfig(tmpAddr,
     2806                                                                  Bstr(VBOXNET_IPV4MASK_DEFAULT));
    28042807                }
    28052808                else
     
    28112814                if (SUCCEEDED(hrc))
    28122815                    hrc = virtualBox->GetExtraData(Bstr("HostOnly/vboxnet0/IPV6NetMask"), tmpMask.asOutParam());
    2813                 if (SUCCEEDED(hrc) && !tmpAddr.isEmpty())
     2816                if (SUCCEEDED(hrc) && !tmpAddr.isEmpty() && !tmpMask.isEmpty())
    28142817                    hrc = hostInterface->EnableStaticIpConfigV6(tmpAddr, Utf8Str(tmpMask).toUInt32());
    28152818#endif
  • trunk/src/VBox/Main/HardDiskImpl.cpp

    r20945 r20977  
    555555                CheckComRCReturnRC (rc);
    556556
    557                 if (!error.isNull())
     557                if (!error.isEmpty())
    558558                {
    559559                    Bstr loc;
     
    615615                CheckComRCReturnRC (rc);
    616616
    617                 if (!error.isNull())
     617                if (!error.isEmpty())
    618618                {
    619619                    Bstr loc;
     
    13261326            tr ("Property '%ls' does not exist"), aName);
    13271327
    1328     it->second.cloneTo (aValue);
     1328    if (it->second.isEmpty())
     1329        Bstr("").cloneTo (aValue);
     1330    else
     1331        it->second.cloneTo (aValue);
    13291332
    13301333    return S_OK;
     
    13551358            tr ("Property '%ls' does not exist"), aName);
    13561359
    1357     it->second = aValue;
     1360    if (aValue && !*aValue)
     1361        it->second = (const char *)NULL;
     1362    else
     1363        it->second = aValue;
    13581364
    13591365    HRESULT rc = mVirtualBox->saveSettings();
     
    13851391    {
    13861392        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]);
    13881397        ++ i;
    13891398    }
     
    14241433        AssertReturn (it != mm.properties.end(), E_FAIL);
    14251434
    1426         it->second = values [i];
     1435        if (values[i] && !*values[i])
     1436            it->second = (const char *)NULL;
     1437        else
     1438            it->second = values [i];
    14271439    }
    14281440
  • trunk/src/VBox/Main/HostDVDDriveImpl.cpp

    r15051 r20977  
    6161
    6262    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;
    6571
    6672    /* Confirm the successful initialization */
  • trunk/src/VBox/Main/HostFloppyDriveImpl.cpp

    r15051 r20977  
    6161
    6262    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;
    6571
    6672    /* Confirm the successful initialization */
  • trunk/src/VBox/Main/HostImpl.cpp

    r20283 r20977  
    10831083 * @returns COM status code
    10841084 * @param   cpu id to get info for.
    1085  * @param   description address of result variable, NULL if known or aCpuId is invalid.
     1085 * @param   description address of result variable, empty string if not known or aCpuId is invalid.
    10861086 */
    10871087STDMETHODIMP Host::GetProcessorDescription(ULONG /* aCpuId */, BSTR *aDescription)
  • trunk/src/VBox/Main/MachineImpl.cpp

    r20931 r20977  
    16191619    AutoReadLock alock (this);
    16201620
    1621     mData->mSession.mType.cloneTo (aSessionType);
     1621    if (mData->mSession.mType.isNull())
     1622        Bstr("").cloneTo(aSessionType);
     1623    else
     1624        mData->mSession.mType.cloneTo (aSessionType);
    16221625
    16231626    return S_OK;
     
    16761679    AutoReadLock alock (this);
    16771680
    1678     mSSData->mStateFilePath.cloneTo (aStateFilePath);
     1681    if (mSSData->mStateFilePath.isEmpty())
     1682        Bstr("").cloneTo(aStateFilePath);
     1683    else
     1684        mSSData->mStateFilePath.cloneTo (aStateFilePath);
    16791685
    16801686    return S_OK;
     
    23712377    CheckComRCReturnRC (autoCaller.rc());
    23722378
    2373     /* serialize file access (prevent writes) */
    2374     AutoReadLock alock (this);
    2375 
    23762379    /* start with nothing found */
    2377     *aNextKey = NULL;
     2380    Bstr("").cloneTo(aNextKey);
    23782381    if (aNextValue)
    2379         *aNextValue = NULL;
     2382        Bstr("").cloneTo(aNextValue);
    23802383
    23812384    /* if we're ready and isConfigLocked() is FALSE then it means
     
    23852388
    23862389    HRESULT rc = S_OK;
     2390
     2391    Bstr bstrInKey(aKey);
     2392
     2393    /* serialize file access (prevent writes) */
     2394    AutoReadLock alock (this);
    23872395
    23882396    try
     
    24132421
    24142422                    /* if we're supposed to return the first one */
    2415                     if (aKey == NULL)
     2423                    if (bstrInKey.isEmpty())
    24162424                    {
    24172425                        key.cloneTo (aNextKey);
     
    24252433
    24262434                    /* did we find the key we're looking for? */
    2427                     if (key == aKey)
     2435                    if (key == bstrInKey)
    24282436                    {
    24292437                        ++ it;
     
    24522460         * through to return NULLs and S_OK. */
    24532461
    2454         if (aKey != NULL)
     2462        if (!bstrInKey.isEmpty())
    24552463            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());
    24572465    }
    24582466    catch (...)
     
    24792487
    24802488    /* start with nothing found */
    2481     *aValue = NULL;
     2489    Bstr("").cloneTo(aValue);
    24822490
    24832491    /* if we're ready and isConfigLocked() is FALSE then it means
     
    25592567    }
    25602568
     2569    Bstr val;
     2570    if (!aValue)
     2571        val = Bstr("");
     2572    else
     2573        val = aValue;
     2574
     2575
    25612576    bool changed = false;
    25622577    HRESULT rc = S_OK;
     
    25832598
    25842599        const Utf8Str key = aKey;
    2585         Bstr oldVal;
     2600        Bstr oldVal("");
    25862601
    25872602        Key machineNode = tree.rootKey().key ("Machine");
     
    26012616        }
    26022617
    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;
    26052620
    26062621        if (changed)
     
    26082623            /* ask for permission from all listeners */
    26092624            Bstr error;
    2610             if (!mParent->onExtraDataCanChange (mData->mUuid, aKey, aValue, error))
     2625            if (!mParent->onExtraDataCanChange (mData->mUuid, aKey, val, error))
    26112626            {
    26122627                const char *sep = error.isEmpty() ? "" : ": ";
     
    26172632                    tr ("Could not set extra data because someone refused "
    26182633                        "the requested change of '%ls' to '%ls'%s%ls"),
    2619                     aKey, aValue, sep, err);
     2634                    aKey, val.raw(), sep, err);
    26202635            }
    26212636
    2622             if (aValue != NULL)
     2637            if (!val.isEmpty())
    26232638            {
    26242639                if (extraDataItemNode.isNull())
     
    30493064
    30503065    CheckComArgNotNull (aName);
    3051     if ((aValue != NULL) && !VALID_PTR (aValue))
    3052         return E_INVALIDARG;
     3066    CheckComArgNotNull (aValue);
    30533067    if ((aFlags != NULL) && !VALID_PTR (aFlags))
    30543068        return E_INVALIDARG;
     
    31193133        if (found && SUCCEEDED (rc))
    31203134        {
    3121             if (aValue != NULL)
     3135            if (*aValue)
    31223136            {
    31233137                RTTIMESPEC time;
     
    31293143            }
    31303144        }
    3131         else if (SUCCEEDED (rc) && (aValue != NULL))
     3145        else if (SUCCEEDED (rc) && *aValue)
    31323146        {
    31333147            RTTIMESPEC time;
     
    37693783    RTENV env = RTENV_DEFAULT;
    37703784
    3771     if (aEnvironment)
     3785    if (aEnvironment != NULL && *aEnvironment)
    37723786    {
    37733787        char *newEnvStr = NULL;
  • trunk/src/VBox/Main/MediumImpl.cpp

    r19239 r20977  
    7575    AutoReadLock alock (this);
    7676
    77     m.description.cloneTo (aDescription);
     77    if (m.description.isEmpty())
     78        Bstr("").cloneTo(aDescription);
     79    else
     80        m.description.cloneTo (aDescription);
    7881
    7982    return S_OK;
     
    199202    AutoReadLock alock (this);
    200203
    201     m.lastAccessError.cloneTo (aLastAccessError);
     204    if (m.lastAccessError.isEmpty())
     205        Bstr("").cloneTo(aLastAccessError);
     206    else
     207        m.lastAccessError.cloneTo (aLastAccessError);
    202208
    203209    return S_OK;
     
    969975        /* if the image file is not accessible, it's not acceptable for the
    970976         * newly opened media so convert this into an error */
    971         if (!m.lastAccessError.isNull())
     977        if (!m.lastAccessError.isEmpty())
    972978            rc = setError (VBOX_E_FILE_ERROR, Utf8Str (m.lastAccessError));
    973979    }
  • trunk/src/VBox/Main/NetworkAdapterImpl.cpp

    r20704 r20977  
    318318     * Are we supposed to generate a MAC?
    319319     */
    320     if (!aMACAddress)
     320    if (!aMACAddress || !*aMACAddress)
    321321    {
    322322        mData.backup();
  • trunk/src/VBox/Main/SharedFolderImpl.cpp

    r16215 r20977  
    331331    AutoReadLock alock (this);
    332332
    333     m.lastAccessError.cloneTo (aLastAccessError);
     333    if (m.lastAccessError.isEmpty())
     334        Bstr("").cloneTo(aLastAccessError);
     335    else
     336        m.lastAccessError.cloneTo (aLastAccessError);
    334337
    335338    return S_OK;
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r20842 r20977  
    791791
    792792    CheckComArgStrNotEmptyOrNull (aName);
     793    /** @todo tighten checks on aId? */
    793794    CheckComArgOutPointerValid (aMachine);
    794795
     
    871872    CheckComArgStrNotEmptyOrNull (aName);
    872873    CheckComArgStrNotEmptyOrNull (aSettingsFile);
     874    /** @todo tighten checks on aId? */
    873875    CheckComArgOutPointerValid (aMachine);
    874876
     
    11071109                                        IHardDisk **aHardDisk)
    11081110{
    1109     CheckComArgStrNotEmptyOrNull (aFormat);
    11101111    CheckComArgOutPointerValid (aHardDisk);
    11111112
     
    14541455
    14551456    /* start with nothing found */
    1456     *aNextKey = NULL;
     1457    Bstr("").cloneTo(aNextKey);
    14571458    if (aNextValue)
    1458         *aNextValue = NULL;
     1459        Bstr("").cloneTo(aNextValue);
    14591460
    14601461    HRESULT rc = S_OK;
     
    15551556
    15561557    /* start with nothing found */
    1557     *aValue = NULL;
     1558    Bstr("").cloneTo(aValue);
    15581559
    15591560    HRESULT rc = S_OK;
     
    16151616
    16161617    Guid emptyGuid;
     1618    Bstr val;
     1619    if (!aValue)
     1620        val = Bstr("");
     1621    else
     1622        val = aValue;
    16171623
    16181624    bool changed = false;
     
    16351641
    16361642        const Utf8Str key = aKey;
    1637         Bstr oldVal;
     1643        Bstr oldVal("");
    16381644
    16391645        Key globalNode = tree.rootKey().key ("Global");
     
    16531659        }
    16541660
    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;
    16571663
    16581664        if (changed)
     
    16601666            /* ask for permission from all listeners */
    16611667            Bstr error;
    1662             if (!onExtraDataCanChange (Guid::Empty, aKey, aValue, error))
     1668            if (!onExtraDataCanChange (Guid::Empty, aKey, val, error))
    16631669            {
    16641670                const char *sep = error.isEmpty() ? "" : ": ";
     
    16691675                    tr ("Could not set extra data because someone refused "
    16701676                        "the requested change of '%ls' to '%ls'%s%ls"),
    1671                     aKey, aValue, sep, err);
     1677                    aKey, val.raw(), sep, err);
    16721678            }
    16731679
    1674             if (aValue != NULL)
     1680            if (!val.isEmpty())
    16751681            {
    16761682                if (extraDataItemNode.isNull())
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r20963 r20977  
    18811881          @a location is a not valid file name (for file-based formats only).
    18821882        </result>
    1883         <result name="E_INVALIDARG">
    1884           @a format is a @c null or empty string.
    1885         </result>
    18861883      </desc>
    18871884      <param name="format" type="wstring" dir="in">
     
    23122309        Returns the global extra data key name following the supplied key.
    23132310
    2314         An error is returned if the supplied @a key does not exist. @c null is
    2315         returned in @a nextKey if the supplied key is the last key. When
     2311        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
    23162313        supplying @c null or an empty string for the @a key, the first key item
    23172314        is returned in @a nextKey (if there is any). @a nextValue is an optional
     
    23392336
    23402337        If the requested data @a key does not exist, this function will
    2341         succeed and return @c null in the @a value argument.
     2338        succeed and return an empty string in the @a value argument.
    23422339
    23432340        <result name="VBOX_E_FILE_ERROR">
     
    23612358        Sets associated global extra data.
    23622359
    2363         If you pass @c null as a key @a value, the given @a key will be
    2364         deleted.
     2360        If you pass @c null or empty string as a key @a value, the given @a key
     2361        will be deleted.
    23652362
    23662363        <note>
     
    25382535        server's variable. If the value of the environment variable is
    25392536        omitted, this variable will be removed from the resulting environment.
    2540         If the environment string is @c null, the server environment is
    2541         inherited 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.
    25422539
    25432540        <see>openExistingSession</see>
     
    37363733      <desc>
    37373734        Updates the flag whether saved state is removed on a machine state
    3738         change from Saved to PowerOff.
     3735        change from Saved to PoweredOff.
    37393736      </desc>
    37403737      <param name="aRemove" type="boolean" dir="in"/>
     
    44424439
    44434440        <note>
    4444           Setting this property to @c null will restore the
    4445           initial value.
     4441          Setting this property to @c null or to an empty string will restore
     4442          the initial value.
    44464443        </note>
    44474444        <note>
     
    45734570        <link to="IVirtualBox::openSession"/>, or if
    45744571        <link to="#sessionState"/> is SessionClosed, the value of this
    4575         attribute is @c null.
     4572        attribute is an empty string.
    45764573      </desc>
    45774574    </attribute>
     
    46064603        <note>
    46074604          When the machine is not in the Saved state, this attribute is
    4608           @c null.
     4605          an empty string.
    46094606        </note>
    46104607      </desc>
     
    50335030        supplied key.
    50345031
    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.
    50405038
    50415039        <result name="VBOX_E_OBJECT_NOT_FOUND">
     
    50605058
    50615059        If the requested data @a key does not exist, this function will
    5062         succeed and return @c null in the @a value argument.
     5060        succeed and return an empty string in the @a value argument.
    50635061
    50645062        <result name="VBOX_E_FILE_ERROR">
     
    50825080        Sets associated machine-specific extra data.
    50835081
    5084         If you pass @c null as a key @a value, the given @a key will be
    5085         deleted.
     5082        If you pass @c null or an empty string as a key @a value, the given
     5083        @a key will be deleted.
    50865084
    50875085        <note>
     
    55375535          The new value of the property to set, change or delete.  If the
    55385536          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 it
    5540           exists.
     5537          created.  If the value is @null or empty, the property will be
     5538          deleted if it exists.
    55415539        </desc>
    55425540      </param>
     
    55755573          The new value of the property to set, change or delete.  If the
    55765574          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 it
    5578           exists.
     5575          created.  If the value is @null or empty, the property will be
     5576          deleted if it exists.
    55795577        </desc>
    55805578      </param>
     
    69136911      <desc>
    69146912        Returns a human readable description for the drive.  This
    6915         description usually contains the product and vendor name.  A
    6916         @c null string 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.
    69176915      </desc>
    69186916    </attribute>
     
    69226920        attribute is reserved for future use instead of
    69236921        <link to="#name"/>. Currently it is not used and may return
    6924         @c null on some platforms.
     6922        an empty string on some platforms.
    69256923      </desc>
    69266924    </attribute>
     
    69476945      <desc>
    69486946        Returns a human readable description for the drive.  This
    6949         description usually contains the product and vendor name.  A
    6950         @c null string 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.
    69516949      </desc>
    69526950    </attribute>
     
    69566954        attribute is reserved for future use instead of
    69576955        <link to="#name"/>. Currently it is not used and may return
    6958         @c null on some platforms.
     6956        an empty string on some platforms.
    69596957      </desc>
    69606958    </attribute>
     
    72487246      <param name="description" type="wstring" dir="return">
    72497247        <desc>
    7250           Model string. A @c null string is returned if value is not known or
     7248          Model string. An empty string is returned if value is not known or
    72517249          @a cpuId is invalid.
    72527250        </desc>
     
    73247322      <desc>
    73257323        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),
    73277325        <i>active</i> is @c false (the filter is not active).
    73287326
     
    76167614
    76177615        <note>
    7618           Setting this property to @c null will restore the
     7616          Setting this property to @c null or an empty string will restore the
    76197617          initial value.
    76207618        </note>
     
    76547652
    76557653        <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.
    76577656        </note>
    76587657        <note>
     
    77267725
    77277726        <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.
    77297729        </note>
    77307730
     
    77547754
    77557755        <note>
    7756           Setting this property to @c null will restore the
     7756          Setting this property to @c null or empty string will restore the
    77577757          initial value.
    77587758        </note>
     
    77817781        is the same for the webservice as it is for VBoxVRDP.
    77827782
     7783        <note>
     7784          Setting this property to @c null or empty string will restore the
     7785          initial value.
     7786        </note>
    77837787      </desc>
    77847788    </attribute>
     
    85448548      <desc>
    85458549        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.
    85478551
    85488552        Media types that don't support this attribute will return E_NOTIMPL in
     
    86518655
    86528656        Accessibility checks are performed each time the <link to="#state"/>
    8653         attribute is read. A @c null string is returned if the last
    8654         accessibility check was successful. A non-@c null string indicates a
     8657        attribute is read. An empty string is returned if the last
     8658        accessibility check was successful. A non-empty string indicates a
    86558659        failure and should normally describe a reason of the failure (for
    86568660        example, a file read error).
     
    94149418        be obtained with <link to="IHardDiskFormat::describeProperties"/>.
    94159419
    9416         Note that if this method returns a @c null @a value, the requested
    9417         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.
    94189422
    94199423        <result name="VBOX_E_OBJECT_NOT_FOUND">
     
    94379441        be obtained with <link to="IHardDiskFormat::describeProperties"/>.
    94389442
    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.
    94429447
    94439448        <result name="VBOX_E_OBJECT_NOT_FOUND">
     
    94609465        The names of the properties to get are specified using the @a names
    94619466        argument which is a list of comma-separated property names or
    9462         @c null if all properties are to be returned. Note that currently
     9467        an empty string if all properties are to be returned. Note that currently
    94639468        the value of this argument is ignored and the method always returns all
    94649469        existing properties.
     
    94749479
    94759480        Note that for properties that do not have assigned values,
    9476         @c null is returned at the appropriate index in the
     9481        an empty string is returned at the appropriate index in the
    94779482        @a returnValues array.
    94789483
     
    95129517        be obtained with <link to="IHardDiskFormat::describeProperties"/>.
    95139518
    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.
    95179523      </desc>
    95189524      <param name="names" type="wstring" safearray="yes" dir="in">
     
    1112411130      <desc>
    1112511131        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.
    1112711133      </desc>
    1112811134    </attribute>
     
    1156111567      <desc>
    1156211568        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),
    1156411570        <i>active</i> is @c false (the filter is not active).
    1156511571
     
    1230312309
    1230412310        Accessibility checks are performed each time the <link to="#accessible"/>
    12305         attribute is read. A @c null string is returned if the last
    12306         accessibility check was successful. A non-@c null string indicates a
     12311        attribute is read. An empty string is returned if the last
     12312        accessibility check was successful. A non-empty string indicates a
    1230712313        failure and should normally describe a reason of the failure (for
    1230812314        example, a file read error).
     
    1257712583        <link to="IConsole::detachUSBDevice"/>) has completed.
    1257812584        A @c null @a error object means success, otherwise it
     12585        describes a failure.
    1257912586
    1258012587        <result name="VBOX_E_INVALID_VM_STATE">
  • trunk/src/VBox/Main/testcase/tstAPI.cpp

    r20928 r20977  
    172172        RTPrintf ("Extra data value: {%ls}\n", extraData.raw());
    173173    } 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");
    178175    }
    179176
     
    194191            RTPrintf ("Extra data value: {%ls}\n", extraData.raw());
    195192        } 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");
    200194        }
    201195    }
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