ecore_wayland: rename session recovery to align namespace
authorStefan Schmidt <stefan@osg.samsung.com>
Fri, 18 Dec 2015 13:51:04 +0000 (14:51 +0100)
committerStefan Schmidt <stefan@osg.samsung.com>
Fri, 18 Dec 2015 13:51:04 +0000 (14:51 +0100)
Align out extension naming with other unstable wayland protocols.
The unstable protocols from the wayland-protocols repo are prefixed
with a zwp additionally we keep a e prefix for now as we are still
developing this here. No functional change, just rename.

Pointed out by Derek that the session-recovery interface name is a
bit to generic here.

src/lib/ecore_wayland/ecore_wl.c
src/lib/ecore_wayland/ecore_wl_private.h
src/lib/ecore_wayland/ecore_wl_window.c
src/lib/ecore_wayland/session-recovery-client-protocol.h
src/lib/ecore_wayland/session-recovery-protocol.c
src/lib/ecore_wayland/session-recovery.xml

index 9dc8c9b..7cd352e 100644 (file)
@@ -524,7 +524,7 @@ _ecore_wl_shutdown(Eina_Bool close)
         _ecore_wl_xkb_shutdown(_ecore_wl_disp);
 
         if (_ecore_wl_disp->wl.session_recovery)
-          session_recovery_destroy(_ecore_wl_disp->wl.session_recovery);
+          zwp_e_session_recovery_destroy(_ecore_wl_disp->wl.session_recovery);
 #ifdef USE_IVI_SHELL
         if (_ecore_wl_disp->wl.ivi_application)
           ivi_application_destroy(_ecore_wl_disp->wl.ivi_application);
@@ -675,10 +675,10 @@ _ecore_wl_cb_handle_global(void *data, struct wl_registry *registry, unsigned in
      _ecore_wl_output_add(ewd, id);
    else if (!strcmp(interface, "wl_seat"))
      _ecore_wl_input_add(ewd, id);
-   else if (!strcmp(interface, "session_recovery") && getenv("EFL_WAYLAND_SESSION_RECOVERY"))
+   else if (!strcmp(interface, "zwp_e_session_recovery") && getenv("EFL_WAYLAND_SESSION_RECOVERY"))
      {
         ewd->wl.session_recovery =
-          wl_registry_bind(registry, id, &session_recovery_interface, 1);
+          wl_registry_bind(registry, id, &zwp_e_session_recovery_interface, 1);
      }
 #ifdef USE_IVI_SHELL
    else if (!strcmp(interface, "ivi_application"))
index 589f9f9..a100b44 100644 (file)
@@ -73,7 +73,7 @@ struct _Ecore_Wl_Display
         struct wl_shell *shell;
         struct xdg_shell *xdg_shell;
         struct wl_shell *desktop_shell;
-        struct session_recovery *session_recovery;
+        struct zwp_e_session_recovery *session_recovery;
 # ifdef USE_IVI_SHELL
         struct ivi_application *ivi_application;
 # endif
index 44a3ef4..39764d4 100644 (file)
@@ -15,7 +15,7 @@ static char *_ecore_wl_window_id_str_get(unsigned int win_id);
 static void _ecore_xdg_handle_surface_configure(void *data, struct xdg_surface *xdg_surface, int32_t width, int32_t height,struct wl_array *states, uint32_t serial);
 static void _ecore_xdg_handle_surface_delete(void *data, struct xdg_surface *xdg_surface);
 static void _ecore_xdg_handle_popup_done(void *data, struct xdg_popup *xdg_popup);
-static void _ecore_session_recovery_uuid(void *data, struct session_recovery *session_recovery, const char *uuid);
+static void _ecore_session_recovery_uuid(void *data, struct zwp_e_session_recovery *session_recovery, const char *uuid);
 
 /* local variables */
 static Eina_Hash *_windows = NULL;
@@ -39,7 +39,7 @@ static const struct xdg_popup_listener _ecore_xdg_popup_listener =
    _ecore_xdg_handle_popup_done,
 };
 
-static const struct session_recovery_listener _ecore_session_recovery_listener =
+static const struct zwp_e_session_recovery_listener _ecore_session_recovery_listener =
 {
    _ecore_session_recovery_uuid,
 };
@@ -403,12 +403,12 @@ ecore_wl_window_surface_create(Ecore_Wl_Window *win)
 
    if (_ecore_wl_disp->wl.session_recovery && getenv("EFL_WAYLAND_SESSION_RECOVERY"))
      {
-        session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery,
+        zwp_e_session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery,
                                       &_ecore_session_recovery_listener, win);
         if (!uuid_is_null(win->uuid))
           {
              uuid_unparse(win->uuid, uuid);
-             session_recovery_provide_uuid(_ecore_wl_disp->wl.session_recovery, uuid);
+             zwp_e_session_recovery_provide_uuid(_ecore_wl_disp->wl.session_recovery, uuid);
           }
      }
    win->surface_id = wl_proxy_get_id((struct wl_proxy *)win->surface);
@@ -1102,7 +1102,7 @@ _ecore_xdg_handle_popup_done(void *data, struct xdg_popup *xdg_popup)
 }
 
 static void
-_ecore_session_recovery_uuid(void *data EINA_UNUSED, struct session_recovery *session_recovery, const char *uuid)
+_ecore_session_recovery_uuid(void *data EINA_UNUSED, struct zwp_e_session_recovery *session_recovery, const char *uuid)
 {
    Ecore_Wl_Window *win;
    char uuid_string[37];
index 97848c8..2405747 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef SESSION_RECOVERY_CLIENT_PROTOCOL_H
-#define SESSION_RECOVERY_CLIENT_PROTOCOL_H
+#ifndef E_SESSION_RECOVERY_CLIENT_PROTOCOL_H
+#define E_SESSION_RECOVERY_CLIENT_PROTOCOL_H
 
 #ifdef  __cplusplus
 extern "C" {
@@ -12,53 +12,53 @@ extern "C" {
 struct wl_client;
 struct wl_resource;
 
-struct session_recovery;
+struct zwp_e_session_recovery;
 
-extern const struct wl_interface session_recovery_interface;
+extern const struct wl_interface zwp_e_session_recovery_interface;
 
-struct session_recovery_listener {
+struct zwp_e_session_recovery_listener {
        /**
         * uuid - (none)
         * @uuid: (none)
         */
        void (*uuid)(void *data,
-                    struct session_recovery *session_recovery,
+                    struct zwp_e_session_recovery *zwp_e_session_recovery,
                     const char *uuid);
 };
 
 static inline int
-session_recovery_add_listener(struct session_recovery *session_recovery,
-                             const struct session_recovery_listener *listener, void *data)
+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 *) session_recovery,
+       return wl_proxy_add_listener((struct wl_proxy *) zwp_e_session_recovery,
                                     (void (**)(void)) listener, data);
 }
 
-#define SESSION_RECOVERY_PROVIDE_UUID  0
+#define ZWP_E_SESSION_RECOVERY_PROVIDE_UUID    0
 
 static inline void
-session_recovery_set_user_data(struct session_recovery *session_recovery, void *user_data)
+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 *) session_recovery, user_data);
+       wl_proxy_set_user_data((struct wl_proxy *) zwp_e_session_recovery, user_data);
 }
 
 static inline void *
-session_recovery_get_user_data(struct session_recovery *session_recovery)
+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 *) session_recovery);
+       return wl_proxy_get_user_data((struct wl_proxy *) zwp_e_session_recovery);
 }
 
 static inline void
-session_recovery_destroy(struct session_recovery *session_recovery)
+zwp_e_session_recovery_destroy(struct zwp_e_session_recovery *zwp_e_session_recovery)
 {
-       wl_proxy_destroy((struct wl_proxy *) session_recovery);
+       wl_proxy_destroy((struct wl_proxy *) zwp_e_session_recovery);
 }
 
 static inline void
-session_recovery_provide_uuid(struct session_recovery *session_recovery, const char *uuid)
+zwp_e_session_recovery_provide_uuid(struct zwp_e_session_recovery *zwp_e_session_recovery, const char *uuid)
 {
-       wl_proxy_marshal((struct wl_proxy *) session_recovery,
-                        SESSION_RECOVERY_PROVIDE_UUID, uuid);
+       wl_proxy_marshal((struct wl_proxy *) zwp_e_session_recovery,
+                        ZWP_E_SESSION_RECOVERY_PROVIDE_UUID, uuid);
 }
 
 #ifdef  __cplusplus
index 5e0a835..32ddbcb 100644 (file)
@@ -7,17 +7,17 @@ static const struct wl_interface *types[] = {
        NULL,
 };
 
-static const struct wl_message session_recovery_requests[] = {
+static const struct wl_message zwp_e_session_recovery_requests[] = {
        { "provide_uuid", "s", types + 0 },
 };
 
-static const struct wl_message session_recovery_events[] = {
+static const struct wl_message zwp_e_session_recovery_events[] = {
        { "uuid", "s", types + 0 },
 };
 
-WL_EXPORT const struct wl_interface session_recovery_interface = {
-       "session_recovery", 1,
-       1, session_recovery_requests,
-       1, session_recovery_events,
+WL_EXPORT const struct wl_interface zwp_e_session_recovery_interface = {
+       "zwp_e_session_recovery", 1,
+       1, zwp_e_session_recovery_requests,
+       1, zwp_e_session_recovery_events,
 };
 
index d996b6d..469871e 100644 (file)
@@ -1,6 +1,6 @@
-<protocol name="session_recovery">
+<protocol name="e_session_recovery">
 
-  <interface name="session_recovery" version="1">
+  <interface name="zwp_e_session_recovery" version="1">
     <request name="provide_uuid">
       <arg name="uuid" type="string"/>
     </request>