mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
This will allow to execute other USB calls (retrieving the device list for example) before connecting to the selected device. PR #2974 <https://github.com/Genymobile/scrcpy/pull/2974>
26 lines
387 B
C
26 lines
387 B
C
#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_handle *handle;
|
|
};
|
|
|
|
bool
|
|
sc_usb_init(struct sc_usb *usb);
|
|
|
|
void
|
|
sc_usb_destroy(struct sc_usb *usb);
|
|
|
|
bool
|
|
sc_usb_connect(struct sc_usb *usb, const char *serial);
|
|
|
|
void
|
|
sc_usb_disconnect(struct sc_usb *usb);
|
|
|
|
#endif
|