syslog-ng source
afsmtp.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2014 Balabit
3  * Copyright (c) 2011-2014 Gergely Nagy <algernon@balabit.hu>
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 as published
7  * by the Free Software Foundation, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * As an additional exemption you are allowed to compile & link against the
19  * OpenSSL libraries as published by the OpenSSL project. See the file
20  * COPYING for details.
21  *
22  */
23 
24 #ifndef AFSMTP_H_INCLUDED
25 #define AFSMTP_H_INCLUDED
26 
27 #include "driver.h"
28 
29 typedef enum
30 {
38 
39 LogDriver *afsmtp_dd_new(GlobalConfig *cfg);
40 
41 void afsmtp_dd_set_host(LogDriver *d, const gchar *host);
42 void afsmtp_dd_set_port(LogDriver *d, gint port);
43 
44 void afsmtp_dd_set_subject(LogDriver *d, LogTemplate *subject);
45 void afsmtp_dd_set_from(LogDriver *d, LogTemplate *phrase, LogTemplate *mbox);
46 void afsmtp_dd_add_rcpt(LogDriver *d, afsmtp_rcpt_type_t type,
47  LogTemplate *phrase, LogTemplate *mbox);
48 void afsmtp_dd_set_body(LogDriver *d, LogTemplate *body);
49 gboolean afsmtp_dd_add_header(LogDriver *d, const gchar *header,
50  LogTemplate *value);
51 LogTemplateOptions *afsmtp_dd_get_template_options(LogDriver *d);
52 
53 #endif
gboolean afsmtp_dd_add_header(LogDriver *d, const gchar *header, LogTemplate *value)
Definition: afsmtp.c:163
LogDriver * afsmtp_dd_new(GlobalConfig *cfg)
Definition: afsmtp.c:663
void afsmtp_dd_add_rcpt(LogDriver *d, afsmtp_rcpt_type_t type, LogTemplate *phrase, LogTemplate *mbox)
Definition: afsmtp.c:138
void afsmtp_dd_set_body(LogDriver *d, LogTemplate *body)
Definition: afsmtp.c:154
void afsmtp_dd_set_subject(LogDriver *d, LogTemplate *subject)
Definition: afsmtp.c:118
void afsmtp_dd_set_port(LogDriver *d, gint port)
Definition: afsmtp.c:110
LogTemplateOptions * afsmtp_dd_get_template_options(LogDriver *d)
Definition: afsmtp.c:90
afsmtp_rcpt_type_t
Definition: afsmtp.h:30
@ AFSMTP_RCPT_TYPE_CC
Definition: afsmtp.h:33
@ AFSMTP_RCPT_TYPE_TO
Definition: afsmtp.h:32
@ AFSMTP_RCPT_TYPE_REPLY_TO
Definition: afsmtp.h:35
@ AFSMTP_RCPT_TYPE_NONE
Definition: afsmtp.h:31
@ AFSMTP_RCPT_TYPE_SENDER
Definition: afsmtp.h:36
@ AFSMTP_RCPT_TYPE_BCC
Definition: afsmtp.h:34
void afsmtp_dd_set_host(LogDriver *d, const gchar *host)
Definition: afsmtp.c:101
void afsmtp_dd_set_from(LogDriver *d, LogTemplate *phrase, LogTemplate *mbox)
Definition: afsmtp.c:127
GlobalConfig * cfg
Definition: test_batched_ack_tracker.c:34
GString * value
Definition: test_decode.c:28