VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/VBoxClient/VBoxClient.h@ 50281

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

Additions/x11/VBoxClient: detect VT switches on Linux 2.6.38 and higher and notify the service.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/** @file
2 *
3 * VirtualBox additions user session daemon.
4 */
5
6/*
7 * Copyright (C) 2006-2011 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 ___vboxclient_vboxclient_h
19# define ___vboxclient_vboxclient_h
20
21#include <iprt/cpp/utils.h>
22
23/** Namespace for VBoxClient-specific things */
24namespace VBoxClient {
25
26/** A simple class describing a service. VBoxClient will run exactly one
27 * service per invocation. */
28class Service : public RTCNonCopyable
29{
30public:
31 /** Get the services default path to pidfile, relative to $HOME */
32 virtual const char *getPidFilePath() = 0;
33 /** Run the service main loop */
34 virtual int run(bool fDaemonised = false) = 0;
35 /** Pause the service loop. This must be safe to call on a different thread
36 * and potentially before @run is or after it exits. */
37 virtual void pause() { }
38 /** Resume after pausing. The same applies here as for @a pause. */
39 virtual void resume() { }
40 /** Clean up any global resources before we shut down hard. Calling
41 * @a pause or @a resume later than @a cleanup must not cause errors. */
42 virtual void cleanup() = 0;
43 /** Virtual destructor. Not used */
44 virtual ~Service() {}
45};
46
47extern Service *GetClipboardService();
48extern Service *GetSeamlessService();
49extern Service *GetDisplayService();
50extern Service *GetHostVersionService();
51#ifdef VBOX_WITH_DRAG_AND_DROP
52extern Service *GetDragAndDropService();
53#endif /* VBOX_WITH_DRAG_AND_DROP */
54
55extern void CleanUp();
56
57} /* namespace VBoxClient */
58
59#endif /* !___vboxclient_vboxclient_h */
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