~ubuntu-branches/ubuntu/quantal/dovecot/quantal-updates

« back to all changes in this revision

Viewing changes to src/doveadm/dsync/dsync-worker-private.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-06-11 11:11:54 UTC
  • mfrom: (1.15.2) (4.1.27 sid)
  • Revision ID: package-import@ubuntu.com-20120611111154-678cwbdj6ktgsv1h
Tags: 1:2.1.7-1ubuntu1
* Merge from Debian unstable, remaining changes:
  + Add mail-stack-delivery package:
    - Update d/rules
    - d/control: convert existing dovecot-postfix package to a dummy
      package and add new mail-stack-delivery package.
    - Update maintainer scripts.
    - Rename d/dovecot-postfix.* to debian/mail-stack-delivery.*
    - d/mail-stack-delivery.preinst: Move previously installed backups and
      config files to a new package namespace.
    - d/mail-stack-delivery.prerm: Added to handle downgrades.
  + Use Snakeoil SSL certificates by default:
    - d/control: Depend on ssl-cert.
    - d/dovecot-core.postinst: Relax grep for SSL_* a bit.
  + Add autopkgtest to debian/tests/*.
  + Add ufw integration:
    - d/dovecot-core.ufw.profile: new ufw profile.
    - d/rules: install profile in dovecot-core.
    - d/control: dovecot-core - suggest ufw.
  + d/{control,rules}: enable PIE hardening.
  + d/dovecot-core.dirs: Added usr/share/doc/dovecot-core
  + Add apport hook:
    - d/rules, d/source_dovecot.py
  + Add upstart job:
    - d/rules, d/dovecot-core.dovecot.upstart, d/control,
      d/dovecot-core.dirs, dovecot-imapd.{postrm, postinst, prerm},
      d/dovecot-pop3d.{postinst, postrm, prerm}.
      d/mail-stack-deliver.postinst: Convert init script to upstart.
  + d/control: Added Pre-Depends: dpkg (>= 1.15.6) to dovecot-dbg to support
    xz compression in Ubuntu.
  + d/control: Demote dovecot-common Recommends: to Suggests: to prevent
    install of extra packages on upgrade.
  + d/patches/dovecot-drac.patch: Updated with version for dovecot >= 2.0.0.
  + d/control: Drop B-D on systemd.
* Dropped changes:
  + d/patches/fix-racey-restart.patch: part of 2.1.x, no longer required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef DSYNC_WORKER_PRIVATE_H
 
2
#define DSYNC_WORKER_PRIVATE_H
 
3
 
 
4
#include "dsync-worker.h"
 
5
 
 
6
struct mail_user;
 
7
 
 
8
struct dsync_worker_vfuncs {
 
9
        void (*deinit)(struct dsync_worker *);
 
10
 
 
11
        bool (*is_output_full)(struct dsync_worker *worker);
 
12
        int (*output_flush)(struct dsync_worker *worker);
 
13
 
 
14
        struct dsync_worker_mailbox_iter *
 
15
                (*mailbox_iter_init)(struct dsync_worker *worker);
 
16
        int (*mailbox_iter_next)(struct dsync_worker_mailbox_iter *iter,
 
17
                                 struct dsync_mailbox *dsync_box_r);
 
18
        int (*mailbox_iter_deinit)(struct dsync_worker_mailbox_iter *iter);
 
19
 
 
20
        struct dsync_worker_subs_iter *
 
21
                (*subs_iter_init)(struct dsync_worker *worker);
 
22
        int (*subs_iter_next)(struct dsync_worker_subs_iter *iter,
 
23
                              struct dsync_worker_subscription *rec_r);
 
24
        int (*subs_iter_next_un)(struct dsync_worker_subs_iter *iter,
 
25
                                 struct dsync_worker_unsubscription *rec_r);
 
26
        int (*subs_iter_deinit)(struct dsync_worker_subs_iter *iter);
 
27
        void (*set_subscribed)(struct dsync_worker *worker,
 
28
                               const char *name, time_t last_change, bool set);
 
29
 
 
30
        struct dsync_worker_msg_iter *
 
31
                (*msg_iter_init)(struct dsync_worker *worker,
 
32
                                 const mailbox_guid_t mailboxes[],
 
33
                                 unsigned int mailbox_count);
 
34
        int (*msg_iter_next)(struct dsync_worker_msg_iter *iter,
 
35
                             unsigned int *mailbox_idx_r,
 
36
                             struct dsync_message *msg_r);
 
37
        int (*msg_iter_deinit)(struct dsync_worker_msg_iter *iter);
 
38
 
 
39
        void (*create_mailbox)(struct dsync_worker *worker,
 
40
                               const struct dsync_mailbox *dsync_box);
 
41
        void (*delete_mailbox)(struct dsync_worker *worker,
 
42
                               const struct dsync_mailbox *dsync_box);
 
43
        void (*delete_dir)(struct dsync_worker *worker,
 
44
                           const struct dsync_mailbox *dsync_box);
 
45
        void (*rename_mailbox)(struct dsync_worker *worker,
 
46
                               const mailbox_guid_t *mailbox,
 
47
                               const struct dsync_mailbox *dsync_box);
 
48
        void (*update_mailbox)(struct dsync_worker *worker,
 
49
                               const struct dsync_mailbox *dsync_box);
 
50
 
 
51
        void (*select_mailbox)(struct dsync_worker *worker,
 
52
                               const mailbox_guid_t *mailbox,
 
53
                               const ARRAY_TYPE(mailbox_cache_field) *cache_fields);
 
54
        void (*msg_update_metadata)(struct dsync_worker *worker,
 
55
                                    const struct dsync_message *msg);
 
56
        void (*msg_update_uid)(struct dsync_worker *worker,
 
57
                               uint32_t old_uid, uint32_t new_uid);
 
58
        void (*msg_expunge)(struct dsync_worker *worker, uint32_t uid);
 
59
        void (*msg_copy)(struct dsync_worker *worker,
 
60
                         const mailbox_guid_t *src_mailbox, uint32_t src_uid,
 
61
                         const struct dsync_message *dest_msg,
 
62
                         dsync_worker_copy_callback_t *callback, void *context);
 
63
        void (*msg_save)(struct dsync_worker *worker,
 
64
                         const struct dsync_message *msg,
 
65
                         const struct dsync_msg_static_data *data,
 
66
                         dsync_worker_save_callback_t *callback,
 
67
                         void *context);
 
68
        void (*msg_save_cancel)(struct dsync_worker *worker);
 
69
        void (*msg_get)(struct dsync_worker *worker,
 
70
                        const mailbox_guid_t *mailbox, uint32_t uid,
 
71
                        dsync_worker_msg_callback_t *callback, void *context);
 
72
        void (*finish)(struct dsync_worker *worker,
 
73
                       dsync_worker_finish_callback_t *callback, void *context);
 
74
};
 
75
 
 
76
struct dsync_worker {
 
77
        struct dsync_worker_vfuncs v;
 
78
 
 
79
        io_callback_t *input_callback, *output_callback;
 
80
        void *input_context, *output_context;
 
81
 
 
82
        unsigned int readonly:1;
 
83
        unsigned int failed:1;
 
84
        unsigned int verbose:1;
 
85
        unsigned int unexpected_changes:1;
 
86
};
 
87
 
 
88
struct dsync_worker_mailbox_iter {
 
89
        struct dsync_worker *worker;
 
90
        bool failed;
 
91
};
 
92
 
 
93
struct dsync_worker_subs_iter {
 
94
        struct dsync_worker *worker;
 
95
        bool failed;
 
96
};
 
97
 
 
98
struct dsync_worker_msg_iter {
 
99
        struct dsync_worker *worker;
 
100
        bool failed;
 
101
};
 
102
 
 
103
void dsync_worker_set_failure(struct dsync_worker *worker);
 
104
 
 
105
#endif