forked from sba1/simplemail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
addresslist.h
33 lines (26 loc) · 914 Bytes
/
addresslist.h
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
31
32
33
#ifndef SM__ADDRESSLIST_H
#define SM__ADDRESSLIST_H
#include "codesets.h"
#include "lists.h"
/* for nodes in an address list NOTE: misplaced in mail.h */
struct address
{
struct node node;
char *realname;
char *email;
};
struct address_list
{
struct list list;
};
struct mailbox;
struct address_list *address_list_create(const char *str);
void address_list_append(struct address_list *list, char *str);
void address_list_append_mailbox(struct address_list *list, struct mailbox *mb);
void address_list_remove_by_mail(struct address_list *list, char *email);
void address_list_free(struct address_list *list);
utf8 *address_list_to_utf8_codeset_safe(struct address_list *list, struct codeset *codeset);
int address_list_length(struct address_list *list);
struct address *address_list_first(struct address_list *list);
struct address *address_next(struct address *address);
#endif /* SM__ADDRESSLIST_H */