~james-page/ubuntu/raring/dovecot/autopkgtest

« back to all changes in this revision

Viewing changes to src/lib-storage/mail-search.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:
35
35
        /* body */
36
36
        SEARCH_BODY,
37
37
        SEARCH_TEXT,
38
 
        SEARCH_BODY_FAST,
39
 
        SEARCH_TEXT_FAST,
40
38
 
41
39
        /* extensions */
42
40
        SEARCH_MODSEQ,
93
91
 
94
92
        void *context;
95
93
        const char *hdr_field_name; /* for SEARCH_HEADER* */
96
 
        unsigned int not:1;
 
94
        unsigned int match_not:1; /* result = !result */
97
95
        unsigned int match_always:1; /* result = 1 always */
98
96
        unsigned int nonmatch_always:1; /* result = 0 always */
 
97
        unsigned int fuzzy:1; /* use fuzzy matching for this arg */
99
98
 
100
99
        int result; /* -1 = unknown, 0 = unmatched, 1 = matched */
101
100
};
106
105
        pool_t pool;
107
106
        struct mailbox *box;
108
107
        struct mail_search_arg *args;
109
 
        const char *charset;
110
108
 
111
109
        unsigned int simplified:1;
112
110
        unsigned int have_inthreads:1;
114
112
 
115
113
#define ARG_SET_RESULT(arg, res) \
116
114
        STMT_START { \
117
 
                (arg)->result = !(arg)->not ? (res) : \
 
115
                (arg)->result = !(arg)->match_not ? (res) : \
118
116
                        (res) == -1 ? -1 : !(res); \
119
117
        } STMT_END
120
118
 
176
174
                                    const char *vname, char sep);
177
175
 
178
176
/* Simplify/optimize search arguments. Afterwards all OR/SUB args are
179
 
   guaranteed to have not=FALSE. */
 
177
   guaranteed to have match_not=FALSE. */
180
178
void mail_search_args_simplify(struct mail_search_args *args);
181
179
 
 
180
/* Serialization for search args' results. */
 
181
void mail_search_args_result_serialize(const struct mail_search_args *args,
 
182
                                       buffer_t *dest);
 
183
void mail_search_args_result_deserialize(struct mail_search_args *args,
 
184
                                         const unsigned char *data,
 
185
                                         size_t size);
 
186
 
182
187
#endif