summaryrefslogtreecommitdiff
path: root/client/client.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-04-23 02:42:35 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2013-04-23 02:42:35 +0200
commita5e9f3d26f887deb451a3ea086e52266c117aa0a (patch)
treed9ebd46faa95ad6d27ae0ce2ef3c506bac338516 /client/client.h
parentd2c392d44839baaefa48f4a38060be648d3415fb (diff)
Restructures birdc and birdcl to merge duplicated code.
The BIRD client code is restructured that most of the code (including main function) is shared in client.c, while birdc.c and birdcl.c contain just I/O-specific callbacks. This removes all duplicated code from variant-specific files.
Diffstat (limited to 'client/client.h')
-rw-r--r--client/client.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/client/client.h b/client/client.h
index 2e4e2ea3..b194a772 100644
--- a/client/client.h
+++ b/client/client.h
@@ -6,12 +6,23 @@
* Can be freely distributed and used under the terms of the GNU GPL.
*/
-/* client.c callbacks */
-void cleanup(void);
+extern int init, busy, interactive;
+extern int term_lns, term_cls;
+
+/* birdc.c / birdcl.c */
+
void input_start_list(void);
void input_stop_list(void);
-void server_got_reply(char *x);
+
+void input_init(void);
+void input_notify(int prompt);
+void input_read(void);
+
+void more_begin(void);
+void more_end(void);
+
+void cleanup(void);
/* commands.c */
@@ -20,16 +31,6 @@ void cmd_help(char *cmd, int len);
int cmd_complete(char *cmd, int len, char *buf, int again);
char *cmd_expand(char *cmd);
-/* common.c */
-
-#define STATE_PROMPT 0
-#define STATE_CMD_SERVER 1
-#define STATE_CMD_USER 2
-
-#define SERVER_READ_BUF_LEN 4096
+/* client.c */
-int handle_internal_command(char *cmd);
-void submit_server_command(char *cmd);
-void server_connect(void);
-void server_read(void);
-void server_send(char *cmd);
+void submit_command(char *cmd_raw);