imapc-client.c revision f084de14d7e975d4dfbcdfca4301312328720c8a
/* Copyright (c) 2011 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "str.h"
#include "ioloop.h"
#include "safe-mkstemp.h"
#include "iostream-ssl.h"
#include "imapc-msgmap.h"
#include "imapc-connection.h"
#include "imapc-client-private.h"
#include <unistd.h>
const struct imapc_capability_name imapc_capability_names[] = {
{ "SASL-IR", IMAPC_CAPABILITY_SASL_IR },
{ "LITERAL+", IMAPC_CAPABILITY_LITERALPLUS },
{ "QRESYNC", IMAPC_CAPABILITY_QRESYNC },
{ "IDLE", IMAPC_CAPABILITY_IDLE },
{ "UIDPLUS", IMAPC_CAPABILITY_UIDPLUS },
{ "AUTH=PLAIN", IMAPC_CAPABILITY_AUTH_PLAIN },
{ "STARTTLS", IMAPC_CAPABILITY_STARTTLS },
{ "IMAP4REV1", IMAPC_CAPABILITY_IMAP4REV1 },
{ NULL, 0 }
};
static void
void *context ATTR_UNUSED)
{
}
struct imapc_client *
{
struct imapc_client *client;
struct ssl_iostream_settings ssl_set;
const char *source;
i_error("imapc(%s): Couldn't initialize SSL context",
source);
}
}
return client;
}
{
}
{
return;
}
{
struct imapc_client_connection **connp;
}
}
void *context)
{
}
{
struct imapc_client_connection *const *connp;
}
}
{
struct imapc_client_connection *const *connp;
}
{
}
{
}
static struct imapc_client_connection *
{
struct imapc_client_connection *conn;
return conn;
}
static struct imapc_connection *
{
struct imapc_client_connection *const *connp;
/* FIXME: stupid algorithm */
}
struct imapc_command *
{
struct imapc_connection *conn;
}
static struct imapc_client_connection *
{
struct imapc_client_connection *const *conns;
unsigned int i, count;
for (i = 0; i < count; i++) {
return conns[i];
}
return imapc_client_add_connection(client);
}
{
struct imapc_client_connection *conn;
}
struct imapc_client_mailbox *
void *untagged_box_context)
{
struct imapc_client_mailbox *box;
struct imapc_client_connection *conn;
return box;
}
{
}
{
struct imapc_client_connection *const *connp;
break;
}
}
/* set this only after unselect, which may cancel some commands that
reference this box */
}
struct imapc_command *
{
struct imapc_command *cmd;
return cmd;
}
struct imapc_msgmap *
{
}
{
}
{
struct imapc_client_mailbox *selected_box;
if (selected_box == box)
return TRUE;
if (selected_box != NULL)
i_error("imapc: Selected mailbox changed unexpectedly");
return FALSE;
}
enum imapc_capability
{
struct imapc_client_connection *const *connp;
}
const char **path_r)
{
int fd;
i_error("imapc: temp_path_prefix not set, "
"can't create temp file");
return -1;
}
if (fd == -1) {
return -1;
}
/* we just want the fd, unlink it */
/* shouldn't happen.. */
return -1;
}
return fd;
}