summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2015-03-20 13:28:08 +0100
committerStefan Schmidt <stefan@osg.samsung.com>2015-06-29 17:09:57 +0200
commitcb449adde6d992c42bb01ebae10cd76b544da8db (patch)
tree982a7e149e88bccbdab7a829a3803a0233bb4687
parentf74895c6b7ef5442b1143a6c1f2f9b860114603b (diff)
ecore_wl: Add generated session-recovery-protocol files to build
For now these are generated externally by wayland-scanner and added here. Also keep the original xml protocol file here for now. This covers the client side for applications while the server side code sits with E as compositor.
-rw-r--r--src/Makefile_Ecore_Wayland.am4
-rw-r--r--src/lib/ecore_wayland/session-recovery-client-protocol.h68
-rw-r--r--src/lib/ecore_wayland/session-recovery-protocol.c23
-rw-r--r--src/lib/ecore_wayland/session-recovery.xml12
4 files changed, 106 insertions, 1 deletions
diff --git a/src/Makefile_Ecore_Wayland.am b/src/Makefile_Ecore_Wayland.am
index f9bb3621d2..6099f34cd4 100644
--- a/src/Makefile_Ecore_Wayland.am
+++ b/src/Makefile_Ecore_Wayland.am
@@ -21,7 +21,9 @@ lib/ecore_wayland/subsurface-client-protocol.h \
21lib/ecore_wayland/ivi-application-protocol.c \ 21lib/ecore_wayland/ivi-application-protocol.c \
22lib/ecore_wayland/ivi-application-client-protocol.h \ 22lib/ecore_wayland/ivi-application-client-protocol.h \
23lib/ecore_wayland/xdg-shell-client-protocol.h \ 23lib/ecore_wayland/xdg-shell-client-protocol.h \
24lib/ecore_wayland/xdg-shell-protocol.c 24lib/ecore_wayland/xdg-shell-protocol.c \
25lib/ecore_wayland/session-recovery-client-protocol.h \
26lib/ecore_wayland/session-recovery-protocol.c
25 27
26lib_ecore_wayland_libecore_wayland_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ECORE_WAYLAND_CFLAGS@ 28lib_ecore_wayland_libecore_wayland_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ECORE_WAYLAND_CFLAGS@
27lib_ecore_wayland_libecore_wayland_la_LIBADD = @ECORE_WAYLAND_LIBS@ 29lib_ecore_wayland_libecore_wayland_la_LIBADD = @ECORE_WAYLAND_LIBS@
diff --git a/src/lib/ecore_wayland/session-recovery-client-protocol.h b/src/lib/ecore_wayland/session-recovery-client-protocol.h
new file mode 100644
index 0000000000..97848c8fec
--- /dev/null
+++ b/src/lib/ecore_wayland/session-recovery-client-protocol.h
@@ -0,0 +1,68 @@
1#ifndef SESSION_RECOVERY_CLIENT_PROTOCOL_H
2#define SESSION_RECOVERY_CLIENT_PROTOCOL_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <stdint.h>
9#include <stddef.h>
10#include "wayland-client.h"
11
12struct wl_client;
13struct wl_resource;
14
15struct session_recovery;
16
17extern const struct wl_interface session_recovery_interface;
18
19struct session_recovery_listener {
20 /**
21 * uuid - (none)
22 * @uuid: (none)
23 */
24 void (*uuid)(void *data,
25 struct session_recovery *session_recovery,
26 const char *uuid);
27};
28
29static inline int
30session_recovery_add_listener(struct session_recovery *session_recovery,
31 const struct session_recovery_listener *listener, void *data)
32{
33 return wl_proxy_add_listener((struct wl_proxy *) session_recovery,
34 (void (**)(void)) listener, data);
35}
36
37#define SESSION_RECOVERY_PROVIDE_UUID 0
38
39static inline void
40session_recovery_set_user_data(struct session_recovery *session_recovery, void *user_data)
41{
42 wl_proxy_set_user_data((struct wl_proxy *) session_recovery, user_data);
43}
44
45static inline void *
46session_recovery_get_user_data(struct session_recovery *session_recovery)
47{
48 return wl_proxy_get_user_data((struct wl_proxy *) session_recovery);
49}
50
51static inline void
52session_recovery_destroy(struct session_recovery *session_recovery)
53{
54 wl_proxy_destroy((struct wl_proxy *) session_recovery);
55}
56
57static inline void
58session_recovery_provide_uuid(struct session_recovery *session_recovery, const char *uuid)
59{
60 wl_proxy_marshal((struct wl_proxy *) session_recovery,
61 SESSION_RECOVERY_PROVIDE_UUID, uuid);
62}
63
64#ifdef __cplusplus
65}
66#endif
67
68#endif
diff --git a/src/lib/ecore_wayland/session-recovery-protocol.c b/src/lib/ecore_wayland/session-recovery-protocol.c
new file mode 100644
index 0000000000..5e0a835f48
--- /dev/null
+++ b/src/lib/ecore_wayland/session-recovery-protocol.c
@@ -0,0 +1,23 @@
1#include <stdlib.h>
2#include <stdint.h>
3#include "wayland-util.h"
4
5
6static const struct wl_interface *types[] = {
7 NULL,
8};
9
10static const struct wl_message session_recovery_requests[] = {
11 { "provide_uuid", "s", types + 0 },
12};
13
14static const struct wl_message session_recovery_events[] = {
15 { "uuid", "s", types + 0 },
16};
17
18WL_EXPORT const struct wl_interface session_recovery_interface = {
19 "session_recovery", 1,
20 1, session_recovery_requests,
21 1, session_recovery_events,
22};
23
diff --git a/src/lib/ecore_wayland/session-recovery.xml b/src/lib/ecore_wayland/session-recovery.xml
new file mode 100644
index 0000000000..d996b6dae2
--- /dev/null
+++ b/src/lib/ecore_wayland/session-recovery.xml
@@ -0,0 +1,12 @@
1<protocol name="session_recovery">
2
3 <interface name="session_recovery" version="1">
4 <request name="provide_uuid">
5 <arg name="uuid" type="string"/>
6 </request>
7 <event name="uuid">
8 <arg name="uuid" type="string"/>
9 </event>
10 </interface>
11
12</protocol>