aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Matt Ronge <mronge@mronge.com>2013-06-02 21:08:38 -0500
committerGravatar Matt Ronge <mronge@mronge.com>2013-06-02 21:08:38 -0500
commitf4608bf0b70c5102eb64abd338c46cff68292b51 (patch)
treeb093170661099f7d8d55d2240b97738755e0cda5
parent3ae5bf7a1d806c749c28f641be34733c85808efe (diff)
Updated the rest of the docs
-rw-r--r--src/objc/abstract/MCOAbstractMessage.h9
-rw-r--r--src/objc/abstract/MCOAbstractMultipart.h2
-rw-r--r--src/objc/abstract/MCOAbstractPart.h30
-rw-r--r--src/objc/abstract/MCOAddress.h54
-rw-r--r--src/objc/abstract/MCOConstants.h308
-rw-r--r--src/objc/abstract/MCOHTMLRendererDelegate.h87
-rw-r--r--src/objc/abstract/MCOHTMLRendererIMAPDelegate.h36
-rw-r--r--src/objc/abstract/MCOMessageHeader.h40
-rw-r--r--src/objc/pop/MCOPOPFetchHeaderOperation.h20
-rw-r--r--src/objc/pop/MCOPOPFetchMessageOperation.h19
-rw-r--r--src/objc/pop/MCOPOPFetchMessagesOperation.h17
-rw-r--r--src/objc/pop/MCOPOPMessageInfo.h10
-rw-r--r--src/objc/pop/MCOPOPOperation.h18
-rw-r--r--src/objc/pop/MCOPOPSession.h131
-rw-r--r--src/objc/rfc822/MCOAttachment.h19
-rw-r--r--src/objc/rfc822/MCOMessageBuilder.h53
-rw-r--r--src/objc/rfc822/MCOMessageParser.h19
-rw-r--r--src/objc/rfc822/MCOMessagePart.h2
-rw-r--r--src/objc/rfc822/MCOMultipart.h2
-rw-r--r--src/objc/utils/MCOIndexSet.h28
-rw-r--r--src/objc/utils/MCORange.h24
21 files changed, 486 insertions, 442 deletions
diff --git a/src/objc/abstract/MCOAbstractMessage.h b/src/objc/abstract/MCOAbstractMessage.h
index aa47d15a..a26d5aac 100644
--- a/src/objc/abstract/MCOAbstractMessage.h
+++ b/src/objc/abstract/MCOAbstractMessage.h
@@ -17,16 +17,19 @@
@interface MCOAbstractMessage : NSObject
-// Header of the message.
+/** Header of the message. */
@property (nonatomic, strong) MCOMessageHeader * header;
-// Returns the part with the given Content-ID.
+/** Returns the part with the given Content-ID.*/
- (MCOAbstractPart *) partForContentID:(NSString *)contentID;
-// Returns the part with the given unique identifier.
+/** Returns the part with the given unique identifier.*/
- (MCOAbstractPart *) partForUniqueID:(NSString *)uniqueID;
+/** All attachments in the message */
- (NSArray *) attachments;
+
+/** All HTML bodies */
- (NSArray *) htmlInlineAttachments;
@end
diff --git a/src/objc/abstract/MCOAbstractMultipart.h b/src/objc/abstract/MCOAbstractMultipart.h
index 38f9dbe3..e43a3e41 100644
--- a/src/objc/abstract/MCOAbstractMultipart.h
+++ b/src/objc/abstract/MCOAbstractMultipart.h
@@ -15,7 +15,7 @@
@interface MCOAbstractMultipart : MCOAbstractPart
-// Returns the subparts of that multipart.
+/** Returns the subparts of that multipart.*/
@property (nonatomic, copy) NSArray * /* MCOAbstractPart */ parts;
@end
diff --git a/src/objc/abstract/MCOAbstractPart.h b/src/objc/abstract/MCOAbstractPart.h
index 770808e0..0269347a 100644
--- a/src/objc/abstract/MCOAbstractPart.h
+++ b/src/objc/abstract/MCOAbstractPart.h
@@ -39,43 +39,43 @@ typedef enum {
@interface MCOAbstractPart : NSObject
-// Returns type of the part (single / message part / multipart/mixed,
-// multipart/related, multipart/alternative). See MCOPartType.
+/** Returns type of the part (single / message part / multipart/mixed,
+ multipart/related, multipart/alternative). See MCOPartType.*/
@property (nonatomic, assign) MCOPartType partType;
-// Returns filename of the part.
+/** Returns filename of the part.*/
@property (nonatomic, copy) NSString * filename;
-// Returns MIME type of the part. For example application/data.
+/** Returns MIME type of the part. For example application/data.*/
@property (nonatomic, copy) NSString * mimeType;
-// Returns charset of the part in case it's a text single part.
+/** Returns charset of the part in case it's a text single part.*/
@property (nonatomic, copy) NSString * charset;
-// Returns the unique ID generated for this part.
-// It's a unique identifier that's created when the object is created manually
-// or created by the parser.
+/** Returns the unique ID generated for this part.
+ It's a unique identifier that's created when the object is created manually
+ or created by the parser.*/
@property (nonatomic, copy) NSString * uniqueID;
-// Returns the value of the Content-ID field of the part.
+/** Returns the value of the Content-ID field of the part.*/
@property (nonatomic, copy) NSString * contentID;
-// Returns the value of the Content-Location field of the part.
+/** Returns the value of the Content-Location field of the part.*/
@property (nonatomic, copy) NSString * contentLocation;
-// Returns whether the part is an explicit inline attachment.
+/** Returns whether the part is an explicit inline attachment.*/
@property (nonatomic, assign, getter=isInlineAttachment) BOOL inlineAttachment;
-// Returns the owner message of the part.
+/** Returns the owner message of the part.*/
@property (nonatomic, weak) MCOAbstractMessage * message;
-// Returns the part with the given Content-ID among this part and its subparts.
+/** Returns the part with the given Content-ID among this part and its subparts.*/
- (MCOAbstractPart *) partForContentID:(NSString *)contentID;
-// Returns the part with the given unique identifier among this part and its subparts.
+/** Returns the part with the given unique identifier among this part and its subparts.*/
- (MCOAbstractPart *) partForUniqueID:(NSString *)uniqueID;
-// Returns a string representation of the data according to charset.
+/** Returns a string representation of the data according to charset.*/
- (NSString *) decodedStringForData:(NSData *)data;
@end
diff --git a/src/objc/abstract/MCOAddress.h b/src/objc/abstract/MCOAddress.h
index c7552676..3a508313 100644
--- a/src/objc/abstract/MCOAddress.h
+++ b/src/objc/abstract/MCOAddress.h
@@ -14,56 +14,66 @@
@interface MCOAddress : NSObject <NSCopying>
-// Creates an address with a display name and a mailbox.
-// Example: [MCOAddress addressWithDisplayName:@"DINH Viêt Hoà" mailbox:@"hoa@etpan.org"]
+/** Creates an address with a display name and a mailbox.
+
+ Example: [MCOAddress addressWithDisplayName:@"DINH Viêt Hoà" mailbox:@"hoa@etpan.org"] */
+ (MCOAddress *) addressWithDisplayName:(NSString *)displayName
mailbox:(NSString *)mailbox;
-// Creates an address with only a mailbox.
-// Example: [MCOAddress addressWithMailbox:@"hoa@etpan.org"]
+/** Creates an address with only a mailbox.
+
+ Example: [MCOAddress addressWithMailbox:@"hoa@etpan.org"]*/
+ (MCOAddress *) addressWithMailbox:(NSString *)mailbox;
-// Creates an address with a RFC822 string.
-// Example: [MCOAddress addressWithRFC822String:@"DINH Vi=C3=AAt Ho=C3=A0 <hoa@etpan.org>"]
+/** Creates an address with a RFC822 string.
+
+ Example: [MCOAddress addressWithRFC822String:@"DINH Vi=C3=AAt Ho=C3=A0 <hoa@etpan.org>"]*/
+ (MCOAddress *) addressWithRFC822String:(NSString *)RFC822String;
-// Creates an address with a non-MIME-encoded RFC822 string.
-// Example: [MCOAddress addressWithRFC822String:@"DINH Viêt Hoà <hoa@etpan.org>"]
+/** Creates an address with a non-MIME-encoded RFC822 string.
+
+ Example: [MCOAddress addressWithRFC822String:@"DINH Viêt Hoà <hoa@etpan.org>"]*/
+ (MCOAddress *) addressWithNonEncodedRFC822String:(NSString *)nonEncodedRFC822String;
-// Returns an NSArray of MCOAddress objects that contain the parsed
-// forms of the RFC822 encoded addresses.
-// For example: @[ @"DINH Vi=C3=AAt Ho=C3=A0 <hoa@etpan.org>" ]
+/**
+ Returns an NSArray of MCOAddress objects that contain the parsed
+ forms of the RFC822 encoded addresses.
+
+ For example: @[ @"DINH Vi=C3=AAt Ho=C3=A0 <hoa@etpan.org>" ]*/
+ (NSArray *) addressesWithRFC822String:(NSString *)string;
-// Returns an NSArray of MCOAddress objects that contain the parsed
-// forms of non-encoded RFC822 addresses.
-// For example: @[ "DINH Viêt Hoà <hoa@etpan.org>" ]
+/**
+ Returns an NSArray of MCOAddress objects that contain the parsed
+ forms of non-encoded RFC822 addresses.
+
+ For example: @[ "DINH Viêt Hoà <hoa@etpan.org>" ]*/
+ (NSArray *) addressesWithNonEncodedRFC822String:(NSString *)string;
-// Returns the display name of the address.
+/** Returns the display name of the address.*/
@property (nonatomic, copy) NSString * displayName;
-// Returns the mailbox of the address.
+/** Returns the mailbox of the address.*/
@property (nonatomic, copy) NSString * mailbox;
-// Returns the RFC822 encoding of the address.
-// For example: "DINH Vi=C3=AAt Ho=C3=A0 <hoa@etpan.org>"
+/** Returns the RFC822 encoding of the address.
+
+ For example: "DINH Vi=C3=AAt Ho=C3=A0 <hoa@etpan.org>"*/
- (NSString *) RFC822String;
-// Returns the non-MIME-encoded RFC822 encoding of the address.
-// For example: "DINH Viêt Hoà <hoa@etpan.org>"
+/** Returns the non-MIME-encoded RFC822 encoding of the address.
+
+ For example: "DINH Viêt Hoà <hoa@etpan.org>"*/
- (NSString *) nonEncodedRFC822String;
@end
@interface NSArray (MCONSArray)
-// Returns the RFC822 encoding of the addresses.
+/** Returns the RFC822 encoding of the addresses.*/
- (NSString *) mco_RFC822StringForAddresses;
-// Returns the non-MIME-encoded RFC822 of the addresses.
+/** Returns the non-MIME-encoded RFC822 of the addresses.*/
- (NSString *) mco_nonEncodedRFC822StringForAddresses;
@end
diff --git a/src/objc/abstract/MCOConstants.h b/src/objc/abstract/MCOConstants.h
index a8cf7bd4..6f9dd446 100644
--- a/src/objc/abstract/MCOConstants.h
+++ b/src/objc/abstract/MCOConstants.h
@@ -2,321 +2,321 @@
#define __MAILCORE_MCOCONSTANTS_H_
-// It's the connection type.
+/** It's the connection type.*/
typedef enum {
- // Clear-text connection for the protocol.
+ /** Clear-text connection for the protocol.*/
MCOConnectionTypeClear = 1 << 0,
- // Clear-text connection at the beginning, then switch to encrypted connection using TLS/SSL
- // on the same TCP connection.
+ /** Clear-text connection at the beginning, then switch to encrypted connection using TLS/SSL*/
+ /** on the same TCP connection.*/
MCOConnectionTypeStartTLS = 1 << 1,
- // Encrypted connection using TLS/SSL.
+ /** Encrypted connection using TLS/SSL.*/
MCOConnectionTypeTLS = 1 << 2,
} MCOConnectionType;
-// It's the authentication type.
+/** It's the authentication type.*/
typedef enum {
- // Default authentication scheme of the protocol.
+ /** Default authentication scheme of the protocol.*/
MCOAuthTypeSASLNone = 0,
- // CRAM-MD5 authentication RFC 2195.
+ /** CRAM-MD5 authentication RFC 2195.*/
MCOAuthTypeSASLCRAMMD5 = 1 << 0,
- // PLAIN authentication RFC 4616.
+ /** PLAIN authentication RFC 4616.*/
MCOAuthTypeSASLPlain = 1 << 1,
- // GSSAPI authentication.
+ /** GSSAPI authentication.*/
MCOAuthTypeSASLGSSAPI = 1 << 2,
- // DIGEST-MD5 authentication RFC 2831.
+ /** DIGEST-MD5 authentication RFC 2831.*/
MCOAuthTypeSASLDIGESTMD5 = 1 << 3,
- // LOGIN authentication http://tools.ietf.org/id/draft-murchison-sasl-login-00.txt
+ /** LOGIN authentication http://tools.ietf.org/id/draft-murchison-sasl-login-00.txt*/
MCOAuthTypeSASLLogin = 1 << 4,
- // Secure Remote Password Authentication http://tools.ietf.org/html/draft-burdis-cat-srp-sasl-08
+ /** Secure Remote Password Authentication http://tools.ietf.org/html/draft-burdis-cat-srp-sasl-08*/
MCOAuthTypeSASLSRP = 1 << 5,
- // NTLM authentication.
+ /** NTLM authentication.*/
MCOAuthTypeSASLNTLM = 1 << 6,
- // Kerberos 4 authentication.
+ /** Kerberos 4 authentication.*/
MCOAuthTypeSASLKerberosV4 = 1 << 7,
} MCOAuthType;
-// It's the IMAP flags of the folder.
+/** It's the IMAP flags of the folder.*/
typedef enum {
MCOIMAPFolderFlagNone = 0,
- // \Marked
+ /** \Marked*/
MCOIMAPFolderFlagMarked = 1 << 0,
- // \Unmarked
+ /** \Unmarked*/
MCOIMAPFolderFlagUnmarked = 1 << 1,
- // \NoSelect: When a folder can't be selected.
+ /** \NoSelect: When a folder can't be selected.*/
MCOIMAPFolderFlagNoSelect = 1 << 2,
- // \NoInferiors: When the folder has no children.
+ /** \NoInferiors: When the folder has no children.*/
MCOIMAPFolderFlagNoInferiors = 1 << 3,
- // \Inbox: When the folder is the inbox.
+ /** \Inbox: When the folder is the inbox.*/
MCOIMAPFolderFlagInbox = 1 << 4,
- // \Sent: When the folder is the sent folder.
+ /** \Sent: When the folder is the sent folder.*/
MCOIMAPFolderFlagSentMail = 1 << 5,
- // \Starred: When the folder is the starred folder
+ /** \Starred: When the folder is the starred folder*/
MCOIMAPFolderFlagStarred = 1 << 6,
- // \AllMail: When the folder is all mail.
+ /** \AllMail: When the folder is all mail.*/
MCOIMAPFolderFlagAllMail = 1 << 7,
- // \Trash: When the folder is the trash.
+ /** \Trash: When the folder is the trash.*/
MCOIMAPFolderFlagTrash = 1 << 8,
- // \Drafts: When the folder is the drafts folder.
+ /** \Drafts: When the folder is the drafts folder.*/
MCOIMAPFolderFlagDrafts = 1 << 9,
- // \Spam: When the folder is the spam folder.
+ /** \Spam: When the folder is the spam folder.*/
MCOIMAPFolderFlagSpam = 1 << 10,
- // \Important: When the folder is the important folder.
+ /** \Important: When the folder is the important folder.*/
MCOIMAPFolderFlagImportant = 1 << 11,
- // \Archive: When the folder is archive.
+ /** \Archive: When the folder is archive.*/
MCOIMAPFolderFlagArchive = 1 << 12,
- // \All: When the folder contains all mails, similar to \AllMail.
+ /** \All: When the folder contains all mails, similar to \AllMail.*/
MCOIMAPFolderFlagAll = MCOIMAPFolderFlagAllMail,
- // \Junk: When the folder is the spam folder.
+ /** \Junk: When the folder is the spam folder.*/
MCOIMAPFolderFlagJunk = MCOIMAPFolderFlagSpam,
- // \Flagged: When the folder contains all the flagged emails.
+ /** \Flagged: When the folder contains all the flagged emails.*/
MCOIMAPFolderFlagFlagged = MCOIMAPFolderFlagStarred,
} MCOIMAPFolderFlag;
-// It's the flags of a message.
+/** It's the flags of a message.*/
typedef enum {
MCOMessageFlagNone = 0,
- // Seen/Read flag.
+ /** Seen/Read flag.*/
MCOMessageFlagSeen = 1 << 0,
- // Replied/Answered flag.
+ /** Replied/Answered flag.*/
MCOMessageFlagAnswered = 1 << 1,
- // Flagged/Starred flag.
+ /** Flagged/Starred flag.*/
MCOMessageFlagFlagged = 1 << 2,
- // Deleted flag.
+ /** Deleted flag.*/
MCOMessageFlagDeleted = 1 << 3,
- // Draft flag.
+ /** Draft flag.*/
MCOMessageFlagDraft = 1 << 4,
- // $MDNSent flag.
+ /** $MDNSent flag.*/
MCOMessageFlagMDNSent = 1 << 5,
- // $Forwarded flag.
+ /** $Forwarded flag.*/
MCOMessageFlagForwarded = 1 << 6,
- // $SubmitPending flag.
+ /** $SubmitPending flag.*/
MCOMessageFlagSubmitPending = 1 << 7,
- // $Submitted flag.
+ /** $Submitted flag.*/
MCOMessageFlagSubmitted = 1 << 8,
} MCOMessageFlag;
-// It's the encoding of a part.
+/** It's the encoding of a part.*/
typedef enum {
- // 7bit encoding.
- MCOEncoding7Bit = 0, // should match MAILIMAP_BODY_FLD_ENC_7BIT
- // 8bit encoding.
- MCOEncoding8Bit = 1, // should match MAILIMAP_BODY_FLD_ENC_8BIT
- // binary encoding.
- MCOEncodingBinary = 2, // should match MAILIMAP_BODY_FLD_ENC_BINARY
- // base64 encoding.
- MCOEncodingBase64 = 3, // should match MAILIMAP_BODY_FLD_ENC_BASE64
- // quoted-printable encoding.
- MCOEncodingQuotedPrintable = 4, // should match MAILIMAP_BODY_FLD_ENC_QUOTED_PRINTABLE
- // other encoding.
- MCOEncodingOther = 5, // should match MAILIMAP_BODY_FLD_ENC_OTHER
+ /** 7bit encoding.*/
+ MCOEncoding7Bit = 0, /** should match MAILIMAP_BODY_FLD_ENC_7BIT*/
+ /** 8bit encoding.*/
+ MCOEncoding8Bit = 1, /** should match MAILIMAP_BODY_FLD_ENC_8BIT*/
+ /** binary encoding.*/
+ MCOEncodingBinary = 2, /** should match MAILIMAP_BODY_FLD_ENC_BINARY*/
+ /** base64 encoding.*/
+ MCOEncodingBase64 = 3, /** should match MAILIMAP_BODY_FLD_ENC_BASE64*/
+ /** quoted-printable encoding.*/
+ MCOEncodingQuotedPrintable = 4, /** should match MAILIMAP_BODY_FLD_ENC_QUOTED_PRINTABLE*/
+ /** other encoding.*/
+ MCOEncodingOther = 5, /** should match MAILIMAP_BODY_FLD_ENC_OTHER*/
- // Negative values should be used for encoding not supported by libetpan.
+ /** Negative values should be used for encoding not supported by libetpan.*/
- // UUEncode encoding.
+ /** UUEncode encoding.*/
MCOEncodingUUEncode = -1
} MCOEncoding;
-// It's the information to fetch for a given message in the IMAP FETCH request.
+/** It's the information to fetch for a given message in the IMAP FETCH request.*/
typedef enum {
- // UID of the message.
- MCOIMAPMessagesRequestKindUid = 0, // This is the default and it's always fetched
- // Flags of the message.
+ /** UID of the message.*/
+ MCOIMAPMessagesRequestKindUid = 0, /** This is the default and it's always fetched*/
+ /** Flags of the message.*/
MCOIMAPMessagesRequestKindFlags = 1 << 0,
- // Headers of the message (parsed by the server).
+ /** Headers of the message (parsed by the server).*/
MCOIMAPMessagesRequestKindHeaders = 1 << 1,
- // MIME structure of the message.
+ /** MIME structure of the message.*/
MCOIMAPMessagesRequestKindStructure = 1 << 2,
- // Received date.
+ /** Received date.*/
MCOIMAPMessagesRequestKindInternalDate = 1 << 3,
- // Headers through headers data.
+ /** Headers through headers data.*/
MCOIMAPMessagesRequestKindFullHeaders = 1 << 4,
- // Subject of the message.
+ /** Subject of the message.*/
MCOIMAPMessagesRequestKindHeaderSubject = 1 << 5,
- // Gmail Labels.
+ /** Gmail Labels.*/
MCOIMAPMessagesRequestKindGmailLabels = 1 << 6,
} MCOIMAPMessagesRequestKind;
-// It defines the behavior of the STORE flags request.
+/** It defines the behavior of the STORE flags request.*/
typedef enum {
- // Add the given flags.
+ /** Add the given flags.*/
MCOIMAPStoreFlagsRequestKindAdd,
- // Remove the given flags.
+ /** Remove the given flags.*/
MCOIMAPStoreFlagsRequestKindRemove,
- // Set the given flags.
+ /** Set the given flags.*/
MCOIMAPStoreFlagsRequestKindSet,
} MCOIMAPStoreFlagsRequestKind;
-// It's the search type.
+/** It's the search type.*/
typedef enum {
- // No search.
+ /** No search.*/
MCOIMAPSearchKindNone,
- // Match sender.
+ /** Match sender.*/
MCOIMAPSearchKindFrom,
- // Match recipient.
+ /** Match recipient.*/
MCOIMAPSearchKindRecipient,
- // Match subject.
+ /** Match subject.*/
MCOIMAPSearchKindSubject,
- // Match content of the message.
+ /** Match content of the message.*/
MCOIMAPSearchKindContent,
- // Match headers of the message.
+ /** Match headers of the message.*/
MCOIMAPSearchKindHeader,
- // Or expresssion.
+ /** Or expresssion.*/
MCOIMAPSearchKindOr,
- // And expression.
+ /** And expression.*/
MCOIMAPSearchKindAnd,
} MCOIMAPSearchKind;
-// Keys for the namespace dictionary.
+/** Keys for the namespace dictionary.*/
#define MCOIMAPNamespacePersonal @"IMAPNamespacePersonal";
#define MCOIMAPNamespaceOther @"IMAPNamespaceOther";
#define MCOIMAPNamespaceShared @"IMAPNamespaceShared";
-// This is the constants for the IMAP capabilities.
-// See corresponding RFC for more information.
+/** This is the constants for the IMAP capabilities.*/
+/** See corresponding RFC for more information.*/
typedef enum {
- // ACL Capability.
+ /** ACL Capability.*/
MCOIMAPCapabilityACL,
- // BINARY Capability.
+ /** BINARY Capability.*/
MCOIMAPCapabilityBinary,
- // CATENATE Capability.
+ /** CATENATE Capability.*/
MCOIMAPCapabilityCatenate,
- // CHILDREN Capability.
+ /** CHILDREN Capability.*/
MCOIMAPCapabilityChildren,
- // COMPRESS Capability.
+ /** COMPRESS Capability.*/
MCOIMAPCapabilityCompressDeflate,
- // CONDSTORE Capability.
+ /** CONDSTORE Capability.*/
MCOIMAPCapabilityCondstore,
- // ENABLE Capability.
+ /** ENABLE Capability.*/
MCOIMAPCapabilityEnable,
- // IDLE Capability.
+ /** IDLE Capability.*/
MCOIMAPCapabilityIdle,
- // ID Capability.
+ /** ID Capability.*/
MCOIMAPCapabilityId,
- // LITERAL+ Capability.
+ /** LITERAL+ Capability.*/
MCOIMAPCapabilityLiteralPlus,
- // MULTIAPPEND Capability.
+ /** MULTIAPPEND Capability.*/
MCOIMAPCapabilityMultiAppend,
- // NAMESPACE Capability.
+ /** NAMESPACE Capability.*/
MCOIMAPCapabilityNamespace,
- // QRESYNC Capability.
+ /** QRESYNC Capability.*/
MCOIMAPCapabilityQResync,
- // QUOTE Capability.
+ /** QUOTE Capability.*/
MCOIMAPCapabilityQuota,
- // SORT Capability.
+ /** SORT Capability.*/
MCOIMAPCapabilitySort,
- // STARTTLS Capability.
+ /** STARTTLS Capability.*/
MCOIMAPCapabilityStartTLS,
- // THREAD=ORDEREDSUBJECT Capability.
+ /** THREAD=ORDEREDSUBJECT Capability.*/
MCOIMAPCapabilityThreadOrderedSubject,
- // THREAD=REFERENCES Capability.
+ /** THREAD=REFERENCES Capability.*/
MCOIMAPCapabilityThreadReferences,
- // UIDPLUS Capability.
+ /** UIDPLUS Capability.*/
MCOIMAPCapabilityUIDPlus,
- // UNSELECT Capability.
+ /** UNSELECT Capability.*/
MCOIMAPCapabilityUnselect,
- // XLIST Capability.
+ /** XLIST Capability.*/
MCOIMAPCapabilityXList,
- // AUTH=ANONYMOUS Capability.
+ /** AUTH=ANONYMOUS Capability.*/
MCOIMAPCapabilityAuthAnonymous,
- // AUTH=CRAM-MD5 Capability.
+ /** AUTH=CRAM-MD5 Capability.*/
MCOIMAPCapabilityAuthCRAMMD5,
- // AUTH=DIGEST-MD5 Capability.
+ /** AUTH=DIGEST-MD5 Capability.*/
MCOIMAPCapabilityAuthDigestMD5,
- // AUTH=EXTERNAL Capability.
+ /** AUTH=EXTERNAL Capability.*/
MCOIMAPCapabilityAuthExternal,
- // AUTH=GSSAPI Capability.
+ /** AUTH=GSSAPI Capability.*/
MCOIMAPCapabilityAuthGSSAPI,
- // AUTH=KERBEROSV4 Capability.
+ /** AUTH=KERBEROSV4 Capability.*/
MCOIMAPCapabilityAuthKerberosV4,
- // AUTH=LOGIN Capability.
+ /** AUTH=LOGIN Capability.*/
MCOIMAPCapabilityAuthLogin,
- // AUTH=NTML Capability.
+ /** AUTH=NTML Capability.*/
MCOIMAPCapabilityAuthNTLM,
- // AUTH=OTP Capability.
+ /** AUTH=OTP Capability.*/
MCOIMAPCapabilityAuthOTP,
- // AUTH=PLAIN Capability.
+ /** AUTH=PLAIN Capability.*/
MCOIMAPCapabilityAuthPlain,
- // AUTH=SKEY Capability.
+ /** AUTH=SKEY Capability.*/
MCOIMAPCapabilityAuthSKey,
- // AUTH=SRP Capability.
+ /** AUTH=SRP Capability.*/
MCOIMAPCapabilityAuthSRP,
} MCOIMAPCapability;
-// Error domain for mailcore.
+/** Error domain for mailcore.*/
#define MCOErrorDomain @"MCOErrorDomain"
-// Here's the list of errors.
+/** Here's the list of errors.*/
typedef enum {
- // No error occurred.
+ /** No error occurred.*/
MCOErrorNone,
- // An error related to the connection occurred.
- // It could not connect or it's been disconnected.
+ /** An error related to the connection occurred.*/
+ /** It could not connect or it's been disconnected.*/
MCOErrorConnection,
- // TLS/SSL connection was not available.
+ /** TLS/SSL connection was not available.*/
MCOErrorTLSNotAvailable,
- // The protocol could not be parsed.
+ /** The protocol could not be parsed.*/
MCOErrorParse,
- // Certificate was not valid.
+ /** Certificate was not valid.*/
MCOErrorCertificate,
- // An authentication error occurred.
+ /** An authentication error occurred.*/
MCOErrorAuthentication,
- // Specific to Gmail: IMAP not enabled.
+ /** Specific to Gmail: IMAP not enabled.*/
MCOErrorGmailIMAPNotEnabled,
- // Specific to Gmail: Exceeded bandwidth limit.
+ /** Specific to Gmail: Exceeded bandwidth limit.*/
MCOErrorGmailExceededBandwidthLimit,
- // Specific to Gmail: Too many simultaneous connections.
+ /** Specific to Gmail: Too many simultaneous connections.*/
MCOErrorGmailTooManySimultaneousConnections,
- // Specific to Mobile Me: Moved to iCloud.
+ /** Specific to Mobile Me: Moved to iCloud.*/
MCOErrorMobileMeMoved,
- // Specific to Yahoo: not available.
+ /** Specific to Yahoo: not available.*/
MCOErrorYahooUnavailable,
- // Non existant folder, select failed.
+ /** Non existant folder, select failed.*/
MCOErrorNonExistantFolder,
- // IMAP: Error occurred while renaming a folder.
+ /** IMAP: Error occurred while renaming a folder.*/
MCOErrorRename,
- // IMAP: Error occurred while deleting a folder.
+ /** IMAP: Error occurred while deleting a folder.*/
MCOErrorDelete,
- // IMAP: Error occurred while creating a folder.
+ /** IMAP: Error occurred while creating a folder.*/
MCOErrorCreate,
- // IMAP: Error occurred while subscribing/unsubcribing to a folder.
+ /** IMAP: Error occurred while subscribing/unsubcribing to a folder.*/
MCOErrorSubscribe,
- // IMAP: Error occurred while adding a message to a folder.
+ /** IMAP: Error occurred while adding a message to a folder.*/
MCOErrorAppend,
- // IMAP: Error occurred while copying a message.
+ /** IMAP: Error occurred while copying a message.*/
MCOErrorCopy,
- // IMAP: Error occurred while expunging.
+ /** IMAP: Error occurred while expunging.*/
MCOErrorExpunge,
- // IMAP: Error occurred while fetching messages.
+ /** IMAP: Error occurred while fetching messages.*/
MCOErrorFetch,
- // IMAP: Error occurred while IDLing.
+ /** IMAP: Error occurred while IDLing.*/
MCOErrorIdle,
- // IMAP: Error occurred while sending/getting identity.
+ /** IMAP: Error occurred while sending/getting identity.*/
MCOErrorIdentity,
- // IMAP: Error occurred while getting namespace.
+ /** IMAP: Error occurred while getting namespace.*/
MCOErrorNamespace,
- // IMAP: Error occurred while storing flags.
+ /** IMAP: Error occurred while storing flags.*/
MCOErrorStore,
- // IMAP: Error wile getting capabilities.
+ /** IMAP: Error wile getting capabilities.*/
MCOErrorCapability,
- // STARTTLS is not available.
+ /** STARTTLS is not available.*/
MCOErrorStartTLSNotAvailable,
- // SMTP: Illegal attachment: certain kind of attachment cannot be sent.
+ /** SMTP: Illegal attachment: certain kind of attachment cannot be sent.*/
MCOErrorSendMessageIllegalAttachment,
- // SMTP: Storage limit: message is probably too big.
+ /** SMTP: Storage limit: message is probably too big.*/
MCOErrorStorageLimit,
- // SMTP: Sending message is not allowed.
+ /** SMTP: Sending message is not allowed.*/
MCOErrorSendMessageNotAllowed,
- // SMTP: Specific to hotmail. Needs to connect to webmail.
+ /** SMTP: Specific to hotmail. Needs to connect to webmail.*/
MCOErrorNeedsConnectToWebmail,
- // SMTP: Error while sending message.
+ /** SMTP: Error while sending message.*/
MCOErrorSendMessage,
- // SMTP: Authentication required.
+ /** SMTP: Authentication required.*/
MCOErrorAuthenticationRequired,
- // POP: Error occurred while fetching message list.
+ /** POP: Error occurred while fetching message list.*/
MCOErrorFetchMessageList,
- // POP: Error occurred while deleting message.
+ /** POP: Error occurred while deleting message.*/
MCOErrorDeleteMessage,
- // SMTP: Error while checking account.
+ /** SMTP: Error while checking account.*/
MCOErrorInvalidAccount,
} MCOErrorCode;
diff --git a/src/objc/abstract/MCOHTMLRendererDelegate.h b/src/objc/abstract/MCOHTMLRendererDelegate.h
index dae1425a..2c153ffb 100644
--- a/src/objc/abstract/MCOHTMLRendererDelegate.h
+++ b/src/objc/abstract/MCOHTMLRendererDelegate.h
@@ -12,13 +12,16 @@
#import <Foundation/Foundation.h>
-// This delegate protocol is used to help rendering of the message.
-//
-// It will be used for the following methods.
-//
-// -[MCOMessageParser htmlRenderingWithDelegate:],
-// -[MCOMessageBuilder htmlRenderingWithDelegate:]
-// -[MCOIMAPMessage htmlRenderingWithFolder:delegate:]
+/** This delegate protocol is used to help rendering of the message.
+
+ It will be used for the following methods.
+
+ [MCOMessageParser htmlRenderingWithDelegate:],
+
+ [MCOMessageBuilder htmlRenderingWithDelegate:]
+
+ -[MCOIMAPMessage htmlRenderingWithFolder:delegate:]
+*/
@class MCOAbstractPart;
@class MCOAbstractMessage;
@@ -27,67 +30,71 @@
@protocol MCOHTMLRendererDelegate <NSObject>
-// All methods are optional.
+/** All methods are optional.*/
@optional
-// This delegate method should return YES if it can render a preview of the attachment as an image.
-// part is always a single part.
-// If the attachment can be previewed, it will be rendered using the image template.
-// If not, the attachment template will be used.
+/** This delegate method should return YES if it can render a preview of the attachment as an image.
+ part is always a single part.
+
+If the attachment can be previewed, it will be rendered using the image template.
+If not, the attachment template will be used.*/
- (BOOL) MCOAbstractMessage:(MCOAbstractMessage *)msg canPreviewPart:(MCOAbstractPart *)part;
-// This delegate method should return YES if the part should be rendered.
+/** This delegate method should return YES if the part should be rendered.*/
- (BOOL) MCOAbstractMessage:(MCOAbstractMessage *)msg shouldShowPart:(MCOAbstractPart *)part;
-// This delegate method returns the values to be applied to the template for the given header.
-// See the content of MCHTMLRendererCallback.cpp for the default values of the header.
+/** This delegate method returns the values to be applied to the template for the given header.
+ See the content of MCHTMLRendererCallback.cpp for the default values of the header.*/
- (NSDictionary *) MCOAbstractMessage:(MCOAbstractMessage *)msg templateValuesForHeader:(MCOMessageHeader *)header;
-// This delegate method returns the values to be applied to the template for the given attachment.
-// See the content of MCHTMLRendererCallback.cpp for the default values of the attachment.
+/** This delegate method returns the values to be applied to the template for the given attachment.
+ See the content of MCHTMLRendererCallback.cpp for the default values of the attachment.*/
- (NSDictionary *) MCOAbstractMessage:(MCOAbstractMessage *)msg templateValuesForPart:(MCOAbstractPart *)part;
-// The following methods returns templates. They will match the syntax of ctemplate.
-// See https://code.google.com/p/ctemplate/
+/** @name Template Methods
+ The following methods returns templates. They will match the syntax of ctemplate.
+ See https://code.google.com/p/ctemplate/ */
-// This delegate method returns the template for the main header of the message.
-// See the content of MCHTMLRendererCallback.cpp for the default values of the template.
+/** This delegate method returns the template for the main header of the message.
+ See the content of MCHTMLRendererCallback.cpp for the default values of the template.*/
- (NSString *) MCOAbstractMessage:(MCOAbstractMessage *)msg templateForMainHeader:(MCOMessageHeader *)header;
-// This delegate method returns the template an image attachment.
+/** This delegate method returns the template an image attachment.*/
- (NSString *) MCOAbstractMessage:(MCOAbstractMessage *)msg templateForImage:(MCOAbstractPart *)header;
-// This delegate method returns the template attachment other than images.
-// See the content of MCHTMLRendererCallback.cpp for the default values of the template.
+/** This delegate method returns the template attachment other than images.
+ See the content of MCHTMLRendererCallback.cpp for the default values of the template.*/
- (NSString *) MCOAbstractMessage:(MCOAbstractMessage *)msg templateForAttachment:(MCOAbstractPart *)part;
-// This delegate method returns the template of the main message.
-// It should include HEADER and a BODY values.
-// See the content of MCHTMLRendererCallback.cpp for the default values of the template.
+/** This delegate method returns the template of the main message.
+ It should include HEADER and a BODY values.
+ See the content of MCHTMLRendererCallback.cpp for the default values of the template.*/
- (NSString *) MCOAbstractMessage_templateForMessage:(MCOAbstractMessage *)msg;
-// This delegate method returns the template of an embedded message (included as attachment).
-// It should include HEADER and a BODY values.
-// See the content of MCHTMLRendererCallback.cpp for the default values of the template.
+/** This delegate method returns the template of an embedded message (included as attachment).
+ It should include HEADER and a BODY values.
+ See the content of MCHTMLRendererCallback.cpp for the default values of the template.*/
- (NSString *) MCOAbstractMessage:(MCOAbstractMessage *)msg templateForEmbeddedMessage:(MCOAbstractMessagePart *)part;
-// This delegate method returns the template for the header of an embedded message.
-// See the content of MCHTMLRendererCallback.cpp for the default values of the template.
+/** This delegate method returns the template for the header of an embedded message.
+ See the content of MCHTMLRendererCallback.cpp for the default values of the template.*/
- (NSString *) MCOAbstractMessage:(MCOAbstractMessage *)msg templateForEmbeddedMessageHeader:(MCOMessageHeader *)header;
-// This delegate method returns the separator between the text of the message and the attachments.
-// This delegate method returns the template for the header of an embedded message.
+/** This delegate method returns the separator between the text of the message and the attachments.
+ This delegate method returns the template for the header of an embedded message.*/
- (NSString *) MCOAbstractMessage_templateForAttachmentSeparator:(MCOAbstractMessage *)msg;
-// The following methods will filter the HTML content and may apply some filters to
-// change how to display the message.
+/** @name Filters
+
+ The following methods will filter the HTML content and may apply some filters to
+ change how to display the message.*/
-// This delegate method will apply the filter to HTML rendered content of a given text part.
-// For example, it could filter the CSS content.
+/** This delegate method will apply the filter to HTML rendered content of a given text part.
+ For example, it could filter the CSS content.*/
- (NSString *) MCOAbstractMessage:(MCOAbstractMessage *)msg filterHTMLForPart:(NSString *)html;
-// This delegate method will apply a filter to the whole HTML content.
-// For example, it could collapse the quoted messages.
+/** This delegate method will apply a filter to the whole HTML content.
+ For example, it could collapse the quoted messages.*/
- (NSString *) MCOAbstractMessage:(MCOAbstractMessage *)msg filterHTMLForMessage:(NSString *)html;
@end
diff --git a/src/objc/abstract/MCOHTMLRendererIMAPDelegate.h b/src/objc/abstract/MCOHTMLRendererIMAPDelegate.h
index 562256c3..aadbb350 100644
--- a/src/objc/abstract/MCOHTMLRendererIMAPDelegate.h
+++ b/src/objc/abstract/MCOHTMLRendererIMAPDelegate.h
@@ -12,31 +12,39 @@
#import <MailCore/MCOHTMLRendererDelegate.h>
-// This delegate protocol is used to fetch the content of the part of the message when the HTML render needs them.
-// It will help fetch the minimal amount of information from the message required to render the HTML.
-//
-// It will be used for the following method.
-//
-// -[MCOIMAPMessage htmlRenderingWithFolder:delegate:]
+/**
+ This delegate protocol is used to fetch the content of the part of the message when the HTML render needs them.
+ It will help fetch the minimal amount of information from the message required to render the HTML.
+
+ It will be used for the following method.
+
+ [MCOIMAPMessage htmlRenderingWithFolder:delegate:]
+*/
@class MCOIMAPPart;
@protocol MCOHTMLRendererIMAPDelegate <MCOHTMLRendererDelegate>
-// All methods are optional.
+/** All methods are optional.*/
@optional
-// The delegate method returns NULL if the delegate have not fetch the part yet. The opportunity can also be used to
-// start fetching the attachment.
-// It will return the data synchronously if it has already fetched it.
+/**
+ The delegate method returns NULL if the delegate have not fetch the part yet. The opportunity can also be used to
+ start fetching the attachment.
+ It will return the data synchronously if it has already fetched it.
+*/
- (NSData *) MCOAbstractMessage:(MCOAbstractMessage *)msg dataForIMAPPart:(MCOIMAPPart *)part folder:(NSString *)folder;
-// The delegate method will notify the delegate to start fetching the given part.
-// It will be used to render an attachment that cannot be previewed.
+/**
+ The delegate method will notify the delegate to start fetching the given part.
+ It will be used to render an attachment that cannot be previewed.
+*/
- (void) MCOAbstractMessage:(MCOAbstractMessage *)msg prefetchAttachmentIMAPPart:(MCOIMAPPart *)part folder:(NSString *)folder;
-// The delegate method will notify the delegate to start fetching the given part.
-// It will be used to render an attachment that can be previewed.
+/**
+ The delegate method will notify the delegate to start fetching the given part.
+ It will be used to render an attachment that can be previewed.
+*/
- (void) MCOAbstractMessage:(MCOAbstractMessage *)msg prefetchImageIMAPPart:(MCOIMAPPart *)part folder:(NSString *)folder;
@end
diff --git a/src/objc/abstract/MCOMessageHeader.h b/src/objc/abstract/MCOMessageHeader.h
index 899f8d38..6e8eb9bf 100644
--- a/src/objc/abstract/MCOMessageHeader.h
+++ b/src/objc/abstract/MCOMessageHeader.h
@@ -12,67 +12,67 @@
#import <Foundation/Foundation.h>
-// This class implements common fields of a message header.
+/** This class implements common fields of a message header.*/
@class MCOAddress;
@interface MCOMessageHeader : NSObject <NSCopying>
-// Message-ID field.
+/** Message-ID field.*/
@property (nonatomic, copy) NSString * messageID;
-// References field. It's an array of message-ids.
+/** 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.
+/** In-Reply-To field. It's an array of message-ids.*/
@property (nonatomic, copy) NSArray * /* NSString */ inReplyTo;
-// Date field: sent date of the message.
+/** Date field: sent date of the message.*/
@property (nonatomic, strong) NSDate * date;
-// Received date: received date of the message.
+/** Received date: received date of the message.*/
@property (nonatomic, strong) NSDate * receivedDate;
-// Sender field.
+/** Sender field.*/
@property (nonatomic, copy) MCOAddress * sender;
-// From field: address of the sender of the message.
+/** 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.
+/** 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.
+/** 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.
+/** 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.
+/** Reply-To field. It's an array of MCOAddress.*/
@property (nonatomic, copy) NSArray * /* MCOAddress */ replyTo;
-// Subject of the message.
+/** Subject of the message.*/
@property (nonatomic, copy) NSString * subject;
-// User-Agent.
+/** User-Agent.*/
@property (nonatomic, copy) NSString * userAgent;
-// Extracted subject (also remove square brackets).
+/** Extracted subject (also remove square brackets).*/
- (NSString *) extractedSubject;
-// Extracted subject (don't remove square brackets).
+/** Extracted subject (don't remove square brackets).*/
- (NSString *) partialExtractedSubject;
-// Fill the header using the given RFC 822 data.
+/** 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.
+/** 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.
+/** 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.
+/** Returns a header that can be used as a base for a forward message.*/
- (MCOMessageHeader *) forwardHeader;
@end
diff --git a/src/objc/pop/MCOPOPFetchHeaderOperation.h b/src/objc/pop/MCOPOPFetchHeaderOperation.h
index d395df5b..76826f56 100644
--- a/src/objc/pop/MCOPOPFetchHeaderOperation.h
+++ b/src/objc/pop/MCOPOPFetchHeaderOperation.h
@@ -13,17 +13,25 @@
#import <Foundation/Foundation.h>
#import <MailCore/MCOPOPOperation.h>
-// This is an asynchronous operation that will fetch the header of a message.
-// See MCOPOPSession for more info.
+/**
+ This is an asynchronous operation that will fetch the header of a message.
+ @See MCOPOPSession
+*/
@class MCOMessageHeader;
@interface MCOPOPFetchHeaderOperation : MCOPOPOperation
-// Starts the asynchronous operation.
-// On success, the completion block will be called with nil as error and the content of the fetched header.
-// On failure, error will be set with MCOErrorDomain as domain and an error code available in MCOConstants.h.
-// header will be nil.
+/**
+ Starts the asynchronous fetch operation.
+
+ @param completionBlock Called when the operation is finished.
+
+ - On success `error` will be nil and `header` will contain the message header
+
+ - On failure, `error` will be set with `MCOErrorDomain` as domain and an
+ error code available in MCOConstants.h, `header` will be null
+*/
- (void) start:(void (^)(NSError * error, MCOMessageHeader * header))completionBlock;
@end
diff --git a/src/objc/pop/MCOPOPFetchMessageOperation.h b/src/objc/pop/MCOPOPFetchMessageOperation.h
index 86149e08..d8091b25 100644
--- a/src/objc/pop/MCOPOPFetchMessageOperation.h
+++ b/src/objc/pop/MCOPOPFetchMessageOperation.h
@@ -13,20 +13,25 @@
#import <Foundation/Foundation.h>
#import <MailCore/MCOPOPOperation.h>
-// This is an asynchronous operation that will fetch the content of a message.
+/** Fetch a message from POP3 */
typedef void (^MCOPOPOperationProgressBlock)(unsigned int current, unsigned int maximum);
@interface MCOPOPFetchMessageOperation : MCOPOPOperation
-// This block will be called during the progression while downloading the message
-// when some bytes have been downloaded from the network.
+/** This block will be called as data is downloaded from the network */
@property (nonatomic, copy) MCOPOPOperationProgressBlock progress;
-// Starts the asynchronous operation.
-// On success, the completion block will be called with nil as error and the fetched message data.
-// On failure, error will be set with MCOErrorDomain as domain and an error code available in MCOConstants.h.
-// messageData will be nil.
+/**
+ Starts the asynchronous fetch operation.
+
+ @param completionBlock Called when the operation is finished.
+
+ - On success `error` will be nil and `data` will contain the message data
+
+ - On failure, `error` will be set with `MCOErrorDomain` as domain and an
+ error code available in MCOConstants.h, `data` will be nil
+*/
- (void) start:(void (^)(NSError * error, NSData * messageData))completionBlock;
@end
diff --git a/src/objc/pop/MCOPOPFetchMessagesOperation.h b/src/objc/pop/MCOPOPFetchMessagesOperation.h
index caad35b5..f63d2c5f 100644
--- a/src/objc/pop/MCOPOPFetchMessagesOperation.h
+++ b/src/objc/pop/MCOPOPFetchMessagesOperation.h
@@ -13,15 +13,20 @@
#import <Foundation/Foundation.h>
#import <MailCore/MCOPOPOperation.h>
-// This is an asynchronous operation that will fetch the list of a messages on the account.
+/** This is an asynchronous operation that will fetch the list of a messages on the POP3 account. */
@interface MCOPOPFetchMessagesOperation : MCOPOPOperation
-// Starts the asynchronous operation.
-// On success, the completion block will be called with nil as error and the fetched messages list.
-// Messages will be an array of MCOPOPMessageInfo.
-// On failure, error will be set with MCOErrorDomain as domain and an error code available in MCOConstants.h.
-// messageData will be nil.
+/**
+ Starts the asynchronous fetch operation.
+
+ @param completionBlock Called when the operation is finished.
+
+ - On success `error` will be nil and `messages` will be an array of MCOPOPMessageInfo
+
+ - On failure, `error` will be set with `MCOErrorDomain` as domain and an
+ error code available in MCOConstants.h, `messages` will be null
+*/
- (void) start:(void (^)(NSError * error, NSArray * /* MCOPOPMessageInfo */ messages))completionBlock;
@end
diff --git a/src/objc/pop/MCOPOPMessageInfo.h b/src/objc/pop/MCOPOPMessageInfo.h
index bef874ff..b1780a96 100644
--- a/src/objc/pop/MCOPOPMessageInfo.h
+++ b/src/objc/pop/MCOPOPMessageInfo.h
@@ -12,18 +12,18 @@
#import <Foundation/Foundation.h>
-// This is information of a message fetched by MCOPOPFetchMessagesOperation.
+/** This is information of a message fetched by MCOPOPFetchMessagesOperation.*/
@interface MCOPOPMessageInfo : NSObject <NSCopying>
-// This is the index of a given message.
+/** This is the index of a given message.*/
@property (nonatomic, assign) unsigned int index;
-// This is the size of the given message.
+/** This is the size of the given message.*/
@property (nonatomic, assign) unsigned int size;
-// This is the unique identifier of the message.
-// It can be used as a cache identifier.
+/** This is the unique identifier of the message.
+ It can be used as a cache identifier.*/
@property (nonatomic, copy) NSString * uid;
@end
diff --git a/src/objc/pop/MCOPOPOperation.h b/src/objc/pop/MCOPOPOperation.h
index 656b57a1..d2b3105e 100644
--- a/src/objc/pop/MCOPOPOperation.h
+++ b/src/objc/pop/MCOPOPOperation.h
@@ -13,13 +13,23 @@
#import <Foundation/Foundation.h>
#import <MailCore/MCOOperation.h>
-// This is an asynchronous POP3 operation.
-// See MCOPOPSession for more info.
+/**
+ This is a generic asynchronous POP3 operation.
+ @see MCOPOPSession
+*/
@interface MCOPOPOperation : MCOOperation
-// On success, the completion block will be called with nil as error.
-// On failure, error will be set with MCOErrorDomain as domain and an error code available in MCOConstants.h.
+/**
+ Starts the asynchronous operation.
+
+ @param completionBlock Called when the operation is finished.
+
+ - On success `error` will be nil
+
+ - On failure, `error` will be set with `MCOErrorDomain` as domain and an
+ error code available in MCOConstants.h,
+*/
- (void) start:(void (^)(NSError * error))completionBlock;
@end
diff --git a/src/objc/pop/MCOPOPSession.h b/src/objc/pop/MCOPOPSession.h
index aa1f2904..52f5a9b7 100644
--- a/src/objc/pop/MCOPOPSession.h
+++ b/src/objc/pop/MCOPOPSession.h
@@ -20,102 +20,95 @@
@class MCOPOPOperation;
@class MCOIndexSet;
-// This class implements asynchronous POP3 protocol.
+/** This class implements asynchronous access to the POP3 protocol.*/
@interface MCOPOPSession : NSObject
-// This is the hostname of the POP3 server to connect to.
+/** This is the hostname of the POP3 server to connect to.*/
@property (nonatomic, copy) NSString * hostname;
-// This is the port of the POP3 server to connect to.
+/** This is the port of the POP3 server to connect to.*/
@property (nonatomic, assign) unsigned int port;
-// This is the username of the account.
+/** This is the username of the account.*/
@property (nonatomic, copy) NSString * username;
-// This is the password of the account.
+/** This is the password of the account.*/
@property (nonatomic, copy) NSString * password;
-// This is the authentication type to use to connect.
-// MCOAuthTypeSASLNone means that it uses the clear-text password authentication.
-// It's the default.
-// Note: However, over a encrypted connection, the password will be safe.
+/**
+ This is the authentication type to use to connect.
+ `MCOAuthTypeSASLNone` means that it uses the clear-text is used (and is the default).
+ @warning *Important*: Over an encrypted connection like TLS, the password will still be secure
+*/
@property (nonatomic, assign) MCOAuthType authType;
-// This is the encryption type to use.
-// See MCOConnectionType for more information.
+/** This is the encryption type to use.
+See MCOConnectionType for more information.*/
@property (nonatomic, assign) MCOConnectionType connectionType;
-// This is the timeout of the connection.
+/** This is the timeout of the connection.*/
@property (nonatomic, assign) NSTimeInterval timeout;
-// When set to YES, the connection will fail if the certificate is incorrect.
+/** When set to YES, the connection will fail if the certificate is incorrect.*/
@property (nonatomic, assign, getter=isCheckCertificateEnabled) BOOL checkCertificateEnabled;
-// Returns an operation that will fetch the list of messages.
-// The operation needs to be started.
-//
-// {
-// ...
-// MCOPOPFetchMessagesOperation * op = [session fetchMessagesOperation];
-// [op start:^(NSError * error, NSArray * messages) {
-// // messages is an array of MCOPOPMessageInfo
-// // [info index] can be used as reference for a given message in the other operations.
-// }];
-//
+/** @name Operations */
+
+/**
+ Returns an operation that will fetch the list of messages.
+
+ MCOPOPFetchMessagesOperation * op = [session fetchMessagesOperation];
+ [op start:^(NSError * error, NSArray * messages) {
+ // messages is an array of MCOPOPMessageInfo
+ // [info index] can be used as reference for a given message in the other operations.
+ }];
+*/
- (MCOPOPFetchMessagesOperation *) fetchMessagesOperation;
-// Returns an operation that will fetch the header of the given message.
-// The operation needs to be started.
-//
-// {
-// ...
-// MCOPOPFetchHeaderOperation * op = [session fetchHeaderOperationWithIndex:idx];
-// [op start:^(NSError * error, MCOMessageHeader * header) {
-// // header is the parsed header of the message.
-// }];
-//
+/**
+ Returns an operation that will fetch the header of the given message.
+
+ MCOPOPFetchHeaderOperation * op = [session fetchHeaderOperationWithIndex:idx];
+ [op start:^(NSError * error, MCOMessageHeader * header) {
+ // header is the parsed header of the message.
+ }];
+*/
- (MCOPOPFetchHeaderOperation *) fetchHeaderOperationWithIndex:(unsigned int)index;
-// Returns an operation that will fetch the content of the given message.
-// The operation needs to be started.
-//
-// {
-// ...
-// MCOPOPFetchMessageOperation * op = [session fetchMessageOperationWithIndex:idx];
-// [op start:^(NSError * error, NSData * messageData) {
-// // messageData is the RFC 822 formatted message data.
-// }];
-//
+/**
+ Returns an operation that will fetch the content of the given message.
+
+ MCOPOPFetchMessageOperation * op = [session fetchMessageOperationWithIndex:idx];
+ [op start:^(NSError * error, NSData * messageData) {
+ // messageData is the RFC 822 formatted message data.
+ }];
+*/
- (MCOPOPFetchMessageOperation *) fetchMessageOperationWithIndex:(unsigned int)index;
-// Returns an operation that will delete the given messages.
-// Will disconnect when finished.
-// The operation needs to be started.
-//
-// {
-// ...
-// MCOIndexSet * indexes = [MCOIndexSet indexSet];
-// [indexes addIndex:1];
-// [indexes addIndex:2];
-// [indexes addIndex:3];
-// MCOPOPOperation * op = [session deleteMessagesOperationWithIndexes:indexes];
-// [op start:^(NSError * error) {
-// ...
-// }];
-//
+/**
+ Returns an operation that will delete the given messages.
+ Will disconnect when finished.
+
+ MCOIndexSet * indexes = [MCOIndexSet indexSet];
+ [indexes addIndex:1];
+ [indexes addIndex:2];
+ [indexes addIndex:3];
+ MCOPOPOperation * op = [session deleteMessagesOperationWithIndexes:indexes];
+ [op start:^(NSError * error) {
+ ...
+ }];
+*/
- (MCOPOPOperation *) deleteMessagesOperationWithIndexes:(MCOIndexSet *)indexes;
-// Returns an operation that will check whether the POP account is valid.
-// The operation needs to be started.
-//
-// {
-// ...
-// MCOPOPOperation * op = [session checkAccountOperation];
-// [op start:^(NSError * error) {
-// ...
-// }];
-//
+/**
+ Returns an operation that will check whether the POP account is valid.
+
+ MCOPOPOperation * op = [session checkAccountOperation];
+ [op start:^(NSError * error) {
+ ...
+ }];
+*/
- (MCOPOPOperation *) checkAccountOperation;
@end
diff --git a/src/objc/rfc822/MCOAttachment.h b/src/objc/rfc822/MCOAttachment.h
index 584bdece..50a2d1a7 100644
--- a/src/objc/rfc822/MCOAttachment.h
+++ b/src/objc/rfc822/MCOAttachment.h
@@ -12,30 +12,31 @@
#import <MailCore/MCOAbstractPart.h>
-// This is a single part.
-// It can either parsed from RFC 822 message data or created to build a message.
+/** 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.
+/** Returns a MIME type for a filename.*/
+ (NSString *) mimeTypeForFilename:(NSString *)filename;
-// Returns a file attachment with the content of the given file.
+/** Returns a file attachment with the content of the given file.*/
+ (MCOAttachment *) attachmentWithContentsOfFile:(NSString *)filename;
-// Returns a part with an HTML content.
+/** Returns a part with an HTML content.*/
+ (MCOAttachment *) attachmentWithHTMLString:(NSString *)htmlString;
-// Returns a part with a RFC 822 messsage attachment.
+/** Returns a part with a RFC 822 messsage attachment.*/
+ (MCOAttachment *) attachmentWithRFC822Message:(NSData *)messageData;
-// Returns a part with an plain text content.
+/** Returns a part with an plain text content.*/
+ (MCOAttachment *) attachmentWithText:(NSString *)text;
-// Decoded data of the part.
+/** Decoded data of the part.*/
@property (nonatomic, strong) NSData * data;
-// Returns string representation according to charset
+/** Returns string representation according to charset*/
- (NSString *) decodedString;
@end
diff --git a/src/objc/rfc822/MCOMessageBuilder.h b/src/objc/rfc822/MCOMessageBuilder.h
index a01e3350..4fa78691 100644
--- a/src/objc/rfc822/MCOMessageBuilder.h
+++ b/src/objc/rfc822/MCOMessageBuilder.h
@@ -12,60 +12,53 @@
#import <MailCore/MCOAbstractMessage.h>
-// This class will allow you to build a RFC 822 formatted message.
-// For example when you need to send a message using SMTP,
-// you need to generate first a RFC 822 formatted message.
-// This class will help you do that.
-
-/*
+/**
+ This class will allow you to build a RFC 822 formatted message.
+ For example when you need to send a message using SMTP,
+ you need to generate first a RFC 822 formatted message.
+ This class will help you do that.
-{
- ...
- MCOMessageBuilder * builder = [[MCOMessageBuilder alloc] init];
- [[builder header] setFrom:[MCOAddress addressWithDisplayName:@"Hoa V. DINH" mailbox:@"hoa@etpan.org"];
- NSArray * to = [NSArray arrayWithObject:[MCOAddress addressWithDisplayName:@"Gael Roualland" mailbox:@"gael@etpan.org"]];
- [[builder header] setTo:to];
- [[builder header] setSubject:@"A nice picture!"];
- [builder setHTMLBody:@"<div>Here's the message I need to send.</div>"];
- [builder addAttachment:[MCOAttachment attachmentWithContentsOfFile:@"/Users/foo/Pictures/image.jpg"]];
- NSData * rfc822Data = [builder data];
- ...
-}
+ MCOMessageBuilder * builder = [[MCOMessageBuilder alloc] init];
+ [[builder header] setFrom:[MCOAddress addressWithDisplayName:@"Hoa V. DINH" mailbox:@"hoa@etpan.org"];
+ NSArray * to = [NSArray arrayWithObject:[MCOAddress addressWithDisplayName:@"Gael Roualland" mailbox:@"gael@etpan.org"]];
+ [[builder header] setTo:to];
+ [[builder header] setSubject:@"A nice picture!"];
+ [builder setHTMLBody:@"<div>Here's the message I need to send.</div>"];
+ [builder addAttachment:[MCOAttachment attachmentWithContentsOfFile:@"/Users/foo/Pictures/image.jpg"]];
+ NSData * rfc822Data = [builder data];
- */
+*/
@class MCOAttachment;
@protocol MCOHTMLRendererDelegate;
@interface MCOMessageBuilder : MCOAbstractMessage <NSCopying>
-// Main HTML content of the message.
+/** Main HTML content of the message.*/
@property (nonatomic, copy, setter=setHTMLBody:) NSString * htmlBody;
-// Plain text content of the message.
+/** Plain text content of the message.*/
@property (nonatomic, copy) NSString * textBody;
-// List of file attachments.
+/** List of file attachments.*/
@property (nonatomic, copy) NSArray * attachments;
-// List of related file attachments (included as cid: link in the HTML part).
+/** List of related file attachments (included as cid: link in the HTML part).*/
@property (nonatomic, copy) NSArray * relatedAttachments;
-// Prefix for the boundary identifier.
-// Default value is nil.
+/** Prefix for the boundary identifier. Default value is nil.*/
@property (nonatomic, copy) NSString * boundaryPrefix;
-// Add an attachment.
+/** Add an attachment.*/
- (void) addAttachment:(MCOAttachment *)attachment;
-// Add a related attachment.
+/** Add a related attachment.*/
- (void) addRelatedAttachment:(MCOAttachment *)attachment;
-// RFC 822 formatted message.
+/** RFC 822 formatted message.*/
- (NSData *) data;
-// HTML rendering of the message to be displayed in a web view.
-// The delegate can be nil.
+/** HTML rendering of the message to be displayed in a web view. The delegate can be nil.*/
- (NSString *) htmlRenderingWithDelegate:(id <MCOHTMLRendererDelegate>)delegate;
@end
diff --git a/src/objc/rfc822/MCOMessageParser.h b/src/objc/rfc822/MCOMessageParser.h
index c0df2fbb..fa46132b 100644
--- a/src/objc/rfc822/MCOMessageParser.h
+++ b/src/objc/rfc822/MCOMessageParser.h
@@ -10,9 +10,11 @@
#define __MAILCORE_MCOMESSAGEPARSER_H_
-// This class implements a parsed message.
-// When the full content of a message has been fetched using POP or IMAP,
-// you need to parse it.
+/**
+ This class implements a parsed message.
+ When the full content of a message has been fetched using POP or IMAP,
+ you need to parse it.
+*/
#import <MailCore/MCOAbstractMessage.h>
@@ -20,21 +22,20 @@
@interface MCOMessageParser : MCOAbstractMessage <NSCopying>
-// returns a parsed message from the given RFC 822 data.
+/** returns a parsed message from the given RFC 822 data.*/
+ (MCOMessageParser *) messageParserWithData:(NSData *)data;
-// data is the RFC 822 formatted message.
+/** 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.
+/** 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.
+/** 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.
-// delegate can be nil.
+/** HTML rendering of the message to be displayed in a web view. delegate can be nil.*/
- (NSString *) htmlRenderingWithDelegate:(id <MCOHTMLRendererDelegate>)delegate;
@end
diff --git a/src/objc/rfc822/MCOMessagePart.h b/src/objc/rfc822/MCOMessagePart.h
index 7d9d7f2c..a7055efc 100644
--- a/src/objc/rfc822/MCOMessagePart.h
+++ b/src/objc/rfc822/MCOMessagePart.h
@@ -12,7 +12,7 @@
#import <MailCore/MCOAbstractMessagePart.h>
-// Message part parsed from RFC 822 message data.
+/** Message part parsed from RFC 822 message data. */
@interface MCOMessagePart : MCOAbstractMessagePart <NSCopying>
diff --git a/src/objc/rfc822/MCOMultipart.h b/src/objc/rfc822/MCOMultipart.h
index 36922fe4..e45d4a0c 100644
--- a/src/objc/rfc822/MCOMultipart.h
+++ b/src/objc/rfc822/MCOMultipart.h
@@ -12,7 +12,7 @@
#import <MailCore/MCOAbstractMultipart.h>
-// Multipart parsed from RFC 822 message data.
+/** Multipart parsed from RFC 822 message data. */
@interface MCOMultipart : MCOAbstractMultipart <NSCopying>
diff --git a/src/objc/utils/MCOIndexSet.h b/src/objc/utils/MCOIndexSet.h
index 1ecf8c9a..d80aa322 100644
--- a/src/objc/utils/MCOIndexSet.h
+++ b/src/objc/utils/MCOIndexSet.h
@@ -14,47 +14,47 @@
#import <MailCore/MCORange.h>
-// similar to NSMutableIndexSet but supports int64_t
+/** similar to NSMutableIndexSet but supports int64_t*/
@interface MCOIndexSet : NSObject <NSCopying>
-// Creates an empty index set.
+/** Creates an empty index set.*/
+ (MCOIndexSet *) indexSet;
-// Creates an index set that contains a range of integers.
+/** Creates an index set that contains a range of integers.*/
+ (MCOIndexSet *) indexSetWithRange:(MCORange)range;
-// Creates an index set with a single integer.
+/** Creates an index set with a single integer.*/
+ (MCOIndexSet *) indexSetWithIndex:(uint64_t)idx;
-// Returns the number of integers in that index set.
+/** Returns the number of integers in that index set.*/
- (unsigned int) count;
-// Adds an integer to the index set.
+/** Adds an integer to the index set.*/
- (void) addIndex:(uint64_t)idx;
-// Removes an integer from the index set.
+/** Removes an integer from the index set.*/
- (void) removeIndex:(uint64_t)idx;
-// Returns YES if the index set contains the given integer.
+/** Returns YES if the index set contains the given integer.*/
- (BOOL) containsIndex:(uint64_t)idx;
-// Adds a range of integers to the index set.
+/** Adds a range of integers to the index set.*/
- (void) addRange:(MCORange)range;
-// Removes a range of integers from the index set.
+/** Removes a range of integers from the index set.*/
- (void) removeRange:(MCORange)range;
-// Removes all integers that are not in the given range.
+/** Removes all integers that are not in the given range.*/
- (void) intersectsRange:(MCORange)range;
-// Returns all the ranges of ths index set.
+/** Returns all the ranges of ths index set.*/
- (MCORange *) allRanges;
-// Returns the number of ranges in this index set.
+/** Returns the number of ranges in this index set.*/
- (unsigned int) rangesCount;
-// Enumerates all the indexes of the index set.
+/** Enumerates all the indexes of the index set.*/
- (void) enumerateIndexes:(void (^)(uint64_t idx))block;
@end
diff --git a/src/objc/utils/MCORange.h b/src/objc/utils/MCORange.h
index 4fdb9233..e3fac7fd 100644
--- a/src/objc/utils/MCORange.h
+++ b/src/objc/utils/MCORange.h
@@ -23,45 +23,45 @@ extern "C" {
@class MCOIndexSet;
typedef struct {
- // first integer of the range.
+ /** first integer of the range.*/
uint64_t location;
- // length of the range.
+ /** length of the range.*/
uint64_t length;
} MCORange;
-// Constants for an emtpy range.
+/** Constants for an emtpy range.*/
extern MCORange MCORangeEmpty;
-// Returns a new range given a location and length.
+/** Returns a new range given a location and length.*/
MCORange MCORangeMake(uint64_t location, uint64_t length);
-// Returns an index set that is the result of sustracting a range from a range.
+/** Returns an index set that is the result of sustracting a range from a range.*/
MCOIndexSet * MCORangeRemoveRange(MCORange range1, MCORange range2);
-// Returns an index set that is the result of the union a range from a range.
+/** Returns an index set that is the result of the union a range from a range.*/
MCOIndexSet * MCORangeUnion(MCORange range1, MCORange range2);
#ifdef __cplusplus
-// Returns a C++ range from an Objective-C range.
+/** Returns a C++ range from an Objective-C range.*/
mailcore::Range MCORangeToMCRange(MCORange range);
-// Returns an Objective-C range from a C++ range.
+/** Returns an Objective-C range from a C++ range.*/
MCORange MCORangeWithMCRange(mailcore::Range range);
#endif
-// Returns the intersection of two ranges.
+/** Returns the intersection of two ranges.*/
MCORange MCORangeIntersection(MCORange range1, MCORange range2);
-// Returns YES if two given ranges have an intersection.
+/** Returns YES if two given ranges have an intersection.*/
BOOL MCORangeHasIntersection(MCORange range1, MCORange range2);
-// Returns left bound of a range.
+/** Returns left bound of a range.*/
uint64_t MCORangeLeftBound(MCORange range);
-// Returns right bound of a range.
+/** Returns right bound of a range.*/
uint64_t MCORangeRightBound(MCORange range);
#ifdef __cplusplus