summaryrefslogtreecommitdiffstats
path: root/src/perl.h
blob: af97b6f4677bfd85b06f7591b136a34cd31593ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef RSPAM_PERL_H
#define RSPAM_PERL_H


#include "config.h"
#include "memcached.h"

#include <EXTERN.h>               /* from the Perl distribution     */
#include <perl.h>                 /* from the Perl distribution     */

#ifndef PERL_IMPLICIT_CONTEXT
#undef  dTHXa
#define dTHXa(a)
#endif

struct uri;
struct worker_task;
struct config_file;

void init_perl_filters (struct config_file *cfg);

int perl_call_header_filter (const char *function, struct worker_task *task);
int perl_call_mime_filter (const char *function, struct worker_task *task);
int perl_call_message_filter (const char *function, struct worker_task *task);
int perl_call_url_filter (const char *function, struct worker_task *task);
int perl_call_chain_filter (const char *function, struct worker_task *task, int *marks, unsigned int number);

void perl_call_memcached_callback (memcached_ctx_t *ctx, memc_error_t error, void *data);

#endif