Split command into process and adb

The process API provides the system-specific implementation, the adb API
uses it to expose adb commands.
This commit is contained in:
Romain Vimont
2021-01-03 14:55:15 +01:00
parent aa8b571389
commit 4bd9da4c93
12 changed files with 97 additions and 80 deletions

34
app/src/adb.h Normal file
View File

@@ -0,0 +1,34 @@
#ifndef SC_ADB_H
#define SC_ADB_H
#include <stdbool.h>
#include <inttypes.h>
#include "config.h"
#include "util/process.h"
process_t
adb_execute(const char *serial, const char *const adb_cmd[], size_t len);
process_t
adb_forward(const char *serial, uint16_t local_port,
const char *device_socket_name);
process_t
adb_forward_remove(const char *serial, uint16_t local_port);
process_t
adb_reverse(const char *serial, const char *device_socket_name,
uint16_t local_port);
process_t
adb_reverse_remove(const char *serial, const char *device_socket_name);
process_t
adb_push(const char *serial, const char *local, const char *remote);
process_t
adb_install(const char *serial, const char *local);
#endif