Privatize low-level adb functions

Only expose the interruptible user-friendly API.
This commit is contained in:
Romain Vimont
2021-11-18 22:12:56 +01:00
parent ce225f019a
commit 3fdbd994e0
2 changed files with 8 additions and 41 deletions

View File

@@ -6,44 +6,11 @@
#include <stdbool.h>
#include <inttypes.h>
#include "util/process.h"
#include "util/intr.h"
sc_pid
adb_execute(const char *serial, const char *const adb_cmd[], size_t len);
sc_pid
adb_execute_p(const char *serial, const char *const adb_cmd[], size_t len,
sc_pipe *pout);
sc_pid
adb_exec_forward(const char *serial, uint16_t local_port,
const char *device_socket_name);
sc_pid
adb_exec_forward_remove(const char *serial, uint16_t local_port);
sc_pid
adb_exec_reverse(const char *serial, const char *device_socket_name,
uint16_t local_port);
sc_pid
adb_exec_reverse_remove(const char *serial, const char *device_socket_name);
sc_pid
adb_exec_push(const char *serial, const char *local, const char *remote);
sc_pid
adb_exec_install(const char *serial, const char *local);
/**
* Execute `adb get-serialno`
*
* The result can be read from the output parameter `pout`.
*/
sc_pid
adb_exec_get_serialno(sc_pipe *pout);
bool
adb_forward(struct sc_intr *intr, const char *serial, uint16_t local_port,
const char *device_socket_name);