Coverage Report

Created: 2026-07-30 06:43

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/pigeonhole/src/lib-sieve/plugins/editheader/ext-editheader.c
Line
Count
Source
1
/* Copyright (c) Pigeonhole authors, see top-level COPYING file */
2
3
/* Extension debug
4
 * ---------------
5
 *
6
 * Authors: Stephan Bosch
7
 * Specification: RFC 5293
8
 * Implementation: full
9
 * Status: testing
10
 *
11
 */
12
13
#include "lib.h"
14
#include "array.h"
15
16
#include "sieve-extensions.h"
17
#include "sieve-commands.h"
18
#include "sieve-comparators.h"
19
#include "sieve-match-types.h"
20
#include "sieve-address-parts.h"
21
22
#include "sieve-validator.h"
23
#include "sieve-generator.h"
24
#include "sieve-binary.h"
25
#include "sieve-interpreter.h"
26
#include "sieve-dump.h"
27
28
#include "ext-editheader-common.h"
29
30
/*
31
 * Operations
32
 */
33
34
const struct sieve_operation_def *editheader_operations[] = {
35
  &addheader_operation,
36
  &deleteheader_operation,
37
};
38
39
/*
40
 * Extension
41
 */
42
43
static bool
44
ext_editheader_validator_load(const struct sieve_extension *ext,
45
            struct sieve_validator *validator);
46
47
const struct sieve_extension_def editheader_extension = {
48
  .name = "editheader",
49
  .load = ext_editheader_load,
50
  .unload = ext_editheader_unload,
51
  .validator_load = ext_editheader_validator_load,
52
  SIEVE_EXT_DEFINE_OPERATIONS(editheader_operations),
53
};
54
55
static bool
56
ext_editheader_validator_load(const struct sieve_extension *ext,
57
            struct sieve_validator *validator)
58
0
{
59
  /* Register new commands */
60
0
  sieve_validator_register_command(validator, ext, &addheader_command);
61
0
  sieve_validator_register_command(validator, ext, &deleteheader_command);
62
63
0
  return TRUE;
64
0
}
65
66
67