VBoxClipboard.h revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
/** @file
*
* Shared Clipboard
*/
/*
* Copyright (C) 2006 InnoTek Systemberatung GmbH
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License as published by the Free Software Foundation,
* in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
* distribution. VirtualBox OSE is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY of any kind.
*
* If you received this file as part of a commercial VirtualBox
* distribution, then only the terms of your commercial VirtualBox
* license agreement apply instead of the previous paragraph.
*/
#ifndef __VBOXCLIPBOARD__H
#define __VBOXCLIPBOARD__H
#define LOG_GROUP LOG_GROUP_HGCM
typedef enum _VBoxClipboardGuestStatus
{
enmEventIdle, /* The guest did not call the QueryEvent yet and
* therefore does not expect any data.
* It is allowed only call the Cancel and QueryEvent
* functions for host data.
*/
enmEventQueried, /* The guest has called the QueryEvent function but no event
* was pending (fEventPresent == false) and therefore the
* request is processed asynchronously.
* Guest only allowed to call the Cancel function.
* If client in the state and a clipboard event occurs,
* the request is processed and client goes to EventReported state.
*/
enmEventReported /* The information about a clipboard event was returned to client,
* either immediately or asynchronously.
* The client can call the Read or Cancel functions.
* Both functions reset the client to EventIdle state.
*/
typedef struct _VBOXCLIPBOARDCLIENTDATA
{
struct _VBOXCLIPBOARDCLIENTDATA *pNext;
struct _VBOXCLIPBOARDCLIENTDATA *pPrev;
VBoxClipboardGuestStatus enmGuestStatus; /* The guest status, as guest waits for the host events. */
struct {
void *pv;
} event;
struct {
} async;
bool vboxClipboardLock (void);
void vboxClipboardUnlock (void);
int vboxClipboardInit (void);
void vboxClipboardDestroy (void);
void vboxClipboardSet (VBOXCLIPBOARDCLIENTDATA *pClient, void *pv, uint32_t cb, uint32_t u32Format);
#endif /* __VBOXCLIPBOARD__H */