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 137a5e1c5e73b4211896e93f10e7281e35d3ef51..35eb16d2bff2a07572a5ca09e4ae2555424da832 100644 (file)
@@ -25,6 +25,7 @@
 #include "core/log.h"
 
 #include "usb.h"
+#include "usb-gadget.h"
 #include "usb-debug.h"
 
 /* Legacy signals */
index f6bfb23ce78ede6f4d0b222a4b51391c7aea51fb..22b5025af0fed2151b619b3ec2f3ba2829149437 100644 (file)
@@ -26,6 +26,7 @@
 #include "shared/device-notifier.h"
 
 #include "usb.h"
+#include "usb-gadget.h"
 
 static bool debug_state;
 
index 161be96181e589853ee1a01df9680c20c473464c..e98442fdbfdc6f67ccf1e95166820563007e3cf9 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 f0d71429d005f2eb14b6ea44f7184e320ae9d331..76dcb7dcbbd6f00e5ef84f422bcb80b9119bd4b5 100644 (file)
@@ -25,6 +25,7 @@
 #include "shared/device-notifier.h"
 
 #include "usb.h"
+#include "usb-gadget.h"
 
 static bool tethering_state;