Extract USB handling from AOA
The AOA code handled both USB initialization and AOA commands/events. Extract USB-related code to a separate file and structure. PR #2974 <https://github.com/Genymobile/scrcpy/pull/2974>
This commit is contained in:
21
app/src/usb/usb.h
Normal file
21
app/src/usb/usb.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef SC_USB_H
|
||||
#define SC_USB_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <libusb-1.0/libusb.h>
|
||||
|
||||
struct sc_usb {
|
||||
libusb_context *context;
|
||||
libusb_device *device;
|
||||
libusb_device_handle *handle;
|
||||
};
|
||||
|
||||
bool
|
||||
sc_usb_init(struct sc_usb *usb, const char *serial);
|
||||
|
||||
void
|
||||
sc_usb_destroy(struct sc_usb *usb);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user