VirtualBox

Ignore:
Timestamp:
Sep 17, 2019 1:03:39 PM (5 years ago)
Author:
vboxsync
Message:

Shared Clipboard/URI: More renaming (URI -> transfer).

Location:
trunk/src/VBox/HostServices/SharedClipboard
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp

    r80849 r80858  
    215215
    216216#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    217     if (pFormats->uFormats & VBOX_SHCL_FMT_URI_LIST) /* No URI support yet. */
     217    if (pFormats->uFormats & VBOX_SHCL_FMT_URI_LIST) /* No transfer support yet. */
    218218        return VINF_SUCCESS;
    219219#endif
     
    277277
    278278#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    279 int SharedClipboardSvcImplURIReadDir(PSHCLCLIENT pClient, PSHCLDIRDATA pDirData)
     279int SharedClipboardSvcImplTransferReadDir(PSHCLCLIENT pClient, PSHCLDIRDATA pDirData)
    280280{
    281281    RT_NOREF(pClient, pDirData);
     
    283283}
    284284
    285 int SharedClipboardSvcImplURIWriteDir(PSHCLCLIENT pClient, PSHCLDIRDATA pDirData)
     285int SharedClipboardSvcImplTransferWriteDir(PSHCLCLIENT pClient, PSHCLDIRDATA pDirData)
    286286{
    287287    RT_NOREF(pClient, pDirData);
     
    289289}
    290290
    291 int SharedClipboardSvcImplURIReadFileHdr(PSHCLCLIENT pClient, PSHCLFILEHDR pFileHdr)
     291int SharedClipboardSvcImplTransferReadFileHdr(PSHCLCLIENT pClient, PSHCLFILEHDR pFileHdr)
    292292{
    293293    RT_NOREF(pClient, pFileHdr);
     
    295295}
    296296
    297 int SharedClipboardSvcImplURIWriteFileHdr(PSHCLCLIENT pClient, PSHCLFILEHDR pFileHdr)
     297int SharedClipboardSvcImplTransferWriteFileHdr(PSHCLCLIENT pClient, PSHCLFILEHDR pFileHdr)
    298298{
    299299    RT_NOREF(pClient, pFileHdr);
     
    301301}
    302302
    303 int SharedClipboardSvcImplURIReadFileData(PSHCLCLIENT pClient, PSHCLFILEDATA pFileData)
     303int SharedClipboardSvcImplTransferReadFileData(PSHCLCLIENT pClient, PSHCLFILEDATA pFileData)
    304304{
    305305    RT_NOREF(pClient, pFileData);
     
    307307}
    308308
    309 int SharedClipboardSvcImplURIWriteFileData(PSHCLCLIENT pClient, PSHCLFILEDATA pFileData)
     309int SharedClipboardSvcImplTransferWriteFileData(PSHCLCLIENT pClient, PSHCLFILEDATA pFileData)
    310310{
    311311    RT_NOREF(pClient, pFileData);
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h

    r80849 r80858  
    6767} SHCLCLIENTMSG, *PSHCLCLIENTMSG;
    6868
    69 typedef struct SHCLCLIENTURISTATE
     69typedef struct SHCLCLIENTTRANSFERSTATE
    7070{
    7171    /** Directory of the transfer to start. */
    72     SHCLURITRANSFERDIR enmTransferDir;
    73 } SHCLCLIENTURISTATE, *PSHCLCLIENTURISTATE;
     72    SHCLTRANSFERDIR enmTransferDir;
     73} SHCLCLIENTTRANSFERSTATE, *PSHCLCLIENTTRANSFERSTATE;
    7474
    7575/**
     
    9393    uint32_t                cbChunkSize;
    9494    SHCLSOURCE              enmSource;
    95     /** The client's URI state. */
    96     SHCLCLIENTURISTATE      URI;
     95    /** The client's transfers state. */
     96    SHCLCLIENTTRANSFERSTATE Transfers;
    9797} SHCLCLIENTSTATE, *PSHCLCLIENTSTATE;
    9898
     
    112112    SHCLEVENTSOURCE          Events;
    113113#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    114     /** URI context data. */
    115     SHCLURICTX               URI;
     114    /** Transfer contextdata. */
     115    SHCLTRANSFERCTX          TransferCtx;
    116116#endif
    117117    /** Structure for keeping the client's pending (deferred return) state.
     
    197197
    198198# ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    199 int sharedClipboardSvcURITransferStart(PSHCLCLIENT pClient,
    200                                      SHCLURITRANSFERDIR enmDir, SHCLSOURCE enmSource,
    201                                      PSHCLURITRANSFER *ppTransfer);
    202 bool sharedClipboardSvcURIMsgIsAllowed(uint32_t uMode, uint32_t uMsg);
     199int sharedClipboardSvcTransferTransferStart(PSHCLCLIENT pClient,
     200                                     SHCLTRANSFERDIR enmDir, SHCLSOURCE enmSource,
     201                                     PSHCLTRANSFER *ppTransfer);
     202bool sharedClipboardSvcTransferMsgIsAllowed(uint32_t uMode, uint32_t uMsg);
    203203# endif /* VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */
    204204
     
    222222
    223223#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    224 int sharedClipboardSvcURITransferOpen(PSHCLPROVIDERCTX pCtx);
    225 DECLCALLBACK(int) sharedClipboardSvcURITransferClose(PSHCLPROVIDERCTX pCtx);
    226 
    227 int sharedClipboardSvcURIGetRoots(PSHCLPROVIDERCTX pCtx, PSHCLROOTLIST *ppRootList);
    228 
    229 int sharedClipboardSvcURIListOpen(PSHCLPROVIDERCTX pCtx, PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList);
    230 int sharedClipboardSvcURIListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList);
    231 int sharedClipboardSvcURIListHdrRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr);
    232 int sharedClipboardSvcURIListHdrWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr);
    233 int sharedClipboardSvcURIListEntryRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry);
    234 int sharedClipboardSvcURIListEntryWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry);
    235 
    236 int sharedClipboardSvcURIObjOpen(PSHCLPROVIDERCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms,
     224int sharedClipboardSvcTransferTransferOpen(PSHCLPROVIDERCTX pCtx);
     225DECLCALLBACK(int) sharedClipboardSvcTransferTransferClose(PSHCLPROVIDERCTX pCtx);
     226
     227int sharedClipboardSvcTransferGetRoots(PSHCLPROVIDERCTX pCtx, PSHCLROOTLIST *ppRootList);
     228
     229int sharedClipboardSvcTransferListOpen(PSHCLPROVIDERCTX pCtx, PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList);
     230int sharedClipboardSvcTransferListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList);
     231int sharedClipboardSvcTransferListHdrRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr);
     232int sharedClipboardSvcTransferListHdrWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr);
     233int sharedClipboardSvcTransferListEntryRead(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry);
     234int sharedClipboardSvcTransferListEntryWrite(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry);
     235
     236int sharedClipboardSvcTransferObjOpen(PSHCLPROVIDERCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms,
    237237                                 PSHCLOBJHANDLE phObj);
    238 int sharedClipboardSvcURIObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj);
    239 int sharedClipboardSvcURIObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
     238int sharedClipboardSvcTransferObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj);
     239int sharedClipboardSvcTransferObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
    240240                                 void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead);
    241 int sharedClipboardSvcURIObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
     241int sharedClipboardSvcTransferObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
    242242                                  void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten);
    243243
    244 DECLCALLBACK(void) VBoxSvcClipboardURITransferPrepareCallback(PSHCLURITRANSFERCALLBACKDATA pData);
    245 DECLCALLBACK(void) VBoxSvcClipboardURIDataHeaderCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData);
    246 DECLCALLBACK(void) VBoxSvcClipboardURIDataCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData);
    247 DECLCALLBACK(void) VBoxSvcClipboardURITransferCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc);
    248 DECLCALLBACK(void) VBoxSvcClipboardURITransferCanceledCallback(PSHCLURITRANSFERCALLBACKDATA pData);
    249 DECLCALLBACK(void) VBoxSvcClipboardURITransferErrorCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc);
    250 
    251 int SharedClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer);
    252 int SharedClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer);
     244DECLCALLBACK(void) VBoxSvcClipboardTransferPrepareCallback(PSHCLTRANSFERCALLBACKDATA pData);
     245DECLCALLBACK(void) VBoxSvcClipboardDataHeaderCompleteCallback(PSHCLTRANSFERCALLBACKDATA pData);
     246DECLCALLBACK(void) VBoxSvcClipboardDataCompleteCallback(PSHCLTRANSFERCALLBACKDATA pData);
     247DECLCALLBACK(void) VBoxSvcClipboardTransferCompleteCallback(PSHCLTRANSFERCALLBACKDATA pData, int rc);
     248DECLCALLBACK(void) VBoxSvcClipboardTransferCanceledCallback(PSHCLTRANSFERCALLBACKDATA pData);
     249DECLCALLBACK(void) VBoxSvcClipboardTransferErrorCallback(PSHCLTRANSFERCALLBACKDATA pData, int rc);
     250
     251int SharedClipboardSvcImplTransferCreate(PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer);
     252int SharedClipboardSvcImplTransferDestroy(PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer);
    253253#endif /*VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS */
    254254
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-uri.cpp

    r80848 r80858  
    11/* $Id$ */
    22/** @file
    3  * Shared Clipboard Service - Internal code for URI (list) handling.
     3 * Shared Clipboard Service - Internal code for transfer (list) handling.
    44 */
    55
     
    4848*   Prototypes                                                                                                                   *
    4949*********************************************************************************************************************************/
    50 static int sharedClipboardSvcURISetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    51                                             PSHCLMSGCTX pMsgCtx, PSHCLLISTOPENPARMS pOpenParms);
    52 static int sharedClipboardSvcURISetListClose(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    53                                              PSHCLMSGCTX pMsgCtx, SHCLLISTHANDLE hList);
     50static int sharedClipboardSvcTransferSetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
     51                                                 PSHCLMSGCTX pMsgCtx, PSHCLLISTOPENPARMS pOpenParms);
     52static int sharedClipboardSvcTransferSetListClose(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
     53                                                  PSHCLMSGCTX pMsgCtx, SHCLLISTHANDLE hList);
    5454
    5555
     
    5858*********************************************************************************************************************************/
    5959
    60 DECLCALLBACK(int) sharedClipboardSvcURITransferOpen(PSHCLPROVIDERCTX pCtx)
     60DECLCALLBACK(int) sharedClipboardSvcTransferTransferOpen(PSHCLPROVIDERCTX pCtx)
    6161{
    6262    RT_NOREF(pCtx);
     
    6666}
    6767
    68 DECLCALLBACK(int) sharedClipboardSvcURITransferClose(PSHCLPROVIDERCTX pCtx)
     68DECLCALLBACK(int) sharedClipboardSvcTransferTransferClose(PSHCLPROVIDERCTX pCtx)
    6969{
    7070    RT_NOREF(pCtx);
     
    7474}
    7575
    76 DECLCALLBACK(int) sharedClipboardSvcURIGetRoots(PSHCLPROVIDERCTX pCtx, PSHCLROOTLIST *ppRootList)
     76DECLCALLBACK(int) sharedClipboardSvcTransferGetRoots(PSHCLPROVIDERCTX pCtx, PSHCLROOTLIST *ppRootList)
    7777{
    7878    LogFlowFuncEnter();
     
    8383    int rc;
    8484
    85     PSHCLCLIENTMSG pMsgHdr = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_URI_ROOT_LIST_HDR_READ,
     85    PSHCLCLIENTMSG pMsgHdr = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_TRANSFER_ROOT_LIST_HDR_READ,
    8686                                                        VBOX_SHCL_CPARMS_ROOT_LIST_HDR_READ);
    8787    if (pMsgHdr)
     
    112112                    LogFlowFunc(("cRoots=%RU32, fRoots=0x%x\n", pSrcRootListHdr->cRoots, pSrcRootListHdr->fRoots));
    113113
    114                     PSHCLROOTLIST pRootList = SharedClipboardURIRootListAlloc();
     114                    PSHCLROOTLIST pRootList = SharedClipboardTransferRootListAlloc();
    115115                    if (pRootList)
    116116                    {
     
    124124                                for (uint32_t i = 0; i < pSrcRootListHdr->cRoots; i++)
    125125                                {
    126                                     PSHCLCLIENTMSG pMsgEntry = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_URI_ROOT_LIST_ENTRY_READ,
     126                                    PSHCLCLIENTMSG pMsgEntry = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_TRANSFER_ROOT_LIST_ENTRY_READ,
    127127                                                                                          VBOX_SHCL_CPARMS_ROOT_LIST_ENTRY_READ_REQ);
    128128
     
    151151                                    Assert(pPayloadEntry->cbData == sizeof(SHCLROOTLISTENTRY));
    152152
    153                                     rc = SharedClipboardURIListEntryCopy(&pRootList->paEntries[i], pSrcRootListEntry);
     153                                    rc = SharedClipboardTransferListEntryCopy(&pRootList->paEntries[i], pSrcRootListEntry);
    154154
    155155                                    SharedClipboardPayloadFree(pPayloadEntry);
     
    173173                        }
    174174                        else
    175                             SharedClipboardURIRootListFree(pRootList);
     175                            SharedClipboardTransferRootListFree(pRootList);
    176176
    177177                        SharedClipboardPayloadFree(pPayloadHdr);
     
    192192}
    193193
    194 DECLCALLBACK(int) sharedClipboardSvcURIListOpen(PSHCLPROVIDERCTX pCtx,
    195                                                 PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList)
     194DECLCALLBACK(int) sharedClipboardSvcTransferListOpen(PSHCLPROVIDERCTX pCtx,
     195                                                     PSHCLLISTOPENPARMS pOpenParms, PSHCLLISTHANDLE phList)
    196196{
    197197    LogFlowFuncEnter();
     
    202202    int rc;
    203203
    204     PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_URI_LIST_OPEN,
     204    PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_TRANSFER_LIST_OPEN,
    205205                                                     VBOX_SHCL_CPARMS_LIST_OPEN);
    206206    if (pMsg)
     
    211211                                                                      uEvent);
    212212
    213         rc = sharedClipboardSvcURISetListOpen(pMsg->cParms, pMsg->paParms, &pMsg->Ctx, pOpenParms);
     213        rc = sharedClipboardSvcTransferSetListOpen(pMsg->cParms, pMsg->paParms, &pMsg->Ctx, pOpenParms);
    214214        if (RT_SUCCESS(rc))
    215215        {
     
    251251}
    252252
    253 DECLCALLBACK(int) sharedClipboardSvcURIListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList)
     253DECLCALLBACK(int) sharedClipboardSvcTransferListClose(PSHCLPROVIDERCTX pCtx, SHCLLISTHANDLE hList)
    254254{
    255255    LogFlowFuncEnter();
     
    260260    int rc;
    261261
    262     PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_URI_LIST_CLOSE,
     262    PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_TRANSFER_LIST_CLOSE,
    263263                                                     VBOX_SHCL_CPARMS_LIST_CLOSE);
    264264    if (pMsg)
     
    269269                                                                    uEvent);
    270270
    271         rc = sharedClipboardSvcURISetListClose(pMsg->cParms, pMsg->paParms, &pMsg->Ctx, hList);
     271        rc = sharedClipboardSvcTransferSetListClose(pMsg->cParms, pMsg->paParms, &pMsg->Ctx, hList);
    272272        if (RT_SUCCESS(rc))
    273273        {
     
    298298}
    299299
    300 DECLCALLBACK(int) sharedClipboardSvcURIListHdrRead(PSHCLPROVIDERCTX pCtx,
    301                                                    SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr)
     300DECLCALLBACK(int) sharedClipboardSvcTransferListHdrRead(PSHCLPROVIDERCTX pCtx,
     301                                                        SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr)
    302302{
    303303    LogFlowFuncEnter();
     
    308308    int rc;
    309309
    310     PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_URI_LIST_HDR_READ,
     310    PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_TRANSFER_LIST_HDR_READ,
    311311                                                     VBOX_SHCL_CPARMS_LIST_HDR_READ_REQ);
    312312    if (pMsg)
     
    349349}
    350350
    351 DECLCALLBACK(int) sharedClipboardSvcURIListHdrWrite(PSHCLPROVIDERCTX pCtx,
    352                                                     SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr)
     351DECLCALLBACK(int) sharedClipboardSvcTransferListHdrWrite(PSHCLPROVIDERCTX pCtx,
     352                                                         SHCLLISTHANDLE hList, PSHCLLISTHDR pListHdr)
    353353{
    354354    RT_NOREF(pCtx, hList, pListHdr);
     
    359359}
    360360
    361 DECLCALLBACK(int) sharedClipboardSvcURIListEntryRead(PSHCLPROVIDERCTX pCtx,
    362                                                      SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry)
     361DECLCALLBACK(int) sharedClipboardSvcTransferListEntryRead(PSHCLPROVIDERCTX pCtx,
     362                                                          SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry)
    363363{
    364364    LogFlowFuncEnter();
     
    369369    int rc;
    370370
    371     PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_URI_LIST_ENTRY_READ,
     371    PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_TRANSFER_LIST_ENTRY_READ,
    372372                                                     VBOX_SHCL_CPARMS_LIST_ENTRY_READ);
    373373    if (pMsg)
     
    395395                    Assert(pPayload->cbData == sizeof(SHCLLISTENTRY));
    396396
    397                     rc = SharedClipboardURIListEntryCopy(pListEntry, (PSHCLLISTENTRY)pPayload->pvData);
     397                    rc = SharedClipboardTransferListEntryCopy(pListEntry, (PSHCLLISTENTRY)pPayload->pvData);
    398398
    399399                    SharedClipboardPayloadFree(pPayload);
     
    409409}
    410410
    411 DECLCALLBACK(int) sharedClipboardSvcURIListEntryWrite(PSHCLPROVIDERCTX pCtx,
    412                                                       SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry)
     411DECLCALLBACK(int) sharedClipboardSvcTransferListEntryWrite(PSHCLPROVIDERCTX pCtx,
     412                                                           SHCLLISTHANDLE hList, PSHCLLISTENTRY pListEntry)
    413413{
    414414    RT_NOREF(pCtx, hList, pListEntry);
     
    419419}
    420420
    421 int sharedClipboardSvcURIObjOpen(PSHCLPROVIDERCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms,
    422                                  PSHCLOBJHANDLE phObj)
     421int sharedClipboardSvcTransferObjOpen(PSHCLPROVIDERCTX pCtx, PSHCLOBJOPENCREATEPARMS pCreateParms,
     422                                      PSHCLOBJHANDLE phObj)
    423423{
    424424    LogFlowFuncEnter();
     
    429429    int rc;
    430430
    431     PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_URI_OBJ_OPEN,
     431    PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_TRANSFER_OBJ_OPEN,
    432432                                                     VBOX_SHCL_CPARMS_OBJ_OPEN);
    433433    if (pMsg)
     
    480480}
    481481
    482 int sharedClipboardSvcURIObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj)
     482int sharedClipboardSvcTransferObjClose(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj)
    483483{
    484484    LogFlowFuncEnter();
     
    489489    int rc;
    490490
    491     PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_URI_OBJ_CLOSE,
     491    PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_TRANSFER_OBJ_CLOSE,
    492492                                                     VBOX_SHCL_CPARMS_OBJ_CLOSE);
    493493    if (pMsg)
     
    533533}
    534534
    535 int sharedClipboardSvcURIObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
    536                                  void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead)
     535int sharedClipboardSvcTransferObjRead(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
     536                                      void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbRead)
    537537{
    538538    LogFlowFuncEnter();
     
    543543    int rc;
    544544
    545     PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_URI_OBJ_READ,
     545    PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_TRANSFER_OBJ_READ,
    546546                                                     VBOX_SHCL_CPARMS_OBJ_READ_REQ);
    547547    if (pMsg)
     
    592592}
    593593
    594 int sharedClipboardSvcURIObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
    595                                   void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten)
     594int sharedClipboardSvcTransferObjWrite(PSHCLPROVIDERCTX pCtx, SHCLOBJHANDLE hObj,
     595                                       void *pvData, uint32_t cbData, uint32_t fFlags, uint32_t *pcbWritten)
    596596{
    597597    LogFlowFuncEnter();
     
    602602    int rc;
    603603
    604     PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_URI_OBJ_WRITE,
     604    PSHCLCLIENTMSG pMsg = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_TRANSFER_OBJ_WRITE,
    605605                                                     VBOX_SHCL_CPARMS_OBJ_WRITE);
    606606    if (pMsg)
     
    648648
    649649/*********************************************************************************************************************************
    650 *   URI callbacks                                                                                                                *
     650*   transfer callbacks                                                                                                                *
    651651*********************************************************************************************************************************/
    652652
    653 DECLCALLBACK(void) VBoxSvcClipboardURITransferPrepareCallback(PSHCLURITRANSFERCALLBACKDATA pData)
     653DECLCALLBACK(void) VBoxSvcClipboardTransferPrepareCallback(PSHCLTRANSFERCALLBACKDATA pData)
    654654{
    655655    RT_NOREF(pData);
     
    658658}
    659659
    660 DECLCALLBACK(void) VBoxSvcClipboardURITransferCompleteCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc)
     660DECLCALLBACK(void) VBoxSvcClipboardTransferCompleteCallback(PSHCLTRANSFERCALLBACKDATA pData, int rc)
    661661{
    662662    RT_NOREF(pData, rc);
     
    667667}
    668668
    669 DECLCALLBACK(void) VBoxSvcClipboardURITransferCanceledCallback(PSHCLURITRANSFERCALLBACKDATA pData)
     669DECLCALLBACK(void) VBoxSvcClipboardTransferCanceledCallback(PSHCLTRANSFERCALLBACKDATA pData)
    670670{
    671671    LogFlowFuncEnter();
     
    676676}
    677677
    678 DECLCALLBACK(void) VBoxSvcClipboardURITransferErrorCallback(PSHCLURITRANSFERCALLBACKDATA pData, int rc)
     678DECLCALLBACK(void) VBoxSvcClipboardTransferErrorCallback(PSHCLTRANSFERCALLBACKDATA pData, int rc)
    679679{
    680680    LogFlowFuncEnter();
     
    691691
    692692/**
    693  * Gets an URI message reply from HGCM service parameters.
     693 * Gets a transfer message reply from HGCM service parameters.
    694694 *
    695695 * @returns VBox status code.
     
    698698 * @param   pReply              Where to store the reply.
    699699 */
    700 static int sharedClipboardSvcURIGetReply(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    701                                          PSHCLREPLY pReply)
     700static int sharedClipboardSvcTransferGetReply(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
     701                                              PSHCLREPLY pReply)
    702702{
    703703    int rc;
     
    767767
    768768/**
    769  * Gets an URI root list header from HGCM service parameters.
     769 * Gets a transfer root list header from HGCM service parameters.
    770770 *
    771771 * @returns VBox status code.
    772772 * @param   cParms              Number of HGCM parameters supplied in \a paParms.
    773773 * @param   paParms             Array of HGCM parameters.
    774  * @param   pRootLstHdr         Where to store the URI root list header on success.
     774 * @param   pRootLstHdr         Where to store the transfer root list header on success.
    775775 */
    776 static int sharedClipboardSvcURIGetRootListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    777                                                PSHCLROOTLISTHDR pRootLstHdr)
     776static int sharedClipboardSvcTransferGetRootListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
     777                                                    PSHCLROOTLISTHDR pRootLstHdr)
    778778{
    779779    int rc;
     
    793793
    794794/**
    795  * Gets an URI root list entry from HGCM service parameters.
     795 * Gets a transfer root list entry from HGCM service parameters.
    796796 *
    797797 * @returns VBox status code.
     
    800800 * @param   pListEntry          Where to store the root list entry.
    801801 */
    802 static int sharedClipboardSvcURIGetRootListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    803                                                  PSHCLROOTLISTENTRY pListEntry)
     802static int sharedClipboardSvcTransferGetRootListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
     803                                                      PSHCLROOTLISTENTRY pListEntry)
    804804{
    805805    int rc;
     
    830830
    831831/**
    832  * Gets an URI list open request from HGCM service parameters.
     832 * Gets a transfer list open request from HGCM service parameters.
    833833 *
    834834 * @returns VBox status code.
     
    837837 * @param   pOpenParms          Where to store the open parameters of the request.
    838838 */
    839 static int sharedClipboardSvcURIGetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    840                                             PSHCLLISTOPENPARMS pOpenParms)
     839static int sharedClipboardSvcTransferGetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
     840                                                 PSHCLLISTOPENPARMS pOpenParms)
    841841{
    842842    int rc;
     
    876876
    877877/**
    878  * Sets an URI list open request to HGCM service parameters.
     878 * Sets a transfer list open request to HGCM service parameters.
    879879 *
    880880 * @returns VBox status code.
     
    884884 * @param   pOpenParms          List open parameters to set.
    885885 */
    886 static int sharedClipboardSvcURISetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    887                                             PSHCLMSGCTX pMsgCtx, PSHCLLISTOPENPARMS pOpenParms)
     886static int sharedClipboardSvcTransferSetListOpen(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
     887                                                 PSHCLMSGCTX pMsgCtx, PSHCLLISTOPENPARMS pOpenParms)
    888888{
    889889    int rc;
     
    909909
    910910/**
    911  * Sets an URI list close request to HGCM service parameters.
     911 * Sets a transfer list close request to HGCM service parameters.
    912912 *
    913913 * @returns VBox status code.
     
    917917 * @param   hList               Handle of list to close.
    918918 */
    919 static int sharedClipboardSvcURISetListClose(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    920                                              PSHCLMSGCTX pMsgCtx, SHCLLISTHANDLE hList)
     919static int sharedClipboardSvcTransferSetListClose(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
     920                                                  PSHCLMSGCTX pMsgCtx, SHCLLISTHANDLE hList)
    921921{
    922922    int rc;
     
    937937
    938938/**
    939  * Gets an URI list header from HGCM service parameters.
     939 * Gets a transfer list header from HGCM service parameters.
    940940 *
    941941 * @returns VBox status code.
     
    945945 * @param   pListHdr            Where to store the list header.
    946946 */
    947 static int sharedClipboardSvcURIGetListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    948                                            PSHCLLISTHANDLE phList, PSHCLLISTHDR pListHdr)
     947static int sharedClipboardSvcTransferGetListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
     948                                                PSHCLLISTHANDLE phList, PSHCLLISTHDR pListHdr)
    949949{
    950950    int rc;
     
    976976#if 0
    977977/**
    978  * Sets an URI list header to HGCM service parameters.
     978 * Sets a transfer list header to HGCM service parameters.
    979979 *
    980980 * @returns VBox status code.
     
    984984 * @param   pListHdr            Pointer to data to set to the HGCM parameters.
    985985 */
    986 static int sharedClipboardSvcURISetListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    987                                            PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTHDR pListHdr)
     986static int sharedClipboardSvcTransferSetListHdr(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
     987                                                PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTHDR pListHdr)
    988988{
    989989    int rc;
     
    10111011
    10121012/**
    1013  * Gets an URI list entry from HGCM service parameters.
     1013 * Gets a transfer list entry from HGCM service parameters.
    10141014 *
    10151015 * @returns VBox status code.
     
    10191019 * @param   pListEntry          Where to store the list entry.
    10201020 */
    1021 static int sharedClipboardSvcURIGetListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    1022                                              PSHCLLISTHANDLE phList, PSHCLLISTENTRY pListEntry)
     1021static int sharedClipboardSvcTransferGetListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
     1022                                                  PSHCLLISTHANDLE phList, PSHCLLISTENTRY pListEntry)
    10231023{
    10241024    int rc;
     
    10441044        if (RT_SUCCESS(rc))
    10451045        {
    1046             if (!SharedClipboardURIListEntryIsValid(pListEntry))
     1046            if (!SharedClipboardTransferListEntryIsValid(pListEntry))
    10471047                rc = VERR_INVALID_PARAMETER;
    10481048        }
     
    10571057#if 0
    10581058/**
    1059  * Sets an URI data chunk to HGCM service parameters.
     1059 * Sets a transfer data chunk to HGCM service parameters.
    10601060 *
    10611061 * @returns VBox status code.
     
    10651065 * @param   pListEntry          Pointer to data to set to the HGCM parameters.
    10661066 */
    1067 static int sharedClipboardSvcURISetListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
    1068                                            PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTENTRY pListEntry)
     1067static int sharedClipboardSvcTransferSetListEntry(uint32_t cParms, VBOXHGCMSVCPARM paParms[],
     1068                                                  PVBOXSHCLMSGCTX pMsgCtx, PSHCLLISTENTRY pListEntry)
    10691069{
    10701070    int rc;
     
    10901090
    10911091/**
    1092  * Gets an URI object data chunk from HGCM service parameters.
     1092 * Gets a transfer object data chunk from HGCM service parameters.
    10931093 *
    10941094 * @returns VBox status code.
     
    10971097 * @param   pDataChunk          Where to store the object data chunk data.
    10981098 */
    1099 static int sharedClipboardSvcURIGetObjDataChunk(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PSHCLOBJDATACHUNK pDataChunk)
     1099static int sharedClipboardSvcTransferGetObjDataChunk(uint32_t cParms, VBOXHGCMSVCPARM paParms[], PSHCLOBJDATACHUNK pDataChunk)
    11001100{
    11011101    AssertPtrReturn(paParms,    VERR_INVALID_PARAMETER);
     
    11281128
    11291129/**
    1130  * Gets an URI error from HGCM service parameters.
     1130 * Gets a transfer error from HGCM service parameters.
    11311131 *
    11321132 * @returns VBox status code.
     
    11351135 * @param   pRc                 Where to store the received error code.
    11361136 */
    1137 static int sharedClipboardSvcURIGetError(uint32_t cParms, VBOXHGCMSVCPARM paParms[], int *pRc)
     1137static int sharedClipboardSvcTransferGetError(uint32_t cParms, VBOXHGCMSVCPARM paParms[], int *pRc)
    11381138{
    11391139    AssertPtrReturn(paParms, VERR_INVALID_PARAMETER);
     
    11621162 * @param   paParms             Array function parameters supplied.
    11631163 */
    1164 static int sharedClipboardSvcURITransferHandleReply(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer,
    1165                                                     uint32_t cParms, VBOXHGCMSVCPARM paParms[])
     1164static int sharedClipboardSvcTransferTransferHandleReply(PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer,
     1165                                                         uint32_t cParms, VBOXHGCMSVCPARM paParms[])
    11661166{
    11671167    RT_NOREF(pClient);
     
    11731173    if (pReply)
    11741174    {
    1175         rc = sharedClipboardSvcURIGetReply(cParms, paParms, pReply);
     1175        rc = sharedClipboardSvcTransferGetReply(cParms, paParms, pReply);
    11761176        if (RT_SUCCESS(rc))
    11771177        {
     
    12371237
    12381238/**
    1239  * URI client (guest) handler for the Shared Clipboard host service.
     1239 * transfer client (guest) handler for the Shared Clipboard host service.
    12401240 *
    12411241 * @returns VBox status code.
     
    12471247 * @param   tsArrival           Timestamp of arrival.
    12481248 */
    1249 int sharedClipboardSvcURIHandler(PSHCLCLIENT pClient,
     1249int sharedClipboardSvcTransferHandler(PSHCLCLIENT pClient,
    12501250                                VBOXHGCMCALLHANDLE callHandle,
    12511251                                uint32_t u32Function,
     
    12611261#if 0
    12621262    /* Check if we've the right mode set. */
    1263     if (!sharedClipboardSvcURIMsgIsAllowed(sharedClipboardSvcGetMode(), u32Function))
     1263    if (!sharedClipboardSvcTransferMsgIsAllowed(sharedClipboardSvcGetMode(), u32Function))
    12641264    {
    12651265        LogFunc(("Wrong clipboard mode, denying access\n"));
     
    12751275        AssertPtr(g_ExtState.pfnExtension);
    12761276#endif
    1277         LogFunc(("Invalid / no service extension set, skipping URI handling\n"));
     1277        LogFunc(("Invalid / no service extension set, skipping transfer handling\n"));
    12781278        return VERR_NOT_SUPPORTED;
    12791279    }
     
    12851285     */
    12861286    uint32_t         uCID      = 0; /* Context ID */
    1287     PSHCLURITRANSFER pTransfer = NULL;
     1287    PSHCLTRANSFER pTransfer = NULL;
    12881288
    12891289    switch (u32Function)
     
    12931293        default:
    12941294        {
    1295             if (!SharedClipboardURICtxGetTotalTransfers(&pClient->URI))
     1295            if (!SharedClipboardTransferCtxGetTotalTransfers(&pClient->TransferCtx))
    12961296            {
    12971297                LogFunc(("No transfers found\n"));
     
    13071307                break;
    13081308
    1309             const SHCLURITRANSFERID uTransferID = VBOX_SHCL_CONTEXTID_GET_TRANSFER(uCID);
    1310 
    1311             pTransfer = SharedClipboardURICtxGetTransfer(&pClient->URI, uTransferID);
     1309            const SHCLTRANSFERID uTransferID = VBOX_SHCL_CONTEXTID_GET_TRANSFER(uCID);
     1310
     1311            pTransfer = SharedClipboardTransferCtxGetTransfer(&pClient->TransferCtx, uTransferID);
    13121312            if (!pTransfer)
    13131313            {
     
    13341334                break;
    13351335
    1336             SHCLURITRANSFERSTATUS uStatus = SHCLURITRANSFERSTATUS_NONE;
     1336            SHCLTRANSFERSTATUS uStatus = SHCLTRANSFERSTATUS_NONE;
    13371337            rc = HGCMSvcGetU32(&paParms[1], &uStatus);
    13381338            if (RT_FAILURE(rc))
     
    13411341            LogFlowFunc(("uStatus: %RU32\n", uStatus));
    13421342
    1343             SharedClipboardURICtxTransfersCleanup(&pClient->URI);
    1344 
    1345             if (SharedClipboardURICtxTransfersMaximumReached(&pClient->URI))
     1343            SharedClipboardTransferCtxTransfersCleanup(&pClient->URI);
     1344
     1345            if (SharedClipboardTransferCtxTransfersMaximumReached(&pClient->URI))
    13461346            {
    13471347                rc = VERR_SHCLPB_MAX_TRANSFERS_REACHED;
     
    13491349            }
    13501350
    1351             if (uStatus == SHCLURITRANSFERSTATUS_RUNNING)
    1352             {
    1353                 const SHCLURITRANSFERDIR enmDir = SHCLURITRANSFERDIR_READ;
    1354 
    1355                 PSHCLURITRANSFER pTransfer;
    1356                 rc = SharedClipboardURITransferCreate(enmDir,
     1351            if (uStatus == SHCLTRANSFERSTATUS_RUNNING)
     1352            {
     1353                const SHCLTRANSFERDIR enmDir = SHCLTRANSFERDIR_READ;
     1354
     1355                PSHCLTRANSFER pTransfer;
     1356                rc = SharedClipboardTransferCreate(enmDir,
    13571357                                                      SHCLSOURCE_REMOTE, &pTransfer);
    13581358                if (RT_SUCCESS(rc))
    13591359                {
    1360                     rc = sharedClipboardSvcURIAreaRegister(&pClient->State, pTransfer);
     1360                    rc = sharedClipboardSvcTransferAreaRegister(&pClient->State, pTransfer);
    13611361                    if (RT_SUCCESS(rc))
    13621362                    {
     
    13661366                        creationCtx.enmSource = pClient->State.enmSource;
    13671367
    1368                         creationCtx.Interface.pfnTransferOpen  = sharedClipboardSvcURITransferOpen;
    1369                         creationCtx.Interface.pfnTransferClose = sharedClipboardSvcURITransferClose;
    1370                         creationCtx.Interface.pfnListOpen      = sharedClipboardSvcURIListOpen;
    1371                         creationCtx.Interface.pfnListClose     = sharedClipboardSvcURIListClose;
    1372                         creationCtx.Interface.pfnObjOpen       = sharedClipboardSvcURIObjOpen;
    1373                         creationCtx.Interface.pfnObjClose      = sharedClipboardSvcURIObjClose;
    1374 
    1375                         if (enmDir == SHCLURITRANSFERDIR_READ)
     1368                        creationCtx.Interface.pfnTransferOpen  = sharedClipboardSvcTransferTransferOpen;
     1369                        creationCtx.Interface.pfnTransferClose = sharedClipboardSvcTransferTransferClose;
     1370                        creationCtx.Interface.pfnListOpen      = sharedClipboardSvcTransferListOpen;
     1371                        creationCtx.Interface.pfnListClose     = sharedClipboardSvcTransferListClose;
     1372                        creationCtx.Interface.pfnObjOpen       = sharedClipboardSvcTransferObjOpen;
     1373                        creationCtx.Interface.pfnObjClose      = sharedClipboardSvcTransferObjClose;
     1374
     1375                        if (enmDir == SHCLTRANSFERDIR_READ)
    13761376                        {
    1377                             creationCtx.Interface.pfnGetRoots        = sharedClipboardSvcURIGetRoots;
    1378                             creationCtx.Interface.pfnListHdrRead     = sharedClipboardSvcURIListHdrRead;
    1379                             creationCtx.Interface.pfnListEntryRead   = sharedClipboardSvcURIListEntryRead;
    1380                             creationCtx.Interface.pfnObjRead         = sharedClipboardSvcURIObjRead;
     1377                            creationCtx.Interface.pfnGetRoots        = sharedClipboardSvcTransferGetRoots;
     1378                            creationCtx.Interface.pfnListHdrRead     = sharedClipboardSvcTransferListHdrRead;
     1379                            creationCtx.Interface.pfnListEntryRead   = sharedClipboardSvcTransferListEntryRead;
     1380                            creationCtx.Interface.pfnObjRead         = sharedClipboardSvcTransferObjRead;
    13811381                        }
    13821382                        else
     
    13881388
    13891389                        /* Register needed callbacks so that we can wait for the meta data to arrive here. */
    1390                         SHCLURITRANSFERCALLBACKS Callbacks;
     1390                        SHCLTRANSFERCALLBACKS Callbacks;
    13911391                        RT_ZERO(Callbacks);
    13921392
    13931393                        Callbacks.pvUser                = pClient;
    13941394
    1395                         Callbacks.pfnTransferPrepare    = VBoxSvcClipboardURITransferPrepareCallback;
    1396                         Callbacks.pfnTransferComplete   = VBoxSvcClipboardURITransferCompleteCallback;
    1397                         Callbacks.pfnTransferCanceled   = VBoxSvcClipboardURITransferCanceledCallback;
    1398                         Callbacks.pfnTransferError      = VBoxSvcClipboardURITransferErrorCallback;
    1399 
    1400                         SharedClipboardURITransferSetCallbacks(pTransfer, &Callbacks);
    1401 
    1402                         rc = SharedClipboardURITransferSetInterface(pTransfer, &creationCtx);
     1395                        Callbacks.pfnTransferPrepare    = VBoxSvcClipboardTransferPrepareCallback;
     1396                        Callbacks.pfnTransferComplete   = VBoxSvcClipboardTransferCompleteCallback;
     1397                        Callbacks.pfnTransferCanceled   = VBoxSvcClipboardTransferCanceledCallback;
     1398                        Callbacks.pfnTransferError      = VBoxSvcClipboardTransferErrorCallback;
     1399
     1400                        SharedClipboardTransferSetCallbacks(pTransfer, &Callbacks);
     1401
     1402                        rc = SharedClipboardTransferSetInterface(pTransfer, &creationCtx);
    14031403                        if (RT_SUCCESS(rc))
    1404                             rc = SharedClipboardURICtxTransferAdd(&pClient->URI, pTransfer);
     1404                            rc = SharedClipboardTransferCtxTransferAdd(&pClient->URI, pTransfer);
    14051405                    }
    14061406
    14071407                    if (RT_SUCCESS(rc))
    14081408                    {
    1409                         rc = SharedClipboardSvcImplURITransferCreate(pClient, pTransfer);
     1409                        rc = SharedClipboardSvcImplTransferCreate(pClient, pTransfer);
    14101410                        if (RT_SUCCESS(rc))
    14111411                            rc = SharedClipboardSvcImplFormatAnnounce(pClient, VBOX_SHCL_FMT_URI_LIST);
     
    14141414                    if (RT_FAILURE(rc))
    14151415                    {
    1416                         SharedClipboardSvcImplURITransferDestroy(pClient, pTransfer);
    1417                         SharedClipboardURITransferDestroy(pTransfer);
     1416                        SharedClipboardSvcImplTransferDestroy(pClient, pTransfer);
     1417                        SharedClipboardTransferDestroy(pTransfer);
    14181418                    }
    14191419                }
     
    14311431        case VBOX_SHCL_GUEST_FN_REPLY:
    14321432        {
    1433             rc = sharedClipboardSvcURITransferHandleReply(pClient, pTransfer, cParms, paParms);
     1433            rc = sharedClipboardSvcTransferTransferHandleReply(pClient, pTransfer, cParms, paParms);
    14341434
    14351435            /* This message does not need any completion, as it can happen at any time from the guest side. */
     
    14461446        {
    14471447            SHCLROOTLISTHDR lstHdr;
    1448             rc = sharedClipboardSvcURIGetRootListHdr(cParms, paParms, &lstHdr);
    1449             if (RT_SUCCESS(rc))
    1450             {
    1451                 void    *pvData = SharedClipboardURIRootListHdrDup(&lstHdr);
     1448            rc = sharedClipboardSvcTransferGetRootListHdr(cParms, paParms, &lstHdr);
     1449            if (RT_SUCCESS(rc))
     1450            {
     1451                void    *pvData = SharedClipboardTransferRootListHdrDup(&lstHdr);
    14521452                uint32_t cbData = sizeof(SHCLROOTLISTHDR);
    14531453
     
    14701470    #if 0
    14711471            SHCLROOTLISTENTRY lstEntry;
    1472             rc = VBoxSvcClipboardURIGetRootListEntry(cParms, paParms, &lstEntry);
    1473             if (RT_SUCCESS(rc))
    1474             {
    1475                 void    *pvData = SharedClipboardURIRootListEntryDup(&lstEntry);
     1472            rc = VBoxSvcClipboardGetRootListEntry(cParms, paParms, &lstEntry);
     1473            if (RT_SUCCESS(rc))
     1474            {
     1475                void    *pvData = SharedClipboardTransferRootListEntryDup(&lstEntry);
    14761476                uint32_t cbData = sizeof(SHCLROOTLISTENTRY);
    14771477
    1478                 PSHCLURITRANSFERPAYLOAD pPayload;
    1479                 rc = SharedClipboardURITransferPayloadAlloc(SHCLURITRANSFEREVENTTYPE_ROOT_LIST_HDR_READ,
     1478                PSHCLTRANSFERPAYLOAD pPayload;
     1479                rc = SharedClipboardTransferPayloadAlloc(SHCLTRANSFEREVENTTYPE_ROOT_LIST_HDR_READ,
    14801480                                                            pvData, cbData, &pPayload);
    14811481                if (RT_SUCCESS(rc))
    1482                     rc = SharedClipboardURITransferEventSignal(pTransfer, SHCLURITRANSFEREVENTTYPE_ROOT_LIST_HDR_READ,
    1483                                                                pPayload);
     1482                    rc = SharedClipboardTransferEventSignal(pTransfer, SHCLTRANSFEREVENTTYPE_ROOT_LIST_HDR_READ,
     1483                                                            pPayload);
    14841484            }
    14851485            break;
     
    14901490        {
    14911491            SHCLROOTLISTENTRY lstEntry;
    1492             rc = sharedClipboardSvcURIGetRootListEntry(cParms, paParms, &lstEntry);
    1493             if (RT_SUCCESS(rc))
    1494             {
    1495                 void    *pvData = SharedClipboardURIRootListEntryDup(&lstEntry);
     1492            rc = sharedClipboardSvcTransferGetRootListEntry(cParms, paParms, &lstEntry);
     1493            if (RT_SUCCESS(rc))
     1494            {
     1495                void    *pvData = SharedClipboardTransferRootListEntryDup(&lstEntry);
    14961496                uint32_t cbData = sizeof(SHCLROOTLISTENTRY);
    14971497
     
    15131513        {
    15141514            SHCLLISTOPENPARMS listOpenParms;
    1515             rc = sharedClipboardSvcURIGetListOpen(cParms, paParms, &listOpenParms);
     1515            rc = sharedClipboardSvcTransferGetListOpen(cParms, paParms, &listOpenParms);
    15161516            if (RT_SUCCESS(rc))
    15171517            {
    15181518                SHCLLISTHANDLE hList;
    1519                 rc = SharedClipboardURITransferListOpen(pTransfer, &listOpenParms, &hList);
     1519                rc = SharedClipboardTransferListOpen(pTransfer, &listOpenParms, &hList);
    15201520                if (RT_SUCCESS(rc))
    15211521                {
     
    15361536            if (RT_SUCCESS(rc))
    15371537            {
    1538                 rc = SharedClipboardURITransferListClose(pTransfer, hList);
     1538                rc = SharedClipboardTransferListClose(pTransfer, hList);
    15391539            }
    15401540            break;
     
    15511551            {
    15521552                SHCLLISTHDR hdrList;
    1553                 rc = SharedClipboardURITransferListGetHeader(pTransfer, hList, &hdrList);
     1553                rc = SharedClipboardTransferListGetHeader(pTransfer, hList, &hdrList);
    15541554                /*if (RT_SUCCESS(rc))
    1555                     rc = sharedClipboardSvcURISetListHdr(cParms, paParms, &hdrList);*/
     1555                    rc = sharedClipboardSvcTransferSetListHdr(cParms, paParms, &hdrList);*/
    15561556            }
    15571557            break;
     
    15611561        {
    15621562            SHCLLISTHDR hdrList;
    1563             rc = SharedClipboardURIListHdrInit(&hdrList);
     1563            rc = SharedClipboardTransferListHdrInit(&hdrList);
    15641564            if (RT_SUCCESS(rc))
    15651565            {
    15661566                SHCLLISTHANDLE hList;
    1567                 rc = sharedClipboardSvcURIGetListHdr(cParms, paParms, &hList, &hdrList);
     1567                rc = sharedClipboardSvcTransferGetListHdr(cParms, paParms, &hList, &hdrList);
    15681568                if (RT_SUCCESS(rc))
    15691569                {
    1570                     void    *pvData = SharedClipboardURIListHdrDup(&hdrList);
     1570                    void    *pvData = SharedClipboardTransferListHdrDup(&hdrList);
    15711571                    uint32_t cbData = sizeof(SHCLLISTHDR);
    15721572
     
    15961596            {
    15971597                SHCLLISTENTRY entryList;
    1598                 rc = SharedClipboardURITransferListRead(pTransfer, hList, &entryList);
     1598                rc = SharedClipboardTransferListRead(pTransfer, hList, &entryList);
    15991599            }
    16001600            break;
     
    16041604        {
    16051605            SHCLLISTENTRY entryList;
    1606             rc = SharedClipboardURIListEntryInit(&entryList);
     1606            rc = SharedClipboardTransferListEntryInit(&entryList);
    16071607            if (RT_SUCCESS(rc))
    16081608            {
    16091609                SHCLLISTHANDLE hList;
    1610                 rc = sharedClipboardSvcURIGetListEntry(cParms, paParms, &hList, &entryList);
     1610                rc = sharedClipboardSvcTransferGetListEntry(cParms, paParms, &hList, &entryList);
    16111611                if (RT_SUCCESS(rc))
    16121612                {
    1613                     void    *pvData = SharedClipboardURIListEntryDup(&entryList);
     1613                    void    *pvData = SharedClipboardTransferListEntryDup(&entryList);
    16141614                    uint32_t cbData = sizeof(SHCLLISTENTRY);
    16151615
     
    16491649        {
    16501650            SHCLOBJDATACHUNK dataChunk;
    1651             rc = sharedClipboardSvcURIGetObjDataChunk(cParms, paParms, &dataChunk);
    1652             if (RT_SUCCESS(rc))
    1653             {
    1654                 void    *pvData = SharedClipboardURIObjectDataChunkDup(&dataChunk);
     1651            rc = sharedClipboardSvcTransferGetObjDataChunk(cParms, paParms, &dataChunk);
     1652            if (RT_SUCCESS(rc))
     1653            {
     1654                void    *pvData = SharedClipboardTransferObjectDataChunkDup(&dataChunk);
    16551655                uint32_t cbData = sizeof(SHCLOBJDATACHUNK);
    16561656
     
    16761676
    16771677            SHCLDIRDATA dirData;
    1678             rc = VBoxSvcClipboardURIGetDir(cParms, paParms, &dirData);
    1679             if (RT_SUCCESS(rc))
    1680             {
    1681                 SharedClipboardArea *pArea = SharedClipboardURITransferGetArea(pTransfer);
     1678            rc = VBoxSvcClipboardGetDir(cParms, paParms, &dirData);
     1679            if (RT_SUCCESS(rc))
     1680            {
     1681                SharedClipboardArea *pArea = SharedClipboardTransferGetArea(pTransfer);
    16821682                AssertPtrBreakStmt(pArea, rc = VERR_INVALID_POINTER);
    16831683
     
    17091709
    17101710            SHCLFILEHDR fileHdr;
    1711             rc = VBoxSvcClipboardURISetFileHdr(cParms, paParms, &fileHdr);
     1711            rc = VBoxSvcClipboardSetFileHdr(cParms, paParms, &fileHdr);
    17121712            break;
    17131713        }
     
    17171717            LogFlowFunc(("VBOX_SHCL_GUEST_FN_WRITE_FILE_HDR\n"));
    17181718
    1719             if (!SharedClipboardURIObjCtxIsValid(SharedClipboardURITransferGetCurrentObjCtx(pTransfer)))
    1720             {
    1721                 pTransfer->State.ObjCtx.pObj = new SharedClipboardURIObject(SharedClipboardURIObject::Type_File);
     1719            if (!SharedClipboardTransferObjCtxIsValid(SharedClipboardTransferGetCurrentObjCtx(pTransfer)))
     1720            {
     1721                pTransfer->State.ObjCtx.pObj = new SharedClipboardTransferObject(SharedClipboardTransferObject::Type_File);
    17221722                if (pTransfer->State.ObjCtx.pObj) /** @todo Can this throw? */
    17231723                {
     
    17341734
    17351735            SHCLFILEHDR fileHdr;
    1736             rc = VBoxSvcClipboardURIGetFileHdr(cParms, paParms, &fileHdr);
    1737             if (RT_SUCCESS(rc))
    1738             {
    1739                 SharedClipboardArea *pArea = SharedClipboardURITransferGetArea(pTransfer);
     1736            rc = VBoxSvcClipboardGetFileHdr(cParms, paParms, &fileHdr);
     1737            if (RT_SUCCESS(rc))
     1738            {
     1739                SharedClipboardArea *pArea = SharedClipboardTransferGetArea(pTransfer);
    17401740                AssertPtrBreakStmt(pArea, rc = VERR_WRONG_ORDER);
    17411741
     
    17491749                    if (RT_SUCCESS(rc))
    17501750                    {
    1751                         PSHCLCLIENTURIOBJCTX pObjCtx = SharedClipboardURITransferGetCurrentObjCtx(pTransfer);
     1751                        PSHCLCLIENTTRANSFEROBJCTX pObjCtx = SharedClipboardTransferGetCurrentObjCtx(pTransfer);
    17521752                        AssertPtrBreakStmt(pObjCtx, VERR_INVALID_POINTER);
    17531753
    1754                         SharedClipboardURIObject *pObj = pObjCtx->pObj;
     1754                        SharedClipboardTransferObject *pObj = pObjCtx->pObj;
    17551755                        AssertPtrBreakStmt(pObj, VERR_INVALID_POINTER);
    17561756
     
    17581758
    17591759                        /** @todo Add sparse file support based on fFlags? (Use Open(..., fFlags | SPARSE). */
    1760                         rc = pObj->OpenFileEx(pszPathAbs, SharedClipboardURIObject::View_Target,
     1760                        rc = pObj->OpenFileEx(pszPathAbs, SharedClipboardTransferObject::View_Target,
    17611761                                              RTFILE_O_CREATE_REPLACE | RTFILE_O_WRITE | RTFILE_O_DENY_WRITE,
    17621762                                              (fileHdr.fMode & RTFS_UNIX_MASK) | RTFS_UNIX_IRUSR | RTFS_UNIX_IWUSR);
     
    17751775                                         pObj->GetDestPathAbs().c_str()));
    17761776
    1777                                 SharedClipboardURIObjCtxDestroy(&pTransfer->State.ObjCtx);
     1777                                SharedClipboardTransferObjCtxDestroy(&pTransfer->State.ObjCtx);
    17781778                            }
    17791779
     
    17951795
    17961796            SHCLFILEDATA fileData;
    1797             rc = VBoxSvcClipboardURISetFileData(cParms, paParms, &fileData);
     1797            rc = VBoxSvcClipboardSetFileData(cParms, paParms, &fileData);
    17981798            break;
    17991799        }
     
    18031803            LogFlowFunc(("VBOX_SHCL_FN_WRITE_FILE_DATA\n"));
    18041804
    1805             if (!SharedClipboardURIObjCtxIsValid(&pTransfer->State.ObjCtx))
     1805            if (!SharedClipboardTransferObjCtxIsValid(&pTransfer->State.ObjCtx))
    18061806            {
    18071807                rc = VERR_WRONG_ORDER;
     
    18101810
    18111811            SHCLFILEDATA fileData;
    1812             rc = VBoxSvcClipboardURIGetFileData(cParms, paParms, &fileData);
    1813             if (RT_SUCCESS(rc))
    1814             {
    1815                 PSHCLCLIENTURIOBJCTX pObjCtx = SharedClipboardURITransferGetCurrentObjCtx(pTransfer);
     1812            rc = VBoxSvcClipboardGetFileData(cParms, paParms, &fileData);
     1813            if (RT_SUCCESS(rc))
     1814            {
     1815                PSHCLCLIENTTRANSFEROBJCTX pObjCtx = SharedClipboardTransferGetCurrentObjCtx(pTransfer);
    18161816                AssertPtrBreakStmt(pObjCtx, VERR_INVALID_POINTER);
    18171817
    1818                 SharedClipboardURIObject *pObj = pObjCtx->pObj;
     1818                SharedClipboardTransferObject *pObj = pObjCtx->pObj;
    18191819                AssertPtrBreakStmt(pObj, VERR_INVALID_POINTER);
    18201820
     
    18321832                    if (   pObj->IsComplete()
    18331833                        || RT_FAILURE(rc))
    1834                         SharedClipboardURIObjCtxDestroy(&pTransfer->State.ObjCtx);
     1834                        SharedClipboardTransferObjCtxDestroy(&pTransfer->State.ObjCtx);
    18351835                }
    18361836                else
     
    18491849        {
    18501850            int rcGuest;
    1851             rc = sharedClipboardSvcURIGetError(cParms,paParms, &rcGuest);
     1851            rc = sharedClipboardSvcTransferGetError(cParms,paParms, &rcGuest);
    18521852            if (RT_SUCCESS(rc))
    18531853                LogRel(("Shared Clipboard: Transfer error: %Rrc\n", rcGuest));
     
    18731873
    18741874/**
    1875  * URI host handler for the Shared Clipboard host service.
     1875 * transfer host handler for the Shared Clipboard host service.
    18761876 *
    18771877 * @returns VBox status code.
     
    18801880 * @param   paParms             Array function parameters  supplied.
    18811881 */
    1882 int sharedClipboardSvcURIHostHandler(uint32_t u32Function,
    1883                                    uint32_t cParms,
    1884                                    VBOXHGCMSVCPARM paParms[])
     1882int sharedClipboardSvcTransferHostHandler(uint32_t u32Function,
     1883                                          uint32_t cParms,
     1884                                          VBOXHGCMSVCPARM paParms[])
    18851885{
    18861886    RT_NOREF(cParms, paParms);
     
    19061906
    19071907/**
    1908  * Registers an URI clipboard area.
     1908 * Registers an clipboard transfer area.
    19091909 *
    19101910 * @returns VBox status code.
    19111911 * @param   pClientState        Client state to use.
    1912  * @param   pTransfer           URI transfer to register a clipboard area for.
     1912 * @param   pTransfer           Shared Clipboard transfer to register a clipboard area for.
    19131913 */
    1914 int sharedClipboardSvcURIAreaRegister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer)
     1914int sharedClipboardSvcTransferAreaRegister(PSHCLCLIENTSTATE pClientState, PSHCLTRANSFER pTransfer)
    19151915{
    19161916    RT_NOREF(pClientState);
     
    19551955
    19561956/**
    1957  * Unregisters an URI clipboard area.
     1957 * Unregisters an clipboard transfer area.
    19581958 *
    19591959 * @returns VBox status code.
    19601960 * @param   pClientState        Client state to use.
    1961  * @param   pTransfer           URI transfer to unregister a clipboard area from.
     1961 * @param   pTransfer           Shared Clipboard transfer to unregister a clipboard area from.
    19621962 */
    1963 int sharedClipboardSvcURIAreaUnregister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer)
     1963int sharedClipboardSvcTransferAreaUnregister(PSHCLCLIENTSTATE pClientState, PSHCLTRANSFER pTransfer)
    19641964{
    19651965    RT_NOREF(pClientState);
     
    20022002
    20032003/**
    2004  * Attaches to an existing (registered) URI clipboard area.
     2004 * Attaches to an existing (registered) clipboard transfer area.
    20052005 *
    20062006 * @returns VBox status code.
    20072007 * @param   pClientState        Client state to use.
    2008  * @param   pTransfer           URI transfer to attach a clipboard area to.
     2008 * @param   pTransfer           Shared Clipboard transfer to attach a clipboard area to.
    20092009 * @param   uID                 ID of clipboard area to to attach to. Specify 0 to attach to the most recent one.
    20102010 */
    2011 int sharedClipboardSvcURIAreaAttach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer,
    2012                                   SHCLAREAID uID)
     2011int sharedClipboardSvcTransferAreaAttach(PSHCLCLIENTSTATE pClientState, PSHCLTRANSFER pTransfer,
     2012                                         SHCLAREAID uID)
    20132013{
    20142014    RT_NOREF(pClientState);
     
    20512051
    20522052/**
    2053  * Detaches from an URI clipboard area.
     2053 * Detaches from an clipboard transfer area.
    20542054 *
    20552055 * @returns VBox status code.
    20562056 * @param   pClientState        Client state to use.
    2057  * @param   pTransfer           URI transfer to detach a clipboard area from.
     2057 * @param   pTransfer           Shared Clipboard transfer to detach a clipboard area from.
    20582058 */
    2059 int sharedClipboardSvcURIAreaDetach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer)
     2059int sharedClipboardSvcTransferAreaDetach(PSHCLCLIENTSTATE pClientState, PSHCLTRANSFER pTransfer)
    20602060{
    20612061    RT_NOREF(pClientState);
     
    20992099 * @param   puEvent             Where to store the created wait event. Optional.
    21002100 */
    2101 int sharedClipboardSvcURITransferSendStatus(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer, SHCLURITRANSFERSTATUS uStatus,
    2102                                             int rcTransfer, PSHCLEVENTID puEvent)
     2101int sharedClipboardSvcTransferTransferSendStatus(PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer, SHCLTRANSFERSTATUS uStatus,
     2102                                                 int rcTransfer, PSHCLEVENTID puEvent)
    21032103{
    21042104    AssertPtrReturn(pClient,   VERR_INVALID_POINTER);
     
    21062106    /* puEvent is optional. */
    21072107
    2108     PSHCLCLIENTMSG pMsgReadData = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_URI_TRANSFER_STATUS,
     2108    PSHCLCLIENTMSG pMsgReadData = sharedClipboardSvcMsgAlloc(VBOX_SHCL_HOST_MSG_TRANSFER_TRANSFER_STATUS,
    21092109                                                             VBOX_SHCL_CPARMS_TRANSFER_STATUS);
    21102110    if (!pMsgReadData)
     
    21532153 * @param   ppTransfer          Where to return the created transfer on success. Optional.
    21542154 */
    2155 int sharedClipboardSvcURITransferStart(PSHCLCLIENT pClient,
    2156                                        SHCLURITRANSFERDIR enmDir, SHCLSOURCE enmSource,
    2157                                        PSHCLURITRANSFER *ppTransfer)
     2155int sharedClipboardSvcTransferTransferStart(PSHCLCLIENT pClient,
     2156                                            SHCLTRANSFERDIR enmDir, SHCLSOURCE enmSource,
     2157                                            PSHCLTRANSFER *ppTransfer)
    21582158{
    21592159    AssertPtrReturn(pClient, VERR_INVALID_POINTER);
     
    21622162    LogFlowFuncEnter();
    21632163
    2164     SharedClipboardURICtxTransfersCleanup(&pClient->URI);
     2164    SharedClipboardTransferCtxTransfersCleanup(&pClient->TransferCtx);
    21652165
    21662166    int rc;
    21672167
    2168     if (!SharedClipboardURICtxTransfersMaximumReached(&pClient->URI))
    2169     {
    2170         LogRel2(("Shared Clipboard: Starting %s transfer ...\n", enmDir == SHCLURITRANSFERDIR_READ ? "read" : "write"));
    2171 
    2172         PSHCLURITRANSFER pTransfer;
    2173         rc = SharedClipboardURITransferCreate(&pTransfer);
     2168    if (!SharedClipboardTransferCtxTransfersMaximumReached(&pClient->TransferCtx))
     2169    {
     2170        LogRel2(("Shared Clipboard: Starting %s transfer ...\n", enmDir == SHCLTRANSFERDIR_READ ? "read" : "write"));
     2171
     2172        PSHCLTRANSFER pTransfer;
     2173        rc = SharedClipboardTransferCreate(&pTransfer);
    21742174        if (RT_SUCCESS(rc))
    21752175        {
     
    21772177            RT_ZERO(creationCtx);
    21782178
    2179             if (enmDir == SHCLURITRANSFERDIR_READ)
    2180             {
    2181                 rc = sharedClipboardSvcURIAreaRegister(&pClient->State, pTransfer);
     2179            if (enmDir == SHCLTRANSFERDIR_READ)
     2180            {
     2181                rc = sharedClipboardSvcTransferAreaRegister(&pClient->State, pTransfer);
    21822182                if (RT_SUCCESS(rc))
    21832183                {
    2184                     creationCtx.Interface.pfnTransferOpen    = sharedClipboardSvcURITransferOpen;
    2185                     creationCtx.Interface.pfnTransferClose   = sharedClipboardSvcURITransferClose;
    2186                     creationCtx.Interface.pfnListOpen        = sharedClipboardSvcURIListOpen;
    2187                     creationCtx.Interface.pfnListClose       = sharedClipboardSvcURIListClose;
    2188                     creationCtx.Interface.pfnObjOpen         = sharedClipboardSvcURIObjOpen;
    2189                     creationCtx.Interface.pfnObjClose        = sharedClipboardSvcURIObjClose;
    2190 
    2191                     creationCtx.Interface.pfnGetRoots        = sharedClipboardSvcURIGetRoots;
    2192                     creationCtx.Interface.pfnListHdrRead     = sharedClipboardSvcURIListHdrRead;
    2193                     creationCtx.Interface.pfnListEntryRead   = sharedClipboardSvcURIListEntryRead;
    2194                     creationCtx.Interface.pfnObjRead         = sharedClipboardSvcURIObjRead;
    2195                 }
    2196             }
    2197             else if (enmDir == SHCLURITRANSFERDIR_WRITE)
    2198             {
    2199                 creationCtx.Interface.pfnListHdrWrite   = sharedClipboardSvcURIListHdrWrite;
    2200                 creationCtx.Interface.pfnListEntryWrite = sharedClipboardSvcURIListEntryWrite;
    2201                 creationCtx.Interface.pfnObjWrite       = sharedClipboardSvcURIObjWrite;
     2184                    creationCtx.Interface.pfnTransferOpen    = sharedClipboardSvcTransferTransferOpen;
     2185                    creationCtx.Interface.pfnTransferClose   = sharedClipboardSvcTransferTransferClose;
     2186                    creationCtx.Interface.pfnListOpen        = sharedClipboardSvcTransferListOpen;
     2187                    creationCtx.Interface.pfnListClose       = sharedClipboardSvcTransferListClose;
     2188                    creationCtx.Interface.pfnObjOpen         = sharedClipboardSvcTransferObjOpen;
     2189                    creationCtx.Interface.pfnObjClose        = sharedClipboardSvcTransferObjClose;
     2190
     2191                    creationCtx.Interface.pfnGetRoots        = sharedClipboardSvcTransferGetRoots;
     2192                    creationCtx.Interface.pfnListHdrRead     = sharedClipboardSvcTransferListHdrRead;
     2193                    creationCtx.Interface.pfnListEntryRead   = sharedClipboardSvcTransferListEntryRead;
     2194                    creationCtx.Interface.pfnObjRead         = sharedClipboardSvcTransferObjRead;
     2195                }
     2196            }
     2197            else if (enmDir == SHCLTRANSFERDIR_WRITE)
     2198            {
     2199                creationCtx.Interface.pfnListHdrWrite   = sharedClipboardSvcTransferListHdrWrite;
     2200                creationCtx.Interface.pfnListEntryWrite = sharedClipboardSvcTransferListEntryWrite;
     2201                creationCtx.Interface.pfnObjWrite       = sharedClipboardSvcTransferObjWrite;
    22022202            }
    22032203            else
     
    22082208
    22092209            /* Register needed callbacks so that we can wait for the meta data to arrive here. */
    2210             SHCLURITRANSFERCALLBACKS Callbacks;
     2210            SHCLTRANSFERCALLBACKS Callbacks;
    22112211            RT_ZERO(Callbacks);
    22122212
    22132213            Callbacks.pvUser                = pClient;
    22142214
    2215             Callbacks.pfnTransferPrepare    = VBoxSvcClipboardURITransferPrepareCallback;
    2216             Callbacks.pfnTransferComplete   = VBoxSvcClipboardURITransferCompleteCallback;
    2217             Callbacks.pfnTransferCanceled   = VBoxSvcClipboardURITransferCanceledCallback;
    2218             Callbacks.pfnTransferError      = VBoxSvcClipboardURITransferErrorCallback;
    2219 
    2220             SharedClipboardURITransferSetCallbacks(pTransfer, &Callbacks);
     2215            Callbacks.pfnTransferPrepare    = VBoxSvcClipboardTransferPrepareCallback;
     2216            Callbacks.pfnTransferComplete   = VBoxSvcClipboardTransferCompleteCallback;
     2217            Callbacks.pfnTransferCanceled   = VBoxSvcClipboardTransferCanceledCallback;
     2218            Callbacks.pfnTransferError      = VBoxSvcClipboardTransferErrorCallback;
     2219
     2220            SharedClipboardTransferSetCallbacks(pTransfer, &Callbacks);
    22212221
    22222222            uint32_t uTransferID = 0;
    22232223
    2224             rc = SharedClipboardURITransferSetInterface(pTransfer, &creationCtx);
    2225             if (RT_SUCCESS(rc))
    2226             {
    2227                 rc = SharedClipboardSvcImplURITransferCreate(pClient, pTransfer);
     2224            rc = SharedClipboardTransferSetInterface(pTransfer, &creationCtx);
     2225            if (RT_SUCCESS(rc))
     2226            {
     2227                rc = SharedClipboardSvcImplTransferCreate(pClient, pTransfer);
    22282228                if (RT_SUCCESS(rc))
    22292229                {
    2230                     rc = SharedClipboardURICtxTransferRegister(&pClient->URI, pTransfer, &uTransferID);
     2230                    rc = SharedClipboardTransferCtxTransferRegister(&pClient->TransferCtx, pTransfer, &uTransferID);
    22312231                    if (RT_SUCCESS(rc))
    22322232                    {
    2233                         rc = SharedClipboardURITransferInit(pTransfer, uTransferID, enmDir, enmSource);
     2233                        rc = SharedClipboardTransferInit(pTransfer, uTransferID, enmDir, enmSource);
    22342234                        if (RT_SUCCESS(rc))
    22352235                        {
    22362236                            SHCLEVENTID uEvent;
    2237                             rc = sharedClipboardSvcURITransferSendStatus(pClient, pTransfer,
    2238                                                                          SHCLURITRANSFERSTATUS_READY, VINF_SUCCESS,
    2239                                                                          &uEvent);
     2237                            rc = sharedClipboardSvcTransferTransferSendStatus(pClient, pTransfer,
     2238                                                                              SHCLTRANSFERSTATUS_READY, VINF_SUCCESS,
     2239                                                                              &uEvent);
    22402240                            if (RT_SUCCESS(rc))
    22412241                            {
     
    22732273            if (RT_FAILURE(rc))
    22742274            {
    2275                 SharedClipboardURICtxTransferUnregister(&pClient->URI, uTransferID);
    2276 
    2277                 SharedClipboardURITransferDestroy(pTransfer);
     2275                SharedClipboardTransferCtxTransferUnregister(&pClient->TransferCtx, uTransferID);
     2276
     2277                SharedClipboardTransferDestroy(pTransfer);
    22782278
    22792279                RTMemFree(pTransfer);
     
    23042304 * @param   pTransfer           Transfer to stop.
    23052305 */
    2306 int sharedClipboardSvcURITransferStop(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer)
    2307 {
    2308     int rc = SharedClipboardURITransferClose(pTransfer);
     2306int sharedClipboardSvcTransferTransferStop(PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer)
     2307{
     2308    int rc = SharedClipboardTransferClose(pTransfer);
    23092309    if (RT_SUCCESS(rc))
    23102310    {
    23112311        SHCLEVENTID uEvent;
    2312         rc = sharedClipboardSvcURITransferSendStatus(pClient, pTransfer,
    2313                                                      SHCLURITRANSFERSTATUS_STOPPED, VINF_SUCCESS,
    2314                                                      &uEvent);
     2312        rc = sharedClipboardSvcTransferTransferSendStatus(pClient, pTransfer,
     2313                                                          SHCLTRANSFERSTATUS_STOPPED, VINF_SUCCESS,
     2314                                                          &uEvent);
    23152315        if (RT_SUCCESS(rc))
    23162316        {
     
    23202320            if (RT_SUCCESS(rc))
    23212321            {
    2322                 rc = SharedClipboardURICtxTransferUnregister(&pClient->URI, SharedClipboardURITransferGetID(pTransfer));
     2322                rc = SharedClipboardTransferCtxTransferUnregister(&pClient->TransferCtx, SharedClipboardTransferGetID(pTransfer));
    23232323
    23242324                LogRel2(("Shared Clipboard: Stopped transfer %RU32 on guest\n", pTransfer->State.uID));
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-uri.h

    r80664 r80858  
    11/* $Id$ */
    22/** @file
    3  * Shared Clipboard Service - Internal header for URI (list) handling.
     3 * Shared Clipboard Service - Internal header for transfer (list) handling.
    44 */
    55
     
    2222#endif
    2323
    24 int sharedClipboardSvcURIHandler(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE callHandle, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[], uint64_t tsArrival);
    25 int sharedClipboardSvcURIHostHandler(uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
     24int sharedClipboardSvcTransferHandler(PSHCLCLIENT pClient, VBOXHGCMCALLHANDLE callHandle, uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[], uint64_t tsArrival);
     25int sharedClipboardSvcTransferHostHandler(uint32_t u32Function, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
    2626
    27 int sharedClipboardSvcURIAreaRegister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer);
    28 int sharedClipboardSvcURIAreaUnregister(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer);
    29 int sharedClipboardSvcURIAreaAttach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer, SHCLAREAID uID);
    30 int sharedClipboardSvcURIAreaDetach(PSHCLCLIENTSTATE pClientState, PSHCLURITRANSFER pTransfer);
     27int sharedClipboardSvcTransferAreaRegister(PSHCLCLIENTSTATE pClientState, PSHCLTRANSFER pTransfer);
     28int sharedClipboardSvcTransferAreaUnregister(PSHCLCLIENTSTATE pClientState, PSHCLTRANSFER pTransfer);
     29int sharedClipboardSvcTransferAreaAttach(PSHCLCLIENTSTATE pClientState, PSHCLTRANSFER pTransfer, SHCLAREAID uID);
     30int sharedClipboardSvcTransferAreaDetach(PSHCLCLIENTSTATE pClientState, PSHCLTRANSFER pTransfer);
    3131
    3232#endif /* !VBOX_INCLUDED_SRC_SharedClipboard_VBoxSharedClipboardSvc_uri_h */
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-utils.cpp

    r80849 r80858  
    101101    switch (uMsg)
    102102    {
    103         case VBOX_SHCL_HOST_MSG_URI_TRANSFER_START:
     103        case VBOX_SHCL_HOST_MSG_TRANSFER_TRANSFER_START:
    104104        {
    105105            Assert(pClient->State.URI.fTransferStart == false);
    106106
    107             LogFlowFunc(("VBOX_SHCL_HOST_MSG_URI_TRANSFER_START\n"));
     107            LogFlowFunc(("VBOX_SHCL_HOST_MSG_TRANSFER_TRANSFER_START\n"));
    108108
    109109            if (   sharedClipboardSvcGetMode() != VBOX_SHCL_MODE_HOST_TO_GUEST
     
    115115
    116116            pClient->State.URI.fTransferStart = true;
    117             pClient->State.URI.enmTransferDir = (SHCLURITRANSFERDIR)uParm;
     117            pClient->State.URI.enmTransferDir = (SHCLTRANSFERDIR)uParm;
    118118            break;
    119119
     
    130130}
    131131
    132 bool sharedClipboardSvcURIReturnMsg(PSHCLCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
     132bool sharedClipboardSvcTransferReturnMsg(PSHCLCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
    133133{
    134134    RT_NOREF(pClient, cParms, paParms);
     
    139139        && cParms >= 2)
    140140    {
    141         HGCMSvcSetU32(&paParms[0], VBOX_SHCL_HOST_MSG_URI_TRANSFER_START);
     141        HGCMSvcSetU32(&paParms[0], VBOX_SHCL_HOST_MSG_TRANSFER_TRANSFER_START);
    142142        HGCMSvcSetU32(&paParms[1], pClient->State.URI.enmTransferDir);
    143143        pClient->State.URI.fTransferStart = false;
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp

    r80849 r80858  
    339339            if (fFormats & VBOX_SHCL_FMT_URI_LIST)
    340340            {
    341                 PSHCLURITRANSFER pTransfer;
    342                 int rc = sharedClipboardSvcURITransferStart(pCtx->pClient,
    343                                                             SHCLURITRANSFERDIR_READ, SHCLSOURCE_REMOTE,
    344                                                             &pTransfer);
     341                PSHCLTRANSFER pTransfer;
     342                int rc = sharedClipboardSvcTransferTransferStart(pCtx->pClient,
     343                                                                 SHCLTRANSFERDIR_READ, SHCLSOURCE_REMOTE,
     344                                                                 &pTransfer);
    345345                if (RT_SUCCESS(rc))
    346346                {
    347347                    /* Create the IDataObject implementation the host OS needs and assign
    348348                     * the newly created transfer to this object. */
    349                     rc = SharedClipboardWinURITransferCreate(&pCtx->Win, pTransfer);
     349                    rc = SharedClipboardWinTransferCreate(&pCtx->Win, pTransfer);
    350350
    351351                    /*  Note: The actual requesting + retrieving of data will be done in the IDataObject implementation
     
    843843
    844844#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    845 int SharedClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer)
     845int SharedClipboardSvcImplTransferCreate(PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer)
    846846{
    847847    RT_NOREF(pClient, pTransfer);
     
    852852}
    853853
    854 int SharedClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer)
     854int SharedClipboardSvcImplTransferDestroy(PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer)
    855855{
    856856    LogFlowFuncEnter();
    857857
    858     SharedClipboardWinURITransferDestroy(&pClient->State.pCtx->Win, pTransfer);
     858    SharedClipboardWinTransferDestroy(&pClient->State.pCtx->Win, pTransfer);
    859859
    860860    return VINF_SUCCESS;
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp

    r80849 r80858  
    205205
    206206#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    207     if (pFormats->uFormats & VBOX_SHCL_FMT_URI_LIST) /* No URI support yet. */
     207    if (pFormats->uFormats & VBOX_SHCL_FMT_URI_LIST) /* No transfer support yet. */
    208208        return VINF_SUCCESS;
    209209#endif
     
    390390
    391391#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    392 int SharedClipboardSvcImplURITransferCreate(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer)
     392int SharedClipboardSvcImplTransferCreate(PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer)
    393393{
    394394    RT_NOREF(pClient, pTransfer);
     
    396396}
    397397
    398 int SharedClipboardSvcImplURITransferDestroy(PSHCLCLIENT pClient, PSHCLURITRANSFER pTransfer)
     398int SharedClipboardSvcImplTransferDestroy(PSHCLCLIENT pClient, PSHCLTRANSFER pTransfer)
    399399{
    400400    RT_NOREF(pClient, pTransfer);
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp

    r80849 r80858  
    8585 * Since VBox x.x.x transferring files via Shared Clipboard is supported.
    8686 * See the VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS define for supported / enabled
    87  * platforms. This is called "URI transfers".
     87 * platforms. This is called "Shared Clipboard transfers".
    8888 *
    8989 * Copying files / directories from guest A to guest B requires the host
     
    103103 * - No (maybe never) support for NT4.
    104104 *
    105  * @section sec_uri_areas               Clipboard areas.
     105 * @section sec_transfers_areas         Clipboard areas.
    106106 *
    107107 * For larger / longer transfers there might be file data
     
    123123 *       host's file system directly?
    124124 *
    125  * @section sec_uri_structure           URI handling structure
     125 * @section sec_transfer_structure        Transfer handling structure
    126126 *
    127127 * All structures / classes are designed for running on both, on the guest
     
    129129 * duplication where applicable.
    130130 *
    131  * Per HGCM client there is a so-called "URI context", which in turn can have
    132  * one or mulitple so-called "URI transfer" objects. At the moment we only support
    133  * on concurrent URI transfer per URI context. It's being used for reading from a
    134  * source or writing to destination, depening on its direction. An URI transfer
     131 * Per HGCM client there is a so-called "transfer context", which in turn can have
     132 * one or mulitple so-called "Shared Clipboard transfer" objects. At the moment we only support
     133 * on concurrent Shared Clipboard transfer per transfer context. It's being used for reading from a
     134 * source or writing to destination, depening on its direction. An Shared Clipboard transfer
    135135 * can have optional callbacks which might be needed by various implementations.
    136136 * Also, transfers optionally can run in an asynchronous thread to prevent
    137137 * blocking the UI while running.
    138138 *
    139  * An URI transfer can maintain its own clipboard area; for the host service such
     139 * An Shared Clipboard transfer can maintain its own clipboard area; for the host service such
    140140 * a clipboard area is coupled to a clipboard area registered or attached with
    141141 * VBoxSVC. This is needed because multiple transfers from multiple VMs (n:n) can
     
    145145 * no references are held to it  anymore, or if VBoxSVC goes down.
    146146 *
    147  * @section sec_uri_providers           URI providers
     147 * @section sec_transfer_providers        Transfer providers
    148148 *
    149149 * For certain implementations (for example on Windows guests / hosts, using
    150150 * IDataObject and IStream objects) a more flexible approach reqarding reading /
    151  * writing is needed. For this so-called URI providers abstract the way of how
     151 * writing is needed. For this so-called transfer providers abstract the way of how
    152152 * data is being read / written in the current context (host / guest), while
    153153 * the rest of the code stays the same.
    154154 *
    155  * @section sec_uri_protocol            URI protocol
     155 * @section sec_transfer_protocol         Transfer protocol
    156156 *
    157157 * The host service issues commands which the guest has to respond with an own
     
    170170 * might need this mechanism.
    171171 *
    172  * An URI transfer has three stages:
    173  *  - 1. Announcement: An URI transfer-compatible format (currently only one format available)
     172 * An Shared Clipboard transfer has three stages:
     173 *  - 1. Announcement: An Shared Clipboard transfer-compatible format (currently only one format available)
    174174 *          has been announced, the destination side creates a transfer object, which then,
    175175 *          depending on the actual implementation, can be used to tell the OS that
    176  *          there is URI (file) data available.
     176 *          there is transfer (file) data available.
    177177 *          At this point this just acts as a (kind-of) promise to the OS that we
    178178 *          can provide (file) data at some later point in time.
     
    11001100
    11011101#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    1102     PSHCLURITRANSFER pTransfer = SharedClipboardURICtxGetTransfer(&pClient->URI, 0 /* Index*/);
     1102    PSHCLTRANSFER pTransfer = SharedClipboardTransferCtxGetTransfer(&pClient->TransferCtx, 0 /* Index*/);
    11031103    if (pTransfer)
    1104         sharedClipboardSvcURIAreaDetach(&pClient->State, pTransfer);
    1105 
    1106     SharedClipboardURICtxDestroy(&pClient->URI);
     1104        sharedClipboardSvcTransferAreaDetach(&pClient->State, pTransfer);
     1105
     1106    SharedClipboardTransferCtxDestroy(&pClient->TransferCtx);
    11071107#endif
    11081108
     
    11511151#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    11521152            if (RT_SUCCESS(rc))
    1153                 rc = SharedClipboardURICtxInit(&pClient->URI);
     1153                rc = SharedClipboardTransferCtxInit(&pClient->TransferCtx);
    11541154#endif
    11551155            if (RT_SUCCESS(rc))
     
    13781378                    if (uFormat == VBOX_SHCL_FMT_URI_LIST)
    13791379                    {
    1380                         rc = sharedClipboardSvcURITransferStart(pClient, SHCLURITRANSFERDIR_WRITE, SHCLSOURCE_LOCAL,
    1381                                                                 NULL /* pTransfer */);
     1380                        rc = sharedClipboardSvcTransferTransferStart(pClient, SHCLTRANSFERDIR_WRITE, SHCLSOURCE_LOCAL,
     1381                                                                     NULL /* pTransfer */);
    13821382                        if (RT_FAILURE(rc))
    13831383                            LogRel(("Shared Clipboard: Initializing host write transfer failed with %Rrc\n", rc));
     
    14761476        {
    14771477#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    1478             rc = sharedClipboardSvcURIHandler(pClient, callHandle, u32Function, cParms, paParms, tsArrival);
     1478            rc = sharedClipboardSvcTransferHandler(pClient, callHandle, u32Function, cParms, paParms, tsArrival);
    14791479#else
    14801480            rc = VERR_NOT_IMPLEMENTED;
     
    15381538
    15391539#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    1540     pClientState->URI.enmTransferDir = SHCLURITRANSFERDIR_UNKNOWN;
     1540    pClientState->Transfers.enmTransferDir = SHCLTRANSFERDIR_UNKNOWN;
    15411541#else
    15421542    RT_NOREF(pClientState);
     
    15991599        {
    16001600#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
    1601             rc = sharedClipboardSvcURIHostHandler(u32Function, cParms, paParms);
     1601            rc = sharedClipboardSvcTransferHostHandler(u32Function, cParms, paParms);
    16021602#else
    16031603            rc = VERR_NOT_IMPLEMENTED;
     
    16281628static SSMFIELD const s_aShClSSMClientURIState[] =
    16291629{
    1630     SSMFIELD_ENTRY(SHCLCLIENTURISTATE, enmTransferDir),
     1630    SSMFIELD_ENTRY(SHCLCLIENTTRANSFERSTATE, enmTransferDir),
    16311631    SSMFIELD_ENTRY_TERM()
    16321632};
     
    16751675    AssertRCReturn(rc, rc);
    16761676
    1677     rc = SSMR3PutStructEx(pSSM, &pClient->State.URI, sizeof(pClient->State.URI), 0 /*fFlags*/, &s_aShClSSMClientURIState[0], NULL);
     1677    rc = SSMR3PutStructEx(pSSM, &pClient->State.Transfers, sizeof(pClient->State.Transfers), 0 /*fFlags*/, &s_aShClSSMClientURIState[0], NULL);
    16781678    AssertRCReturn(rc, rc);
    16791679
     
    17641764        AssertRCReturn(rc, rc);
    17651765
    1766         rc = SSMR3GetStructEx(pSSM, &pClient->State.URI, sizeof(pClient->State.URI), 0 /*fFlags*/, &s_aShClSSMClientURIState[0], NULL);
     1766        rc = SSMR3GetStructEx(pSSM, &pClient->State.Transfers, sizeof(pClient->State.Transfers), 0 /*fFlags*/, &s_aShClSSMClientURIState[0], NULL);
    17671767        AssertRCReturn(rc, rc);
    17681768
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