aboutsummaryrefslogtreecommitdiff
path: root/client/libacron/apps/acronc/handler.h
diff options
context:
space:
mode:
Diffstat (limited to 'client/libacron/apps/acronc/handler.h')
-rw-r--r--client/libacron/apps/acronc/handler.h55
1 files changed, 0 insertions, 55 deletions
diff --git a/client/libacron/apps/acronc/handler.h b/client/libacron/apps/acronc/handler.h
deleted file mode 100644
index 1a2ccfe..0000000
--- a/client/libacron/apps/acronc/handler.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Created by yuuta on 7/24/22.
- */
-
-#ifndef ACRONC_HANDLER_H
-#define ACRONC_HANDLER_H
-
-#include <uv.h>
-#include <libac.h>
-
-enum exit_reason {
- /* Exit due to a signal. Socket is working. */
- EXIT_SIGNAL,
- /* Exit due to an EOF from stdin. Socket is working. */
- EXIT_STDIN_EOF,
- /* Exit due to an EOF from socket. Socket is closed. */
- EXIT_SOCKET_EOF,
- /* Exit due to a socket failure. Socket is closed. */
- EXIT_FAILURE_SOCKET,
- /* Exit due to a failure. Socket is working. */
- EXIT_FAILURE
-};
-
-struct uv_obj {
- void *obj;
- bool running;
-};
-
-extern uv_loop_t *loop;
-
-extern void (*on_exit)(enum exit_reason reason);
-
-int h_signal(void);
-
-int h_stdin(int (*on_input)(ac_request_t *req),
- void (*on_close)(void));
-
-int h_socket(ac_connection_parameters_t *p,
- const struct addrinfo *ai,
- void (*on_connect_result)(bool),
- int (*on_ready)(void),
- int (*on_received)(ac_obj_t *obj),
- void (*on_closed)(void));
-
-int sock_request(ac_request_t *req);
-
-int sock_ext(bool trigger_callback);
-
-int a_dns(const char *host,
- uint16_t port,
- void (*on_resolv)(int status,
- const struct addrinfo *,
- void (*on_connect_result)(bool)));
-
-#endif /* ACRONC_HANDLER_H */