1 | /** @file
|
---|
2 | *
|
---|
3 | * VirtualBox additions user session daemon.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2007 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 */
|
---|
24 | namespace VBoxClient {
|
---|
25 |
|
---|
26 | /** A simple class describing a service. VBoxClient will run exactly one
|
---|
27 | * service per invocation. */
|
---|
28 | class Service : public iprt::non_copyable
|
---|
29 | {
|
---|
30 | public:
|
---|
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 | /** Clean up any global resources before we shut down hard */
|
---|
36 | virtual void cleanup() = 0;
|
---|
37 | /** Virtual destructor. Not used */
|
---|
38 | virtual ~Service() {}
|
---|
39 | };
|
---|
40 |
|
---|
41 | extern Service *GetClipboardService();
|
---|
42 | extern Service *GetSeamlessService();
|
---|
43 | extern Service *GetDisplayService();
|
---|
44 | extern Service *GetHostVersionService();
|
---|
45 |
|
---|
46 | extern void CleanUp();
|
---|
47 |
|
---|
48 | } /* namespace VBoxClient */
|
---|
49 |
|
---|
50 | #endif /* !___vboxclient_vboxclient_h */
|
---|