usb-gadget: relocate declarations of enum 97/273797/1
authorYoungjae Cho <y0.cho@samsung.com>
Thu, 14 Apr 2022 02:10:32 +0000 (11:10 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Thu, 14 Apr 2022 02:10:32 +0000 (11:10 +0900)
Move USB_FUNCTION_IDX_* from hal-api-device to deviced.
Move USB_FUNCTION_* from hal-api-device to capi-system-device.

Change-Id: I820fa7532c9376ccf41fdfe7684a39613e60e16b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/usb/usb-dbus.c
src/usb/usb-debug.c
src/usb/usb-gadget.h
src/usb/usb-tethering.c

index 137a5e1..35eb16d 100644 (file)
@@ -25,6 +25,7 @@
 #include "core/log.h"
 
 #include "usb.h"
+#include "usb-gadget.h"
 #include "usb-debug.h"
 
 /* Legacy signals */
index f6bfb23..22b5025 100644 (file)
@@ -26,6 +26,7 @@
 #include "shared/device-notifier.h"
 
 #include "usb.h"
+#include "usb-gadget.h"
 
 static bool debug_state;
 
index 161be96..e98442f 100644 (file)
@@ -2,7 +2,7 @@
 #define __USB_GADGET_H__
 
 #include <stdint.h>
-#include <vconf-internal-usb-keys.h>
+#include <device/usb-gadget.h>
 
 /*The default USB configuration */
 #define DEFAULT_VID 0x04e8
@@ -73,6 +73,19 @@ struct usb_gadget_id {
        unsigned int function_mask;
 };
 
+enum {
+       USB_FUNCTION_IDX_MTP         = 0,
+       USB_FUNCTION_IDX_ACM         = 1,
+       USB_FUNCTION_IDX_SDB         = 2,
+       USB_FUNCTION_IDX_RNDIS       = 3,
+       USB_FUNCTION_IDX_DIAG        = 4,
+       USB_FUNCTION_IDX_CONN_GADGET = 5,
+       USB_FUNCTION_IDX_DM          = 6,
+       USB_FUNCTION_IDX_RMNET       = 7,
+       USB_FUNCTION_IDX_MAX         = USB_FUNCTION_IDX_RMNET + 1
+};
+
+
 struct usb_function *find_usb_function_by_name(const char *name);
 struct usb_function *find_usb_function_by_name_instance(const char *name, const char *instance);
 
index f0d7142..76dcb7d 100644 (file)
@@ -25,6 +25,7 @@
 #include "shared/device-notifier.h"
 
 #include "usb.h"
+#include "usb-gadget.h"
 
 static bool tethering_state;