VirtualBox

Changeset 78579 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 18, 2019 3:27:22 PM (6 years ago)
Author:
vboxsync
Message:

Shared Clipboard/URI: Renaming.

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

Legend:

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

    r78578 r78579  
    6666    uint32_t u32RequestedFormat;
    6767
    68 } VBOXCLIPBOARDCLIENTDATA, *PVBOXCLIPBOARDCLIENTDATA;
     68} VBOXCLIPBOARDSVCCTX, *PVBOXCLIPBOARDSVCCTX;
    6969
    7070/*
    7171 * The service functions. Locking is between the service thread and the platform dependent windows thread.
    7272 */
    73 void vboxSvcClipboardReportMsg(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Msg, uint32_t u32Formats);
    74 void vboxSvcClipboardCompleteReadData(VBOXCLIPBOARDCLIENTDATA *pClient, int rc, uint32_t cbActual);
     73void vboxSvcClipboardReportMsg(PVBOXCLIPBOARDSVCCTX pSvcCtx, uint32_t u32Msg, uint32_t u32Formats);
     74void vboxSvcClipboardCompleteReadData(PVBOXCLIPBOARDSVCCTX pSvcCtx, int rc, uint32_t cbActual);
    7575
    7676/*
     
    8080void VBoxClipboardSvcImplDestroy(void);
    8181
    82 int VBoxClipboardSvcImplConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless);
    83 void VBoxClipboardSvcImplDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient);
    84 void VBoxClipboardSvcImplFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats);
    85 int VBoxClipboardSvcImplReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format, void *pv, uint32_t cb, uint32_t *pcbActual);
    86 void VBoxClipboardSvcImplWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb, uint32_t u32Format);
    87 int VBoxClipboardSvcImplSync(VBOXCLIPBOARDCLIENTDATA *pClient);
     82int VBoxClipboardSvcImplConnect(PVBOXCLIPBOARDSVCCTX pSvcCtx, bool fHeadless);
     83void VBoxClipboardSvcImplDisconnect(PVBOXCLIPBOARDSVCCTX pSvcCtx);
     84void VBoxClipboardSvcImplFormatAnnounce(PVBOXCLIPBOARDSVCCTX pSvcCtx, uint32_t u32Formats);
     85int VBoxClipboardSvcImplReadData(PVBOXCLIPBOARDSVCCTX pSvcCtx, uint32_t u32Format, void *pv, uint32_t cb, uint32_t *pcbActual);
     86void VBoxClipboardSvcImplWriteData(PVBOXCLIPBOARDSVCCTX pSvcCtx, void *pv, uint32_t cb, uint32_t u32Format);
     87int VBoxClipboardSvcImplSync(PVBOXCLIPBOARDSVCCTX pSvcCtx);
    8888
    8989/* Host unit testing interface */
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp

    r78578 r78579  
    4444    PasteboardRef pasteboard;
    4545
    46     VBOXCLIPBOARDCLIENTDATA *pClient;
     46    PVBOXCLIPBOARDSVCCTX pSvcCtx;
    4747};
    4848
     
    167167 * @returns RT status code
    168168 */
    169 int VBoxClipboardSvcImplConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
     169int VBoxClipboardSvcImplConnect(PVBOXCLIPBOARDSVCCTX pSvcCtx, bool fHeadless)
    170170{
    171171    NOREF(fHeadless);
     
    192192 * after a save and restore of the guest.
    193193 */
    194 int VBoxClipboardSvcImplSync(VBOXCLIPBOARDCLIENTDATA *pClient)
     194int VBoxClipboardSvcImplSync(PVBOXCLIPBOARDSVCCTX pSvcCtx)
    195195{
    196196    /* Sync the host clipboard content with the client. */
     
    205205 * Shut down the shared clipboard subsystem and "disconnect" the guest.
    206206 */
    207 void VBoxClipboardSvcImplDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
     207void VBoxClipboardSvcImplDisconnect(PVBOXCLIPBOARDSVCCTX pSvcCtx)
    208208{
    209209    Log(("vboxClipboardDisconnect\n"));
     
    221221 * @param u32Formats Clipboard formats the guest is offering
    222222 */
    223 void VBoxClipboardSvcImplFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
     223void VBoxClipboardSvcImplFormatAnnounce(PVBOXCLIPBOARDSVCCTX pSvcCtx, 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 VBoxClipboardSvcImplReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format,
     244int VBoxClipboardSvcImplReadData(PVBOXCLIPBOARDSVCCTX pSvcCtx, 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 VBoxClipboardSvcImplWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb, uint32_t u32Format)
     265void VBoxClipboardSvcImplWriteData(PVBOXCLIPBOARDSVCCTX pSvcCtx, void *pv, uint32_t cb, uint32_t u32Format)
    266266{
    267267    VBoxSvcClipboardLock();
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp

    r78578 r78579  
    6161    RTSEMEVENT               hRenderEvent;
    6262    /** Structure for keeping and communicating with client data (from the guest). */
    63     PVBOXCLIPBOARDCLIENTDATA pClient;
     63    PVBOXCLIPBOARDSVCCTX    pClient;
    6464    /** Windows-specific context data. */
    6565    VBOXCLIPBOARDWINCTX      Win;
     
    602602}
    603603
    604 int VBoxClipboardSvcImplConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
     604int VBoxClipboardSvcImplConnect(PVBOXCLIPBOARDSVCCTX pSvcCtx, bool fHeadless)
    605605{
    606606    RT_NOREF(fHeadless);
     
    624624}
    625625
    626 int VBoxClipboardSvcImplSync(VBOXCLIPBOARDCLIENTDATA *pClient)
     626int VBoxClipboardSvcImplSync(PVBOXCLIPBOARDSVCCTX pSvcCtx)
    627627{
    628628    /* Sync the host clipboard content with the client. */
     
    630630}
    631631
    632 void VBoxClipboardSvcImplDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
     632void VBoxClipboardSvcImplDisconnect(PVBOXCLIPBOARDSVCCTX pSvcCtx)
    633633{
    634634    RT_NOREF(pClient);
     
    639639}
    640640
    641 void VBoxClipboardSvcImplFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
     641void VBoxClipboardSvcImplFormatAnnounce(PVBOXCLIPBOARDSVCCTX pSvcCtx, uint32_t u32Formats)
    642642{
    643643    AssertPtrReturnVoid(pClient);
     
    682682#endif
    683683
    684 int VBoxClipboardSvcImplReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format, void *pv, uint32_t cb, uint32_t *pcbActual)
     684int VBoxClipboardSvcImplReadData(PVBOXCLIPBOARDSVCCTX pSvcCtx, uint32_t u32Format, void *pv, uint32_t cb, uint32_t *pcbActual)
    685685{
    686686    AssertPtrReturn(pClient,       VERR_INVALID_POINTER);
     
    816816}
    817817
    818 void VBoxClipboardSvcImplWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb, uint32_t u32Format)
     818void VBoxClipboardSvcImplWriteData(PVBOXCLIPBOARDSVCCTX pSvcCtx, void *pv, uint32_t cb, uint32_t u32Format)
    819819{
    820820    LogFlowFuncEnter();
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11-stubs.cpp

    r78578 r78579  
    5959  * @returns RT status code
    6060  */
    61 int VBoxClipboardSvcImplConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
     61int VBoxClipboardSvcImplConnect(PVBOXCLIPBOARDSVCCTX pSvcCtx, bool fHeadless)
    6262{
    6363    RT_NOREF(pClient, fHeadless);
     
    7070 * after a save and restore of the guest.
    7171 */
    72 int VBoxClipboardSvcImplSync(VBOXCLIPBOARDCLIENTDATA * /* pClient */)
     72int VBoxClipboardSvcImplSync(PVBOXCLIPBOARDSVCCTX /* pClient */)
    7373{
    7474    LogFlowFunc(("called, returning VINF_SUCCESS.\n"));
     
    8181 * @param   pClient    Structure containing context information about the guest system
    8282 */
    83 void VBoxClipboardSvcImplDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
     83void VBoxClipboardSvcImplDisconnect(PVBOXCLIPBOARDSVCCTX pSvcCtx)
    8484{
    8585    RT_NOREF(pClient);
     
    9494 * @param u32Formats Clipboard formats the guest is offering
    9595 */
    96 void VBoxClipboardSvcImplFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
     96void VBoxClipboardSvcImplFormatAnnounce(PVBOXCLIPBOARDSVCCTX pSvcCtx, 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 VBoxClipboardSvcImplReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format,
     111int VBoxClipboardSvcImplReadData(PVBOXCLIPBOARDSVCCTX pSvcCtx, 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 VBoxClipboardSvcImplWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb,
     129void VBoxClipboardSvcImplWriteData(PVBOXCLIPBOARDSVCCTX pSvcCtx, void *pv, uint32_t cb,
    130130                            uint32_t u32Format)
    131131{
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp

    r78578 r78579  
    5959    CLIPBACKEND *pBackend;
    6060    /** Pointer to the VBox host client data structure. */
    61     VBOXCLIPBOARDCLIENTDATA *pClient;
     61    PVBOXCLIPBOARDSVCCTX pSvcCtx;
    6262    /** We set this when we start shutting down as a hint not to post any new
    6363     * requests. */
     
    105105 *        the clipboard and leave ownership to X11.
    106106 */
    107 int VBoxClipboardSvcImplConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
     107int VBoxClipboardSvcImplConnect(PVBOXCLIPBOARDSVCCTX pSvcCtx, bool fHeadless)
    108108{
    109109    int rc = VINF_SUCCESS;
     
    144144 * @note  Host glue code
    145145 */
    146 int VBoxClipboardSvcImplSync(VBOXCLIPBOARDCLIENTDATA *pClient)
     146int VBoxClipboardSvcImplSync(PVBOXCLIPBOARDSVCCTX pSvcCtx)
    147147{
    148148    /* Tell the guest we have no data in case X11 is not available.  If
     
    158158 * @note  Host glue code
    159159 */
    160 void VBoxClipboardSvcImplDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
     160void VBoxClipboardSvcImplDisconnect(PVBOXCLIPBOARDSVCCTX pSvcCtx)
    161161{
    162162    LogRelFlow(("vboxClipboardDisconnect\n"));
     
    189189 * @note  Host glue code
    190190 */
    191 void VBoxClipboardSvcImplFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
     191void VBoxClipboardSvcImplFormatAnnounce(PVBOXCLIPBOARDSVCCTX pSvcCtx, uint32_t u32Formats)
    192192{
    193193    LogRelFlowFunc(("called.  pClient=%p, u32Formats=%02X\n", pClient, u32Formats));
     
    225225 *
    226226 */
    227 int VBoxClipboardSvcImplReadData(VBOXCLIPBOARDCLIENTDATA *pClient,
     227int VBoxClipboardSvcImplReadData(PVBOXCLIPBOARDSVCCTX pSvcCtx,
    228228                          uint32_t u32Format, void *pv, uint32_t cb,
    229229                          uint32_t *pcbActual)
     
    399399 * @note   Host glue code
    400400 */
    401 void VBoxClipboardSvcImplWriteData(VBOXCLIPBOARDCLIENTDATA *pClient,
     401void VBoxClipboardSvcImplWriteData(PVBOXCLIPBOARDSVCCTX pSvcCtx,
    402402                            void *pv, uint32_t cb, uint32_t u32Format)
    403403{
     
    463463};
    464464
    465 void vboxSvcClipboardReportMsg(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Msg, uint32_t u32Formats)
     465void vboxSvcClipboardReportMsg(PVBOXCLIPBOARDSVCCTX pSvcCtx, uint32_t u32Msg, uint32_t u32Formats)
    466466{
    467467    RT_NOREF(u32Formats);
     
    477477}
    478478
    479 void vboxSvcClipboardCompleteReadData(VBOXCLIPBOARDCLIENTDATA *pClient, int rc, uint32_t cbActual)
     479void vboxSvcClipboardCompleteReadData(PVBOXCLIPBOARDSVCCTX pSvcCtx, int rc, uint32_t cbActual)
    480480{
    481481    CLIPBACKEND *pBackend = pClient->pCtx->pBackend;
     
    522522int main()
    523523{
    524     VBOXCLIPBOARDCLIENTDATA client;
     524    VBOXCLIPBOARDSVCCTX client;
    525525    unsigned cErrors = 0;
    526526    int rc = RTR3InitExeNoArguments(0);
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp

    r78578 r78579  
    102102static void *g_pvExtension;
    103103
    104 static VBOXCLIPBOARDCLIENTDATA *g_pClient;
     104static PVBOXCLIPBOARDSVCCTX g_pClient;
    105105
    106106/* Serialization of data reading and format announcements from the RDP client. */
     
    200200 * Executed under the clipboard lock.
    201201 */
    202 static bool vboxSvcClipboardReturnMsg(VBOXCLIPBOARDCLIENTDATA *pClient, VBOXHGCMSVCPARM paParms[])
     202static bool vboxSvcClipboardReturnMsg(PVBOXCLIPBOARDSVCCTX pSvcCtx, VBOXHGCMSVCPARM paParms[])
    203203{
    204204    /* Message priority is taken into account. */
     
    254254}
    255255
    256 void vboxSvcClipboardReportMsg(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Msg, uint32_t u32Formats)
     256void vboxSvcClipboardReportMsg(PVBOXCLIPBOARDSVCCTX pSvcCtx, uint32_t u32Msg, uint32_t u32Formats)
    257257{
    258258    AssertPtrReturnVoid(pClient);
     
    366366    RT_NOREF(u32ClientID);
    367367
    368     VBOXCLIPBOARDCLIENTDATA *pClient = (VBOXCLIPBOARDCLIENTDATA *)pvClient;
     368    PVBOXCLIPBOARDSVCCTX pSvcCtx = (PVBOXCLIPBOARDSVCCTX)pvClient;
    369369
    370370    LogFunc(("u32ClientID = %d\n", u32ClientID));
     
    386386{
    387387    RT_NOREF(fRequestor, fRestoring);
    388     VBOXCLIPBOARDCLIENTDATA *pClient = (VBOXCLIPBOARDCLIENTDATA *)pvClient;
     388    PVBOXCLIPBOARDSVCCTX pSvcCtx = (PVBOXCLIPBOARDSVCCTX)pvClient;
    389389
    390390    int rc = VINF_SUCCESS;
     
    431431             u32ClientID, u32Function, cParms, paParms));
    432432
    433     VBOXCLIPBOARDCLIENTDATA *pClient = (VBOXCLIPBOARDCLIENTDATA *)pvClient;
     433    PVBOXCLIPBOARDSVCCTX pSvcCtx = (PVBOXCLIPBOARDSVCCTX)pvClient;
    434434
    435435    bool fAsynchronousProcessing = false;
     
    713713 * then complete it, otherwise return.  See the protocol description in the
    714714 * shared clipboard module description. */
    715 void vboxSvcClipboardCompleteReadData(VBOXCLIPBOARDCLIENTDATA *pClient, int rc, uint32_t cbActual)
     715void vboxSvcClipboardCompleteReadData(PVBOXCLIPBOARDSVCCTX pSvcCtx, int rc, uint32_t cbActual)
    716716{
    717717    VBOXHGCMCALLHANDLE callHandle = NULL;
     
    804804static SSMFIELD const g_aClipboardClientDataFields[] =
    805805{
    806     SSMFIELD_ENTRY(VBOXCLIPBOARDCLIENTDATA, u32ClientID),  /* for validation purposes */
    807     SSMFIELD_ENTRY(VBOXCLIPBOARDCLIENTDATA, fHostMsgQuit),
    808     SSMFIELD_ENTRY(VBOXCLIPBOARDCLIENTDATA, fHostMsgReadData),
    809     SSMFIELD_ENTRY(VBOXCLIPBOARDCLIENTDATA, fHostMsgFormats),
    810     SSMFIELD_ENTRY(VBOXCLIPBOARDCLIENTDATA, u32RequestedFormat),
     806    SSMFIELD_ENTRY(VBOXCLIPBOARDSVCCTX, u32ClientID),  /* for validation purposes */
     807    SSMFIELD_ENTRY(VBOXCLIPBOARDSVCCTX, fHostMsgQuit),
     808    SSMFIELD_ENTRY(VBOXCLIPBOARDSVCCTX, fHostMsgReadData),
     809    SSMFIELD_ENTRY(VBOXCLIPBOARDSVCCTX, fHostMsgFormats),
     810    SSMFIELD_ENTRY(VBOXCLIPBOARDSVCCTX, u32RequestedFormat),
    811811    SSMFIELD_ENTRY_TERM()
    812812};
     
    826826    LogFunc(("u32ClientID = %d\n", u32ClientID));
    827827
    828     VBOXCLIPBOARDCLIENTDATA *pClient = (VBOXCLIPBOARDCLIENTDATA *)pvClient;
     828    PVBOXCLIPBOARDSVCCTX pSvcCtx = (PVBOXCLIPBOARDSVCCTX)pvClient;
    829829
    830830    /* This field used to be the length. We're using it as a version field
     
    891891    LogFunc(("u32ClientID = %d\n", u32ClientID));
    892892
    893     VBOXCLIPBOARDCLIENTDATA *pClient = (VBOXCLIPBOARDCLIENTDATA *)pvClient;
     893    PVBOXCLIPBOARDSVCCTX pSvcCtx = (PVBOXCLIPBOARDSVCCTX)pvClient;
    894894
    895895    /* Existing client can not be in async state yet. */
     
    10531053            g_pHelpers = ptable->pHelpers;
    10541054
    1055             ptable->cbClient = sizeof(VBOXCLIPBOARDCLIENTDATA);
     1055            ptable->cbClient = sizeof(VBOXCLIPBOARDSVCCTX);
    10561056
    10571057            ptable->pfnUnload     = svcUnload;
  • trunk/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp

    r78578 r78579  
    2626extern "C" DECLCALLBACK(DECLEXPORT(int)) VBoxHGCMSvcLoad (VBOXHGCMSVCFNTABLE *ptable);
    2727
    28 static VBOXCLIPBOARDCLIENTDATA g_Client;
     28static VBOXCLIPBOARDSVCCTX g_Client;
    2929static VBOXHGCMSVCHELPERS g_Helpers = { NULL };
    3030
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