VirtualBox

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

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

Shared Clipboard/URI: Build fix.

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