~ubuntu-branches/ubuntu/vivid/dovecot/vivid

« back to all changes in this revision

Viewing changes to src/login-common/login-proxy.h

  • Committer: Bazaar Package Importer
  • Author(s): Jaldhar H. Vyas
  • Date: 2005-11-05 23:19:19 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20051105231919-ydujs4y7687fpor2
Tags: upstream-1.0.alpha4
ImportĀ upstreamĀ versionĀ 1.0.alpha4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __LOGIN_PROXY_H
 
2
#define __LOGIN_PROXY_H
 
3
 
 
4
struct login_proxy;
 
5
 
 
6
/* Called when new input comes from proxy. */
 
7
typedef void proxy_callback_t(struct istream *input, struct ostream *output,
 
8
                              void *context);
 
9
 
 
10
/* Create a proxy to given host. Returns NULL if failed. Given callback is
 
11
   called when new input is available from proxy. */
 
12
struct login_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);
 
17
 
 
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);
 
22
 
 
23
void login_proxy_deinit(void);
 
24
 
 
25
#endif