1
#ifndef __LOGIN_PROXY_H
2
#define __LOGIN_PROXY_H
6
/* Called when new input comes from proxy. */
7
typedef void proxy_callback_t(struct istream *input, struct ostream *output,
10
/* Create a proxy to given host. Returns NULL if failed. Given callback is
11
called when new input is available from proxy. */
13
login_proxy_new(struct client *client, const char *host, unsigned int port,
14
proxy_callback_t *callback, void *context);
15
/* Free the proxy. This should be called if authentication fails. */
16
void login_proxy_free(struct login_proxy *proxy);
18
/* Detach proxy from client. This is done after the authentication is
19
successful and all that is left is the dummy proxying. */
20
void login_proxy_detach(struct login_proxy *proxy, struct istream *client_input,
21
struct ostream *client_output);
23
void login_proxy_deinit(void);