VirtualBox

Changeset 82462 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 6, 2019 2:22:03 PM (5 years ago)
Author:
vboxsync
Message:

Shared Clipboard/Transfers: Renamed SHCLTRANSFERDIR_[READ|WRITE] -> SHCLTRANSFERDIR_[FROM|TO]_REMOTE.

Location:
trunk/src/VBox
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp

    r81960 r82462  
    152152
    153153    /* The guest wants to write local data to the host? */
    154     if (enmDir == SHCLTRANSFERDIR_WRITE)
     154    if (enmDir == SHCLTRANSFERDIR_TO_REMOTE)
    155155    {
    156156        rc = SharedClipboardWinGetRoots(&pCtx->Win, pTransfer);
    157157    }
    158158    /* The guest wants to read data from a remote source. */
    159     else if (enmDir == SHCLTRANSFERDIR_READ)
     159    else if (enmDir == SHCLTRANSFERDIR_FROM_REMOTE)
    160160    {
    161161        /* The IDataObject *must* be created on the same thread as our (proxy) window, so post a message to it
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibClipboard.cpp

    r81960 r82462  
    18151815                /* If this is a read transfer (reading data from host), set the interface to use
    18161816                 * our VbglR3 routines here. */
    1817                 if (enmDir == SHCLTRANSFERDIR_READ)
     1817                if (enmDir == SHCLTRANSFERDIR_FROM_REMOTE)
    18181818                {
    18191819                    SHCLPROVIDERCREATIONCTX creationCtx;
     
    18521852        LogRel2(("Shared Clipboard: Transfer ID=%RU16 (%s %s) successfully started\n",
    18531853                 uTransferID,
    1854                  enmDir    == SHCLTRANSFERDIR_READ ? "reading from" : "writing to",
    1855                  enmSource == SHCLSOURCE_LOCAL     ? "local"        : "remote"));
     1854                 enmDir    == SHCLTRANSFERDIR_FROM_REMOTE ? "reading from" : "writing to",
     1855                 enmSource == SHCLSOURCE_LOCAL            ? "local"        : "remote"));
    18561856    }
    18571857    else
     
    19521952
    19531953                        /* The host announces the transfer direction from its point of view, so inverse the direction here. */
    1954                         if (enmDir == SHCLTRANSFERDIR_WRITE)
     1954                        if (enmDir == SHCLTRANSFERDIR_TO_REMOTE)
    19551955                        {
    1956                             enmDir = SHCLTRANSFERDIR_READ;
     1956                            enmDir = SHCLTRANSFERDIR_FROM_REMOTE;
    19571957                            enmSource = SHCLSOURCE_REMOTE;
    19581958                        }
    1959                         else if (enmDir == SHCLTRANSFERDIR_READ)
     1959                        else if (enmDir == SHCLTRANSFERDIR_FROM_REMOTE)
    19601960                        {
    1961                             enmDir = SHCLTRANSFERDIR_WRITE;
     1961                            enmDir = SHCLTRANSFERDIR_TO_REMOTE;
    19621962                            enmSource = SHCLSOURCE_LOCAL;
    19631963                        }
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp

    r82460 r82462  
    818818         * Make sure the transfer direction matches the open/create parameters.
    819819         */
    820         if (pTransfer->State.enmDir == SHCLTRANSFERDIR_READ)
     820        if (pTransfer->State.enmDir == SHCLTRANSFERDIR_FROM_REMOTE)
    821821        {
    822822            if (pOpenCreateParms->fCreate & SHCL_OBJ_CF_ACCESS_READ) /* Read access wanted? */
     
    827827            }
    828828        }
    829         else if (pTransfer->State.enmDir == SHCLTRANSFERDIR_WRITE)
     829        else if (pTransfer->State.enmDir == SHCLTRANSFERDIR_TO_REMOTE)
    830830        {
    831831            if (pOpenCreateParms->fCreate & SHCL_OBJ_CF_ACCESS_WRITE) /* Write access wanted? */
     
    854854                    /* Only if this is a read transfer (locally) we're able to actually write to files
    855855                     * (we're reading from the source). */
    856                     const bool fWritable = pTransfer->State.enmDir == SHCLTRANSFERDIR_READ;
     856                    const bool fWritable = pTransfer->State.enmDir == SHCLTRANSFERDIR_FROM_REMOTE;
    857857
    858858                    uint64_t fOpen;
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-transfers.cpp

    r81829 r82462  
    13961396
    13971397            if (   ShClTransferGetSource(pTransfer) == SHCLSOURCE_LOCAL
    1398                 && ShClTransferGetDir(pTransfer)    == SHCLTRANSFERDIR_WRITE)
     1398                && ShClTransferGetDir(pTransfer)    == SHCLTRANSFERDIR_TO_REMOTE)
    13991399            {
    14001400                /* Get roots if this is a local write transfer (host -> guest). */
     
    20472047    if (!ShClTransferCtxTransfersMaximumReached(&pClient->TransferCtx))
    20482048    {
    2049         LogRel2(("Shared Clipboard: Starting %s transfer ...\n", enmDir == SHCLTRANSFERDIR_READ ? "read" : "write"));
     2049        LogRel2(("Shared Clipboard: Starting %s transfer ...\n", enmDir == SHCLTRANSFERDIR_FROM_REMOTE ? "read" : "write"));
    20502050
    20512051        PSHCLTRANSFER pTransfer;
     
    20592059                RT_ZERO(creationCtx);
    20602060
    2061                 if (enmDir == SHCLTRANSFERDIR_READ)
     2061                if (enmDir == SHCLTRANSFERDIR_FROM_REMOTE)
    20622062                {
    20632063                    rc = shClSvcTransferAreaRegister(&pClient->State, pTransfer);
     
    20792079                    }
    20802080                }
    2081                 else if (enmDir == SHCLTRANSFERDIR_WRITE)
     2081                else if (enmDir == SHCLTRANSFERDIR_TO_REMOTE)
    20822082                {
    20832083                    creationCtx.Interface.pfnListHdrWrite   = shClSvcTransferIfaceListHdrWrite;
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp

    r81843 r82462  
    364364                PSHCLTRANSFER pTransfer;
    365365                int rc = shClSvcTransferStart(pCtx->pClient,
    366                                               SHCLTRANSFERDIR_READ, SHCLSOURCE_REMOTE,
     366                                              SHCLTRANSFERDIR_FROM_REMOTE, SHCLSOURCE_REMOTE,
    367367                                              &pTransfer);
    368368                if (RT_SUCCESS(rc))
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp

    r81960 r82462  
    12441244            if (fFormats & VBOX_SHCL_FMT_URI_LIST)
    12451245            {
    1246                 rc = shClSvcTransferStart(pClient, SHCLTRANSFERDIR_WRITE, SHCLSOURCE_LOCAL,
     1246                rc = shClSvcTransferStart(pClient, SHCLTRANSFERDIR_TO_REMOTE, SHCLSOURCE_LOCAL,
    12471247                                          NULL /* pTransfer */);
    12481248                if (RT_FAILURE(rc))
  • trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardTransfers.cpp

    r82460 r82462  
    235235    RTTESTI_CHECK_RC_OK(rc);
    236236
    237     rc = ShClTransferInit(pTransfer, 0 /* ID */, SHCLTRANSFERDIR_READ, SHCLSOURCE_LOCAL);
     237    rc = ShClTransferInit(pTransfer, 0 /* ID */, SHCLTRANSFERDIR_FROM_REMOTE, SHCLSOURCE_LOCAL);
    238238    RTTESTI_CHECK_RC_OK(rc);
    239239
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