dict-private.h (dovecot-2.3.16) | : | dict-private.h (dovecot-2.3.17) | ||
---|---|---|---|---|
skipping to change at line 16 | skipping to change at line 16 | |||
struct ioloop; | struct ioloop; | |||
struct dict_vfuncs { | struct dict_vfuncs { | |||
int (*init)(struct dict *dict_driver, const char *uri, | int (*init)(struct dict *dict_driver, const char *uri, | |||
const struct dict_settings *set, | const struct dict_settings *set, | |||
struct dict **dict_r, const char **error_r); | struct dict **dict_r, const char **error_r); | |||
void (*deinit)(struct dict *dict); | void (*deinit)(struct dict *dict); | |||
void (*wait)(struct dict *dict); | void (*wait)(struct dict *dict); | |||
int (*lookup)(struct dict *dict, pool_t pool, | int (*lookup)(struct dict *dict, const struct dict_op_settings *set, | |||
const char *key, const char **value_r, | pool_t pool, const char *key, const char **value_r, | |||
const char **error_r); | const char **error_r); | |||
struct dict_iterate_context * | struct dict_iterate_context * | |||
(*iterate_init)(struct dict *dict, const char *const *paths, | (*iterate_init)(struct dict *dict, | |||
const struct dict_op_settings *set, | ||||
const char *path, | ||||
enum dict_iterate_flags flags); | enum dict_iterate_flags flags); | |||
bool (*iterate)(struct dict_iterate_context *ctx, | bool (*iterate)(struct dict_iterate_context *ctx, | |||
const char **key_r, const char *const **values_r); | const char **key_r, const char *const **values_r); | |||
int (*iterate_deinit)(struct dict_iterate_context *ctx, | int (*iterate_deinit)(struct dict_iterate_context *ctx, | |||
const char **error_r); | const char **error_r); | |||
struct dict_transaction_context *(*transaction_init)(struct dict *dict); | struct dict_transaction_context *(*transaction_init)(struct dict *dict); | |||
/* call the callback before returning if non-async commits */ | /* call the callback before returning if non-async commits */ | |||
void (*transaction_commit)(struct dict_transaction_context *ctx, | void (*transaction_commit)(struct dict_transaction_context *ctx, | |||
bool async, | bool async, | |||
skipping to change at line 43 | skipping to change at line 45 | |||
void *context); | void *context); | |||
void (*transaction_rollback)(struct dict_transaction_context *ctx); | void (*transaction_rollback)(struct dict_transaction_context *ctx); | |||
void (*set)(struct dict_transaction_context *ctx, | void (*set)(struct dict_transaction_context *ctx, | |||
const char *key, const char *value); | const char *key, const char *value); | |||
void (*unset)(struct dict_transaction_context *ctx, | void (*unset)(struct dict_transaction_context *ctx, | |||
const char *key); | const char *key); | |||
void (*atomic_inc)(struct dict_transaction_context *ctx, | void (*atomic_inc)(struct dict_transaction_context *ctx, | |||
const char *key, long long diff); | const char *key, long long diff); | |||
void (*lookup_async)(struct dict *dict, const char *key, | void (*lookup_async)(struct dict *dict, const struct dict_op_settings *se | |||
dict_lookup_callback_t *callback, void *context); | t, | |||
const char *key, dict_lookup_callback_t *callback, | ||||
void *context); | ||||
bool (*switch_ioloop)(struct dict *dict); | bool (*switch_ioloop)(struct dict *dict); | |||
void (*set_timestamp)(struct dict_transaction_context *ctx, | void (*set_timestamp)(struct dict_transaction_context *ctx, | |||
const struct timespec *ts); | const struct timespec *ts); | |||
}; | }; | |||
struct dict_commit_callback_ctx; | struct dict_commit_callback_ctx; | |||
struct dict_op_settings_private { | ||||
char *username; | ||||
char *home_dir; | ||||
}; | ||||
struct dict { | struct dict { | |||
const char *name; | const char *name; | |||
struct dict_vfuncs v; | struct dict_vfuncs v; | |||
unsigned int iter_count; | unsigned int iter_count; | |||
unsigned int transaction_count; | unsigned int transaction_count; | |||
struct dict_transaction_context *transactions; | struct dict_transaction_context *transactions; | |||
int refcount; | int refcount; | |||
struct event *event; | struct event *event; | |||
struct ioloop *ioloop, *prev_ioloop; | struct ioloop *ioloop, *prev_ioloop; | |||
struct dict_commit_callback_ctx *commits; | struct dict_commit_callback_ctx *commits; | |||
}; | }; | |||
struct dict_iterate_context { | struct dict_iterate_context { | |||
struct dict *dict; | struct dict *dict; | |||
struct event *event; | struct event *event; | |||
struct dict_op_settings_private set; | ||||
enum dict_iterate_flags flags; | enum dict_iterate_flags flags; | |||
dict_iterate_callback_t *async_callback; | dict_iterate_callback_t *async_callback; | |||
void *async_context; | void *async_context; | |||
uint64_t row_count, max_rows; | uint64_t row_count, max_rows; | |||
bool has_more:1; | bool has_more:1; | |||
}; | }; | |||
struct dict_transaction_context { | struct dict_transaction_context { | |||
struct dict *dict; | struct dict *dict; | |||
struct dict_op_settings_private set; | ||||
struct dict_transaction_context *prev, *next; | struct dict_transaction_context *prev, *next; | |||
struct event *event; | struct event *event; | |||
struct timespec timestamp; | struct timespec timestamp; | |||
bool changed:1; | bool changed:1; | |||
bool no_slowness_warning:1; | bool no_slowness_warning:1; | |||
}; | }; | |||
void dict_transaction_commit_async_noop_callback( | void dict_transaction_commit_async_noop_callback( | |||
skipping to change at line 107 | skipping to change at line 117 | |||
extern struct dict dict_driver_redis; | extern struct dict dict_driver_redis; | |||
extern struct dict dict_driver_cdb; | extern struct dict dict_driver_cdb; | |||
extern struct dict dict_driver_fail; | extern struct dict dict_driver_fail; | |||
extern struct dict_iterate_context dict_iter_unsupported; | extern struct dict_iterate_context dict_iter_unsupported; | |||
extern struct dict_transaction_context dict_transaction_unsupported; | extern struct dict_transaction_context dict_transaction_unsupported; | |||
void dict_pre_api_callback(struct dict *dict); | void dict_pre_api_callback(struct dict *dict); | |||
void dict_post_api_callback(struct dict *dict); | void dict_post_api_callback(struct dict *dict); | |||
/* Duplicate an object of type dict_op_settings. Used for initializing/freeing | ||||
iterator and transaction contexts. */ | ||||
void dict_op_settings_dup(const struct dict_op_settings *source, | ||||
struct dict_op_settings_private *dest_r); | ||||
void dict_op_settings_private_free(struct dict_op_settings_private *set); | ||||
#endif | #endif | |||
End of changes. 7 change blocks. | ||||
5 lines changed or deleted | 22 lines changed or added |