VirtualBox

source: vbox/trunk/src/VBox/Main/include/GuestDnDTargetImpl.h@ 51856

Last change on this file since 51856 was 51556, checked in by vboxsync, 11 years ago

DnD: Added support for dynamically managing formats on the host.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/* $Id: GuestDnDTargetImpl.h 51556 2014-06-05 14:38:31Z vboxsync $ */
2/** @file
3 * VBox Console COM Class implementation - Guest drag'n drop target.
4 */
5
6/*
7 * Copyright (C) 2014 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#ifndef ____H_GUESTDNDTARGETIMPL
19#define ____H_GUESTDNDTARGETIMPL
20
21#include "GuestDnDTargetWrap.h"
22#include "GuestDnDPrivate.h"
23
24class ATL_NO_VTABLE GuestDnDTarget :
25 public GuestDnDTargetWrap,
26 protected GuestDnDBase
27{
28public:
29 /** @name COM and internal init/term/mapping cruft.
30 * @{ */
31 DECLARE_EMPTY_CTOR_DTOR(GuestDnDTarget)
32
33 int init(const ComObjPtr<Guest>& pGuest);
34 void uninit(void);
35
36 HRESULT FinalConstruct(void);
37 void FinalRelease(void);
38 /** @} */
39
40private:
41
42 /** Private wrapped @name IDnDBase methods.
43 * @{ */
44 HRESULT isFormatSupported(const com::Utf8Str &aFormat, BOOL *aSupported);
45 HRESULT getFormats(std::vector<com::Utf8Str> &aFormats);
46 HRESULT addFormats(const std::vector<com::Utf8Str> &aFormats);
47 HRESULT removeFormats(const std::vector<com::Utf8Str> &aFormats);
48 /** @} */
49
50 /** Private wrapped @name IDnDTarget methods.
51 * @{ */
52 HRESULT enter(ULONG aScreenId, ULONG ax, ULONG aY, DnDAction_T aDefaultAction, const std::vector<DnDAction_T> &aAllowedActions, const std::vector<com::Utf8Str> &aFormats, DnDAction_T *aResultAction);
53 HRESULT move(ULONG aScreenId, ULONG aX, ULONG aY, DnDAction_T aDefaultAction, const std::vector<DnDAction_T> &aAllowedActions, const std::vector<com::Utf8Str> &aFormats, DnDAction_T *aResultAction);
54 HRESULT leave(ULONG aScreenId);
55 HRESULT drop(ULONG aScreenId, ULONG aX, ULONG aY, DnDAction_T aDefaultAction, const std::vector<DnDAction_T> &aAllowedActions, const std::vector<com::Utf8Str> &aFormats, com::Utf8Str &aFormat, DnDAction_T *aResultAction);
56 HRESULT sendData(ULONG aScreenId, const com::Utf8Str &aFormat, const std::vector<BYTE> &aData, ComPtr<IProgress> &aProgress);
57 /** @} */
58
59protected:
60
61 /** @name Attributes.
62 * @{ */
63 /** Pointer to guest implementation. */
64 const ComObjPtr<Guest> m_pGuest;
65 /** @} */
66};
67
68#endif /* !____H_GUESTDNDTARGETIMPL */
69
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