new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / os_maild / mail_list.h
1 /* Copyright (C) 2009 Trend Micro Inc.
2  * All rights reserved.
3  *
4  * This program is a free software; you can redistribute it
5  * and/or modify it under the terms of the GNU General Public
6  * License (version 2) as published by the FSF - Free Software
7  * Foundation
8  */
9
10 #ifndef _MAILLIST__H
11 #define _MAILLIST__H
12
13 /* Events List structure */
14 typedef struct _MailNode {
15     MailMsg *mail;
16     struct _MailNode *next;
17     struct _MailNode *prev;
18 } MailNode;
19
20 /* Add an email to the list */
21 void OS_AddMailtoList(MailMsg *ml) __attribute__((nonnull));
22
23 /* Return the last event from the Event list
24  * removing it from there
25  */
26 MailNode *OS_PopLastMail(void);
27
28 /* Return a pointer to the last email, not removing it */
29 MailNode *OS_CheckLastMail(void);
30
31 /* Create the mail list. Maxsize must be specified */
32 void OS_CreateMailList(int maxsize);
33
34 /* Free an email node */
35 void FreeMail(MailNode *ml);
36
37 /* Free email msg */
38 void FreeMailMsg(MailMsg *ml);
39
40 #endif /* _MAILLIST__H */
41