client.h revision d1bcee48225783610f0f6f639973677dd72b884a
#ifndef __CLIENT_H
#define __CLIENT_H
struct client;
struct mail_storage;
struct imap_parser;
struct imap_arg;
struct mailbox_custom_flags {
char **custom_flags;
unsigned int custom_flags_count;
};
struct client {
int socket;
struct mail_storage *storage;
struct mailbox_custom_flags mailbox_flags;
unsigned int select_counter; /* increased when mailbox is changed */
unsigned int bad_counter;
struct imap_parser *parser;
const char *cmd_tag; /* tag of command (allocated from parser pool), */
const char *cmd_name; /* command name (allocated from parser pool) */
unsigned int cmd_error:1;
unsigned int sync_flags_send_uid:1;
unsigned int rawlog:1;
found a new line */
};
if the handle is a socket. */
/* Disconnect client connection */
/* Send a line of data to client */
/* Send line of data to client, prefixed with client->tag */
/* Send BAD command error to client. msg can be NULL. */
/* Read a number of arguments. Returns TRUE if everything was read or
FALSE if either needs more data or error occured. */
/* Reads a number of string arguments. ... is a list of pointers where to
store the arguments. */
void clients_init(void);
void clients_deinit(void);
void _client_input(void *context);
#endif