Copy server params
This is a preliminary step necessary to move the server to a separate thread.
This commit is contained in:
@@ -40,7 +40,8 @@ struct server_params {
|
||||
};
|
||||
|
||||
struct server {
|
||||
char *serial;
|
||||
// The internal allocated strings are copies owned by the server
|
||||
struct server_params params;
|
||||
|
||||
sc_pid process;
|
||||
// alive only between start() and stop()
|
||||
@@ -54,13 +55,13 @@ struct server {
|
||||
bool tunnel_forward; // use "adb forward" instead of "adb reverse"
|
||||
};
|
||||
|
||||
// init default values
|
||||
// init the server with the given params
|
||||
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 struct server_params *params);
|
||||
server_start(struct server *server);
|
||||
|
||||
// block until the communication with the server is established
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user