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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
//
// MCOMessageHeader.h
// mailcore2
//
// Created by DINH Viêt Hoà on 3/10/13.
// Copyright (c) 2013 MailCore. All rights reserved.
//
#ifndef __MAILCORE_MCOMESSAGEHEADER_H_
#define __MAILCORE_MCOMESSAGEHEADER_H_
#import <Foundation/Foundation.h>
// This class implements common fields of a message header.
@class MCOAddress;
@interface MCOMessageHeader : NSObject <NSCopying>
// Message-ID field.
@property (nonatomic, copy) NSString * messageID;
// References field. It's an array of message-ids.
@property (nonatomic, copy) NSArray * /* NSString */ references;
// In-Reply-To field. It's an array of message-ids.
@property (nonatomic, copy) NSArray * /* NSString */ inReplyTo;
// Date field: sent date of the message.
@property (nonatomic, strong) NSDate * date;
// Received date: received date of the message.
@property (nonatomic, strong) NSDate * receivedDate;
// Sender field.
@property (nonatomic, copy) MCOAddress * sender;
// From field: address of the sender of the message.
@property (nonatomic, copy) MCOAddress * from;
// To field: recipient of the message. It's an array of MCOAddress.
@property (nonatomic, copy) NSArray * /* MCOAddress */ to;
// Cc field: cc recipient of the message. It's an array of MCOAddress.
@property (nonatomic, copy) NSArray * /* MCOAddress */ cc;
// Bcc field: bcc recipient of the message. It's an array of MCOAddress.
@property (nonatomic, copy) NSArray * /* MCOAddress */ bcc;
// Reply-To field. It's an array of MCOAddress.
@property (nonatomic, copy) NSArray * /* MCOAddress */ replyTo;
// Subject of the message.
@property (nonatomic, copy) NSString * subject;
// User-Agent.
@property (nonatomic, copy) NSString * userAgent;
// Extracted subject (also remove square brackets).
- (NSString *) extractedSubject;
// Extracted subject (don't remove square brackets).
- (NSString *) partialExtractedSubject;
// Fill the header using the given RFC 822 data.
- (void) importHeadersData:(NSData *)data;
// Returns a header that can be used as a base for a reply message.
- (MCOMessageHeader *) replyHeaderWithExcludedRecipients:(NSArray *)excludedRecipients;
// Returns a header that can be used as a base for a reply all message.
- (MCOMessageHeader *) replyAllHeaderWithExcludedRecipients:(NSArray *)excludedRecipients;
// Returns a header that can be used as a base for a forward message.
- (MCOMessageHeader *) forwardHeader;
@end
#endif
|