usb: apply new enums for usb-gadget mode 69/274569/1 accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix accepted/tizen_8.0_unified accepted/tizen_9.0_unified accepted/tizen_unified tizen tizen_7.0 tizen_7.0_hotfix tizen_8.0 tizen_9.0 accepted/tizen/7.0/unified/20221110.061724 accepted/tizen/7.0/unified/hotfix/20221116.105150 accepted/tizen/8.0/unified/20231005.093210 accepted/tizen/9.0/unified/20241030.233736 accepted/tizen/unified/20220505.134709 submit/tizen/20220503.013451 tizen_7.0_m2_release tizen_8.0_m2_release tizen_9.0_m2_release
authorYoungjae Cho <y0.cho@samsung.com>
Tue, 3 May 2022 00:38:40 +0000 (09:38 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Tue, 3 May 2022 00:39:16 +0000 (09:39 +0900)
Change-Id: I2b5328d2c51f3002820f7de8e40ed801eabb4852
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
CMakeLists.txt
packaging/data-router.spec
src/dr-noti-handler.c

index 6a66e76..289aa9c 100644 (file)
@@ -19,6 +19,7 @@ INCLUDE(FindPkgConfig)
 pkg_check_modules(pkgs REQUIRED glib-2.0
                                gio-2.0
                                dlog vconf
+                               capi-system-device
                                )
 
 FOREACH(flag ${pkgs_CFLAGS})
index a14cacf..9222901 100755 (executable)
@@ -11,6 +11,7 @@ BuildRequires: pkgconfig(glib-2.0) >= 2.26
 BuildRequires: pkgconfig(gio-2.0)
 BuildRequires: pkgconfig(dlog)
 BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(capi-system-device)
 Requires(post): /usr/bin/vconftool
 
 %description
index a99e05d..b47f762 100755 (executable)
@@ -23,6 +23,7 @@
 
 #include <glib.h>
 #include <sys/wait.h>
+#include <device/usb-gadget.h>
 
 #include "dr-main.h"
 #include "dr-usb.h"
@@ -38,14 +39,7 @@ volatile gboolean dsr_status = FALSE;
 
 static gboolean acm_enabled(int mode)
 {
-       switch (mode) {
-       case SET_USB_DEFAULT:
-       case SET_USB_SDB:
-       case SET_USB_SDB_DIAG:
-               return TRUE;
-       default:
-               return FALSE;
-       }
+       return (mode & USB_GADGET_FUNC_ACM);
 }
 
 static void __usb_status_noti_handler(void *data)