summaryrefslogtreecommitdiffstats
path: root/polyp/cli-command.h
diff options
context:
space:
mode:
Diffstat (limited to 'polyp/cli-command.h')
-rw-r--r--polyp/cli-command.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/polyp/cli-command.h b/polyp/cli-command.h
index 0f089f61..4887c55e 100644
--- a/polyp/cli-command.h
+++ b/polyp/cli-command.h
@@ -25,8 +25,17 @@
#include "strbuf.h"
#include "core.h"
+/* Execute a single CLI command. Write the results to the string
+ * buffer *buf. If *fail is non-zero the function will return -1 when
+ * one or more of the executed commands failed. If *verbose is
+ * non-zero the command is executed verbosely. Both *verbose and *fail
+ * may be modified by the function call. */
int pa_cli_command_execute_line(struct pa_core *c, const char *s, struct pa_strbuf *buf, int *fail, int *verbose);
+
+/* Execute a whole file of CLI commands */
int pa_cli_command_execute_file(struct pa_core *c, const char *fn, struct pa_strbuf *buf, int *fail, int *verbose);
+
+/* Split the specified string into lines and run pa_cli_command_execute_line() for each. */
int pa_cli_command_execute(struct pa_core *c, const char *s, struct pa_strbuf *buf, int *fail, int *verbose);
#endif