pop3c-mail.c revision 5f4e547bb810403e8cfb19a49d8fe34713507ffd
/* Copyright (c) 2011-2013 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "ioloop.h"
#include "istream.h"
#include "index-mail.h"
#include "pop3c-settings.h"
#include "pop3c-client.h"
#include "pop3c-sync.h"
#include "pop3c-storage.h"
{
int tz;
/* we don't care about the date, just return the current date */
*date_r = ioloop_time;
return 0;
}
/* FIXME: we could also parse the first Received: header and get
the date from there, but since this code is unlikely to be called
except during migration, I don't think it really matters. */
}
{
/* FIXME: we could use a value stored in cache */
}
return 0;
}
{
/* virtual size is already known. it's the same as our
(correct) physical size */
return 0;
}
return 0;
}
/* kludge: we want output for POP3 LIST with
pop3_fast_size_lookups=yes. use the remote's LIST values
regardless of their correctness */
if (pop3c_sync_get_sizes(mbox) < 0)
return -1;
}
return 0;
}
/* slow way: get the whole message body */
return -1;
return 0;
}
{
unsigned int cache_idx;
return;
/* make sure it's not cached twice */
}
}
static int
struct message_size *hdr_size,
{
enum pop3c_capability capa;
/* we've fetched the body */
/* we've fetched the header, but we need the body
now too */
} else {
}
}
} else {
}
return -1;
}
return -1;
}
}
if (get_body)
}
}
static int
const char **value_r)
{
switch (field) {
case MAIL_FETCH_UIDL_BACKEND:
case MAIL_FETCH_GUID:
if (pop3c_sync_get_uidls(mbox) < 0)
return -1;
}
return 0;
default:
}
}
struct mail_vfuncs pop3c_mail_vfuncs = {
NULL,
};