ecore_wl2: Auto generate session-recovery protocol
authorDerek Foreman <derekf@osg.samsung.com>
Tue, 17 Jan 2017 22:29:06 +0000 (16:29 -0600)
committerDerek Foreman <derekf@osg.samsung.com>
Wed, 18 Jan 2017 19:04:47 +0000 (13:04 -0600)
Check in the latest session-recovery xml and remove the checked
in generated files.

.gitignore
src/Makefile_Ecore_Wl2.am
src/lib/ecore_wl2/ecore_wl2_private.h
src/lib/ecore_wl2/session-recovery.c [deleted file]
src/lib/ecore_wl2/session-recovery.h [deleted file]
src/wayland_protocol/session-recovery.xml [new file with mode: 0644]

index b00829a..8c38228 100644 (file)
@@ -77,3 +77,7 @@ Session.vim
 /src/modules/evas/engines/gl_common/shader_3d/evas_3d_shaders.x
 /src/scripts/eo/eo_debug
 /src/bin/ecore_con/efl_net_proxy_helper
+
+#Once all protocols are generated these will use wildcards
+/src/lib/ecore_wl2/session-recovery-client-protocol.h
+/src/lib/ecore_wl2/session-recovery-protocol.c
index 7ffc2ef..7ad1662 100644 (file)
@@ -10,8 +10,8 @@ dist_installed_ecorewl2mainheaders_DATA = lib/ecore_wl2/Ecore_Wl2.h
 lib_ecore_wl2_libecore_wl2_la_SOURCES = \
 lib/ecore_wl2/teamwork_protocol.c \
 lib/ecore_wl2/teamwork_protocol.h \
-lib/ecore_wl2/session-recovery.h \
-lib/ecore_wl2/session-recovery.c \
+lib/ecore_wl2/session-recovery-client-protocol.h \
+lib/ecore_wl2/session-recovery-protocol.c \
 lib/ecore_wl2/subsurface-client-protocol.h \
 lib/ecore_wl2/subsurface-protocol.c \
 lib/ecore_wl2/xdg-shell-client-protocol.h \
@@ -37,4 +37,8 @@ lib_ecore_wl2_libecore_wl2_la_LIBADD = @ECORE_WL2_LIBS@
 lib_ecore_wl2_libecore_wl2_la_DEPENDENCIES = @ECORE_WL2_INTERNAL_LIBS@
 lib_ecore_wl2_libecore_wl2_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
 
+BUILT_SOURCES += \
+ lib/ecore_wl2/session-recovery-protocol.c \
+ lib/ecore_wl2/session-recovery-client-protocol.h
+
 endif
index 49b80f8..ff9a09e 100644 (file)
@@ -18,7 +18,7 @@
 # include "xdg-shell-client-protocol.h"
 # define XDG_VERSION 5
 
-# include "session-recovery.h"
+# include "session-recovery-client-protocol.h"
 
 # include "zxdg-shell-client-protocol.h"
 
diff --git a/src/lib/ecore_wl2/session-recovery.c b/src/lib/ecore_wl2/session-recovery.c
deleted file mode 100644 (file)
index 47ecbb9..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <stdlib.h>
-#include <stdint.h>
-#include "wayland-util.h"
-
-extern const struct wl_interface wl_surface_interface;
-
-static const struct wl_interface *types[] = {
-       &wl_surface_interface,
-       &wl_surface_interface,
-       NULL,
-       &wl_surface_interface,
-       NULL,
-       &wl_surface_interface,
-       NULL,
-};
-
-static const struct wl_message zwp_e_session_recovery_requests[] = {
-       { "get_uuid", "o", types + 0 },
-       { "set_uuid", "os", types + 1 },
-       { "destroy_uuid", "os", types + 3 },
-};
-
-static const struct wl_message zwp_e_session_recovery_events[] = {
-       { "create_uuid", "os", types + 5 },
-};
-
-WL_EXPORT const struct wl_interface zwp_e_session_recovery_interface = {
-       "zwp_e_session_recovery", 1,
-       3, zwp_e_session_recovery_requests,
-       1, zwp_e_session_recovery_events,
-};
-
diff --git a/src/lib/ecore_wl2/session-recovery.h b/src/lib/ecore_wl2/session-recovery.h
deleted file mode 100644 (file)
index 980d37f..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-#ifndef E_SESSION_RECOVERY_CLIENT_PROTOCOL_H
-#define E_SESSION_RECOVERY_CLIENT_PROTOCOL_H
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "wayland-client.h"
-
-struct wl_client;
-struct wl_resource;
-
-struct wl_surface;
-struct zwp_e_session_recovery;
-
-extern const struct wl_interface zwp_e_session_recovery_interface;
-
-struct zwp_e_session_recovery_listener {
-       /**
-        * create_uuid - (none)
-        * @surface: (none)
-        * @uuid: (none)
-        */
-       void (*create_uuid)(void *data,
-                           struct zwp_e_session_recovery *zwp_e_session_recovery,
-                           struct wl_surface *surface,
-                           const char *uuid);
-};
-
-static inline int
-zwp_e_session_recovery_add_listener(struct zwp_e_session_recovery *zwp_e_session_recovery,
-                                   const struct zwp_e_session_recovery_listener *listener, void *data)
-{
-       return wl_proxy_add_listener((struct wl_proxy *) zwp_e_session_recovery,
-                                    (void (**)(void)) listener, data);
-}
-
-#define ZWP_E_SESSION_RECOVERY_GET_UUID        0
-#define ZWP_E_SESSION_RECOVERY_SET_UUID        1
-#define ZWP_E_SESSION_RECOVERY_DESTROY_UUID    2
-
-#define ZWP_E_SESSION_RECOVERY_GET_UUID_SINCE_VERSION  1
-#define ZWP_E_SESSION_RECOVERY_SET_UUID_SINCE_VERSION  1
-#define ZWP_E_SESSION_RECOVERY_DESTROY_UUID_SINCE_VERSION      1
-
-static inline void
-zwp_e_session_recovery_set_user_data(struct zwp_e_session_recovery *zwp_e_session_recovery, void *user_data)
-{
-       wl_proxy_set_user_data((struct wl_proxy *) zwp_e_session_recovery, user_data);
-}
-
-static inline void *
-zwp_e_session_recovery_get_user_data(struct zwp_e_session_recovery *zwp_e_session_recovery)
-{
-       return wl_proxy_get_user_data((struct wl_proxy *) zwp_e_session_recovery);
-}
-
-static inline uint32_t
-zwp_e_session_recovery_get_version(struct zwp_e_session_recovery *zwp_e_session_recovery)
-{
-       return wl_proxy_get_version((struct wl_proxy *) zwp_e_session_recovery);
-}
-
-static inline void
-zwp_e_session_recovery_destroy(struct zwp_e_session_recovery *zwp_e_session_recovery)
-{
-       wl_proxy_destroy((struct wl_proxy *) zwp_e_session_recovery);
-}
-
-static inline void
-zwp_e_session_recovery_get_uuid(struct zwp_e_session_recovery *zwp_e_session_recovery, struct wl_surface *surface)
-{
-       wl_proxy_marshal((struct wl_proxy *) zwp_e_session_recovery,
-                        ZWP_E_SESSION_RECOVERY_GET_UUID, surface);
-}
-
-static inline void
-zwp_e_session_recovery_set_uuid(struct zwp_e_session_recovery *zwp_e_session_recovery, struct wl_surface *surface, const char *uuid)
-{
-       wl_proxy_marshal((struct wl_proxy *) zwp_e_session_recovery,
-                        ZWP_E_SESSION_RECOVERY_SET_UUID, surface, uuid);
-}
-
-static inline void
-zwp_e_session_recovery_destroy_uuid(struct zwp_e_session_recovery *zwp_e_session_recovery, struct wl_surface *surface, const char *uuid)
-{
-       wl_proxy_marshal((struct wl_proxy *) zwp_e_session_recovery,
-                        ZWP_E_SESSION_RECOVERY_DESTROY_UUID, surface, uuid);
-}
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif
diff --git a/src/wayland_protocol/session-recovery.xml b/src/wayland_protocol/session-recovery.xml
new file mode 100644 (file)
index 0000000..3109413
--- /dev/null
@@ -0,0 +1,21 @@
+<protocol name="e_session_recovery">
+
+  <interface name="zwp_e_session_recovery" version="1">
+    <request name="get_uuid">
+      <arg name="surface" type="object" interface="wl_surface"/>
+    </request>
+    <request name="set_uuid">
+      <arg name="surface" type="object" interface="wl_surface"/>
+      <arg name="uuid" type="string"/>
+    </request>
+    <request name="destroy_uuid">
+      <arg name="surface" type="object" interface="wl_surface"/>
+      <arg name="uuid" type="string"/>
+    </request>
+    <event name="create_uuid">
+      <arg name="surface" type="object" interface="wl_surface"/>
+      <arg name="uuid" type="string"/>
+    </event>
+  </interface>
+
+</protocol>