summaryrefslogtreecommitdiffstats
path: root/src/shell.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-04-26 20:30:05 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-04-26 20:37:47 +0200
commit4020ee614cfe248010764028902d80b4a9091f7d (patch)
treed0bc8cb336401d1d87b60ab66a2595f0294aaddf /src/shell.h
parent1ea5ef8944db5da3ff9eeb2d72bcf8a887599925 (diff)
downloadfastd-4020ee614cfe248010764028902d80b4a9091f7d.tar
fastd-4020ee614cfe248010764028902d80b4a9091f7d.zip
Revise shell command API
Diffstat (limited to 'src/shell.h')
-rw-r--r--src/shell.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/shell.h b/src/shell.h
index 30de630..9b66477 100644
--- a/src/shell.h
+++ b/src/shell.h
@@ -38,6 +38,7 @@ struct fastd_shell_command {
bool sync;
};
+
static inline void fastd_shell_command_unset(fastd_shell_command_t *command) {
free(command->command);
command->command = NULL;
@@ -58,5 +59,9 @@ static inline bool fastd_shell_command_isset(const fastd_shell_command_t *comman
return command->command;
}
-bool fastd_shell_command_exec_sync(const fastd_shell_command_t *command, const fastd_peer_t *peer, const fastd_peer_address_t *local_addr, const fastd_peer_address_t *peer_addr, int *ret);
-void fastd_shell_command_exec(const fastd_shell_command_t *command, const fastd_peer_t *peer, const fastd_peer_address_t *local_addr, const fastd_peer_address_t *peer_addr);
+fastd_shell_env_t * fastd_shell_env_alloc(void);
+void fastd_shell_env_set(fastd_shell_env_t *env, const char *key, const char *value);
+void fastd_shell_env_free(fastd_shell_env_t *env);
+
+bool fastd_shell_command_exec_sync(const fastd_shell_command_t *command, const fastd_shell_env_t *env, int *ret);
+void fastd_shell_command_exec(const fastd_shell_command_t *command, const fastd_shell_env_t *env);