KWayland

clientconnection.h
1 /*
2  SPDX-FileCopyrightText: 2014 Martin Gräßlin <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 #ifndef KWAYLAND_SERVER_CLIENTCONNECTION_H
7 #define KWAYLAND_SERVER_CLIENTCONNECTION_H
8 
9 #include <sys/types.h>
10 
11 #include <QObject>
12 
13 #include <KWayland/Server/kwaylandserver_export.h>
14 
15 struct wl_client;
16 struct wl_interface;
17 struct wl_resource;
18 
19 namespace KWayland
20 {
21 namespace Server
22 {
23 
24 class Display;
25 
35 class KWAYLANDSERVER_EXPORT ClientConnection : public QObject
36 {
37  Q_OBJECT
38 public:
39  virtual ~ClientConnection();
40 
44  void flush();
55  wl_resource *createResource(const wl_interface *interface, quint32 version, quint32 id);
60  wl_resource *getResource(quint32 id);
61 
65  wl_client *client();
69  Display *display();
70 
79  pid_t processId() const;
88  uid_t userId() const;
97  gid_t groupId() const;
98 
110  QString executablePath() const;
111 
115  operator wl_client*();
119  operator wl_client*() const;
120 
128  void destroy();
129 
130 Q_SIGNALS:
134  void disconnected(KWayland::Server::ClientConnection*);
135 
136 private:
137  friend class Display;
138  explicit ClientConnection(wl_client *c, Display *parent);
139  class Private;
141 };
142 
143 }
144 }
145 
146 Q_DECLARE_METATYPE(KWayland::Server::ClientConnection*)
147 
148 #endif
Class holding the Wayland server display loop.
Definition: display.h:89
Convenient Class which represents a wl_client.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Nov 21 2020 22:50:38 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.