VirtualBox

source: vbox/trunk/src/VBox/Main/src-client/SharedClipboardPrivate.cpp@ 80862

Last change on this file since 80862 was 80862, checked in by vboxsync, 5 years ago

Shared Clipboard/URI: File renaming: *-uri* -> *-transfers*.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 2.1 KB
Line 
1/* $Id: SharedClipboardPrivate.cpp 80862 2019-09-17 14:45:21Z vboxsync $ */
2/** @file
3 * Private Shared Clipboard code.
4 */
5
6/*
7 * Copyright (C) 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#define LOG_GROUP LOG_GROUP_SHARED_CLIPBOARD
19#include "LoggingNew.h"
20
21#include <VMMDev.h>
22
23#include <VBox/err.h>
24
25#ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
26# include <VBox/GuestHost/SharedClipboard-transfers.h>
27#endif
28
29#include "ConsoleImpl.h"
30#include "SharedClipboardPrivate.h"
31
32SharedClipboard* SharedClipboard::s_pInstance = NULL;
33
34SharedClipboard::SharedClipboard(const ComObjPtr<Console> &pConsole)
35 : m_pConsole(pConsole)
36{
37 LogFlowFuncEnter();
38}
39
40SharedClipboard::~SharedClipboard(void)
41{
42 LogFlowFuncEnter();
43}
44
45int SharedClipboard::hostCall(uint32_t u32Function, uint32_t cParms, PVBOXHGCMSVCPARM paParms) const
46{
47 /* Forward the information to the VMM device. */
48 Assert(!m_pConsole.isNull());
49 VMMDev *pVMMDev = m_pConsole->i_getVMMDev();
50 if (!pVMMDev)
51 return VERR_COM_OBJECT_NOT_FOUND;
52
53 return pVMMDev->hgcmHostCall("VBoxSharedClipboard", u32Function, cParms, paParms);
54}
55
56/* static */
57DECLCALLBACK(int) SharedClipboard::hostServiceCallback(void *pvExtension, uint32_t u32Function,
58 void *pvParms, uint32_t cbParms)
59{
60 LogFlowFunc(("pvExtension=%p, u32Function=%RU32, pvParms=%p, cbParms=%RU32\n",
61 pvExtension, u32Function, pvParms, cbParms));
62
63 RT_NOREF(u32Function, pvParms, cbParms);
64
65 SharedClipboard *pThis = reinterpret_cast<SharedClipboard *>(pvExtension);
66 AssertPtrReturn(pThis, VERR_INVALID_POINTER);
67
68 int rc = VINF_SUCCESS;
69
70 LogFlowFuncLeaveRC(rc);
71 return rc;
72}
73
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