ecore_wl: Added destroy interface for tizen_rotation_interface. 55/57855/1
authorSeunghun Lee <shiin.lee@samsung.com>
Mon, 25 Jan 2016 08:48:15 +0000 (17:48 +0900)
committerSeunghun Lee <shiin.lee@samsung.com>
Mon, 25 Jan 2016 08:48:15 +0000 (17:48 +0900)
Change-Id: Iaf716fa2363f78abd8ca29f51e39f7730f39032b

src/lib/ecore_wayland/tizen-policy-ext-client-protocol.h
src/lib/ecore_wayland/tizen-policy-ext-protocol.c

index 6759b90..45964a4 100644 (file)
@@ -96,9 +96,10 @@ tizen_rotation_add_listener(struct tizen_rotation *tizen_rotation,
                                     (void (**)(void)) listener, data);
 }
 
-#define TIZEN_ROTATION_SET_AVAILABLE_ANGLES    0
-#define TIZEN_ROTATION_SET_PREFERRED_ANGLE     1
-#define TIZEN_ROTATION_ACK_ANGLE_CHANGE        2
+#define TIZEN_ROTATION_DESTROY 0
+#define TIZEN_ROTATION_SET_AVAILABLE_ANGLES    1
+#define TIZEN_ROTATION_SET_PREFERRED_ANGLE     2
+#define TIZEN_ROTATION_ACK_ANGLE_CHANGE        3
 
 static inline void
 tizen_rotation_set_user_data(struct tizen_rotation *tizen_rotation, void *user_data)
@@ -115,6 +116,9 @@ tizen_rotation_get_user_data(struct tizen_rotation *tizen_rotation)
 static inline void
 tizen_rotation_destroy(struct tizen_rotation *tizen_rotation)
 {
+       wl_proxy_marshal((struct wl_proxy *) tizen_rotation,
+                        TIZEN_ROTATION_DESTROY);
+
        wl_proxy_destroy((struct wl_proxy *) tizen_rotation);
 }
 
index 35b3f33..d5ab495 100644 (file)
@@ -23,6 +23,7 @@ WL_EXPORT const struct wl_interface tizen_policy_ext_interface = {
 };
 
 static const struct wl_message tizen_rotation_requests[] = {
+       { "destroy", "", types + 0 },
        { "set_available_angles", "u", types + 0 },
        { "set_preferred_angle", "u", types + 0 },
        { "ack_angle_change", "u", types + 0 },
@@ -36,7 +37,7 @@ static const struct wl_message tizen_rotation_events[] = {
 
 WL_EXPORT const struct wl_interface tizen_rotation_interface = {
        "tizen_rotation", 1,
-       3, tizen_rotation_requests,
+       4, tizen_rotation_requests,
        3, tizen_rotation_events,
 };