dsync-ibc-pipe.c revision 2e652d2651b2800f99a17dcb3014a009fe4660d3
/* Copyright (c) 2013-2015 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "istream.h"
#include "dsync-mail.h"
#include "dsync-mailbox.h"
#include "dsync-mailbox-state.h"
#include "dsync-mailbox-tree.h"
#include "dsync-ibc-private.h"
enum item_type {
};
struct item {
union {
struct dsync_ibc_settings set;
struct dsync_mailbox_state state;
struct dsync_mailbox_node node;
struct dsync_mailbox dsync_box;
struct dsync_mailbox_attribute attr;
struct dsync_mail_change change;
struct dsync_mail_request request;
struct dsync_mail mail;
struct {
const struct dsync_mailbox_delete *deletes;
unsigned int count;
char hierarchy_sep;
} u;
};
struct dsync_ibc_pipe {
struct dsync_ibc_pipe *remote;
};
{
unsigned int count;
if (count == 0)
return ret;
}
static struct item * ATTR_NOWARN_UNUSED_RESULT
{
switch (type) {
case ITEM_END_OF_LIST:
case ITEM_MAILBOX_STATE:
case ITEM_MAILBOX_DELETE:
break;
case ITEM_HANDSHAKE:
case ITEM_MAILBOX:
case ITEM_MAILBOX_TREE_NODE:
case ITEM_MAILBOX_ATTRIBUTE:
case ITEM_MAIL_CHANGE:
case ITEM_MAIL_REQUEST:
case ITEM_MAIL:
break;
}
return item;
}
static struct item *
{
return NULL;
}
{
return FALSE;
return FALSE;
return TRUE;
}
{
}
}
}
static void
const struct dsync_ibc_settings *set)
{
}
static enum dsync_ibc_recv_ret
const struct dsync_ibc_settings **set_r)
{
return DSYNC_IBC_RECV_RET_TRYAGAIN;
return DSYNC_IBC_RECV_RET_OK;
}
{
}
{
}
static void
{
}
static void
const struct dsync_mailbox_state *state)
{
}
static enum dsync_ibc_recv_ret
struct dsync_mailbox_state *state_r)
{
return DSYNC_IBC_RECV_RET_FINISHED;
return DSYNC_IBC_RECV_RET_TRYAGAIN;
return DSYNC_IBC_RECV_RET_OK;
}
static void
const char *const *name,
const struct dsync_mailbox_node *node)
{
/* a little bit kludgy way to send it */
}
static enum dsync_ibc_recv_ret
const char *const **name_r,
const struct dsync_mailbox_node **node_r)
{
return DSYNC_IBC_RECV_RET_FINISHED;
return DSYNC_IBC_RECV_RET_TRYAGAIN;
return DSYNC_IBC_RECV_RET_OK;
}
static void
const struct dsync_mailbox_delete *deletes,
unsigned int count, char hierarchy_sep)
{
/* we'll assume that the deletes are permanent. this works for now.. */
/* a little bit kludgy way to send it */
}
static enum dsync_ibc_recv_ret
const struct dsync_mailbox_delete **deletes_r,
unsigned int *count_r,
char *hierarchy_sep_r)
{
return DSYNC_IBC_RECV_RET_FINISHED;
return DSYNC_IBC_RECV_RET_TRYAGAIN;
return DSYNC_IBC_RECV_RET_OK;
}
static void
const struct dsync_mailbox *dsync_box)
{
const struct mailbox_cache_field *cf;
struct mailbox_cache_field *ncf;
}
}
static enum dsync_ibc_recv_ret
const struct dsync_mailbox **dsync_box_r)
{
return DSYNC_IBC_RECV_RET_FINISHED;
return DSYNC_IBC_RECV_RET_TRYAGAIN;
return DSYNC_IBC_RECV_RET_OK;
}
static void
const struct dsync_mailbox_attribute *attr)
{
}
static enum dsync_ibc_recv_ret
const struct dsync_mailbox_attribute **attr_r)
{
return DSYNC_IBC_RECV_RET_FINISHED;
return DSYNC_IBC_RECV_RET_TRYAGAIN;
return DSYNC_IBC_RECV_RET_OK;
}
static void
const struct dsync_mail_change *change)
{
}
static enum dsync_ibc_recv_ret
const struct dsync_mail_change **change_r)
{
return DSYNC_IBC_RECV_RET_FINISHED;
return DSYNC_IBC_RECV_RET_TRYAGAIN;
return DSYNC_IBC_RECV_RET_OK;
}
static void
const struct dsync_mail_request *request)
{
}
static enum dsync_ibc_recv_ret
const struct dsync_mail_request **request_r)
{
return DSYNC_IBC_RECV_RET_FINISHED;
return DSYNC_IBC_RECV_RET_TRYAGAIN;
return DSYNC_IBC_RECV_RET_OK;
}
static void
{
}
}
static enum dsync_ibc_recv_ret
{
return DSYNC_IBC_RECV_RET_FINISHED;
return DSYNC_IBC_RECV_RET_TRYAGAIN;
return DSYNC_IBC_RECV_RET_OK;
}
{
}
}
{
}
static const struct dsync_ibc_vfuncs dsync_ibc_pipe_vfuncs = {
};
static struct dsync_ibc_pipe *
dsync_ibc_pipe_alloc(void)
{
struct dsync_ibc_pipe *pipe;
return pipe;
}
{
}