VirtualBox

Changeset 78578 in vbox for trunk/src


Ignore:
Timestamp:
May 18, 2019 2:48:13 PM (6 years ago)
Author:
vboxsync
Message:

Shared Clipboard/URI: Renaming; to make more clear what is what.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxClipboard.h

    r78501 r78578  
    7575
    7676/*
    77  * Platform dependent functions.
     77 * Platform-dependent implementations.
    7878 */
    79 int vboxClipboardInit(void);
    80 void vboxClipboardDestroy(void);
     79int VBoxClipboardSvcImplInit(void);
     80void VBoxClipboardSvcImplDestroy(void);
    8181
    82 int vboxClipboardConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless);
    83 void vboxClipboardDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient);
    84 void vboxClipboardFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats);
    85 int vboxClipboardReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format, void *pv, uint32_t cb, uint32_t *pcbActual);
    86 void vboxClipboardWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb, uint32_t u32Format);
    87 
    88 int vboxClipboardSync (VBOXCLIPBOARDCLIENTDATA *pClient);
     82int VBoxClipboardSvcImplConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless);
     83void VBoxClipboardSvcImplDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient);
     84void VBoxClipboardSvcImplFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats);
     85int VBoxClipboardSvcImplReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format, void *pv, uint32_t cb, uint32_t *pcbActual);
     86void VBoxClipboardSvcImplWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb, uint32_t u32Format);
     87int VBoxClipboardSvcImplSync(VBOXCLIPBOARDCLIENTDATA *pClient);
    8988
    9089/* Host unit testing interface */
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp

    r78318 r78578  
    118118
    119119/** Initialise the host side of the shared clipboard - called by the hgcm layer. */
    120 int vboxClipboardInit(void)
     120int VBoxClipboardSvcImplInit(void)
    121121{
    122122    Log(("vboxClipboardInit\n"));
     
    139139
    140140/** Terminate the host side of the shared clipboard - called by the hgcm layer. */
    141 void vboxClipboardDestroy(void)
     141void VBoxClipboardSvcImplDestroy(void)
    142142{
    143143    Log(("vboxClipboardDestroy\n"));
     
    167167 * @returns RT status code
    168168 */
    169 int vboxClipboardConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
     169int VBoxClipboardSvcImplConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
    170170{
    171171    NOREF(fHeadless);
     
    182182
    183183    /* Initially sync the host clipboard content with the client. */
    184     int rc = vboxClipboardSync(pClient);
     184    int rc = VBoxClipboardSvcImplSync(pClient);
    185185
    186186    VBoxSvcClipboardUnlock();
     
    192192 * after a save and restore of the guest.
    193193 */
    194 int vboxClipboardSync(VBOXCLIPBOARDCLIENTDATA *pClient)
     194int VBoxClipboardSvcImplSync(VBOXCLIPBOARDCLIENTDATA *pClient)
    195195{
    196196    /* Sync the host clipboard content with the client. */
     
    205205 * Shut down the shared clipboard subsystem and "disconnect" the guest.
    206206 */
    207 void vboxClipboardDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
     207void VBoxClipboardSvcImplDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
    208208{
    209209    Log(("vboxClipboardDisconnect\n"));
     
    221221 * @param u32Formats Clipboard formats the guest is offering
    222222 */
    223 void vboxClipboardFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
     223void VBoxClipboardSvcImplFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
    224224{
    225225    Log(("vboxClipboardFormatAnnounce u32Formats %02X\n", u32Formats));
     
    242242 * @param pcbActual Where to write the actual size of the written data
    243243 */
    244 int vboxClipboardReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format,
     244int VBoxClipboardSvcImplReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format,
    245245                          void *pv, uint32_t cb, uint32_t *pcbActual)
    246246{
     
    263263 * @param u32Format The format of the data written
    264264 */
    265 void vboxClipboardWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb, uint32_t u32Format)
     265void VBoxClipboardSvcImplWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb, uint32_t u32Format)
    266266{
    267267    VBoxSvcClipboardLock();
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp

    r78501 r78578  
    562562 * Public platform dependent functions.
    563563 */
    564 int vboxClipboardInit(void)
     564int VBoxClipboardSvcImplInit(void)
    565565{
    566566    RT_ZERO(g_ctx); /* Be careful not messing up non-POD types! */
     
    582582}
    583583
    584 void vboxClipboardDestroy(void)
     584void VBoxClipboardSvcImplDestroy(void)
    585585{
    586586    LogFlowFuncEnter();
     
    602602}
    603603
    604 int vboxClipboardConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
     604int VBoxClipboardSvcImplConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
    605605{
    606606    RT_NOREF(fHeadless);
     
    619619
    620620    /* Sync the host clipboard content with the client. */
    621     vboxClipboardSync(pClient);
     621    VBoxClipboardSvcImplSync(pClient);
    622622
    623623    return VINF_SUCCESS;
    624624}
    625625
    626 int vboxClipboardSync(VBOXCLIPBOARDCLIENTDATA *pClient)
     626int VBoxClipboardSvcImplSync(VBOXCLIPBOARDCLIENTDATA *pClient)
    627627{
    628628    /* Sync the host clipboard content with the client. */
     
    630630}
    631631
    632 void vboxClipboardDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
     632void VBoxClipboardSvcImplDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
    633633{
    634634    RT_NOREF(pClient);
     
    639639}
    640640
    641 void vboxClipboardFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
     641void VBoxClipboardSvcImplFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
    642642{
    643643    AssertPtrReturnVoid(pClient);
     
    682682#endif
    683683
    684 int vboxClipboardReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format, void *pv, uint32_t cb, uint32_t *pcbActual)
     684int VBoxClipboardSvcImplReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format, void *pv, uint32_t cb, uint32_t *pcbActual)
    685685{
    686686    AssertPtrReturn(pClient,       VERR_INVALID_POINTER);
     
    816816}
    817817
    818 void vboxClipboardWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb, uint32_t u32Format)
     818void VBoxClipboardSvcImplWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb, uint32_t u32Format)
    819819{
    820820    LogFlowFuncEnter();
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11-stubs.cpp

    r78182 r78578  
    4040
    4141/** Initialise the host side of the shared clipboard - called by the hgcm layer. */
    42 int vboxClipboardInit(void)
     42int VBoxClipboardSvcImplInit(void)
    4343{
    4444    LogFlowFunc(("called, returning VINF_SUCCESS.\n"));
     
    4747
    4848/** Terminate the host side of the shared clipboard - called by the hgcm layer. */
    49 void vboxClipboardDestroy(void)
     49void VBoxClipboardSvcImplDestroy(void)
    5050{
    5151    LogFlowFunc(("called, returning.\n"));
     
    5959  * @returns RT status code
    6060  */
    61 int vboxClipboardConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
     61int VBoxClipboardSvcImplConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
    6262{
    6363    RT_NOREF(pClient, fHeadless);
     
    7070 * after a save and restore of the guest.
    7171 */
    72 int vboxClipboardSync(VBOXCLIPBOARDCLIENTDATA * /* pClient */)
     72int VBoxClipboardSvcImplSync(VBOXCLIPBOARDCLIENTDATA * /* pClient */)
    7373{
    7474    LogFlowFunc(("called, returning VINF_SUCCESS.\n"));
     
    8181 * @param   pClient    Structure containing context information about the guest system
    8282 */
    83 void vboxClipboardDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
     83void VBoxClipboardSvcImplDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
    8484{
    8585    RT_NOREF(pClient);
     
    9494 * @param u32Formats Clipboard formats the guest is offering
    9595 */
    96 void vboxClipboardFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
     96void VBoxClipboardSvcImplFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
    9797{
    9898    RT_NOREF(pClient, u32Formats);
     
    109109 * @param pcbActual Where to write the actual size of the written data
    110110 */
    111 int vboxClipboardReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format,
     111int VBoxClipboardSvcImplReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format,
    112112                          void *pv, uint32_t cb, uint32_t *pcbActual)
    113113{
     
    127127 * @param u32Format The format of the data written
    128128 */
    129 void vboxClipboardWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb,
     129void VBoxClipboardSvcImplWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb,
    130130                            uint32_t u32Format)
    131131{
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp

    r78317 r78578  
    8585 * @note  Host glue code
    8686 */
    87 int vboxClipboardInit(void)
     87int VBoxClipboardSvcImplInit(void)
    8888{
    8989    return VINF_SUCCESS;
     
    9494 * @note  host glue code
    9595 */
    96 void vboxClipboardDestroy(void)
     96void VBoxClipboardSvcImplDestroy(void)
    9797{
    9898
     
    105105 *        the clipboard and leave ownership to X11.
    106106 */
    107 int vboxClipboardConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
     107int VBoxClipboardSvcImplConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
    108108{
    109109    int rc = VINF_SUCCESS;
     
    144144 * @note  Host glue code
    145145 */
    146 int vboxClipboardSync(VBOXCLIPBOARDCLIENTDATA *pClient)
     146int VBoxClipboardSvcImplSync(VBOXCLIPBOARDCLIENTDATA *pClient)
    147147{
    148148    /* Tell the guest we have no data in case X11 is not available.  If
     
    158158 * @note  Host glue code
    159159 */
    160 void vboxClipboardDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
     160void VBoxClipboardSvcImplDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
    161161{
    162162    LogRelFlow(("vboxClipboardDisconnect\n"));
     
    169169    pCtx->fShuttingDown = true;
    170170    /* If there is a currently pending request, release it immediately. */
    171     vboxClipboardWriteData(pClient, NULL, 0, 0);
     171    VBoxClipboardSvcImplWriteData(pClient, NULL, 0, 0);
    172172    int rc = ClipStopX11(pCtx->pBackend);
    173173    /** @todo handle this slightly more reasonably, or be really sure
     
    189189 * @note  Host glue code
    190190 */
    191 void vboxClipboardFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
     191void VBoxClipboardSvcImplFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
    192192{
    193193    LogRelFlowFunc(("called.  pClient=%p, u32Formats=%02X\n", pClient, u32Formats));
     
    225225 *
    226226 */
    227 int vboxClipboardReadData(VBOXCLIPBOARDCLIENTDATA *pClient,
     227int VBoxClipboardSvcImplReadData(VBOXCLIPBOARDCLIENTDATA *pClient,
    228228                          uint32_t u32Format, void *pv, uint32_t cb,
    229229                          uint32_t *pcbActual)
     
    399399 * @note   Host glue code
    400400 */
    401 void vboxClipboardWriteData(VBOXCLIPBOARDCLIENTDATA *pClient,
     401void VBoxClipboardSvcImplWriteData(VBOXCLIPBOARDCLIENTDATA *pClient,
    402402                            void *pv, uint32_t cb, uint32_t u32Format)
    403403{
     
    470470    if ((u32Msg == VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA)
    471471        && !pBackend->writeData.timeout)
    472         vboxClipboardWriteData(pClient, pBackend->writeData.pv,
     472        VBoxClipboardSvcImplWriteData(pClient, pBackend->writeData.pv,
    473473                               pBackend->writeData.cb,
    474474                               pBackend->writeData.format);
     
    527527    RTPrintf(TEST_NAME ": TESTING\n");
    528528    AssertRCReturn(rc, 1);
    529     rc = vboxClipboardConnect(&client, false);
     529    rc = VBoxClipboardSvcImplConnect(&client, false);
    530530    CLIPBACKEND *pBackend = client.pCtx->pBackend;
    531531    AssertRCReturn(rc, 1);
    532     vboxClipboardFormatAnnounce(&client,
     532    VBoxClipboardSvcImplFormatAnnounce(&client,
    533533                                VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT);
    534534    if (pBackend->formats != VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT)
     
    541541    client.asyncRead.paParms = (VBOXHGCMSVCPARM *)&client;
    542542    uint32_t u32Dummy;
    543     rc = vboxClipboardReadData(&client, VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT,
     543    rc = VBoxClipboardSvcImplReadData(&client, VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT,
    544544                               &u32Dummy, 42, &u32Dummy);
    545545    if (rc != VINF_HGCM_ASYNC_EXECUTE)
     
    609609    /* Data arriving after a timeout should *not* cause any segfaults or
    610610     * memory leaks.  Check with Valgrind! */
    611     vboxClipboardWriteData(&client, (void *)"tested", sizeof("tested"), 999);
    612     vboxClipboardDisconnect(&client);
     611    VBoxClipboardSvcImplWriteData(&client, (void *)"tested", sizeof("tested"), 999);
     612    VBoxClipboardSvcImplDisconnect(&client);
    613613    if (cErrors > 0)
    614614        RTPrintf(TEST_NAME ": errors: %u\n", cErrors);
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp

    r78501 r78578  
    337337        vboxSvcClipboardModeSet(VBOX_SHARED_CLIPBOARD_MODE_OFF);
    338338
    339         rc = vboxClipboardInit();
     339        rc = VBoxClipboardSvcImplInit();
    340340
    341341        /* Clean up on failure, because 'svnUnload' will not be called
     
    353353static DECLCALLBACK(int) svcUnload(void *)
    354354{
    355     vboxClipboardDestroy();
     355    VBoxClipboardSvcImplDestroy();
    356356    RTCritSectDelete(&critsect);
    357357    return VINF_SUCCESS;
     
    374374    vboxSvcClipboardCompleteReadData(pClient, VERR_NO_DATA, 0);
    375375
    376     vboxClipboardDisconnect(pClient);
     376    VBoxClipboardSvcImplDisconnect(pClient);
    377377
    378378    memset(pClient, 0, sizeof(*pClient));
     
    405405    pClient->u32ClientID = u32ClientID;
    406406
    407     rc = vboxClipboardConnect(pClient, VBoxSvcClipboardGetHeadless());
     407    rc = VBoxClipboardSvcImplConnect(pClient, VBoxSvcClipboardGetHeadless());
    408408
    409409    if (RT_SUCCESS(rc))
     
    534534                    else
    535535                    {
    536                         vboxClipboardFormatAnnounce (pClient, u32Formats);
     536                        VBoxClipboardSvcImplFormatAnnounce (pClient, u32Formats);
    537537                    }
    538538                }
     
    608608                             * support one pending read at one time. */
    609609                            vboxSvcClipboardCompleteReadData(pClient, VERR_NO_DATA, 0);
    610                             rc = vboxClipboardReadData (pClient, u32Format, pv, cb, &cbActual);
     610                            rc = VBoxClipboardSvcImplReadData (pClient, u32Format, pv, cb, &cbActual);
    611611                        }
    612612
     
    684684                        else
    685685                        {
    686                             vboxClipboardWriteData (pClient, pv, cb, u32Format);
     686                            VBoxClipboardSvcImplWriteData (pClient, pv, cb, u32Format);
    687687                        }
    688688                    }
     
    957957
    958958    /* Actual host data are to be reported to guest (SYNC). */
    959     vboxClipboardSync(pClient);
     959    VBoxClipboardSvcImplSync(pClient);
    960960
    961961#else  /* UNIT_TEST*/
  • trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp

    r78171 r78578  
    273273}
    274274
    275 int vboxClipboardInit() { return VINF_SUCCESS; }
    276 void vboxClipboardDestroy() { }
    277 void vboxClipboardDisconnect(_VBOXCLIPBOARDCLIENTDATA *) { AssertFailed(); }
    278 int vboxClipboardConnect(_VBOXCLIPBOARDCLIENTDATA *, bool)
     275int VBoxClipboardSvcImplInit() { return VINF_SUCCESS; }
     276void VBoxClipboardSvcImplDestroy() { }
     277void VBoxClipboardSvcImplDisconnect(_VBOXCLIPBOARDCLIENTDATA *) { AssertFailed(); }
     278int VBoxClipboardSvcImplConnect(_VBOXCLIPBOARDCLIENTDATA *, bool)
    279279{ AssertFailed(); return VERR_WRONG_ORDER; }
    280 void vboxClipboardFormatAnnounce(_VBOXCLIPBOARDCLIENTDATA *, unsigned int)
     280void VBoxClipboardSvcImplFormatAnnounce(_VBOXCLIPBOARDCLIENTDATA *, unsigned int)
    281281{ AssertFailed(); }
    282 int vboxClipboardReadData(_VBOXCLIPBOARDCLIENTDATA *, unsigned int, void *, unsigned int, unsigned int *)
     282int VBoxClipboardSvcImplReadData(_VBOXCLIPBOARDCLIENTDATA *, unsigned int, void *, unsigned int, unsigned int *)
    283283{ AssertFailed(); return VERR_WRONG_ORDER; }
    284 void vboxClipboardWriteData(_VBOXCLIPBOARDCLIENTDATA *, void *, unsigned int, unsigned int) { AssertFailed(); }
    285 int vboxClipboardSync(_VBOXCLIPBOARDCLIENTDATA *)
     284void VBoxClipboardSvcImplWriteData(_VBOXCLIPBOARDCLIENTDATA *, void *, unsigned int, unsigned int) { AssertFailed(); }
     285int VBoxClipboardSvcImplSync(_VBOXCLIPBOARDCLIENTDATA *)
    286286{ AssertFailed(); return VERR_WRONG_ORDER; }
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