Signed-off-by: Sung-Jin Park <[email protected]>
---
 src/wayland-server-core.h |  6 ++++++
 src/wayland-server.c      | 13 +++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/src/wayland-server-core.h b/src/wayland-server-core.h
index e8e1e9c..6990423 100644
--- a/src/wayland-server-core.h
+++ b/src/wayland-server-core.h
@@ -186,6 +186,12 @@ int
 wl_client_get_fd(struct wl_client *client);
 
 void
+wl_client_set_user_data(struct wl_client *client, void *data);
+
+void *
+wl_client_get_user_data(struct wl_client *client);
+
+void
 wl_client_add_destroy_listener(struct wl_client *client,
                               struct wl_listener *listener);
 
diff --git a/src/wayland-server.c b/src/wayland-server.c
index 6654cd7..e7a6eae 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -81,6 +81,7 @@ struct wl_client {
        struct wl_signal destroy_signal;
        struct ucred ucred;
        int error;
+       void *data;
 };
 
 struct wl_display {
@@ -526,6 +527,18 @@ wl_client_get_fd(struct wl_client *client)
        return wl_connection_get_fd(client->connection);
 }
 
+WL_EXPORT void
+wl_client_set_user_data(struct wl_client *client, void *data)
+{
+       client->data = data;
+}
+
+WL_EXPORT void *
+wl_client_get_user_data(struct wl_client *client)
+{
+       return client->data;
+}
+
 /** Look up an object in the client name space
  *
  * \param client The client object
-- 
1.9.1

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to