VirtualBox

source: vbox/trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11-stubs.cpp@ 94348

Last change on this file since 94348 was 93919, checked in by vboxsync, 3 years ago

Shared Clipboard: Resolved a @todo (renamed ShClBackendFormatAnnounce -> ShClBackendReportFormats).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1/* $Id: VBoxSharedClipboardSvc-x11-stubs.cpp 93919 2022-02-24 13:59:11Z vboxsync $*/
2/** @file
3 * Shared Clipboard Service - Linux host, a stub version with no functionality for use on headless hosts.
4 */
5
6/*
7 * Copyright (C) 2006-2022 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18
19/*********************************************************************************************************************************
20* Header Files *
21*********************************************************************************************************************************/
22#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
23#include <VBox/HostServices/VBoxClipboardSvc.h>
24
25#include <iprt/alloc.h>
26#include <iprt/asm.h> /* For atomic operations */
27#include <iprt/assert.h>
28#include <iprt/mem.h>
29#include <iprt/string.h>
30#include <iprt/thread.h>
31#include <iprt/process.h>
32#include <iprt/semaphore.h>
33#include <string.h>
34#include <stdio.h>
35#include <stdint.h>
36
37#include "VBoxSharedClipboardSvc-internal.h"
38
39
40/*
41 * Initialise the host side of the shared clipboard - called by the hgcm layer.
42 */
43int ShClBackendInit(PSHCLBACKEND pBackend, VBOXHGCMSVCFNTABLE *pTable)
44{
45 RT_NOREF(pTable);
46 LogFlowFunc(("called, returning VINF_SUCCESS\n"));
47 return VINF_SUCCESS;
48}
49
50/*
51 * Terminate the host side of the shared clipboard - called by the hgcm layer.
52 */
53void ShClBackendDestroy(PSHCLBACKEND pBackend)
54{
55 RT_NOREF(pBackend);
56 LogFlowFunc(("called, returning\n"));
57}
58
59int ShClBackendConnect(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, bool fHeadless)
60{
61 RT_NOREF(pBackend, pClient, fHeadless);
62 LogFlowFunc(("called, returning VINF_SUCCESS\n"));
63 return VINF_SUCCESS;
64}
65
66/*
67 * Synchronise the contents of the host clipboard with the guest, called by the HGCM layer
68 * after a save and restore of the guest.
69 */
70int ShClBackendSync(PSHCLBACKEND pBackend, PSHCLCLIENT pClient)
71{
72 RT_NOREF(pBackend, pClient);
73 LogFlowFunc(("called, returning VINF_SUCCESS\n"));
74 return VINF_SUCCESS;
75}
76
77int ShClBackendDisconnect(PSHCLBACKEND pBackend, PSHCLCLIENT pClient)
78{
79 RT_NOREF(pBackend, pClient);
80 return VINF_SUCCESS;
81}
82
83/*
84 * The guest is taking possession of the shared clipboard.
85 * Called by the HGCM clipboard subsystem.
86 */
87int ShClBackendReportFormats(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, SHCLFORMATS fFormats)
88{
89 RT_NOREF(pBackend, pClient, fFormats);
90 return VINF_SUCCESS;
91}
92
93/*
94 * Called by the HGCM clipboard subsystem when the guest wants to read the host clipboard.
95 */
96int ShClBackendReadData(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
97 SHCLFORMAT uFormat, void *pvData, uint32_t cbData, uint32_t *pcbActual)
98{
99 RT_NOREF(pBackend, pClient, pCmdCtx, uFormat, pvData, cbData);
100
101 /* No data available. */
102 *pcbActual = 0;
103
104 return VINF_SUCCESS;
105}
106
107int ShClBackendWriteData(PSHCLBACKEND pBackend, PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
108 SHCLFORMAT uFormat, void *pvData, uint32_t cbData)
109{
110 RT_NOREF(pBackend, pClient, pCmdCtx, uFormat, pvData, cbData);
111 return VERR_NOT_IMPLEMENTED;
112}
113
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette