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