server_params_copy

This commit is contained in:
Romain Vimont
2021-05-02 15:01:18 +02:00
parent efb531943d
commit 52f5c6d4c1
3 changed files with 72 additions and 12 deletions

View File

@@ -47,16 +47,18 @@ struct server {
uint16_t local_port; // selected from port_range
bool tunnel_enabled;
bool tunnel_forward; // use "adb forward" instead of "adb reverse"
// The internal allocated strings are copies owned by the server
struct server_params params;
};
// init default values
// init server fields
bool
server_init(struct server *server);
server_init(struct server *server, const struct server_params *params);
// push, enable tunnel et start the server
bool
server_start(struct server *server, const char *serial,
const struct server_params *params);
server_start(struct server *server, const char *serial);
// block until the communication with the server is established
bool