85 |
#define LOG_DESTINATION_MAILBOX 6 |
#define LOG_DESTINATION_MAILBOX 6 |
86 |
#define LOG_HEADER 7 |
#define LOG_HEADER 7 |
87 |
|
|
|
/* Buffer size of the IMAP command. */ |
|
|
#define SMALL_CMD 64 |
|
|
#define MEDIUM_CMD 512 |
|
|
#define BIG_CMD 32768 |
|
|
|
|
88 |
/* Store IMAP command type may replace,add or remove flags. */ |
/* Store IMAP command type may replace,add or remove flags. */ |
89 |
#define STORE_FLAG_REPLACE 1 |
#define STORE_FLAG_REPLACE 1 |
90 |
#define STORE_FLAG_ADD 2 |
#define STORE_FLAG_ADD 2 |
105 |
#define RESPONSE_READONLY 5 |
#define RESPONSE_READONLY 5 |
106 |
#define RESPONSE_TRYCREATE 6 |
#define RESPONSE_TRYCREATE 6 |
107 |
|
|
108 |
/* Size of input buffer. */ |
/* Size of temporary buffer. */ |
109 |
#define INPUT_BUF 4096 |
#define BUFFER_SIZE 4096 |
110 |
|
|
111 |
/* Length of mailbox namespace prefix. */ |
/* Length of mailbox namespace prefix. */ |
112 |
#define NAMESPACE_PREFIX_LEN 64 |
#define NAMESPACE_PREFIX_LEN 64 |
138 |
} secmem_t; |
} secmem_t; |
139 |
|
|
140 |
|
|
141 |
|
/* Temporary buffer. */ |
142 |
|
typedef struct buffer { |
143 |
|
char *data; |
144 |
|
size_t size; |
145 |
|
} buffer_t; |
146 |
|
|
147 |
|
|
148 |
/* Namespace of IMAP mailboxes. */ |
/* Namespace of IMAP mailboxes. */ |
149 |
typedef struct namesp { |
typedef struct namesp { |
150 |
char prefix[NAMESPACE_PREFIX_LEN]; |
char prefix[NAMESPACE_PREFIX_LEN]; |
158 |
|
|
159 |
#endif |
#endif |
160 |
|
|
161 |
|
/* buffer.c */ |
162 |
|
void init_buffer(buffer_t * buf); |
163 |
|
void reset_buffer(buffer_t * buf); |
164 |
|
void check_buffer(buffer_t * buf, size_t n); |
165 |
|
|
166 |
/* file.c */ |
/* file.c */ |
167 |
int read_config(char *cfg); |
int read_config(char *cfg); |
168 |
int parse_config(FILE * fd); |
int parse_config(FILE * fd); |
342 |
int append_response(int *sock, unsigned int tag); |
int append_response(int *sock, unsigned int tag); |
343 |
int copy_response(int *sock, unsigned int tag); |
int copy_response(int *sock, unsigned int tag); |
344 |
int analyze_response(int *sock, char *buf); |
int analyze_response(int *sock, char *buf); |
|
void init_ibuf(void); |
|
|
void reset_ibuf(void); |
|
|
void check_ibuf(void); |
|
345 |
|
|
346 |
/* socket.c */ |
/* socket.c */ |
347 |
int init_connection(int *sock, char *serv, unsigned short int port, unsigned int protocol); |
int init_connection(int *sock, char *serv, unsigned short int port, unsigned int protocol); |