aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc/rfc822
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-04-04 23:23:50 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-04-04 23:23:50 -0700
commitd036437a499feafdd79994fcaa38d03b50929fe0 (patch)
treee000395d2eff5532184d8e73c49daa473cf73ecc /src/objc/rfc822
parent6eba7f202753d79f2de6b8a8c87864e93394343c (diff)
Header documentation. Header clean-up
Diffstat (limited to 'src/objc/rfc822')
-rw-r--r--src/objc/rfc822/MCOAttachment.h13
-rw-r--r--src/objc/rfc822/MCOMessageBuilder.h16
-rw-r--r--src/objc/rfc822/MCOMessageParser.h6
-rw-r--r--src/objc/rfc822/MCOMessagePart.h2
-rw-r--r--src/objc/rfc822/MCOMultipart.h2
5 files changed, 39 insertions, 0 deletions
diff --git a/src/objc/rfc822/MCOAttachment.h b/src/objc/rfc822/MCOAttachment.h
index 95f60321..7c6a0d7b 100644
--- a/src/objc/rfc822/MCOAttachment.h
+++ b/src/objc/rfc822/MCOAttachment.h
@@ -12,14 +12,27 @@
#import <MailCore/MCOAbstractPart.h>
+// This is a single part.
+// It can either parsed from RFC 822 message data or created to build a message.
+
@interface MCOAttachment : MCOAbstractPart <NSCopying>
+// Returns a MIME type for a filename.
+ (NSString *) mimeTypeForFilename:(NSString *)filename;
+
+// Returns a file attachment with the content of the given file.
+ (MCOAttachment *) attachmentWithContentsOfFile:(NSString *)filename;
+
+// Returns a part with an HTML content.
+ (MCOAttachment *) attachmentWithHTMLString:(NSString *)htmlString;
+
+// Returns a part with a RFC 822 messsage attachment.
+ (MCOAttachment *) attachmentWithRFC822Message:(NSData *)messageData;
+
+// Returns a part with an plain text content.
+ (MCOAttachment *) attachmentWithText:(NSString *)text;
+// Decoded data of the part.
@property (nonatomic, strong) NSData * data;
@end
diff --git a/src/objc/rfc822/MCOMessageBuilder.h b/src/objc/rfc822/MCOMessageBuilder.h
index a74b3e6f..576a37a7 100644
--- a/src/objc/rfc822/MCOMessageBuilder.h
+++ b/src/objc/rfc822/MCOMessageBuilder.h
@@ -12,22 +12,38 @@
#import <MailCore/MCOAbstractMessage.h>
+// This class will allow you to build a RFC 822 formatted message.
+
@class MCOAttachment;
@protocol MCOHTMLRendererDelegate;
@interface MCOMessageBuilder : MCOAbstractMessage <NSCopying>
+// Main HTML content of the message.
@property (nonatomic, copy, setter=setHTMLBody:) NSString * htmlBody;
+
+// Plain text content of the message.
@property (nonatomic, copy) NSString * textBody;
+
+// List of file attachments.
@property (nonatomic, copy) NSArray * attachments;
+
+// List of related file attachments (included as cid: link in the HTML part).
@property (nonatomic, copy) NSArray * relatedAttachments;
+
+// Prefix for the boundary identifier
@property (nonatomic, copy) NSString * boundaryPrefix;
+// Add an attachment.
- (void) addAttachment:(MCOAttachment *)attachment;
+
+// Add a related attachment.
- (void) addRelatedAttachment:(MCOAttachment *)attachment;
+// RFC 822 formatted message.
- (NSData *) data;
+// HTML rendering of the message to be displayed in a web view.
- (NSString *) htmlRenderingWithDelegate:(id <MCOHTMLRendererDelegate>)delegate;
@end
diff --git a/src/objc/rfc822/MCOMessageParser.h b/src/objc/rfc822/MCOMessageParser.h
index a22b657e..80dee964 100644
--- a/src/objc/rfc822/MCOMessageParser.h
+++ b/src/objc/rfc822/MCOMessageParser.h
@@ -16,14 +16,20 @@
@interface MCOMessageParser : MCOAbstractMessage <NSCopying>
+// returns a parsed message from the given RFC 822 data.
+ (MCOMessageParser *) messageParserWithData:(NSData *)data;
+// data is the RFC 822 formatted message.
- (id) initWithData:(NSData *)data;
- (void) dealloc;
+// It's the main part of the message. It can be MCOMessagePart, MCOMultipart or MCOAttachment.
- (MCOAbstractPart *) mainPart;
+
+// data of the RFC 822 formatted message. It's the input of the parser.
- (NSData *) data;
+// HTML rendering of the message to be displayed in a web view.
- (NSString *) htmlRenderingWithDelegate:(id <MCOHTMLRendererDelegate>)delegate;
@end
diff --git a/src/objc/rfc822/MCOMessagePart.h b/src/objc/rfc822/MCOMessagePart.h
index dc31fdfb..7d9d7f2c 100644
--- a/src/objc/rfc822/MCOMessagePart.h
+++ b/src/objc/rfc822/MCOMessagePart.h
@@ -12,6 +12,8 @@
#import <MailCore/MCOAbstractMessagePart.h>
+// Message part parsed from RFC 822 message data.
+
@interface MCOMessagePart : MCOAbstractMessagePart <NSCopying>
@end
diff --git a/src/objc/rfc822/MCOMultipart.h b/src/objc/rfc822/MCOMultipart.h
index b5722e72..36922fe4 100644
--- a/src/objc/rfc822/MCOMultipart.h
+++ b/src/objc/rfc822/MCOMultipart.h
@@ -12,6 +12,8 @@
#import <MailCore/MCOAbstractMultipart.h>
+// Multipart parsed from RFC 822 message data.
+
@interface MCOMultipart : MCOAbstractMultipart <NSCopying>
@end