summaryrefslogtreecommitdiff
path: root/src/VBox/HostServices/SharedClipboard
diff options
context:
space:
mode:
authorvboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2020-09-01 15:06:44 +0000
committervboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f>2020-09-01 15:06:44 +0000
commit34a52e0b15ea94ff10b6400796b53a6d662f32c0 (patch)
treeab82403bfe98a7a884c7271516b7cfa8011a1746 /src/VBox/HostServices/SharedClipboard
parenteaadfbffafa49e8a1ff45659708f4e0df44f5654 (diff)
downloadVirtualBox-svn-34a52e0b15ea94ff10b6400796b53a6d662f32c0.tar.gz
Shared Clipboard: Renamed backend-specific ShClSvcDataReadXXX functions to emphasize its usage + docs.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@85980 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/HostServices/SharedClipboard')
-rw-r--r--src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp2
-rw-r--r--src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h4
-rw-r--r--src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp4
-rw-r--r--src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp4
-rw-r--r--src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp20
-rw-r--r--src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp2
6 files changed, 23 insertions, 13 deletions
diff --git a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp
index f3cd3942abb..cd850bbb8b9 100644
--- a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp
+++ b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-darwin.cpp
@@ -240,7 +240,7 @@ int ShClBackendFormatAnnounce(PSHCLCLIENT pClient, SHCLFORMATS fFormats)
/*
* Now, request the data from the guest.
*/
- return ShClSvcDataReadRequest(pClient, fFormats, NULL /* pidEvent */);
+ return ShClSvcGuestDataRequest(pClient, fFormats, NULL /* pidEvent */);
}
int ShClBackendReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, SHCLFORMAT fFormat,
diff --git a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h
index fe0e23ac93c..87f172ef581 100644
--- a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h
+++ b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-internal.h
@@ -241,8 +241,8 @@ void shClSvcClientTransfersReset(PSHCLCLIENT pClient);
* Locking is between the (host) service thread and the platform-dependent (window) thread.
* @{
*/
-int ShClSvcDataReadRequest(PSHCLCLIENT pClient, SHCLFORMATS fFormats, PSHCLEVENTID pidEvent);
-int ShClSvcDataReadSignal(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, SHCLFORMAT uFormat, void *pvData, uint32_t cbData);
+int ShClSvcGuestDataRequest(PSHCLCLIENT pClient, SHCLFORMATS fFormats, PSHCLEVENTID pidEvent);
+int ShClSvcGuestDataReceived(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx, SHCLFORMAT uFormat, void *pvData, uint32_t cbData);
int ShClSvcHostReportFormats(PSHCLCLIENT pClient, SHCLFORMATS fFormats);
uint32_t ShClSvcGetMode(void);
bool ShClSvcGetHeadless(void);
diff --git a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp
index 9dd437a6e8f..d8c889acf3b 100644
--- a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp
+++ b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-win.cpp
@@ -178,7 +178,7 @@ static int vboxClipboardSvcWinDataRead(PSHCLCONTEXT pCtx, UINT uFormat, void **p
}
SHCLEVENTID idEvent = 0;
- int rc = ShClSvcDataReadRequest(pCtx->pClient, fFormat, &idEvent);
+ int rc = ShClSvcGuestDataRequest(pCtx->pClient, fFormat, &idEvent);
if (RT_SUCCESS(rc))
{
PSHCLEVENTPAYLOAD pPayload;
@@ -833,7 +833,7 @@ int ShClBackendWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
{
LogFlowFuncEnter();
- int rc = ShClSvcDataReadSignal(pClient, pCmdCtx, uFormat, pvData, cbData);
+ int rc = ShClSvcGuestDataReceived(pClient, pCmdCtx, uFormat, pvData, cbData);
LogFlowFuncLeaveRC(rc);
return rc;
diff --git a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp
index 76c9fc171dd..54affd67c54 100644
--- a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp
+++ b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp
@@ -243,7 +243,7 @@ int ShClBackendWriteData(PSHCLCLIENT pClient,
LogFlowFunc(("pClient=%p, pv=%p, cb=%RU32, uFormat=%02X\n",
pClient, pvData, cbData, uFormat));
- int rc = ShClSvcDataReadSignal(pClient, pCmdCtx, uFormat, pvData, cbData);
+ int rc = ShClSvcGuestDataReceived(pClient, pCmdCtx, uFormat, pvData, cbData);
LogFlowFuncLeaveRC(rc);
return rc;
@@ -348,7 +348,7 @@ DECLCALLBACK(int) ShClX11RequestDataForX11Callback(PSHCLCONTEXT pCtx, SHCLFORMAT
{
/* Request data from the guest. */
SHCLEVENTID idEvent;
- rc = ShClSvcDataReadRequest(pCtx->pClient, fFormat, &idEvent);
+ rc = ShClSvcGuestDataRequest(pCtx->pClient, fFormat, &idEvent);
if (RT_SUCCESS(rc))
{
PSHCLEVENTPAYLOAD pPayload;
diff --git a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
index b76287ef9ca..5c03608cc03 100644
--- a/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
+++ b/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
@@ -1193,7 +1193,7 @@ int shClSvcClientWakeup(PSHCLCLIENT pClient)
* @param pidEvent Event ID for waiting for new data. Optional.
* Must be released by the caller with ShClEventRelease() before unregistering then.
*/
-int ShClSvcDataReadRequest(PSHCLCLIENT pClient, SHCLFORMATS fFormats, PSHCLEVENTID pidEvent)
+int ShClSvcGuestDataRequest(PSHCLCLIENT pClient, SHCLFORMATS fFormats, PSHCLEVENTID pidEvent)
{
LogFlowFuncEnter();
if (pidEvent)
@@ -1289,8 +1289,18 @@ int ShClSvcDataReadRequest(PSHCLCLIENT pClient, SHCLFORMATS fFormats, PSHCLEVENT
return rc;
}
-int ShClSvcDataReadSignal(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
- SHCLFORMAT uFormat, void *pvData, uint32_t cbData)
+/**
+ * Notifies that clipboard data from the guest has been received.
+ *
+ * @returns VBox status code.
+ * @param pClient Client the guest clipboard data was received for.
+ * @param pCmdCtx Client command context to use.
+ * @param uFormat Clipboard format of data received.
+ * @param pvData Pointer to clipboard data received.
+ * @param cbData Size (in bytes) of clipboard data received.
+ */
+int ShClSvcGuestDataReceived(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
+ SHCLFORMAT uFormat, void *pvData, uint32_t cbData)
{
AssertPtrReturn(pClient, VERR_INVALID_POINTER);
AssertPtrReturn(pCmdCtx, VERR_INVALID_POINTER);
@@ -1657,7 +1667,7 @@ int shClSvcClientWriteData(PSHCLCLIENT pClient, uint32_t cParms, VBOXHGCMSVCPARM
}
else
{
- /** @todo supply CID from client state? Setting it in ShClSvcDataReadRequest? */
+ /** @todo supply CID from client state? Setting it in ShClSvcGuestDataRequest? */
}
if (cParms == VBOX_SHCL_CPARMS_DATA_WRITE_61B)
{
@@ -2451,7 +2461,7 @@ static DECLCALLBACK(int) extCallback(uint32_t u32Function, uint32_t u32Format, v
/* The service extension wants read data from the guest. */
case VBOX_CLIPBOARD_EXT_FN_DATA_READ:
- rc = ShClSvcDataReadRequest(pClient, u32Format, NULL /* pidEvent */);
+ rc = ShClSvcGuestDataRequest(pClient, u32Format, NULL /* pidEvent */);
break;
default:
diff --git a/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp b/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp
index 0649c1d1fae..5755fb60e70 100644
--- a/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp
+++ b/src/VBox/HostServices/SharedClipboard/testcase/tstClipboardServiceHost.cpp
@@ -129,7 +129,7 @@ static void testSetTransferMode(void)
/* Adds a host data read request message to the client's message queue. */
static void testMsgAddReadData(PSHCLCLIENT pClient, SHCLFORMATS fFormats)
{
- int rc = ShClSvcDataReadRequest(pClient, fFormats, NULL /* pidEvent */);
+ int rc = ShClSvcGuestDataRequest(pClient, fFormats, NULL /* pidEvent */);
RTTESTI_CHECK_RC_OK(rc);
}