VirtualBox

Ignore:
Timestamp:
Apr 17, 2019 7:06:26 PM (6 years ago)
Author:
vboxsync
Message:

Shared Clipboard: Coding style.

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

Legend:

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

    r78160 r78179  
    6161 * @param   pCtx    The context.
    6262 */
    63 static int vboxClipboardChanged (VBOXCLIPBOARDCONTEXT *pCtx)
     63static int vboxClipboardChanged(VBOXCLIPBOARDCONTEXT *pCtx)
    6464{
    6565    if (pCtx->pClient == NULL)
     
    6969    bool fChanged = false;
    7070    /* Retrieve the formats currently in the clipboard and supported by vbox */
    71     int rc = queryNewPasteboardFormats (pCtx->pasteboard, &fFormats, &fChanged);
    72     if (RT_SUCCESS (rc) && fChanged)
    73     {
    74         vboxSvcClipboardReportMsg (pCtx->pClient, VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS, fFormats);
    75         Log (("vboxClipboardChanged fFormats %02X\n", fFormats));
     71    int rc = queryNewPasteboardFormats(pCtx->pasteboard, &fFormats, &fChanged);
     72    if (RT_SUCCESS(rc) && fChanged)
     73    {
     74        vboxSvcClipboardReportMsg(pCtx->pClient, VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS, fFormats);
     75        Log(("vboxClipboardChanged fFormats %02X\n", fFormats));
    7676    }
    7777
     
    9090 *
    9191 */
    92 static int vboxClipboardThread (RTTHREAD ThreadSelf, void *pvUser)
    93 {
    94     Log (("vboxClipboardThread: starting clipboard thread\n"));
    95 
    96     AssertPtrReturn (pvUser, VERR_INVALID_PARAMETER);
    97     VBOXCLIPBOARDCONTEXT *pCtx = (VBOXCLIPBOARDCONTEXT *) pvUser;
     92static int vboxClipboardThread(RTTHREAD ThreadSelf, void *pvUser)
     93{
     94    Log(("vboxClipboardThread: starting clipboard thread\n"));
     95
     96    AssertPtrReturn(pvUser, VERR_INVALID_PARAMETER);
     97    VBOXCLIPBOARDCONTEXT *pCtx = (VBOXCLIPBOARDCONTEXT *)pvUser;
    9898
    9999    while (!pCtx->fTerminate)
     
    102102           thread safe and in any case we're calling several methods. */
    103103        VBoxSvcClipboardLock();
    104         vboxClipboardChanged (pCtx);
     104        vboxClipboardChanged(pCtx);
    105105        VBoxSvcClipboardUnlock();
    106106
    107107        /* Sleep for 200 msecs before next poll */
    108         RTThreadUserWait (ThreadSelf, 200);
    109     }
    110 
    111     Log (("vboxClipboardThread: clipboard thread terminated successfully with return code %Rrc\n", VINF_SUCCESS));
     108        RTThreadUserWait(ThreadSelf, 200);
     109    }
     110
     111    Log(("vboxClipboardThread: clipboard thread terminated successfully with return code %Rrc\n", VINF_SUCCESS));
    112112    return VINF_SUCCESS;
    113113}
     
    118118
    119119/** Initialise the host side of the shared clipboard - called by the hgcm layer. */
    120 int vboxClipboardInit (void)
    121 {
    122     Log (("vboxClipboardInit\n"));
     120int vboxClipboardInit(void)
     121{
     122    Log(("vboxClipboardInit\n"));
    123123
    124124    g_ctx.fTerminate = false;
    125125
    126     int rc = initPasteboard (&g_ctx.pasteboard);
    127     AssertRCReturn (rc, rc);
    128 
    129     rc = RTThreadCreate (&g_ctx.thread, vboxClipboardThread, &g_ctx, 0,
    130                          RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, "SHCLIP");
    131     if (RT_FAILURE (rc))
     126    int rc = initPasteboard(&g_ctx.pasteboard);
     127    AssertRCReturn(rc, rc);
     128
     129    rc = RTThreadCreate(&g_ctx.thread, vboxClipboardThread, &g_ctx, 0,
     130                        RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, "SHCLIP");
     131    if (RT_FAILURE(rc))
    132132    {
    133133        g_ctx.thread = NIL_RTTHREAD;
    134         destroyPasteboard (&g_ctx.pasteboard);
     134        destroyPasteboard(&g_ctx.pasteboard);
    135135    }
    136136
     
    139139
    140140/** Terminate the host side of the shared clipboard - called by the hgcm layer. */
    141 void vboxClipboardDestroy (void)
    142 {
    143     Log (("vboxClipboardDestroy\n"));
     141void vboxClipboardDestroy(void)
     142{
     143    Log(("vboxClipboardDestroy\n"));
    144144
    145145    /*
    146146     * Signal the termination of the polling thread and wait for it to respond.
    147147     */
    148     ASMAtomicWriteBool (&g_ctx.fTerminate, true);
    149     int rc = RTThreadUserSignal (g_ctx.thread);
    150     AssertRC (rc);
    151     rc = RTThreadWait (g_ctx.thread, RT_INDEFINITE_WAIT, NULL);
    152     AssertRC (rc);
     148    ASMAtomicWriteBool(&g_ctx.fTerminate, true);
     149    int rc = RTThreadUserSignal(g_ctx.thread);
     150    AssertRC(rc);
     151    rc = RTThreadWait(g_ctx.thread, RT_INDEFINITE_WAIT, NULL);
     152    AssertRC(rc);
    153153
    154154    /*
    155155     * Destroy the pasteboard and uninitialize the global context record.
    156156     */
    157     destroyPasteboard (&g_ctx.pasteboard);
     157    destroyPasteboard(&g_ctx.pasteboard);
    158158    g_ctx.thread = NIL_RTTHREAD;
    159159    g_ctx.pClient = NULL;
     
    167167 * @returns RT status code
    168168 */
    169 int vboxClipboardConnect (VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
     169int vboxClipboardConnect(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 = vboxClipboardSync(pClient);
    185185
    186186    VBoxSvcClipboardUnlock();
     
    192192 * after a save and restore of the guest.
    193193 */
    194 int vboxClipboardSync (VBOXCLIPBOARDCLIENTDATA *pClient)
     194int vboxClipboardSync(VBOXCLIPBOARDCLIENTDATA *pClient)
    195195{
    196196    /* Sync the host clipboard content with the client. */
    197197    VBoxSvcClipboardLock();
    198     int rc = vboxClipboardChanged (pClient->pCtx);
     198    int rc = vboxClipboardChanged(pClient->pCtx);
    199199    VBoxSvcClipboardUnlock();
    200200
     
    205205 * Shut down the shared clipboard subsystem and "disconnect" the guest.
    206206 */
    207 void vboxClipboardDisconnect (VBOXCLIPBOARDCLIENTDATA *pClient)
    208 {
    209     Log (("vboxClipboardDisconnect\n"));
     207void vboxClipboardDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
     208{
     209    Log(("vboxClipboardDisconnect\n"));
    210210
    211211    VBoxSvcClipboardLock();
     
    221221 * @param u32Formats Clipboard formats the guest is offering
    222222 */
    223 void vboxClipboardFormatAnnounce (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
    224 {
    225     Log (("vboxClipboardFormatAnnounce u32Formats %02X\n", u32Formats));
     223void vboxClipboardFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
     224{
     225    Log(("vboxClipboardFormatAnnounce u32Formats %02X\n", u32Formats));
    226226    if (u32Formats == 0)
    227227    {
     
    230230    }
    231231
    232     vboxSvcClipboardReportMsg (pClient, VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA,
    233                                u32Formats);
     232    vboxSvcClipboardReportMsg(pClient, VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA, u32Formats);
    234233}
    235234
     
    243242 * @param pcbActual Where to write the actual size of the written data
    244243 */
    245 int vboxClipboardReadData (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format,
    246                            void *pv, uint32_t cb, uint32_t * pcbActual)
     244int vboxClipboardReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format,
     245                          void *pv, uint32_t cb, uint32_t *pcbActual)
    247246{
    248247    VBoxSvcClipboardLock();
     
    250249    /* Default to no data available. */
    251250    *pcbActual = 0;
    252     int rc = readFromPasteboard (pClient->pCtx->pasteboard, u32Format, pv, cb, pcbActual);
     251    int rc = readFromPasteboard(pClient->pCtx->pasteboard, u32Format, pv, cb, pcbActual);
    253252
    254253    VBoxSvcClipboardUnlock();
     
    264263 * @param u32Format The format of the data written
    265264 */
    266 void vboxClipboardWriteData (VBOXCLIPBOARDCLIENTDATA *pClient, void *pv,
    267                              uint32_t cb, uint32_t u32Format)
    268 {
    269     VBoxSvcClipboardLock();
    270 
    271     writeToPasteboard (pClient->pCtx->pasteboard, pv, cb, u32Format);
    272 
    273     VBoxSvcClipboardUnlock();
    274 }
     265void vboxClipboardWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb, uint32_t u32Format)
     266{
     267    VBoxSvcClipboardLock();
     268
     269    writeToPasteboard(pClient->pCtx->pasteboard, pv, cb, u32Format);
     270
     271    VBoxSvcClipboardUnlock();
     272}
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11-stubs.cpp

    r78160 r78179  
    4040
    4141/** Initialise the host side of the shared clipboard - called by the hgcm layer. */
    42 int vboxClipboardInit (void)
     42int vboxClipboardInit(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 vboxClipboardDestroy(void)
    5050{
    5151    LogFlowFunc(("called, returning.\n"));
     
    5959  * @returns RT status code
    6060  */
    61 int vboxClipboardConnect (VBOXCLIPBOARDCLIENTDATA *pClient,
    62                           bool fHeadless)
     61int vboxClipboardConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
    6362{
    6463    RT_NOREF(pClient, fHeadless);
     
    7170 * after a save and restore of the guest.
    7271 */
    73 int vboxClipboardSync (VBOXCLIPBOARDCLIENTDATA * /* pClient */)
     72int vboxClipboardSync(VBOXCLIPBOARDCLIENTDATA * /* pClient */)
    7473{
    7574    LogFlowFunc(("called, returning VINF_SUCCESS.\n"));
     
    8281 * @param   pClient    Structure containing context information about the guest system
    8382 */
    84 void vboxClipboardDisconnect (VBOXCLIPBOARDCLIENTDATA *pClient)
     83void vboxClipboardDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
    8584{
    8685    RT_NOREF(pClient);
     
    9594 * @param u32Formats Clipboard formats the guest is offering
    9695 */
    97 void vboxClipboardFormatAnnounce (VBOXCLIPBOARDCLIENTDATA *pClient,
    98                                   uint32_t u32Formats)
     96void vboxClipboardFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
    9997{
    10098    RT_NOREF(pClient, u32Formats);
     
    111109 * @param pcbActual Where to write the actual size of the written data
    112110 */
    113 int vboxClipboardReadData (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format,
    114                            void *pv, uint32_t cb, uint32_t *pcbActual)
     111int vboxClipboardReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format,
     112                          void *pv, uint32_t cb, uint32_t *pcbActual)
    115113{
    116114    RT_NOREF(pClient, u32Format, pv, cb);
     
    129127 * @param u32Format The format of the data written
    130128 */
    131 void vboxClipboardWriteData (VBOXCLIPBOARDCLIENTDATA *pClient, void *pv,
    132                              uint32_t cb, uint32_t u32Format)
     129void vboxClipboardWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb,
     130                            uint32_t u32Format)
    133131{
    134132    RT_NOREF(pClient, pv, cb, u32Format);
     
    136134}
    137135
     136
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp

    r78160 r78179  
    5656     * the backend is responsible for ensuring that this does not happen. */
    5757    VBOXCLIPBOARDREQFROMVBOX *pReq;
    58 
    5958    /** Pointer to the opaque X11 backend structure */
    6059    CLIPBACKEND *pBackend;
     
    7473 * @note  Host glue code
    7574 */
    76 void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx,
    77                                       uint32_t u32Formats)
     75void ClipReportX11Formats(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Formats)
    7876{
    7977    LogRelFlowFunc(("called.  pCtx=%p, u32Formats=%02X\n", pCtx, u32Formats));
     
    8785 * @note  Host glue code
    8886 */
    89 int vboxClipboardInit (void)
     87int vboxClipboardInit(void)
    9088{
    9189    return VINF_SUCCESS;
     
    9694 * @note  host glue code
    9795 */
    98 void vboxClipboardDestroy (void)
     96void vboxClipboardDestroy(void)
    9997{
    10098
     
    107105 *        the clipboard and leave ownership to X11.
    108106 */
    109 int vboxClipboardConnect (VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
     107int vboxClipboardConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
    110108{
    111109    int rc = VINF_SUCCESS;
     
    113111
    114112    LogRel(("Starting host clipboard service\n"));
    115     VBOXCLIPBOARDCONTEXT *pCtx =
    116         (VBOXCLIPBOARDCONTEXT *) RTMemAllocZ(sizeof(VBOXCLIPBOARDCONTEXT));
     113    VBOXCLIPBOARDCONTEXT *pCtx = (VBOXCLIPBOARDCONTEXT *)RTMemAllocZ(sizeof(VBOXCLIPBOARDCONTEXT));
    117114    if (!pCtx)
    118115        rc = VERR_NO_MEMORY;
     
    147144 * @note  Host glue code
    148145 */
    149 int vboxClipboardSync (VBOXCLIPBOARDCLIENTDATA *pClient)
     146int vboxClipboardSync(VBOXCLIPBOARDCLIENTDATA *pClient)
    150147{
    151148    /* Tell the guest we have no data in case X11 is not available.  If
    152149     * there is data in the host clipboard it will automatically be sent to
    153150     * the guest when the clipboard starts up. */
    154     vboxSvcClipboardReportMsg (pClient,
    155                                VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS, 0);
     151    vboxSvcClipboardReportMsg(pClient, VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS, 0);
     152    /** @todo r=andy Check rc code. */
    156153    return VINF_SUCCESS;
    157154}
     
    161158 * @note  Host glue code
    162159 */
    163 void vboxClipboardDisconnect (VBOXCLIPBOARDCLIENTDATA *pClient)
     160void vboxClipboardDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
    164161{
    165162    LogRelFlow(("vboxClipboardDisconnect\n"));
     
    192189 * @note  Host glue code
    193190 */
    194 void vboxClipboardFormatAnnounce (VBOXCLIPBOARDCLIENTDATA *pClient,
    195                                   uint32_t u32Formats)
    196 {
    197     LogRelFlowFunc(("called.  pClient=%p, u32Formats=%02X\n", pClient,
    198                  u32Formats));
    199     ClipAnnounceFormatToX11 (pClient->pCtx->pBackend, u32Formats);
     191void vboxClipboardFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
     192{
     193    LogRelFlowFunc(("called.  pClient=%p, u32Formats=%02X\n", pClient, u32Formats));
     194
     195    ClipAnnounceFormatToX11(pClient->pCtx->pBackend, u32Formats);
    200196}
    201197
     
    229225 *
    230226 */
    231 int vboxClipboardReadData (VBOXCLIPBOARDCLIENTDATA *pClient,
    232                            uint32_t u32Format, void *pv, uint32_t cb,
    233                            uint32_t *pcbActual)
     227int vboxClipboardReadData(VBOXCLIPBOARDCLIENTDATA *pClient,
     228                          uint32_t u32Format, void *pv, uint32_t cb,
     229                          uint32_t *pcbActual)
    234230{
    235231    LogRelFlowFunc(("pClient=%p, u32Format=%02X, pv=%p, cb=%u, pcbActual=%p",
    236                  pClient, u32Format, pv, cb, pcbActual));
     232                    pClient, u32Format, pv, cb, pcbActual));
    237233
    238234    int rc = VINF_SUCCESS;
    239     CLIPREADCBREQ *pReq = (CLIPREADCBREQ *) RTMemAlloc(sizeof(CLIPREADCBREQ));
     235    CLIPREADCBREQ *pReq = (CLIPREADCBREQ *)RTMemAlloc(sizeof(CLIPREADCBREQ));
    240236    if (!pReq)
    241237        rc = VERR_NO_MEMORY;
     
    270266    if (cb <= pReq->cb && cb != 0)
    271267        memcpy(pReq->pv, pv, cb);
     268
    272269    RTMemFree(pReq);
     270
    273271    vboxSvcClipboardCompleteReadData(pCtx->pClient, rc, cb);
    274272}
     
    293291{
    294292    int rc = VINF_SUCCESS;
     293
    295294    LogRelFlowFunc(("pCtx=%p, pReq=%p, u32Format=%02X\n", pCtx, pReq, u32Format));
     295
    296296    /* Request data from VBox */
    297297    vboxSvcClipboardReportMsg(pCtx->pClient,
     
    321321/** Post a request for clipboard data to VBox/the guest and wait for it to be
    322322 * completed. */
    323 static int clipRequestDataFromVBox(VBOXCLIPBOARDCONTEXT *pCtx,
    324                                           VBOXCLIPBOARDREQFROMVBOX *pReq,
    325                                           uint32_t u32Format)
     323static int clipRequestDataFromVBox(VBOXCLIPBOARDCONTEXT *pCtx, VBOXCLIPBOARDREQFROMVBOX *pReq, uint32_t u32Format)
    326324{
    327325    int rc = VINF_SUCCESS;
    328     LogRelFlowFunc(("pCtx=%p, pReq=%p, u32Format=%02X\n", pCtx, pReq,
    329                  u32Format));
     326
     327    LogRelFlowFunc(("pCtx=%p, pReq=%p, u32Format=%02X\n", pCtx, pReq, u32Format));
     328
    330329    /* Start by "posting" the request for the next invocation of
    331330     * vboxClipboardWriteData. */
     
    358357 * @note   Host glue code.
    359358 */
    360 int ClipRequestDataForX11 (VBOXCLIPBOARDCONTEXT *pCtx,
    361                                    uint32_t u32Format, void **ppv,
    362                                    uint32_t *pcb)
     359int ClipRequestDataForX11(VBOXCLIPBOARDCONTEXT *pCtx, uint32_t u32Format, void **ppv, uint32_t *pcb)
    363360{
    364361    VBOXCLIPBOARDREQFROMVBOX request = { NULL, 0, 0, NIL_RTSEMEVENT };
    365362
    366     LogRelFlowFunc(("pCtx=%p, u32Format=%02X, ppv=%p, pcb=%p\n", pCtx,
    367                  u32Format, ppv, pcb));
     363    LogRelFlowFunc(("pCtx=%p, u32Format=%02X, ppv=%p, pcb=%p\n", pCtx, u32Format, ppv, pcb));
     364
    368365    if (pCtx->fShuttingDown)
    369366    {
     
    378375        RTSemEventDestroy(request.finished);
    379376    }
     377
    380378    if (RT_SUCCESS(rc))
    381379    {
     
    383381        *pcb = request.cb;
    384382    }
     383
    385384    LogRelFlowFunc(("returning %Rrc\n", rc));
     385
    386386    if (RT_SUCCESS(rc))
    387         LogRelFlowFunc(("*ppv=%.*ls, *pcb=%u\n", *pcb / 2, *ppv, *pcb));
     387        LogRelFlowFunc(("*ppv=%.*ls, *pcb=%u\n",*pcb / 2,*ppv,*pcb));
     388
    388389    return rc;
    389390}
     
    398399 * @note   Host glue code
    399400 */
    400 void vboxClipboardWriteData (VBOXCLIPBOARDCLIENTDATA *pClient,
    401                              void *pv, uint32_t cb, uint32_t u32Format)
    402 {
    403     LogRelFlowFunc (("called.  pClient=%p, pv=%p (%.*ls), cb=%u, u32Format=%02X\n",
    404                   pClient, pv, cb / 2, pv, cb, u32Format));
     401void vboxClipboardWriteData(VBOXCLIPBOARDCLIENTDATA *pClient,
     402                            void *pv, uint32_t cb, uint32_t u32Format)
     403{
     404    LogRelFlowFunc(("called.  pClient=%p, pv=%p (%.*ls), cb=%u, u32Format=%02X\n",
     405                    pClient, pv, cb / 2, pv, cb, u32Format));
    405406
    406407    VBOXCLIPBOARDCONTEXT *pCtx = pClient->pCtx;
    407     /* Grab the mutex and check whether there is a pending request for data.
    408     */
     408
     409    /* Grab the mutex and check whether there is a pending request for data. */
    409410    RTCritSectEnter(&pCtx->clipboardMutex);
     411
    410412    VBOXCLIPBOARDREQFROMVBOX *pReq = pCtx->pReq;
    411413    if (pReq != NULL)
     
    424426        pCtx->pReq = NULL;
    425427    }
     428
    426429    RTCritSectLeave(&pCtx->clipboardMutex);
    427430}
    428431
    429432#ifdef TESTCASE
    430 #include <iprt/initterm.h>
    431 #include <iprt/stream.h>
    432 
    433 #define TEST_NAME "tstClipboardX11-2"
     433# include <iprt/initterm.h>
     434# include <iprt/stream.h>
     435
     436# define TEST_NAME "tstClipboardX11-2"
    434437
    435438struct _CLIPBACKEND
     
    460463};
    461464
    462 void vboxSvcClipboardReportMsg (VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Msg, uint32_t u32Formats)
    463 {
    464     RT_NOREF1(u32Formats);
     465void vboxSvcClipboardReportMsg(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Msg, uint32_t u32Formats)
     466{
     467    RT_NOREF(u32Formats);
    465468    CLIPBACKEND *pBackend = pClient->pCtx->pBackend;
    466     if (   (u32Msg == VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA)
     469
     470    if ((u32Msg == VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA)
    467471        && !pBackend->writeData.timeout)
    468472        vboxClipboardWriteData(pClient, pBackend->writeData.pv,
     
    480484}
    481485
    482 CLIPBACKEND *ClipConstructX11(VBOXCLIPBOARDCONTEXT *pFrontend, bool)
    483 {
    484     RT_NOREF1(pFrontend);
     486CLIPBACKEND* ClipConstructX11(VBOXCLIPBOARDCONTEXT *pFrontend, bool)
     487{
     488    RT_NOREF(pFrontend);
    485489    return (CLIPBACKEND *)RTMemAllocZ(sizeof(CLIPBACKEND));
    486490}
     
    492496
    493497int ClipStartX11(CLIPBACKEND *pBackend, bool)
     498{
     499    RT_NOREF(pBackend);
     500    return VINF_SUCCESS;
     501}
     502
     503int ClipStopX11(CLIPBACKEND *pBackend)
    494504{
    495505    RT_NOREF1(pBackend);
     
    497507}
    498508
    499 int ClipStopX11(CLIPBACKEND *pBackend)
    500 {
    501     RT_NOREF1(pBackend);
    502     return VINF_SUCCESS;
    503 }
    504 
    505 void ClipAnnounceFormatToX11(CLIPBACKEND *pBackend,
    506                                     uint32_t u32Formats)
     509void ClipAnnounceFormatToX11(CLIPBACKEND *pBackend, uint32_t u32Formats)
    507510{
    508511    pBackend->formats = u32Formats;
     
    547550    else
    548551    {
    549         if (   pBackend->readData.format !=
    550                        VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT
     552        if (   pBackend->readData.format != VBOX_SHARED_CLIPBOARD_FMT_UNICODETEXT
    551553            || pBackend->readData.pReq->pv != &u32Dummy
    552554            || pBackend->readData.pReq->cb != 42
     
    614616}
    615617#endif  /* TESTCASE */
     618
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