VirtualBox

Changeset 85740 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 13, 2020 7:14:45 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
139888
Message:

DnD/Main: Got rid of protocol-guessing via Guest Additions version and pass down the reported (now marked as deprecated) protocol version and guest feature bits to Main.

Location:
trunk/src/VBox/Main
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r85688 r85740  
    1288112881  <interface
    1288212882    name="IDnDBase" extends="$unknown"
    12883     uuid="4132147b-42f8-cd96-7570-6a8800e3342c"
     12883    uuid="00727A73-000A-4C4A-006D-E7D300351186"
    1288412884    wsmap="managed"
    1288512885    reservedMethods="1" reservedAttributes="2"
     
    1288912889    <attribute name="formats" type="wstring" safearray="yes" readonly="yes">
    1289012890      <desc>Returns all supported drag'n drop formats.</desc>
    12891     </attribute>
    12892 
    12893     <attribute name="protocolVersion" type="unsigned long" readonly="yes">
    12894       <desc>Returns the protocol version which is used to communicate
    12895         with the guest.</desc>
    1289612891    </attribute>
    1289712892
  • trunk/src/VBox/Main/include/GuestDnDSourceImpl.h

    r85537 r85740  
    5757    HRESULT addFormats(const GuestDnDMIMEList &aFormats);
    5858    HRESULT removeFormats(const GuestDnDMIMEList &aFormats);
    59 
    60     HRESULT getProtocolVersion(ULONG *aProtocolVersion);
    6159    /** @}  */
    6260
  • trunk/src/VBox/Main/include/GuestDnDTargetImpl.h

    r85537 r85740  
    5555    HRESULT addFormats(const GuestDnDMIMEList &aFormats);
    5656    HRESULT removeFormats(const GuestDnDMIMEList &aFormats);
    57 
    58     HRESULT getProtocolVersion(ULONG *aProtocolVersion);
    5957    /** @}  */
    6058
  • trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp

    r85739 r85740  
    250250
    251251    return GuestDnDBase::i_removeFormats(aFormats);
    252 #endif /* VBOX_WITH_DRAG_AND_DROP */
    253 }
    254 
    255 HRESULT GuestDnDSource::getProtocolVersion(ULONG *aProtocolVersion)
    256 {
    257 #if !defined(VBOX_WITH_DRAG_AND_DROP)
    258     ReturnComNotImplemented();
    259 #else /* VBOX_WITH_DRAG_AND_DROP */
    260 
    261     AutoCaller autoCaller(this);
    262     if (FAILED(autoCaller.rc())) return autoCaller.rc();
    263 
    264     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    265 
    266     *aProtocolVersion = m_pResp->m_uProtocolVersion;
    267 
    268     return S_OK;
    269252#endif /* VBOX_WITH_DRAG_AND_DROP */
    270253}
  • trunk/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp

    r85739 r85740  
    248248
    249249    return GuestDnDBase::i_removeFormats(aFormats);
    250 #endif /* VBOX_WITH_DRAG_AND_DROP */
    251 }
    252 
    253 HRESULT GuestDnDTarget::getProtocolVersion(ULONG *aProtocolVersion)
    254 {
    255 #if !defined(VBOX_WITH_DRAG_AND_DROP)
    256     ReturnComNotImplemented();
    257 #else /* VBOX_WITH_DRAG_AND_DROP */
    258 
    259     AutoCaller autoCaller(this);
    260     if (FAILED(autoCaller.rc())) return autoCaller.rc();
    261 
    262     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    263 
    264     *aProtocolVersion = m_pResp->m_uProtocolVersion;
    265 
    266     return S_OK;
    267250#endif /* VBOX_WITH_DRAG_AND_DROP */
    268251}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette