Files
xserver/os/client_priv.h
Enrico Weigelt, metux IT consult 4a75fb14b7 os: unexport ReplyCallback
It's only used by record extension, not used by any drivers at all
(neither FOSS nor proprietary), so it shouldn't be in the public SDK.

Since it's never been used by any driver, it's effectively no ABI change,
so we can safely do this within ABI-25.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:05:27 +02:00

77 lines
2.7 KiB
C

/* SPDX-License-Identifier: MIT OR X11
*
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
* Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies).
*/
#ifndef _XSERVER_OS_CLIENT_PRIV_H
#define _XSERVER_OS_CLIENT_PRIV_H
#include <sys/types.h>
#include <X11/Xdefs.h>
#include <X11/Xfuncproto.h>
#include "include/callback.h"
/* Client IDs. Use GetClientPid, GetClientCmdName and GetClientCmdArgs
* instead of accessing the fields directly. */
struct _ClientId {
pid_t pid; /* process ID, -1 if not available */
const char *cmdname; /* process name, NULL if not available */
const char *cmdargs; /* process arguments, NULL if not available */
};
struct _Client;
/* Initialize and clean up. */
void ReserveClientIds(struct _Client *client);
void ReleaseClientIds(struct _Client *client);
/* Determine client IDs for caching. Exported on purpose for
* extensions such as SELinux. */
pid_t DetermineClientPid(struct _Client *client);
void DetermineClientCmd(pid_t, const char **cmdname, const char **cmdargs);
/* Query cached client IDs. Exported on purpose for drivers. */
pid_t GetClientPid(struct _Client *client);
const char *GetClientCmdName(struct _Client *client);
const char *GetClientCmdArgs(struct _Client *client);
Bool ClientIsLocal(struct _Client *client);
XID AuthorizationIDOfClient(struct _Client *client);
const char *ClientAuthorized(struct _Client *client,
unsigned int proto_n,
char *auth_proto,
unsigned int string_n,
char *auth_string);
Bool AddClientOnOpenFD(int fd);
void ListenOnOpenFD(int fd, int noxauth);
int ReadRequestFromClient(struct _Client *client);
int WriteFdToClient(struct _Client *client, int fd, Bool do_close);
Bool InsertFakeRequest(struct _Client *client, char *data, int count);
void FlushAllOutput(void);
void FlushIfCriticalOutputPending(void);
void ResetOsBuffers(void);
void NotifyParentProcess(void);
void CreateWellKnownSockets(void);
void ResetWellKnownSockets(void);
void CloseWellKnownConnections(void);
// exported for nvidia driver
_X_EXPORT void SetCriticalOutputPending(void);
/* exported only for DRI module, but should not be used by external drivers */
_X_EXPORT void ResetCurrentRequest(struct _Client *client);
/* stuff for ReplyCallback */
extern CallbackListPtr ReplyCallback;
typedef struct {
ClientPtr client;
const void *replyData;
unsigned long dataLenBytes; /* actual bytes from replyData + pad bytes */
unsigned long bytesRemaining;
Bool startOfReply;
unsigned long padBytes; /* pad bytes from zeroed array */
} ReplyInfoRec;
#endif /* _XSERVER_DIX_CLIENT_PRIV_H */