VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.11.0/client.h@ 61386

最後變更 在這個檔案從61386是 38824,由 vboxsync 提交於 13 年 前

Additions/x11: header files for building X.Org Server 1.11 modules

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.4 KB
 
1/*
2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All
3 * rights reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 * THE SOFTWARE.
22 */
23
24/* Author: Rami Ylimäki <[email protected]> */
25
26#ifndef CLIENT_H
27#define CLIENT_H
28
29#ifdef HAVE_DIX_CONFIG_H
30#include <dix-config.h>
31#endif /* HAVE_DIX_CONFIG_H */
32#include <X11/Xfuncproto.h>
33#include <sys/types.h>
34
35/* Client IDs. Use GetClientPid, GetClientCmdName and GetClientCmdArgs
36 * instead of accessing the fields directly. */
37typedef struct {
38 pid_t pid; /* process ID, -1 if not available */
39 const char *cmdname; /* process name, NULL if not available */
40 const char *cmdargs; /* process arguments, NULL if not available */
41} ClientIdRec, *ClientIdPtr;
42
43struct _Client;
44
45/* Initialize and clean up. */
46void ReserveClientIds(struct _Client *client);
47void ReleaseClientIds(struct _Client *client);
48
49/* Determine client IDs for caching. Exported on purpose for
50 * extensions such as SELinux. */
51extern _X_EXPORT pid_t DetermineClientPid(struct _Client *client);
52extern _X_EXPORT void DetermineClientCmd(pid_t, const char **cmdname, const char **cmdargs);
53
54/* Query cached client IDs. Exported on purpose for drivers. */
55extern _X_EXPORT pid_t GetClientPid(struct _Client *client);
56extern _X_EXPORT const char *GetClientCmdName(struct _Client *client);
57extern _X_EXPORT const char *GetClientCmdArgs(struct _Client *client);
58
59#endif /* CLIENT_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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