x11-stub.cpp revision 46fd1b35e55cbd736b7abe0d856a940f0336eb81
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync/** @file
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync *
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync * Shared Clipboard:
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync * Linux host, a stub version with no functionality for use on headless hosts.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync */
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync/*
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync *
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * available from http://www.virtualbox.org. This file is free software;
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * you can redistribute it and/or modify it under the terms of the GNU
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * General Public License (GPL) as published by the Free Software
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync *
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync * additional information or have any questions.
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync */
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync#include <VBox/HostServices/VBoxClipboardSvc.h>
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync#include <iprt/alloc.h>
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync#include <iprt/asm.h> /* For atomic operations */
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync#include <iprt/assert.h>
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync#include <iprt/mem.h>
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync#include <iprt/string.h>
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync#include <iprt/thread.h>
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync#include <iprt/process.h>
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync#include <iprt/semaphore.h>
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync#include <string.h>
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync#include <stdio.h>
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync#include <stdint.h>
485a153f0c2ddf3738d940d5158c72939f080cc8vboxsync
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync#include "VBoxClipboard.h"
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync/** Initialise the host side of the shared clipboard - called by the hgcm layer. */
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsyncint vboxClipboardInit (void)
4604ab7d38c2bd2dfc255aa1facffdf81c1c9153vboxsync{
LogFlowFunc(("called, returning VINF_SUCCESS.\n"));
return VINF_SUCCESS;
}
/** Terminate the host side of the shared clipboard - called by the hgcm layer. */
void vboxClipboardDestroy (void)
{
LogFlowFunc(("called, returning.\n"));
}
/**
* Enable the shared clipboard - called by the hgcm clipboard subsystem.
*
* @param pClient Structure containing context information about the guest system
* @returns RT status code
*/
int vboxClipboardConnect (VBOXCLIPBOARDCLIENTDATA * /* pClient */)
{
LogFlowFunc(("called, returning VINF_SUCCESS.\n"));
return VINF_SUCCESS;
}
/**
* Synchronise the contents of the host clipboard with the guest, called by the HGCM layer
* after a save and restore of the guest.
*/
int vboxClipboardSync (VBOXCLIPBOARDCLIENTDATA * /* pClient */)
{
LogFlowFunc(("called, returning VINF_SUCCESS.\n"));
return VINF_SUCCESS;
}
/**
* Shut down the shared clipboard subsystem and "disconnect" the guest.
*/
void vboxClipboardDisconnect (VBOXCLIPBOARDCLIENTDATA * /* pClient */)
{
LogFlowFunc(("called, returning.\n"));
}
/**
* The guest is taking possession of the shared clipboard. Called by the HGCM clipboard
* subsystem.
*
* @param pClient Context data for the guest system
* @param u32Formats Clipboard formats the guest is offering
*/
void vboxClipboardFormatAnnounce (VBOXCLIPBOARDCLIENTDATA * /* pClient */,
uint32_t /* u32Formats */)
{
LogFlowFunc(("called, returning.\n"));
}
/**
* Called by the HGCM clipboard subsystem when the guest wants to read the host clipboard.
*
* @param pClient Context information about the guest VM
* @param u32Format The format that the guest would like to receive the data in
* @param pv Where to write the data to
* @param cb The size of the buffer to write the data to
* @param pcbActual Where to write the actual size of the written data
*/
int vboxClipboardReadData (VBOXCLIPBOARDCLIENTDATA * /* pClient */, uint32_t /* u32Format */,
void * /* pv */, uint32_t /* cb */, uint32_t * pcbActual)
{
LogFlowFunc(("called, returning VINF_SUCCESS.\n"));
/* No data available. */
*pcbActual = 0;
return VINF_SUCCESS;
}
/**
* Called by the HGCM clipboard subsystem when we have requested data and that data arrives.
*
* @param pClient Context information about the guest VM
* @param pv Buffer to which the data was written
* @param cb The size of the data written
* @param u32Format The format of the data written
*/
void vboxClipboardWriteData (VBOXCLIPBOARDCLIENTDATA * /* pClient */, void * /* pv */,
uint32_t /* cb */, uint32_t /* u32Format */)
{
LogFlowFunc(("called, returning.\n"));
}