e_policy_wl_screenshooter: add implementation for version 2 of tizen_screenshooter 60/144460/2
authorJunSeok, Kim <juns.kim@samsung.com>
Wed, 16 Aug 2017 05:43:22 +0000 (14:43 +0900)
committerJunSeok Kim <juns.kim@samsung.com>
Thu, 17 Aug 2017 01:57:52 +0000 (01:57 +0000)
The destructor added to tizen_screenshooter so add the implementation of
server side.

Change-Id: I518ae78ff36b3da5443a99b4319c36b150330e83

src/bin/e_comp_wl_screenshooter.c

index 760590221e21c5c8b17fc97481f4949027135f63..cc21201d740d47cee8410281723e597c1824dd37 100644 (file)
@@ -1568,10 +1568,17 @@ _e_tz_screenshooter_set_oneshot_auto_rotation(struct wl_client *client,
      screenshot_auto_rotation = EINA_FALSE;
 }
 
+static void
+_e_tz_screenshooter_destroy(struct wl_client *client, struct wl_resource *resource)
+{
+   wl_resource_destroy(resource);
+}
+
 static const struct tizen_screenshooter_interface _e_tz_screenshooter_interface =
 {
    _e_tz_screenshooter_get_screenmirror,
-   _e_tz_screenshooter_set_oneshot_auto_rotation
+   _e_tz_screenshooter_set_oneshot_auto_rotation,
+   _e_tz_screenshooter_destroy,
 };
 
 static void
@@ -1580,7 +1587,7 @@ _e_tz_screenshooter_cb_bind(struct wl_client *client, void *data, uint32_t versi
    struct wl_resource *res;
    int i;
 
-   if (!(res = wl_resource_create(client, &tizen_screenshooter_interface, MIN(version, 1), id)))
+   if (!(res = wl_resource_create(client, &tizen_screenshooter_interface, MIN(version, 2), id)))
      {
         ERR("Could not create tizen_screenshooter resource: %m");
         wl_client_post_no_memory(client);
@@ -1778,7 +1785,7 @@ e_comp_wl_screenshooter_init(void)
      }
 
    /* try to add tizen_screenshooter to wayland globals */
-   if (!wl_global_create(e_comp_wl->wl.disp, &tizen_screenshooter_interface, 1,
+   if (!wl_global_create(e_comp_wl->wl.disp, &tizen_screenshooter_interface, 2,
                          NULL, _e_tz_screenshooter_cb_bind))
      {
         ERR("Could not add tizen_screenshooter to wayland globals");