VirtualBox

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

Last change on this file since 91749 was 90238, checked in by vboxsync, 3 years ago

HGCM,HostServices: Extended VBOXHGCMSVCFNTABLE with client and call limits. Tried to pick reasonable values for all services. bugref:9379

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
Line 
1/* $Id: VBoxSharedClipboardSvc-x11-stubs.cpp 90238 2021-07-19 13:48:09Z 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-2020 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(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(void)
54{
55 LogFlowFunc(("called, returning\n"));
56}
57
58int ShClBackendConnect(PSHCLCLIENT pClient, bool fHeadless)
59{
60 RT_NOREF(pClient, fHeadless);
61 LogFlowFunc(("called, returning VINF_SUCCESS\n"));
62 return VINF_SUCCESS;
63}
64
65/*
66 * Synchronise the contents of the host clipboard with the guest, called by the HGCM layer
67 * after a save and restore of the guest.
68 */
69int ShClBackendSync(PSHCLCLIENT pClient)
70{
71 RT_NOREF(pClient);
72 LogFlowFunc(("called, returning VINF_SUCCESS\n"));
73 return VINF_SUCCESS;
74}
75
76int ShClBackendDisconnect(PSHCLCLIENT pClient)
77{
78 RT_NOREF(pClient);
79 return VINF_SUCCESS;
80}
81
82/*
83 * The guest is taking possession of the shared clipboard.
84 * Called by the HGCM clipboard subsystem.
85 */
86int ShClBackendFormatAnnounce(PSHCLCLIENT pClient, SHCLFORMATS fFormats)
87{
88 RT_NOREF(pClient, fFormats);
89 return VINF_SUCCESS;
90}
91
92/*
93 * Called by the HGCM clipboard subsystem when the guest wants to read the host clipboard.
94 */
95int ShClBackendReadData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
96 SHCLFORMAT uFormat, void *pvData, uint32_t cbData, uint32_t *pcbActual)
97{
98 RT_NOREF(pClient, pCmdCtx, uFormat, pvData, cbData);
99
100 /* No data available. */
101 *pcbActual = 0;
102
103 return VINF_SUCCESS;
104}
105
106int ShClBackendWriteData(PSHCLCLIENT pClient, PSHCLCLIENTCMDCTX pCmdCtx,
107 SHCLFORMAT uFormat, void *pvData, uint32_t cbData)
108{
109 RT_NOREF(pClient, pCmdCtx, uFormat, pvData, cbData);
110 return VERR_NOT_IMPLEMENTED;
111}
112
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