VirtualBox

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

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

bugref:9637. removing an obsolete VBoxClient service.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/* $Id: VBoxClient.h 83218 2020-03-06 10:10:00Z vboxsync $ */
2/** @file
3 *
4 * VirtualBox additions user session daemon.
5 */
6
7/*
8 * Copyright (C) 2006-2020 Oracle Corporation
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 GA_INCLUDED_SRC_x11_VBoxClient_VBoxClient_h
20#define GA_INCLUDED_SRC_x11_VBoxClient_VBoxClient_h
21#ifndef RT_WITHOUT_PRAGMA_ONCE
22# pragma once
23#endif
24
25#include <VBox/log.h>
26#include <iprt/cpp/utils.h>
27#include <iprt/string.h>
28
29void VBClLogInfo(const char *pszFormat, ...);
30void VBClLogError(const char *pszFormat, ...);
31void VBClLogFatalError(const char *pszFormat, ...);
32
33/** Call clean-up for the current service and exit. */
34extern void VBClCleanUp(bool fExit = true);
35
36/** A simple interface describing a service. VBoxClient will run exactly one
37 * service per invocation. */
38struct VBCLSERVICE
39{
40 /** Returns the (friendly) name of the service. */
41 const char *(*getName)(void);
42 /** Get the services default path to pidfile, relative to $HOME */
43 /** @todo Should this also have a component relative to the X server number?
44 */
45 const char *(*getPidFilePath)(void);
46 /** Special initialisation, if needed. @a pause and @a resume are
47 * guaranteed not to be called until after this returns. */
48 int (*init)(struct VBCLSERVICE **ppInterface);
49 /** Run the service main loop */
50 int (*run)(struct VBCLSERVICE **ppInterface, bool fDaemonised);
51 /** Clean up any global resources before we shut down hard. The last calls
52 * to @a pause and @a resume are guaranteed to finish before this is called.
53 */
54 void (*cleanup)(struct VBCLSERVICE **ppInterface);
55};
56
57/** Default handler for various struct VBCLSERVICE member functions. */
58DECLINLINE(int) VBClServiceDefaultHandler(struct VBCLSERVICE **pSelf)
59{
60 RT_NOREF1(pSelf);
61 return VINF_SUCCESS;
62}
63
64/** Default handler for the struct VBCLSERVICE clean-up member function.
65 * Usually used because the service is cleaned up automatically when the user
66 * process/X11 exits. */
67DECLINLINE(void) VBClServiceDefaultCleanup(struct VBCLSERVICE **ppInterface)
68{
69 RT_NOREF(ppInterface);
70}
71
72extern struct VBCLSERVICE **VBClGetClipboardService();
73extern struct VBCLSERVICE **VBClGetSeamlessService();
74extern struct VBCLSERVICE **VBClGetHostVersionService();
75#ifdef VBOX_WITH_DRAG_AND_DROP
76extern struct VBCLSERVICE **VBClGetDragAndDropService();
77#endif /* VBOX_WITH_DRAG_AND_DROP */
78extern struct VBCLSERVICE **VBClCheck3DService();
79extern struct VBCLSERVICE **VBClDisplaySVGAService();
80extern struct VBCLSERVICE **VBClDisplaySVGAX11Service();
81
82#endif /* !GA_INCLUDED_SRC_x11_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