summaryrefslogtreecommitdiffstats
path: root/fastboot/usb.h
diff options
context:
space:
mode:
authorDavid Pursell <dpursell@google.com>2015-10-30 11:22:01 -0700
committerDavid Pursell <dpursell@google.com>2015-11-13 11:08:17 -0800
commit6f233a7799a681e65c539e9c8287db0814c8948f (patch)
tree3fa9f8b84c7d48cb3907d3c3964a3cb3e130e204 /fastboot/usb.h
parentab75edb4ad01b518cb5c96a5a3d4ad344bc4ce26 (diff)
downloadsystem_core-6f233a7799a681e65c539e9c8287db0814c8948f.tar.gz
system_core-6f233a7799a681e65c539e9c8287db0814c8948f.tar.bz2
system_core-6f233a7799a681e65c539e9c8287db0814c8948f.zip
fastboot: create Transport object.
This CL creates a Transport object to provide a generic interface for various transports. Specifically this is designed to be able to add UDP support to fastboot in an upcoming CL without changing the main program logic. Also includes some minor code style fixes and replaces malloc/free in the USB implementation files with smart pointers and std::string. Bug: http://b/22029765 Change-Id: I68641af0da7d13db4647f5e20a18d04d67f0b327
Diffstat (limited to 'fastboot/usb.h')
-rw-r--r--fastboot/usb.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/fastboot/usb.h b/fastboot/usb.h
index 0fda41aae..4acf12d57 100644
--- a/fastboot/usb.h
+++ b/fastboot/usb.h
@@ -29,7 +29,7 @@
#ifndef _USB_H_
#define _USB_H_
-struct usb_handle;
+#include "transport.h"
struct usb_ifc_info {
/* from device descriptor */
@@ -55,10 +55,6 @@ struct usb_ifc_info {
typedef int (*ifc_match_func)(usb_ifc_info *ifc);
-usb_handle *usb_open(ifc_match_func callback);
-int usb_close(usb_handle *h);
-int usb_read(usb_handle *h, void *_data, int len);
-int usb_write(usb_handle *h, const void *_data, int len);
-int usb_wait_for_disconnect(usb_handle *h);
+Transport* usb_open(ifc_match_func callback);
#endif