956b8eea7ae479a38b25175447fc8eac2df30480Timo Sirainentypedef void server_cmd_callback_t(int exit_code, const char *error,
e34d170f8f0e084bd94bfbc1a7085ece67e508dfTimo Sirainenint server_connection_create(struct doveadm_server *server,
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainenvoid server_connection_destroy(struct server_connection **conn);
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen/* Return the server given to create() */
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainenserver_connection_get_server(struct server_connection *conn);
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainenvoid server_connection_cmd(struct server_connection *conn, const char *line,
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen server_cmd_callback_t *callback, void *context);
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainen/* Returns TRUE if no command is being processed */
71df09024cea5f2faa93da3bb9513ee96ba6bf22Timo Sirainenbool server_connection_is_idle(struct server_connection *conn);
07ce366ac19bc96be354d26a04305de300c6fe3eTimo Sirainen/* Extract iostreams from connection. Afterwards the server_connection simply
07ce366ac19bc96be354d26a04305de300c6fe3eTimo Sirainen waits for itself to be destroyed. */