VirtualBox

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

Last change on this file since 78398 was 78182, checked in by vboxsync, 6 years ago

Shared Clipboard: SCM fix.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.5 KB
Line 
1/* $Id: VBoxSharedClipboardSvc-x11-stubs.cpp 78182 2019-04-17 19:53:51Z 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-2019 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 "VBoxClipboard.h"
38
39
40
41/** Initialise the host side of the shared clipboard - called by the hgcm layer. */
42int vboxClipboardInit(void)
43{
44 LogFlowFunc(("called, returning VINF_SUCCESS.\n"));
45 return VINF_SUCCESS;
46}
47
48/** Terminate the host side of the shared clipboard - called by the hgcm layer. */
49void vboxClipboardDestroy(void)
50{
51 LogFlowFunc(("called, returning.\n"));
52}
53
54/**
55 * Enable the shared clipboard - called by the hgcm clipboard subsystem.
56 *
57 * @param pClient Structure containing context information about the guest system
58 * @param fHeadless Whether headless.
59 * @returns RT status code
60 */
61int vboxClipboardConnect(VBOXCLIPBOARDCLIENTDATA *pClient, bool fHeadless)
62{
63 RT_NOREF(pClient, fHeadless);
64 LogFlowFunc(("called, returning VINF_SUCCESS.\n"));
65 return VINF_SUCCESS;
66}
67
68/**
69 * Synchronise the contents of the host clipboard with the guest, called by the HGCM layer
70 * after a save and restore of the guest.
71 */
72int vboxClipboardSync(VBOXCLIPBOARDCLIENTDATA * /* pClient */)
73{
74 LogFlowFunc(("called, returning VINF_SUCCESS.\n"));
75 return VINF_SUCCESS;
76}
77
78/**
79 * Shut down the shared clipboard subsystem and "disconnect" the guest.
80 *
81 * @param pClient Structure containing context information about the guest system
82 */
83void vboxClipboardDisconnect(VBOXCLIPBOARDCLIENTDATA *pClient)
84{
85 RT_NOREF(pClient);
86 LogFlowFunc(("called, returning.\n"));
87}
88
89/**
90 * The guest is taking possession of the shared clipboard. Called by the HGCM clipboard
91 * subsystem.
92 *
93 * @param pClient Context data for the guest system
94 * @param u32Formats Clipboard formats the guest is offering
95 */
96void vboxClipboardFormatAnnounce(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Formats)
97{
98 RT_NOREF(pClient, u32Formats);
99 LogFlowFunc(("called, returning.\n"));
100}
101
102/**
103 * Called by the HGCM clipboard subsystem when the guest wants to read the host clipboard.
104 *
105 * @param pClient Context information about the guest VM
106 * @param u32Format The format that the guest would like to receive the data in
107 * @param pv Where to write the data to
108 * @param cb The size of the buffer to write the data to
109 * @param pcbActual Where to write the actual size of the written data
110 */
111int vboxClipboardReadData(VBOXCLIPBOARDCLIENTDATA *pClient, uint32_t u32Format,
112 void *pv, uint32_t cb, uint32_t *pcbActual)
113{
114 RT_NOREF(pClient, u32Format, pv, cb);
115 LogFlowFunc(("called, returning VINF_SUCCESS.\n"));
116 /* No data available. */
117 *pcbActual = 0;
118 return VINF_SUCCESS;
119}
120
121/**
122 * Called by the HGCM clipboard subsystem when we have requested data and that data arrives.
123 *
124 * @param pClient Context information about the guest VM
125 * @param pv Buffer to which the data was written
126 * @param cb The size of the data written
127 * @param u32Format The format of the data written
128 */
129void vboxClipboardWriteData(VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb,
130 uint32_t u32Format)
131{
132 RT_NOREF(pClient, pv, cb, u32Format);
133 LogFlowFunc(("called, returning.\n"));
134}
135
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