1 | /** @file
|
---|
2 | *
|
---|
3 | * Guest client: seamless mode
|
---|
4 | * Proxy between the guest and host components
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2006-2007 innotek GmbH
|
---|
9 | *
|
---|
10 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | * available from http://www.virtualbox.org. This file is free software;
|
---|
12 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | * General Public License (GPL) as published by the Free Software
|
---|
14 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | */
|
---|
18 |
|
---|
19 | #ifndef __Additions_client_seamless_glue_h
|
---|
20 | # define __Additions_client_seamless_glue_h
|
---|
21 |
|
---|
22 | #if 0
|
---|
23 |
|
---|
24 | #include "seamless-host.h"
|
---|
25 | #include "seamless-guest.h"
|
---|
26 |
|
---|
27 | #endif
|
---|
28 |
|
---|
29 | class VBoxGuestSeamlessObserver
|
---|
30 | {
|
---|
31 | public:
|
---|
32 | virtual void notify(void) = 0;
|
---|
33 | virtual ~VBoxGuestSeamlessObserver() {}
|
---|
34 | };
|
---|
35 |
|
---|
36 | #if 0
|
---|
37 | /**
|
---|
38 | * Observer to connect the guest and the host parts of the seamless guest client.
|
---|
39 | * It starts the host part when the guest reports that it supports seamless mode and
|
---|
40 | * stops it when the guest no longer supports seamless. It also proxies enter and
|
---|
41 | * exit seamless mode requests from the host part to the guest and informs the host
|
---|
42 | * part when the guest's visible area changes.
|
---|
43 | */
|
---|
44 | class VBoxGuestSeamlessGlue
|
---|
45 | {
|
---|
46 | private:
|
---|
47 | VBoxGuestSeamlessHost *mHost;
|
---|
48 | VBoxGuestSeamlessGuestImpl *mGuest;
|
---|
49 |
|
---|
50 | public:
|
---|
51 | VBoxGuestSeamlessGlue(VBoxGuestSeamlessHost *pHost, VBoxGuestSeamlessGuestImpl *pGuest)
|
---|
52 | : mHost(pHost), mGuest(pGuest) {}
|
---|
53 | ~VBoxGuestSeamlessGlue();
|
---|
54 |
|
---|
55 | /** State change notification callback for the guest. */
|
---|
56 | void guestNotify(VBoxGuestSeamlessGuest::meEvent event)
|
---|
57 | {
|
---|
58 | switch(event)
|
---|
59 | {
|
---|
60 | case VBoxGuestSeamlessGuest::CAPABLE:
|
---|
61 | mHost->start();
|
---|
62 | break;
|
---|
63 | case VBoxGuestSeamlessGuest::INCAPABLE:
|
---|
64 | mHost->stop();
|
---|
65 | break;
|
---|
66 | case VBoxGuestSeamlessGuest::UPDATE:
|
---|
67 | mHost->updateRects(mGuest->getRects());
|
---|
68 | break;
|
---|
69 | default:
|
---|
70 | break;
|
---|
71 | }
|
---|
72 | }
|
---|
73 |
|
---|
74 | /** State change notification callback for the host. */
|
---|
75 | void hostNotify(VBoxGuestSeamlessHost::meEvent event)
|
---|
76 | {
|
---|
77 | switch(event)
|
---|
78 | {
|
---|
79 | case VBoxGuestSeamlessHost::ENABLE:
|
---|
80 | mGuest->start();
|
---|
81 | break;
|
---|
82 | case VBoxGuestSeamlessHost::DISABLE:
|
---|
83 | mGuest->stop();
|
---|
84 | break;
|
---|
85 | default:
|
---|
86 | break;
|
---|
87 | }
|
---|
88 | }
|
---|
89 | };
|
---|
90 | #endif /* 0 */
|
---|
91 |
|
---|
92 | #endif /* __Additions_client_seamless_glue_h not defined */
|
---|