dsync-proxy.c revision e59faf65ce864fe95dc00f5d52b8323cdbd0608a
/* Copyright (c) 2009-2010 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "str.h"
#include "strescape.h"
#include "ostream.h"
#include "hex-binary.h"
#include "mail-types.h"
#include "imap-util.h"
#include "dsync-data.h"
#include "dsync-proxy.h"
#include <stdlib.h>
{
const char *const *fields;
unsigned int i, count;
if (!array_is_created(strings))
return;
for (i = 0; i < count; i++) {
}
}
const struct dsync_message *msg)
{
}
struct dsync_message *msg_r)
{
enum mail_flags flag;
if (**args != '\\') {
} else {
if (flag == 0)
return -1;
}
}
(void)array_append_space(&keywords);
return 0;
}
struct dsync_message *msg_r,
const char **error_r)
{
/* guid uid modseq flags save_date */
*error_r = "Missing parameters";
return -1;
}
*error_r = "Invalid system flags";
return -1;
}
return 0;
}
{
char **args;
unsigned int i;
int ret;
T_BEGIN {
(const char *const *)args,
} T_END;
return ret;
}
const struct dsync_msg_static_data *msg)
{
}
const char *const *args,
struct dsync_msg_static_data *msg_r,
const char **error_r)
{
/* received_date pop3_uidl */
*error_r = "Missing parameters";
return -1;
}
return 0;
}
struct dsync_msg_static_data *msg_r,
const char **error_r)
{
char **args;
unsigned int i;
int ret;
T_BEGIN {
(const char *const *)args,
} T_END;
return ret;
}
const struct dsync_mailbox *box)
{
char s[2];
str_tabescape_write(str, s);
if (dsync_mailbox_is_noselect(box)) {
return;
}
(unsigned long long)box->highest_modseq);
}
struct dsync_mailbox *box_r,
const char **error_r)
{
unsigned int i = 0, count;
char *p;
*error_r = "Mailbox missing parameters";
return -1;
}
/* name dir_guid mailbox_guid uid_validity uid_next highest_modseq */
*error_r = "Invalid mailbox name hierarchy separator";
return -1;
}
if (*p != '\0') {
*error_r = "Invalid mailbox last_change";
return -1;
}
if (*p != '\0' ||
*error_r = "Invalid mailbox flags";
return -1;
}
/* \noselect mailbox */
return 0;
}
if (dsync_proxy_mailbox_guid_import(args[i++],
&box_r->mailbox_guid) < 0) {
*error_r = "Invalid mailbox GUID";
return -1;
}
*error_r = "Invalid mailbox uid_validity";
return -1;
}
*error_r = "Invalid mailbox uid_next";
return -1;
}
if (*p != '\0') {
*error_r = "Invalid mailbox highest_modseq";
return -1;
}
args += i;
count -= i;
for (i = 0; i < count; i++) {
}
return 0;
}
struct dsync_mailbox *box_r,
const char **error_r)
{
char **args;
int ret;
T_BEGIN {
(const char *const *)args,
} T_END;
return ret;
}
const mailbox_guid_t *mailbox)
{
}
{
return -1;
return 0;
}
{
start = i;
}
}
}