File: session.h

package info (click to toggle)
imapfilter 1%3A1.2.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 300 kB
  • ctags: 315
  • sloc: ansic: 3,392; sh: 182; makefile: 103
file content (37 lines) | stat: -rw-r--r-- 904 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef SESSION_H
#define SESSION_H


#ifndef NO_SSLTLS
#include <openssl/ssl.h>
#endif


/* IMAP session. */
typedef struct session {
	char *server;		/* Server hostname. */
	char *port;		/* Server port. */ 
	char *username;		/* User name. */
	int socket;		/* Socket. */
#ifndef NO_SSLTLS
	SSL *ssl;		/* SSL socket. */
#endif
	unsigned int protocol;	/* IMAP protocol.  Currently IMAP4rev1 and
				 * IMAP4 are supported. */
	unsigned int capabilities;	/* Capabilities of the mail server. */
	struct {		/* Namespace of the mail server's mailboxes. */
		char *prefix;	/* Namespace prefix. */
		char delim;	/* Namespace delimiter. */
	} ns;
} session;


/*	session.c	*/
session *session_new(void);
void session_init(session *ssn);
void session_destroy(session *ssn);
void session_free(session *ssn);
session *session_find(const char *server, const char *port, const char *user);


#endif				/* SESSION_H */