imap-quota-plugin.c revision c6e8f897413ce2fce378430a440e90e6421a8db0
/* Copyright (c) 2005-2013 Dovecot authors, see the included COPYING file */
#include "imap-common.h"
#include "str.h"
#include "ostream.h"
#include "imap-quote.h"
#include "mail-namespace.h"
#include "imap-commands.h"
#include "quota.h"
#include "quota-plugin.h"
#include "imap-quota-plugin.h"
#include <stdlib.h>
#define QUOTA_USER_SEPARATOR ':'
const char *imap_quota_plugin_version = DOVECOT_ABI_VERSION;
static struct module *imap_quota_module;
static const char *
struct quota_root *root)
{
const char *name;
return name;
}
static void
{
unsigned int i;
int ret = 0;
if (ret < 0)
break;
if (ret > 0) {
if (i > 0)
(unsigned long long)value,
(unsigned long long)limit);
i++;
}
}
if (ret < 0)
}
{
struct mail_namespace *ns;
struct quota_root_iter *iter;
struct quota_root *root;
/* <mailbox> */
return FALSE;
return TRUE;
return TRUE;
}
return TRUE;
}
/* build QUOTAROOT reply and QUOTA reply for all quota roots */
}
mailbox_free(&box);
/* send replies */
if (str_len(quota_reply) == 0)
else {
}
return TRUE;
}
{
struct quota_root *root;
const char *root_name;
/* <quota root> */
return FALSE;
/* we're an admin. see if there's a quota root for another
user. */
if (p != NULL) {
t_strdup_until(root_name, p));
}
}
return TRUE;
}
return TRUE;
}
{
struct quota_root *root;
/* <quota root> <resource limits> */
return FALSE;
return TRUE;
}
return TRUE;
}
return TRUE;
}
return TRUE;
}
}
return TRUE;
}
{
if (next_hook_client_created != NULL)
}
{
}
void imap_quota_plugin_deinit(void)
{
command_unregister("GETQUOTAROOT");
command_unregister("GETQUOTA");
command_unregister("SETQUOTA");
}
const char imap_quota_plugin_binary_dependency[] = "imap";