VirtualBox

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

最後變更 在這個檔案從93423是 93385,由 vboxsync 提交於 3 年 前

Additions: make VBoxDRMClient and VBoxClient --vmsvga-session available only from Linux, bugref:10185.

For the rest of platforms (Solaris, FreeBSD) --vmsvga-session is an alias to --vmsvga.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.0 KB
 
1/* $Id: VBoxClient.h 93385 2022-01-20 20:30:39Z vboxsync $ */
2/** @file
3 *
4 * VirtualBox additions user session daemon.
5 */
6
7/*
8 * Copyright (C) 2006-2022 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.alldomusa.eu.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, ...);
32void VBClLogVerbose(unsigned iLevel, const char *pszFormat, ...);
33
34int VBClLogCreate(const char *pszLogFile);
35void VBClLogSetLogPrefix(const char *pszPrefix);
36void VBClLogDestroy(void);
37
38/** Call clean-up for the current service and exit. */
39extern void VBClShutdown(bool fExit = true);
40
41/**
42 * A service descriptor.
43 */
44typedef struct
45{
46 /** The short service name. 16 chars maximum (RTTHREAD_NAME_LEN). */
47 const char *pszName;
48 /** The longer service name. */
49 const char *pszDesc;
50 /** Get the services default path to pidfile, relative to $HOME */
51 /** @todo Should this also have a component relative to the X server number?
52 */
53 const char *pszPidFilePath;
54 /** The usage options stuff for the --help screen. */
55 const char *pszUsage;
56 /** The option descriptions for the --help screen. */
57 const char *pszOptions;
58
59 /**
60 * Tries to parse the given command line option.
61 *
62 * @returns 0 if we parsed, -1 if it didn't and anything else means exit.
63 * @param ppszShort If not NULL it points to the short option iterator. a short argument.
64 * If NULL examine argv[*pi].
65 * @param argc The argument count.
66 * @param argv The argument vector.
67 * @param pi The argument vector index. Update if any value(s) are eaten.
68 */
69 DECLCALLBACKMEMBER(int, pfnOption,(const char **ppszShort, int argc, char **argv, int *pi));
70
71 /**
72 * Called before parsing arguments.
73 * @returns VBox status code, or
74 * VERR_NOT_AVAILABLE if service is supported on this platform in general but not available at the moment.
75 * VERR_NOT_SUPPORTED if service is not supported on this platform. */
76 DECLCALLBACKMEMBER(int, pfnInit,(void));
77
78 /** Called from the worker thread.
79 *
80 * @returns VBox status code.
81 * @retval VINF_SUCCESS if exitting because *pfShutdown was set.
82 * @param pfShutdown Pointer to a per service termination flag to check
83 * before and after blocking.
84 */
85 DECLCALLBACKMEMBER(int, pfnWorker,(bool volatile *pfShutdown));
86
87 /**
88 * Asks the service to stop.
89 *
90 * @remarks Will be called from the signal handler.
91 */
92 DECLCALLBACKMEMBER(void, pfnStop,(void));
93
94 /**
95 * Does termination cleanups.
96 *
97 * @remarks This will be called even if pfnInit hasn't been called or pfnStop failed!
98 */
99 DECLCALLBACKMEMBER(int, pfnTerm,(void));
100} VBCLSERVICE;
101/** Pointer to a VBCLSERVICE. */
102typedef VBCLSERVICE *PVBCLSERVICE;
103/** Pointer to a const VBCLSERVICE. */
104typedef VBCLSERVICE const *PCVBCLSERVICE;
105
106RT_C_DECLS_BEGIN
107extern VBCLSERVICE g_SvcClipboard;
108extern VBCLSERVICE g_SvcDisplayDRM;
109extern VBCLSERVICE g_SvcDisplaySVGA;
110# ifdef RT_OS_LINUX
111extern VBCLSERVICE g_SvcDisplaySVGASession;
112# endif
113extern VBCLSERVICE g_SvcDragAndDrop;
114extern VBCLSERVICE g_SvcHostVersion;
115extern VBCLSERVICE g_SvcSeamless;
116
117extern bool g_fDaemonized;
118RT_C_DECLS_END
119
120#endif /* !GA_INCLUDED_SRC_x11_VBoxClient_VBoxClient_h */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette