usb: move vconf enum to deviced 51/273751/1
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 13 Apr 2022 08:13:34 +0000 (17:13 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Wed, 13 Apr 2022 08:13:34 +0000 (17:13 +0900)
Change-Id: I98e52b0747e77cfc84a757a5a21fd6054b26baa9
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/usb/usb-dbus.c
src/usb/usb-debug.c
src/usb/usb-gadget.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 efa1da8..6a9030c 100644 (file)
@@ -3,7 +3,6 @@
 
 #include <libsyscommon/libsystemd.h>
 #include <libsyscommon/list.h>
-#include <vconf-internal-usb-keys.h>
 
 #include <shared/log.h>
 
index 161be96..e49e8e8 100644 (file)
@@ -2,7 +2,6 @@
 #define __USB_GADGET_H__
 
 #include <stdint.h>
-#include <vconf-internal-usb-keys.h>
 
 /*The default USB configuration */
 #define DEFAULT_VID 0x04e8
@@ -73,6 +72,46 @@ struct usb_gadget_id {
        unsigned int function_mask;
 };
 
+enum usb_mode_idx {
+       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 = 8
+};
+
+enum usb_mode {
+       USB_FUNCTION_NONE = 0,
+               USB_FUNCTION_MTP = 1,
+               USB_FUNCTION_ACM = 2,
+               USB_FUNCTION_SDB = 4,
+               USB_FUNCTION_RNDIS = 8,
+               USB_FUNCTION_DIAG = 16,
+               USB_FUNCTION_CONN_GADGET = 32,
+               USB_FUNCTION_DM = 64,
+               USB_FUNCTION_RMNET = 128
+};
+
+enum usb_mode_deprecated {
+       SET_USB_NONE = 0,
+               SET_USB_DEFAULT = 1,
+               SET_USB_SDB = 2,
+               SET_USB_SDB_DIAG = 3,
+               SET_USB_RNDIS_TETHERING = 4,
+               SET_USB_RNDIS  = 5,
+               SET_USB_RNDIS_SDB = 6,
+               SET_USB_DIAG_SDB = 7,
+               SET_USB_RNDIS_DIAG = 8,
+               SET_USB_ACCESSORY = 9,
+               SET_USB_DIAG_RMNET = 11,
+               SET_USB_ACM_SDB_DM = 12,
+               SET_USB_RNDIS_SDB_ACM = 13
+};
+
 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;