VirtualBox

Changeset 74526 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Sep 28, 2018 3:08:24 PM (6 years ago)
Author:
vboxsync
Message:

DnD: Renaming for DnDURIObject / DnDURIList classes, some typedefs to distinguish flags better. No functional changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibDragAndDrop.cpp

    r74472 r74526  
    410410     * Enter the main loop of retieving files + directories.
    411411     */
    412     DnDURIObject objFile(DnDURIObject::File);
     412    DnDURIObject objFile(DnDURIObject::Type_File);
    413413
    414414    char szPathName[RTPATH_MAX] = { 0 };
     
    510510                                uint32_t fCreationMode = (fMode & RTFS_UNIX_MASK) | RTFS_UNIX_IRUSR | RTFS_UNIX_IWUSR;
    511511#endif
    512                                 rc = objFile.OpenEx(strPathAbs, DnDURIObject::File, DnDURIObject::Target, fOpen, fCreationMode);
     512                                rc = objFile.OpenEx(strPathAbs, DnDURIObject::Type_File, DnDURIObject::View_Target, fOpen, fCreationMode);
    513513                                if (RT_SUCCESS(rc))
    514514                                {
     
    866866            Assert(cbData);
    867867
    868             rc = lstURI.RootFromURIData(pvData, cbData, 0 /* fFlags */);
     868            rc = lstURI.SetFromURIData(pvData, cbData, 0 /* fFlags */);
    869869            if (RT_SUCCESS(rc))
    870870                rc = vbglR3DnDHGRecvURIData(pCtx, &dataHdr, &droppedFiles);
     
    879879                }
    880880
    881                 RTCString strData = lstURI.RootToString(droppedFiles.GetDirAbs());
     881                RTCString strData = lstURI.GetRootEntries(droppedFiles.GetDirAbs());
    882882                Assert(!strData.isEmpty());
    883883
     
    15621562static int vbglR3DnDGHSendDir(PVBGLR3GUESTDNDCMDCTX pCtx, DnDURIObject *pObj)
    15631563{
    1564     AssertPtrReturn(pObj,                                    VERR_INVALID_POINTER);
    1565     AssertPtrReturn(pCtx,                                    VERR_INVALID_POINTER);
    1566     AssertReturn(pObj->GetType() == DnDURIObject::Directory, VERR_INVALID_PARAMETER);
     1564    AssertPtrReturn(pObj,                                         VERR_INVALID_POINTER);
     1565    AssertPtrReturn(pCtx,                                             VERR_INVALID_POINTER);
     1566    AssertReturn(pObj->GetType() == DnDURIObject::Type_Directory, VERR_INVALID_PARAMETER);
    15671567
    15681568    RTCString strPath = pObj->GetDestPath();
     
    15981598static int vbglR3DnDGHSendFile(PVBGLR3GUESTDNDCMDCTX pCtx, DnDURIObject *pObj)
    15991599{
    1600     AssertPtrReturn(pCtx,                               VERR_INVALID_POINTER);
    1601     AssertPtrReturn(pObj,                               VERR_INVALID_POINTER);
    1602     AssertReturn(pObj->GetType() == DnDURIObject::File, VERR_INVALID_PARAMETER);
    1603     AssertReturn(pObj->IsOpen(),                        VERR_INVALID_STATE);
     1600    AssertPtrReturn(pCtx,                                    VERR_INVALID_POINTER);
     1601    AssertPtrReturn(pObj,                                    VERR_INVALID_POINTER);
     1602    AssertReturn(pObj->GetType() == DnDURIObject::Type_File, VERR_INVALID_PARAMETER);
     1603    AssertReturn(pObj->IsOpen(),                             VERR_INVALID_STATE);
    16041604
    16051605    uint32_t cbBuf = _64K;           /** @todo Make this configurable? */
     
    17001700    switch (pObj->GetType())
    17011701    {
    1702         case DnDURIObject::Directory:
     1702        case DnDURIObject::Type_Directory:
    17031703            rc = vbglR3DnDGHSendDir(pCtx, pObj);
    17041704            break;
    17051705
    1706         case DnDURIObject::File:
     1706        case DnDURIObject::Type_File:
    17071707            rc = vbglR3DnDGHSendFile(pCtx, pObj);
    17081708            break;
     
    17711771         * URI list the host needs to know upfront to set up the drag'n drop operation.
    17721772         */
    1773         RTCString strRootDest = lstURI.RootToString();
     1773        RTCString strRootDest = lstURI.GetRootEntries();
    17741774        if (strRootDest.isNotEmpty())
    17751775        {
     
    17791779            /* The total size also contains the size of the meta data. */
    17801780            uint64_t cbTotal  = cbURLIist;
    1781                      cbTotal += lstURI.TotalBytes();
     1781                     cbTotal += lstURI.GetTotalBytes();
    17821782
    17831783            /* We're going to send an URI list in text format. */
     
    17911791            dataHdr.pvMetaFmt = (void *)szMetaFmt;
    17921792            dataHdr.cbMetaFmt = cbMetaFmt;
    1793             dataHdr.cObjects  = lstURI.TotalCount();
     1793            dataHdr.cObjects  = lstURI.GetTotalCount();
    17941794
    17951795            rc = vbglR3DnDGHSendDataInternal(pCtx,
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