From 7c321d614e8d91b23434b13bfcf89274797815ec Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Sat, 22 Apr 2017 22:24:06 +0200 Subject: Initial Commit. --- src/meta_net/meta_net.h | 82 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 src/meta_net/meta_net.h (limited to 'src/meta_net/meta_net.h') diff --git a/src/meta_net/meta_net.h b/src/meta_net/meta_net.h new file mode 100644 index 0000000..ce5c61e --- /dev/null +++ b/src/meta_net/meta_net.h @@ -0,0 +1,82 @@ +#ifndef _JH_META_NET_META_NET_H_ +#define _JH_META_NET_META_NET_H_ + +#include "../parameters/parameters_types.h" + +#include "../irc/irc_types.h" + +#include "meta_net_types.h" + +void JH_meta_net_initialize +( + struct JH_meta_net socket [const restrict static 1] +); + +int JH_meta_net_connect +( + struct JH_meta_net socket [const restrict static 1], + const struct JH_parameters params [const restrict static 1] +); + +void JH_meta_net_finalize +( + struct JH_meta_net socket [const restrict static 1] +); + +int JH_meta_net_try_request +( + struct JH_meta_net socket [const restrict static 1], + const char string [const restrict static 1], + const size_t string_size +); + +int JH_meta_net_handle_user_message +( + struct JH_meta_net socket [const restrict static 1], + const char string [const restrict static 1], + const size_t string_size +); + +int JH_meta_net_handle_user_action +( + struct JH_meta_net socket [const restrict static 1], + const char string [const restrict static 1], + const size_t string_size +); + +int JH_meta_net_read +( + struct JH_meta_net socket [const restrict static 1] +); + +/* TODO */ +int JH_meta_net_write +( + struct JH_meta_net socket [const restrict static 1] +); + +void JH_meta_net_handle_reply +( + struct JH_meta_net socket [const restrict static 1], + struct JH_irc irc [const restrict static 1], + const struct JH_parameters params [const restrict static 1] +); + +int JH_meta_net_pre_select +( + struct JH_meta_net socket [const restrict static 1], + const struct JH_parameters params [const restrict static 1], + fd_set in [const restrict static 1], + fd_set out [const restrict static 1], + int max_fd [const restrict static 1] +); + +int JH_meta_net_post_select +( + struct JH_meta_net socket [const restrict static 1], + const struct JH_parameters params [const restrict static 1], + fd_set in [const restrict static 1], + fd_set out [const restrict static 1] +); + +#endif -- cgit v1.2.3-70-g09d2