pop3c-storage.c revision 5d4a0dac041964a04405bc6b94de51315ca917af
/* Copyright (c) 2011-2013 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "ioloop.h"
#include "str.h"
#include "mail-copy.h"
#include "mail-user.h"
#include "mailbox-list-private.h"
#include "index-mail.h"
#include "pop3c-client.h"
#include "pop3c-settings.h"
#include "pop3c-sync.h"
#include "pop3c-storage.h"
#define DNS_CLIENT_SOCKET_NAME "dns-client"
extern struct mail_storage pop3c_storage;
extern struct mailbox pop3c_mailbox;
static struct mail_storage *pop3c_storage_alloc(void)
{
struct pop3c_storage *storage;
}
static int
const char **error_r)
{
*error_r = "missing pop3c_host";
return -1;
}
*error_r = "missing pop3c_password";
return -1;
}
return 0;
}
static struct pop3c_client *
const struct pop3c_settings *set)
{
struct pop3c_client_settings client_set;
else
return pop3c_client_init(&client_set);
}
static void
struct mailbox_list_settings *set)
{
/* we don't really care about root_dir, but we
just need to get index_dir autocreated.
it happens when index_dir differs from root_dir. */
}
}
static struct mailbox *
{
struct pop3c_mailbox *mbox;
}
static int
enum mailbox_existence *existence_r)
{
else
return 0;
}
{
switch (state) {
case POP3C_COMMAND_STATE_OK:
break;
case POP3C_COMMAND_STATE_ERR:
} else {
/* authentication failure probably */
}
break;
"pop3c: Disconnected from remote server");
break;
}
}
{
return -1;
}
return -1;
}
{
}
static int
bool directory ATTR_UNUSED)
{
"POP3 mailbox creation isn't supported");
return -1;
}
static int
{
update->min_first_recent_uid != 0) {
"POP3 mailbox update isn't supported");
}
}
enum mailbox_metadata_items items,
struct mailbox_metadata *metadata_r)
{
if ((items & MAILBOX_METADATA_GUID) != 0) {
/* a bit ugly way to do this, but better than nothing for now.
FIXME: if indexes are enabled, keep this there. */
}
if (items != 0) {
return -1;
}
return 0;
}
{
}
{
return index_storage_is_inconsistent(box) ||
}
struct mail_storage pop3c_storage = {
.v = {
NULL,
NULL,
}
};
struct mailbox pop3c_mailbox = {
.v = {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
};