VirtualBox

Changeset 39821 in vbox


Ignore:
Timestamp:
Jan 20, 2012 2:01:49 PM (13 years ago)
Author:
vboxsync
Message:

API/GuestProperties: add DeleteGuestProperty.

Location:
trunk/src/VBox
Files:
4 edited

Legend:

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

    r38735 r39821  
    160160
    161161        if (!pszValue && !pszFlags)
    162             CHECK_ERROR(machine, SetGuestPropertyValue(Bstr(pszName).raw(),
    163                                                        Bstr().raw()));
     162            CHECK_ERROR(machine, DeleteGuestProperty(Bstr(pszName).raw()));
    164163        else if (!pszFlags)
    165164            CHECK_ERROR(machine, SetGuestPropertyValue(Bstr(pszName).raw(),
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r39712 r39821  
    58865886    </method>
    58875887
     5888    <method name="deleteGuestProperty" const="yes">
     5889      <desc>
     5890        Deletes an entry from the machine's guest property store.
     5891
     5892        <result name="VBOX_E_INVALID_VM_STATE">
     5893          Machine session is not open.
     5894        </result>
     5895
     5896      </desc>
     5897      <param name="name" type="wstring" dir="in">
     5898        <desc>
     5899          The name of the property to delete.
     5900        </desc>
     5901      </param>
     5902    </method>
     5903
    58885904    <method name="enumerateGuestProperties" const="yes">
    58895905      <desc>
  • trunk/src/VBox/Main/include/MachineImpl.h

    r39248 r39821  
    517517    STDMETHOD(SetGuestProperty)(IN_BSTR aName, IN_BSTR aValue, IN_BSTR aFlags);
    518518    STDMETHOD(SetGuestPropertyValue)(IN_BSTR aName, IN_BSTR aValue);
     519    STDMETHOD(DeleteGuestProperty)(IN_BSTR aName);
    519520    STDMETHOD(EnumerateGuestProperties)(IN_BSTR aPattern, ComSafeArrayOut(BSTR, aNames), ComSafeArrayOut(BSTR, aValues), ComSafeArrayOut(LONG64, aTimestamps), ComSafeArrayOut(BSTR, aFlags));
    520521    STDMETHOD(GetMediumAttachmentsOfController)(IN_BSTR aName, ComSafeArrayOut(IMediumAttachment *, aAttachments));
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r39564 r39821  
    52925292        if (found && SUCCEEDED(rc))
    52935293        {
    5294             if (*aValue)
     5294            if (aValue)
    52955295            {
    52965296                RTTIMESPEC time;
     
    53025302            }
    53035303        }
    5304         else if (SUCCEEDED(rc) && *aValue)
     5304        else if (SUCCEEDED(rc) && aValue)
    53055305        {
    53065306            RTTIMESPEC time;
     
    53965396{
    53975397    return SetGuestProperty(aName, aValue, NULL);
     5398}
     5399
     5400STDMETHODIMP Machine::DeleteGuestProperty(IN_BSTR aName)
     5401{
     5402    return SetGuestProperty(aName, NULL, NULL);
    53985403}
    53995404
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