dsync-ibc.h revision 5332128f69ad688cc024897c2a92f6b37ef8d05c
#ifndef DSYNC_IBC_H
#define DSYNC_IBC_H
/* dsync inter-brain communicator */
#include "ioloop.h"
#include "guid.h"
#include "dsync-brain.h"
struct dsync_mailbox;
struct dsync_mailbox_state;
struct dsync_mailbox_node;
struct dsync_mailbox_delete;
struct dsync_mail;
struct dsync_mail_change;
struct dsync_mail_request;
enum dsync_ibc_send_ret {
/* send queue is full, stop sending more */
};
enum dsync_ibc_recv_ret {
/* try again / error (the error handling delayed until io callback) */
};
struct dsync_ibc_settings {
/* if non-NULL, sync only this namespace */
const char *sync_ns_prefix;
enum dsync_brain_flags brain_flags;
};
struct dsync_ibc *
const char *name, const char *temp_path_prefix);
/* I/O callback is called whenever new data is available. It's also called on
errors, so check first the error status. */
const struct dsync_ibc_settings *set);
enum dsync_ibc_recv_ret
const struct dsync_ibc_settings **set_r);
const struct dsync_mailbox_state *state);
enum dsync_ibc_recv_ret
struct dsync_mailbox_state *state_r);
const char *const *name,
const struct dsync_mailbox_node *node);
enum dsync_ibc_recv_ret
const char *const **name_r,
const struct dsync_mailbox_node **node_r);
const struct dsync_mailbox_delete *deletes,
unsigned int count, char hierarchy_sep);
enum dsync_ibc_recv_ret
const struct dsync_mailbox_delete **deletes_r,
unsigned int *count_r, char *hierarchy_sep_r);
const struct dsync_mailbox *dsync_box);
enum dsync_ibc_recv_ret
const struct dsync_mailbox **dsync_box_r);
const struct dsync_mail_change *change);
enum dsync_ibc_recv_ret
const struct dsync_mail_change **change_r);
const struct dsync_mail_request *request);
enum dsync_ibc_recv_ret
const struct dsync_mail_request **request_r);
enum dsync_ibc_recv_ret
#endif