summaryrefslogtreecommitdiffstats
path: root/src/lib/hook-build.h
blob: 03c157952929c947d61c25a2fda804f02def8980 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Copyright (c) 2017-2018 Dovecot authors, see the included COPYING file */
#ifndef HOOK_BUILD_H
#define HOOK_BUILD_H 1

struct hook_build_context;
struct hook_stack;

/* Initialize new hook building context, vfuncs should point to
   the functions table that is being manipulated, and size should be
   the size of this table. */
struct hook_build_context *hook_build_init(void (**vfuncs)(), size_t size);

/* This is called after a hook may have updated vfuncs */
void hook_build_update(struct hook_build_context *ctx, void *_vlast);

/* Free memory used by build context */
void hook_build_deinit(struct hook_build_context **_ctx);

#endif