aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc/abstract/MCOAbstractMessage.h
blob: 71d74c84ebfdd1c905a6b1d572f88966e534d467 (plain)
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
//
//  MCOAbstractMessage.h
//  mailcore2
//
//  Created by DINH Viêt Hoà on 3/10/13.
//  Copyright (c) 2013 MailCore. All rights reserved.
//

#ifndef MAILCORE_MCOABSTRACTMESSAGE_H

#define MAILCORE_MCOABSTRACTMESSAGE_H

#import <Foundation/Foundation.h>

@class MCOMessageHeader;
@class MCOAbstractPart;

#ifdef __cplusplus
namespace mailcore {
    class AbstractMessage;
}
#endif

@interface MCOAbstractMessage : NSObject <NSCopying>

#ifdef __cplusplus
- (instancetype) initWithMCMessage:(mailcore::AbstractMessage *)message NS_DESIGNATED_INITIALIZER;
#endif

/** Header of the message. */
@property (nonatomic, strong) MCOMessageHeader * header;

/** Returns the part with the given Content-ID.*/
- (MCOAbstractPart *) partForContentID:(NSString *)contentID;

/** Returns the part with the given unique identifier.*/
- (MCOAbstractPart *) partForUniqueID:(NSString *)uniqueID;

/** All attachments in the message.
 It will return an array of MCOIMAPPart for MCOIMAPMessage.
 It will return an array of MCOAttachment for MCOMessageParser.
 It will return an array of MCOAttachment for MCOMessageBuilder. */
- (NSArray<MCOAbstractPart *> *) attachments;

/** All image attachments included inline in the message through cid: URLs.
 It will return an array of MCOIMAPPart for MCOIMAPMessage.
 It will return an array of MCOAttachment for MCOMessageParser.
 It will return an array of MCOAttachment for MCOMessageBuilder. */
- (NSArray<MCOAbstractPart *> * /* MCOAbstractPart */) htmlInlineAttachments;

/**
 Returns parts required to render the message as plain text or html.
 This does not include inline images and attachments, but only the text content
 */
- (NSArray<MCOAbstractPart *> *) requiredPartsForRendering;

@end

#endif