Mir
mesa_drm_auth.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License version 2 or 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_CLIENT_EXTENSIONS_MESA_DRM_AUTH_H_
20 #define MIR_CLIENT_EXTENSIONS_MESA_DRM_AUTH_H_
21 
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 struct MirConnection;
29 
30 typedef void (*MirAuthFdCallback)(
31  int auth_fd, void* context);
32 /*
33  * Request authenticated FD from server.
34  * \param [in] connection The connection
35  * \param [in] cb The callback triggered on server response
36  * \param [in] context The context for the callback
37  */
38 typedef void (*MirExtensionMesaDrmAuthFd)(MirConnection*, MirAuthFdCallback cb, void* context);
39 
40 typedef void (*MirAuthMagicCallback)(
41  int response, void* context);
42 /*
43  * Request magic cookie from server.
44  * \param [in] connection The connection
45  * \param [in] magic The magic
46  * \param [in] cb The callback triggered on server response
47  * \param [in] context The context for the callback
48  */
50  MirConnection* connection, int magic, MirAuthMagicCallback cb, void* context);
51 
53 {
57 
58 static inline MirExtensionMesaDRMAuthV1 const* mir_extension_mesa_drm_auth_v1(
59  MirConnection* connection)
60 {
62  connection, "mir_extension_mesa_drm_auth", 1);
63 }
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 #endif /* MIR_CLIENT_EXTENSIONS_MESA_DRM_AUTH_H_ */
void(* MirExtensionMesaDrmAuthMagic)(MirConnection *connection, int magic, MirAuthMagicCallback cb, void *context)
Definition: mesa_drm_auth.h:49
struct MirConnection MirConnection
Definition: client_types.h:41
void(* MirExtensionMesaDrmAuthFd)(MirConnection *, MirAuthFdCallback cb, void *context)
Definition: mesa_drm_auth.h:38
MirExtensionMesaDrmAuthFd drm_auth_fd
Definition: mesa_drm_auth.h:54
void const * mir_connection_request_extension(MirConnection *connection, char const *interface, int version)
Request a Mir extension.
struct MirExtensionMesaDRMAuthV1 MirExtensionMesaDRMAuthV1
void(* MirAuthFdCallback)(int auth_fd, void *context)
Definition: mesa_drm_auth.h:30
Definition: mesa_drm_auth.h:52
MirExtensionMesaDrmAuthMagic drm_auth_magic
Definition: mesa_drm_auth.h:55
void(* MirAuthMagicCallback)(int response, void *context)
Definition: mesa_drm_auth.h:40

Copyright © 2012-2019 Canonical Ltd.
Generated on Fri Feb 1 22:50:25 UTC 2019
This documentation is licensed under the GPL version 2 or 3.