dpms: fix build error 91/278091/1
authorJunkyeong Kim <jk0430.kim@samsung.com>
Tue, 7 Jun 2022 04:29:44 +0000 (13:29 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 18 Jul 2022 05:08:45 +0000 (14:08 +0900)
Change-Id: I06c768d97d26ccee3ca85825e653c6cc56538539
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
include/libds-tizen/dpms.h
src/libds-tizen/dpms.c
src/libds-tizen/meson.build

index 3293ae8..10df4c1 100644 (file)
@@ -30,7 +30,7 @@ enum ds_tizen_dpms_error
 struct ds_tizen_dpms_event
 {
     //struct ds_output *output;
-    ds_tizen_dpms_mode mode;
+    enum ds_tizen_dpms_mode mode;
 };
 
 struct ds_tizen_dpms *
index c5bcabb..315d6c0 100644 (file)
@@ -3,9 +3,10 @@
 #include <stdlib.h>
 #include <wayland-server.h>
 #include "libds/log.h"
-#include "libds-tizen/dpms.h"
 #include "libds/output.h"
+#include "libds-tizen/dpms.h"
 #include "tizen-dpms-server-protocol.h"
+#include "util.h"
 
 struct ds_tizen_dpms
 {
@@ -53,8 +54,8 @@ ds_tizen_dpms_create(struct wl_display *display)
     wl_signal_init(&dpms->events.set_dpms);
     wl_signal_init(&dpms->events.get_dpms);
 
-    dpms->display_destroy.notify = dpms_handle_display_destroy;
-    wl_display_add_destroy_listener(display, &dpms->display_destroy);
+    dpms->destroy.notify = dpms_handle_display_destroy;
+    wl_display_add_destroy_listener(display, &dpms->destroy);
 
     ds_inf("global create : tizen_dpms_manager(%p)", dpms);
 
@@ -103,12 +104,12 @@ dpms_handle_display_destroy(struct wl_listener *listener, void *data)
 {
     struct ds_tizen_dpms *dpms;
 
-    dpms = wl_container_of(listener, dpms, display_destroy);
+    dpms = wl_container_of(listener, dpms, destroy);
 
     ds_inf("global destroy : tizen_dpms_manager(%p)", dpms);
 
     wl_signal_emit(&dpms->events.destroy, dpms);
-    wl_list_remove(&dpms->display_destroy.link);
+    wl_list_remove(&dpms->destroy.link);
     wl_resource_set_user_data(dpms->res, NULL);
     wl_global_destroy(dpms->global);
     free(dpms);
@@ -132,8 +133,8 @@ _tizen_dpms_manager_handle_set_dpms(struct wl_client *client,
 
     if (mode > DS_TIZEN_DPMS_MODE_OFF) {
         ds_err("set dpms error : not supported mode(%d)", mode);
-        tizen_dpms_manager_send_set_state(resource, E_DPMS_MODE_OFF,
-                E_DPMS_MANAGER_ERROR_INVALID_PARAMETER);
+        tizen_dpms_manager_send_set_state(resource, DS_TIZEN_DPMS_MODE_OFF,
+                DS_TIZEN_DPMS_ERROR_INVALID_PARAMETER);
         return;
     }
 
index 0d780a3..6779a72 100644 (file)
@@ -1,6 +1,7 @@
 libds_tizen_files = [
   'pixel_format.c',
   'tbm_server.c',
+  'dpms.c',
 ]
 
 libds_tizen_deps = [
@@ -8,6 +9,7 @@ libds_tizen_deps = [
   dependency('libdrm', required: true),
   dependency('libtbm', required: true),
   dependency('wayland-tbm-server', required: true),
+  dependency('tizen-dpms-server', required: true),
 ]
 
 subdir('allocator')