annotate src/lib-imap/imap-envelope.h @ 792:d573c53946ac HEAD

Full not-too-well-tested support for SORT extension. Required a few library interface changes.
author Timo Sirainen <tss@iki.fi>
date Tue, 17 Dec 2002 06:28:40 +0200
parents e057845d94ca
children 41ec8cadd238
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
1 #ifndef __IMAP_ENVELOPE_H
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2 #define __IMAP_ENVELOPE_H
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
4 typedef struct _MessagePartEnvelopeData MessagePartEnvelopeData;
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
5
408
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
6 typedef enum {
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
7 /* NOTE: in the same order as listed in ENVELOPE */
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
8 IMAP_ENVELOPE_DATE = 0,
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
9 IMAP_ENVELOPE_SUBJECT,
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
10 IMAP_ENVELOPE_FROM,
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
11 IMAP_ENVELOPE_SENDER,
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
12 IMAP_ENVELOPE_REPLY_TO,
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
13 IMAP_ENVELOPE_TO,
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
14 IMAP_ENVELOPE_CC,
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
15 IMAP_ENVELOPE_BCC,
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
16 IMAP_ENVELOPE_IN_REPLY_TO,
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
17 IMAP_ENVELOPE_MESSAGE_ID,
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
18
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
19 IMAP_ENVELOPE_FIELDS
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
20 } ImapEnvelopeField;
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
21
792
d573c53946ac Full not-too-well-tested support for SORT extension. Required a few
Timo Sirainen <tss@iki.fi>
parents: 408
diff changeset
22 typedef enum {
d573c53946ac Full not-too-well-tested support for SORT extension. Required a few
Timo Sirainen <tss@iki.fi>
parents: 408
diff changeset
23 IMAP_ENVELOPE_RESULT_STRING,
d573c53946ac Full not-too-well-tested support for SORT extension. Required a few
Timo Sirainen <tss@iki.fi>
parents: 408
diff changeset
24 IMAP_ENVELOPE_RESULT_FIRST_MAILBOX
d573c53946ac Full not-too-well-tested support for SORT extension. Required a few
Timo Sirainen <tss@iki.fi>
parents: 408
diff changeset
25 } ImapEnvelopeResult;
d573c53946ac Full not-too-well-tested support for SORT extension. Required a few
Timo Sirainen <tss@iki.fi>
parents: 408
diff changeset
26
408
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
27 /* Update envelope data based from given header field */
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
28 void imap_envelope_parse_header(Pool pool, MessagePartEnvelopeData **data,
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
29 const char *name,
184
4223b9ed0c80 move size_t fixes
Timo Sirainen <tss@iki.fi>
parents: 0
diff changeset
30 const char *value, size_t value_len);
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
31
408
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
32 /* Write envelope to given string */
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
33 void imap_envelope_write_part_data(MessagePartEnvelopeData *data,
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
34 TempString *str);
408
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
35 /* Return envelope. */
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
36 const char *imap_envelope_get_part_data(MessagePartEnvelopeData *data);
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
37
408
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
38 /* Parse envelope and return specified field unquoted, or NULL if error
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
39 occured. NILs are returned as "". */
792
d573c53946ac Full not-too-well-tested support for SORT extension. Required a few
Timo Sirainen <tss@iki.fi>
parents: 408
diff changeset
40 const char *imap_envelope_parse(const char *envelope, ImapEnvelopeField field,
d573c53946ac Full not-too-well-tested support for SORT extension. Required a few
Timo Sirainen <tss@iki.fi>
parents: 408
diff changeset
41 ImapEnvelopeResult result);
408
e057845d94ca Dropped sent_time and alignment from MailIndexRecord. SEARCH can now use
Timo Sirainen <tss@iki.fi>
parents: 184
diff changeset
42
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
43 #endif