Changeset 106788 in vbox for trunk/src/VBox/Additions/x11/VBoxClient/vboxwl.cpp
- Timestamp:
- Oct 30, 2024 12:04:20 PM (5 months ago)
- svn:sync-xref-src-repo-rev:
- 165683
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/vboxwl.cpp
r106786 r106788 91 91 92 92 /** Clipboard IPC flow object. */ 93 vbcl::ipc:: clipboard::ClipboardIpc *g_oClipboardIpc;93 vbcl::ipc::data::DataIpc *g_oDataIpc; 94 94 95 95 … … 133 133 if (RT_SUCCESS(rc)) 134 134 { 135 g_o ClipboardIpc->m_pvClipboardBuf.set((uint64_t)pvBufOut);136 g_o ClipboardIpc->m_cbClipboardBuf.set((uint64_t)cbBufOut);135 g_oDataIpc->m_pvClipboardBuf.set((uint64_t)pvBufOut); 136 g_oDataIpc->m_cbClipboardBuf.set((uint64_t)cbBufOut); 137 137 g_tsGtkQuit = RTTimeMilliTS(); 138 138 } … … 225 225 226 226 /* Set formats to be sent to the host. */ 227 g_o ClipboardIpc->m_fFmts.set(fFormats);227 g_oDataIpc->m_fFmts.set(fFormats); 228 228 229 229 /* Wait for host to send clipboard format it wants to copy from guest. */ 230 uFmt = g_o ClipboardIpc->m_uFmt.wait();231 if (uFmt != g_o ClipboardIpc->m_uFmt.defaults())230 uFmt = g_oDataIpc->m_uFmt.wait(); 231 if (uFmt != g_oDataIpc->m_uFmt.defaults()) 232 232 { 233 233 /* Find target which matches to host format among reported by guest. */ … … 274 274 275 275 /* Set clipboard format which guest wants to send it to the host. */ 276 g_o ClipboardIpc->m_uFmt.set(uFmt);276 g_oDataIpc->m_uFmt.set(uFmt); 277 277 278 278 /* Wait for the host to send clipboard data in requested format. */ 279 uint32_t cbBuf = g_o ClipboardIpc->m_cbClipboardBuf.wait();280 void *pvBuf = (void *)g_o ClipboardIpc->m_pvClipboardBuf.wait();281 282 if ( cbBuf != g_o ClipboardIpc->m_cbClipboardBuf.defaults()283 && pvBuf != (void *)g_o ClipboardIpc->m_pvClipboardBuf.defaults())279 uint32_t cbBuf = g_oDataIpc->m_cbClipboardBuf.wait(); 280 void *pvBuf = (void *)g_oDataIpc->m_pvClipboardBuf.wait(); 281 282 if ( cbBuf != g_oDataIpc->m_cbClipboardBuf.defaults() 283 && pvBuf != (void *)g_oDataIpc->m_pvClipboardBuf.defaults()) 284 284 { 285 285 void *pBufOut; … … 362 362 363 363 /* Wait for host to report available clipboard formats from its buffer. */ 364 fFmts = g_o ClipboardIpc->m_fFmts.wait();365 if (fFmts != g_o ClipboardIpc->m_fFmts.defaults())364 fFmts = g_oDataIpc->m_fFmts.wait(); 365 if (fFmts != g_oDataIpc->m_fFmts.defaults()) 366 366 { 367 367 GtkTargetList *aTargetList = gtk_target_list_new(0, 0); … … 524 524 525 525 if (g_enmSessionType == VBCL_WL_CLIPBOARD_SESSION_TYPE_COPY_TO_GUEST) 526 rc = g_o ClipboardIpc->flow(vbcl::ipc::clipboard::HGCopyFlow, hIpcSession);526 rc = g_oDataIpc->flow(vbcl::ipc::data::HGCopyFlow, hIpcSession); 527 527 else if (g_enmSessionType == VBCL_WL_CLIPBOARD_SESSION_TYPE_ANNOUNCE_TO_HOST) 528 rc = g_o ClipboardIpc->flow(vbcl::ipc::clipboard::GHAnnounceAndCopyFlow, hIpcSession);528 rc = g_oDataIpc->flow(vbcl::ipc::data::GHAnnounceAndCopyFlow, hIpcSession); 529 529 else if (g_enmSessionType == VBCL_WL_CLIPBOARD_SESSION_TYPE_COPY_TO_HOST) 530 rc = g_o ClipboardIpc->flow(vbcl::ipc::clipboard::GHCopyFlow, hIpcSession);530 rc = g_oDataIpc->flow(vbcl::ipc::data::GHCopyFlow, hIpcSession); 531 531 532 532 return rc; … … 579 579 if (RT_SUCCESS(rc)) 580 580 { 581 g_o ClipboardIpc = new vbcl::ipc::clipboard::ClipboardIpc();582 if (RT_VALID_PTR(g_o ClipboardIpc))581 g_oDataIpc = new vbcl::ipc::data::DataIpc(); 582 if (RT_VALID_PTR(g_oDataIpc)) 583 583 { 584 g_o ClipboardIpc->init(vbcl::ipc::FLOW_DIRECTION_CLIENT, g_uSessionId);584 g_oDataIpc->init(vbcl::ipc::FLOW_DIRECTION_CLIENT, g_uSessionId); 585 585 586 586 rc = vboxwl_ipc_flow(hIpcSession); … … 596 596 g_uSessionId, rc, rcThread); 597 597 598 g_o ClipboardIpc->reset();599 delete g_o ClipboardIpc;598 g_oDataIpc->reset(); 599 delete g_oDataIpc; 600 600 } 601 601 else
Note:
See TracChangeset
for help on using the changeset viewer.