Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated the inline API docs

  • Loading branch information...
commit c95e8fc48338d14e3439450e6191160dbbb6e3f0 1 parent a19d761
@mronge mronge authored
View
16 MailCore.xcodeproj/project.pbxproj
@@ -64,7 +64,6 @@
F8618D1C10DAE1E600C41188 /* (null) in Sources */ = {isa = PBXBuildFile; };
F8618D1D10DAE1E600C41188 /* CTBareAttachment.m in Sources */ = {isa = PBXBuildFile; fileRef = F81E26690C6ED35C00B3FBAC /* CTBareAttachment.m */; };
F8618D1E10DAE1E600C41188 /* MailCoreUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = F88804D60B4243C000D400E7 /* MailCoreUtilities.m */; };
- F8618D1F10DAE1EB00C41188 /* JRLog.m in Sources */ = {isa = PBXBuildFile; fileRef = F8A70EEE0C4059E100D1D694 /* JRLog.m */; };
F86B542314F476170080FB8F /* CTSMTPConnection.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F81B885A0A74AA7100143DF6 /* CTSMTPConnection.h */; };
F86B542414F4761C0080FB8F /* CTSMTPAsyncConnection.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2D538B42119803A6000AB4A2 /* CTSMTPAsyncConnection.h */; };
F86B542514F4761E0080FB8F /* CTSMTP.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F88CA0CC0BF7A7B00055AC29 /* CTSMTP.h */; };
@@ -86,7 +85,6 @@
F86B543614F476500080FB8F /* MailCoreUtilities.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F88804D50B4243C000D400E7 /* MailCoreUtilities.h */; };
F86B543714F476530080FB8F /* MailCore.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F81B885C0A74AA7100143DF6 /* MailCore.h */; };
F86B543814F476540080FB8F /* MailCoreTypes.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F81B885D0A74AA7100143DF6 /* MailCoreTypes.h */; };
- F86B543914F476560080FB8F /* JRLog.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F8A70EED0C4059E100D1D694 /* JRLog.h */; };
F88804620B42018500D400E7 /* libsasl2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F88804610B42018500D400E7 /* libsasl2.dylib */; };
F88804D70B4243C000D400E7 /* MailCoreUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = F88804D50B4243C000D400E7 /* MailCoreUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; };
F88804D80B4243C000D400E7 /* MailCoreUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = F88804D60B4243C000D400E7 /* MailCoreUtilities.m */; };
@@ -126,9 +124,6 @@
F8A2FAC4144FA87B00C03DB4 /* CTSMTPAsyncConnection.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2D538B42119803A6000AB4A2 /* CTSMTPAsyncConnection.h */; };
F8A2FAC5144FA87D00C03DB4 /* CTSMTP.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F88CA0CC0BF7A7B00055AC29 /* CTSMTP.h */; };
F8A2FAC6144FA88100C03DB4 /* CTESMTP.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F88CA0D20BF7AC0B0055AC29 /* CTESMTP.h */; };
- F8A2FAC7144FA88F00C03DB4 /* JRLog.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = F8A70EED0C4059E100D1D694 /* JRLog.h */; };
- F8A70EEF0C4059E100D1D694 /* JRLog.h in Headers */ = {isa = PBXBuildFile; fileRef = F8A70EED0C4059E100D1D694 /* JRLog.h */; settings = {ATTRIBUTES = (Public, ); }; };
- F8A70EF00C4059E100D1D694 /* JRLog.m in Sources */ = {isa = PBXBuildFile; fileRef = F8A70EEE0C4059E100D1D694 /* JRLog.m */; };
F8B245CE144BAC15002B56DA /* libetpan_ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F8B245CA144BABA4002B56DA /* libetpan_ios.a */; };
F8B6D4F0156EE189008DE9EB /* libetpan_mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F8B6D4EC156EE173008DE9EB /* libetpan_mac.a */; };
F8DFCF4C15801A5000C01975 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8DFCF4B15801A5000C01975 /* SenTestingKit.framework */; };
@@ -244,7 +239,6 @@
dstPath = "$(SRCROOT)/include/MailCore";
dstSubfolderSpec = 0;
files = (
- F86B543914F476560080FB8F /* JRLog.h in CopyFiles */,
F86B543814F476540080FB8F /* MailCoreTypes.h in CopyFiles */,
F86B543714F476530080FB8F /* MailCore.h in CopyFiles */,
F86B543614F476500080FB8F /* MailCoreUtilities.h in CopyFiles */,
@@ -276,7 +270,6 @@
dstSubfolderSpec = 0;
files = (
F8A2FAC3144FA87800C03DB4 /* CTSMTPConnection.h in CopyFiles */,
- F8A2FAC7144FA88F00C03DB4 /* JRLog.h in CopyFiles */,
F8A2FAC1144FA87300C03DB4 /* CTMIME.h in CopyFiles */,
F8A2FAC2144FA87400C03DB4 /* CTMIME_Enumerator.h in CopyFiles */,
F8A2FAC0144FA87100C03DB4 /* CTMIME_TextPart.h in CopyFiles */,
@@ -327,7 +320,7 @@
F81B88530A74AA7100143DF6 /* CTCoreAddress.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = CTCoreAddress.m; path = Source/CTCoreAddress.m; sourceTree = SOURCE_ROOT; };
F81B88540A74AA7100143DF6 /* CTCoreFolder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CTCoreFolder.h; path = Source/CTCoreFolder.h; sourceTree = SOURCE_ROOT; };
F81B88550A74AA7100143DF6 /* CTCoreFolder.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = CTCoreFolder.m; path = Source/CTCoreFolder.m; sourceTree = SOURCE_ROOT; };
- F81B88560A74AA7100143DF6 /* CTCoreMessage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CTCoreMessage.h; path = Source/CTCoreMessage.h; sourceTree = SOURCE_ROOT; };
+ F81B88560A74AA7100143DF6 /* CTCoreMessage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = CTCoreMessage.h; path = Source/CTCoreMessage.h; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
F81B88570A74AA7100143DF6 /* CTCoreMessage.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = CTCoreMessage.m; path = Source/CTCoreMessage.m; sourceTree = SOURCE_ROOT; };
F81B885A0A74AA7100143DF6 /* CTSMTPConnection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = CTSMTPConnection.h; path = Source/CTSMTPConnection.h; sourceTree = "<group>"; };
F81B885B0A74AA7100143DF6 /* CTSMTPConnection.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = CTSMTPConnection.m; path = Source/CTSMTPConnection.m; sourceTree = "<group>"; };
@@ -363,8 +356,6 @@
F88CA0D20BF7AC0B0055AC29 /* CTESMTP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CTESMTP.h; path = Source/CTESMTP.h; sourceTree = "<group>"; };
F88CA0D30BF7AC0B0055AC29 /* CTESMTP.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CTESMTP.m; path = Source/CTESMTP.m; sourceTree = "<group>"; };
F890D38D10CEECD50039817C /* libetpan.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libetpan.xcodeproj; path = "libetpan/build-mac/libetpan.xcodeproj"; sourceTree = SOURCE_ROOT; };
- F8A70EED0C4059E100D1D694 /* JRLog.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = JRLog.h; path = Source/JRLog.h; sourceTree = "<group>"; };
- F8A70EEE0C4059E100D1D694 /* JRLog.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = JRLog.m; path = Source/JRLog.m; sourceTree = "<group>"; };
F8D31A3109C524EA00468234 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
F8DFAB0410541708003D3CC1 /* libetpan.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libetpan.framework; path = "OpenSourceProjects/libetpan-0.58/build-mac/build/Release/libetpan.framework"; sourceTree = "<group>"; };
F8DFCF4915801A5000C01975 /* Tests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -527,8 +518,6 @@
32C88DFF0371C24200C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
- F8A70EED0C4059E100D1D694 /* JRLog.h */,
- F8A70EEE0C4059E100D1D694 /* JRLog.m */,
F81B88710A74AAD800143DF6 /* MailCore_Prefix.pch */,
F8D31A3109C524EA00468234 /* main.m */,
);
@@ -667,7 +656,6 @@
F81A8AE20C03FC3B002F780A /* CTMIME_TextPart.h in Headers */,
F81A8AE40C03FC3B002F780A /* CTMIME.h in Headers */,
F8245A6D0C041C8C005E08A8 /* CTMIMEFactory.h in Headers */,
- F8A70EEF0C4059E100D1D694 /* JRLog.h in Headers */,
F81E266A0C6ED35C00B3FBAC /* CTBareAttachment.h in Headers */,
F81E266E0C6ED4E100B3FBAC /* CTCoreAttachment.h in Headers */,
F8430BB10C72B16000753941 /* CTMIME_Enumerator.h in Headers */,
@@ -908,7 +896,6 @@
F81A8AE30C03FC3B002F780A /* CTMIME_TextPart.m in Sources */,
F81A8AE50C03FC3B002F780A /* CTMIME.m in Sources */,
F8245A700C041C91005E08A8 /* CTMIMEFactory.m in Sources */,
- F8A70EF00C4059E100D1D694 /* JRLog.m in Sources */,
F858CC4A0C51DE6B00EF1B3D /* (null) in Sources */,
F81E266B0C6ED35C00B3FBAC /* CTBareAttachment.m in Sources */,
F81E266F0C6ED4E100B3FBAC /* CTCoreAttachment.m in Sources */,
@@ -922,7 +909,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- F8618D1F10DAE1EB00C41188 /* JRLog.m in Sources */,
F8618D0D10DAE1E600C41188 /* CTSMTPConnection.m in Sources */,
F8618D0E10DAE1E600C41188 /* CTSMTP.m in Sources */,
F8618D0F10DAE1E600C41188 /* CTESMTP.m in Sources */,
View
12 Source/CTBareAttachment.h
@@ -34,7 +34,9 @@
@class CTCoreAttachment;
-//TODO Document me
+/**
+ Represents an attachment before it has been fully fetched.
+*/
@interface CTBareAttachment : NSObject {
CTMIME_SinglePart *mMIMEPart;
NSString *mFilename;
@@ -46,6 +48,14 @@
-(NSString*)decodedFilename;
- (id)initWithMIMESinglePart:(CTMIME_SinglePart *)part;
+/**
+ Fetches the full attachment
+*/
- (CTCoreAttachment *)fetchFullAttachment;
+/**
+ Fetches the full attachment
+
+ Also has a progress handler
+*/
- (CTCoreAttachment *)fetchFullAttachmentWithProgress:(CTProgressBlock)block;
@end
View
93 Source/CTCoreAccount.h
@@ -32,12 +32,10 @@
#import <Foundation/Foundation.h>
#import <libetpan/libetpan.h>
-/*!
- @class CTCoreAccount
- CTCoreAccount is the base class with which you establish a connection to the
- IMAP server. After establishing a connection with CTCoreAccount you can access
- all of the folders (I use the term folder instead of mailbox) on the server.
- All methods throw an exception on failure.
+/**
+ CTCoreAccount is the base class with which you establish a connection to the
+ IMAP server. After establishing a connection with CTCoreAccount you can access
+ all of the folders (I use the term folder instead of mailbox) on the server.
*/
@class CTCoreFolder;
@@ -47,74 +45,73 @@
BOOL connected;
NSError *lastError;
}
-/*!
- @abstract If an error occurred (nil or return of NO) call this method to get the error
- */
+/**
+ If an error occurred (nil or return of NO) call this method to get the error
+*/
@property(nonatomic, retain) NSError *lastError;
-/*!
- @abstract Retrieves the list of all the available folders from the server.
- @result Returns a NSSet which contains NSStrings of the folders pathnames, nil on error
+/**
+ Retrieves the list of all the available folders from the server.
+ @return Returns a NSSet which contains NSStrings of the folders pathnames, nil on error
*/
- (NSSet *)allFolders;
-/*!
- @abstract Retrieves a list of only the subscribed folders from the server.
- @result Returns a NSSet which contains NSStrings of the folders pathnames, nil on error
+/**
+ Retrieves a list of only the subscribed folders from the server.
+ @return Returns a NSSet which contains NSStrings of the folders pathnames, nil on error
*/
- (NSSet *)subscribedFolders;
-/*!
- @abstract If you have the path of a folder on the server use this method to retrieve just the one folder.
- @param path A NSString specifying the path of the folder to retrieve from the server.
- @result Returns a CTCoreFolder.
+/**
+ If you have the path of a folder on the server use this method to retrieve just the one folder.
+ @param path A NSString specifying the path of the folder to retrieve from the server.
+ @return Returns a CTCoreFolder.
*/
- (CTCoreFolder *)folderWithPath:(NSString *)path;
-/*!
- @abstract This method initiates the connection to the server.
- @param server The address of the server.
- @param port The port to connect to.
- @param connnectionType What kind of connection to use, it can be one of these three values:
- CTConnectionTypePlain, CTConnectionTypeStartTLS, CTConnectionTypeTryStartTLS, CTConnectionTypeTLS.
- See MailCoreTypes.h for more information
- @param authType The authentication type, only CTImapAuthTypePlain is currently supported
- @param login The username to connect with.
- @param password The password to use to connect.
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+/**
+ This method initiates the connection to the server.
+ @param server The address of the server.
+ @param port The port to connect to.
+ @param connnectionType What kind of connection to use, it can be one of these three values:
+ CTConnectionTypePlain, CTConnectionTypeStartTLS, CTConnectionTypeTryStartTLS, CTConnectionTypeTLS. See MailCoreTypes.h for more information
+ @param authType The authentication type, only CTImapAuthTypePlain is currently supported
+ @param login The username to connect with.
+ @param password The password to use to connect.
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)connectToServer:(NSString *)server port:(int)port connectionType:(int)conType authType:(int)authType
login:(NSString *)login password:(NSString *)password;
-/*!
- @abstract This method returns the current connection status.
- @result Returns YES or NO as the status of the connection.
+/**
+ This method returns the current connection status.
+ @return Returns YES or NO as the status of the connection.
*/
- (BOOL)isConnected;
-/*!
- @abstract Terminates the connection. If you terminate this connection it will also affect the
- connectivity of CTCoreFolders and CTMessages that rely on this account.
+/**
+ Terminates the connection. If you terminate this connection it will also affect the
+ connectivity of CTCoreFolders and CTMessages that rely on this account.
*/
- (void)disconnect;
-/*!
- @abstract Sends the idle command to the server.
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
- */
+/**
+ Sends the idle command to the server.
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+*/
- (BOOL)idle;
-/*!
- @abstract Blocks the connection until data arrives.
- @return Returns nil on error
- */
+/**
+ Blocks the connection until data arrives.
+ @return Returns nil on error
+*/
- (NSString *)read;
-/*!
- @abstract Sends the done command to the server.
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
- */
+/**
+ Sends the done command to the server.
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+*/
- (BOOL)done;
/* Intended for advanced use only */
View
45 Source/CTCoreAddress.h
@@ -31,60 +31,59 @@
#import <Foundation/Foundation.h>
-/*!
- @class @CTCoreAddress
- This is a very simple class designed to make it easier to work with email addresses since many times
- the e-mail address and name are both encoded in the MIME e-mail fields. This class should be very straight
- forward, you can get and set a name and an e-mail address.
+/**
+ This is a very simple class designed to make it easier to work with email addresses since many times
+ the e-mail address and name are both encoded in the MIME e-mail fields. This class should be very straight
+ forward, you can get and set a name and an e-mail address.
*/
@interface CTCoreAddress : NSObject {
NSString *email;
NSString *name;
}
-/*!
- @abstract Returns a CTCoreAddress with the name and e-mail address set as an empty string.
+/**
+ Returns a CTCoreAddress with the name and e-mail address set as an empty string.
*/
+ (id)address;
-/*!
- @abstract Returns a CTCoreAddress set with the specified name and email.
+/**
+ Returns a CTCoreAddress set with the specified name and email.
*/
+ (id)addressWithName:(NSString *)aName email:(NSString *)aEmail;
-/*!
- @abstract Returns a CTCoreAddress set with the specified name and email.
+/**
+ Returns a CTCoreAddress set with the specified name and email.
*/
- (id)initWithName:(NSString *)aName email:(NSString *)aEmail;
-/*!
- @abstract Returns the name as a NSString
+/**
+ Returns the name as a NSString
*/
- (NSString *)name;
-(NSString*)decodedName; // added by Gabor
-/*!
- @abstract Sets the name.
+/**
+ Sets the name.
*/
- (void)setName:(NSString *)aValue;
-/*!
- @abstract Returns the e-mail as a NSString
+/**
+ Returns the e-mail as a NSString
*/
- (NSString *)email;
-/*!
- @abstract Sets the e-mail.
+/**
+ Sets the e-mail.
*/
- (void)setEmail:(NSString *)aValue;
-/*!
- @abstract Works like the typical isEqual: method
+/**
+ Works like the typical isEqual: method
*/
- (BOOL)isEqual:(id)object;
-/*!
- @abstract Standard description method
+/**
+ Standard description method
*/
- (NSString *)description;
@end
View
22 Source/CTCoreAttachment.h
@@ -32,13 +32,31 @@
#import <Foundation/Foundation.h>
#import "CTBareAttachment.h"
+/**
+ A message's attachment
+*/
@interface CTCoreAttachment : CTBareAttachment {
NSData *mData;
}
@property(retain) NSData *data;
+/**
+ Load the attachment from a local file
+ NOTE: This currently only works on Mac OS X, use initWithData:contentType:filename: instead on iOS
+*/
+
- (id)initWithContentsOfFile:(NSString *)path;
-- (id)initWithData:(NSData *)data contentType:(NSString *)contentType
- filename:(NSString *)filename;
+/**
+ Create an attachment from a chunk of data
+
+ @param data The actual attachment data
+ @param contentType The MIME content type you'd like to use
+ @param filename The filename you'd like the attachment to be given in the e-mail message
+*/
+- (id)initWithData:(NSData *)data contentType:(NSString *)contentType filename:(NSString *)filename;
+
+/**
+ Used to save the attachment locally
+*/
- (BOOL)writeToFile:(NSString *)path;
@end
View
254 Source/CTCoreFolder.h
@@ -33,11 +33,10 @@
#import <libetpan/libetpan.h>
#import "MailCoreTypes.h"
-/*!
- @class CTCoreFolder
- CTCoreFolder is the class used to get and set attributes for a server side folder. It is also the
- class used to get a list of messages from the server. You need to make sure and establish a connection
- first by calling connect. All methods throw an exceptions on failure.
+/**
+ CTCoreFolder is the class used to get and set attributes for a server side folder. It is also the
+ class used to get a list of messages from the server. You need to make sure and establish a connection
+ first by calling connect.
*/
@class CTCoreMessage, CTCoreAccount;
@@ -49,196 +48,201 @@
BOOL connected;
NSError *lastError;
}
-/*!
- @abstract If an error occurred (nil or return of NO) call this method to get the error
- */
+/**
+ If an error occurred (nil or return of NO) call this method to get the error
+*/
@property(nonatomic, retain) NSError *lastError;
-/*!
- @abstract This method is used to initialize a folder. This method or the
- method in CTCoreAccount folderWithPath can be used to setup a folder.
- @param inAccount This parameter must be passed in so the folder can initiate it's connection.
+/**
+ This method is used to initialize a folder. This method or the
+ method in CTCoreAccount folderWithPath can be used to setup a folder.
+ @param inAccount This parameter must be passed in so the folder can initiate it's connection.
*/
- (id)initWithPath:(NSString *)path inAccount:(CTCoreAccount *)account;
-/*!
- @abstract This initiates the connection after the folder has been initalized.
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+/**
+ This initiates the connection after the folder has been initalized.
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)connect;
-/*!
- @abstract This method terminates the connection, make sure you don't have any message
- connections open from this folder before disconnecting.
+/**
+ This method terminates the connection
+
+ Make sure you don't have any message connections open from this folder before disconnecting.
*/
- (void)disconnect;
-/*!
- @abstract This will return the message from this folder with the UID that was passed in. If the message
- can't be found, nil is returned
- @result A CTMessage object is returned which can be used to get further information and perform operations
- on the message.
+/**
+ This will return the message from this folder with the UID that was passed in.
+
+ A CTMessage object is returned which can be used to get further information and perform operationson the message.
+ @return A CTCoreMessage or if not found, nil
*/
- (CTCoreMessage *)messageWithUID:(NSUInteger)uid;
-/*!
- @abstract Use this method to download message lists from the server. This method take fetch attributes
- which configure what is fetched. Fetch attributes can be combined so you fetch all the message data at
- once, or select which pieces you want for your app. You can also fetch just the default attributes which
- will be as fast as possible.
- @param start The message sequence number to start from, starts with 1 and NOT 0 (IMAP starts with 1 that way, sorry)
- @param end The ending message sequence number, or if you'd like to fetch to the end of the message list pass in 0
- @param attrs This controls what is fetched. Pass in CTFetchAttrDefaultsOnly to fetch the minimum possible, this
- includes the UID, RFC822.size, and flags. The defaults are always fetched, even when you don't pass in this flag.
- Use CTFetchAttrBodyStructure to also fetch the body structure of the message. This prevents a future round trip
- done by [CTCoreMessage fetchBodyStructure], if it sees you already have the body structure it won't re-fetch it.
- Use CTFetchAttrEnvelope if you'd like to fetch the subject, to, from, cc, bcc, sender, date etc. You can
- also fetch both the envelope and body structure by passing in CTFetchAttrEnvelope | CTFetchAttrBodyStructure
- @return Returns a NSArray of CTCoreMessage's. Returns nil on error
+/**
+ Use this method to download message lists from the server.
+
+ This method take fetch attributes which configure what is fetched. Fetch attributes can be combined
+ so you fetch all the message data at once, or select which pieces you want for your app. You can
+ also fetch just the default attributes which will be as fast as possible. Pass in
+ CTFetchAttrDefaultsOnly to attrs fetch the minimum possible, this includes the UID, RFC822.size, and
+ flags. The defaults are always fetched, even when you don't pass in this flag. Use
+ CTFetchAttrBodyStructure to also fetch the body structure of the message. This prevents a future
+ round trip done by [CTCoreMessage fetchBodyStructure], if it sees you already have the body
+ structure it won't re-fetch it. Use CTFetchAttrEnvelope if you'd like to fetch the subject, to,
+ from, cc, bcc, sender, date etc. You can also fetch both the envelope and body structure by passing
+ in CTFetchAttrEnvelope | CTFetchAttrBodyStructure
+
+
+ @param start The message sequence number to start from, starts with 1 and NOT 0 (IMAP starts with 1 that way, sorry)
+ @param end The ending message sequence number, or if you'd like to fetch to the end of the message list pass in 0
+ @param attrs This controls what is fetched.
+ @return Returns a NSArray of CTCoreMessage's. Returns nil on error
*/
- (NSArray *)messagesFromSequenceNumber:(NSUInteger)startNum to:(NSUInteger)endNum withFetchAttributes:(CTFetchAttributes)attrs;
-/*!
- @abstract Use this method to download message lists from the server. This method uses UID ranges to determine
- which messages to download, while messagesFromSequenceNumber:to:withFetchAttributes: uses sequence numbers.
- This method take fetch attributes which configure what is fetched. Fetch attributes can be combined so
- you fetch all the message data at once, or select which pieces you want.
- @param start The message sequence number to start from, starts with 1 and NOT 0 (IMAP starts with 1 that way, sorry)
- @param end The ending message sequence number, or if you'd like to fetch to the end of the message list pass in 0
- @param attrs This controls what is fetched. Pass in CTFetchAttrDefaultsOnly to fetch the minimum possible, this
- includes the UID, RFC822.size, and flags. The defaults are always fetched, even when you don't pass in this flag.
- Use CTFetchAttrBodyStructure to also fetch the body structure of the message. This prevents a future round trip
- done by [CTCoreMessage fetchBodyStructure], if it sees you already have the body structure it won't re-fetch it.
- Use CTFetchAttrEnvelope if you'd like to fetch the subject, to, from, cc, bcc, sender, date etc. You can
- also fetch both the envelope and body structure by passing in CTFetchAttrEnvelope | CTFetchAttrBodyStructure
- @return Returns a NSArray of CTCoreMessage's. Returns nil on error
+/**
+ Use this method to download message lists from the server.
+
+ This method uses UID ranges to determine which messages to download, while messagesFromSequenceNumber:to:withFetchAttributes: uses sequence numbers.
+
+ @param start The message sequence number to start from, starts with 1 and NOT 0 (IMAP starts with 1 that way, sorry)
+ @param end The ending message sequence number, or if you'd like to fetch to the end of the message list pass in 0
+ @param attrs This controls what is fetched.
+ @return Returns a NSArray of CTCoreMessage's. Returns nil on error
+ @see messagesFromSequenceNumber:to:withFetchAttributes:
*/
- (NSArray *)messagesFromUID:(NSUInteger)startUID to:(NSUInteger)endUID withFetchAttributes:(CTFetchAttributes)attrs;
-/*!
- @abstract Pulls the sequence number for the message with the specified uid.
- It does not perform UID validation, and the sequence ID is only
- valid per session.
- @param The uid for the message
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+/**
+ Pulls the sequence number for the message with the specified uid.
+ It does not perform UID validation, and the sequence ID is only
+ valid per session.
+ @param The uid for the message
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)sequenceNumberForUID:(NSUInteger)uid sequenceNumber:(NSUInteger *)sequenceNumber;
-/*!
- @abstract From IMAP RFC: "The CHECK command requests a checkpoint of the currently selected mailbox.
- A checkpoint refers to any implementation-dependent housekeeping associated
- with the mailbox (e.g., resolving the server's in-memory state of the mailbox
- with the state on its disk) that is not normally executed as part of each command."
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+/**
+ Perform an IMAP check command
+
+ From IMAP RFC: "The CHECK command requests a checkpoint of the currently selected mailbox.
+ A checkpoint refers to any implementation-dependent housekeeping associated
+ with the mailbox (e.g., resolving the server's in-memory state of the mailbox
+ with the state on its disk) that is not normally executed as part of each command."
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)check;
-/*!
- @abstract The folder name.
+/**
+ The folder name.
*/
- (NSString *)name;
-/*!
- @abstract The entire path of folder.
+/**
+ The entire path of folder.
*/
- (NSString *)path;
-/*!
- @abstract This will change the path of the folder. Use this method to rename the folder on the server
- or to move the folder on the server.
- @param path The new path for the folder as an NSString.
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+/**
+ This will change the path of the folder.
+
+ Use this method to rename the folder on the server or to move the folder on the server.
+ @param path The new path for the folder as an NSString.
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)setPath:(NSString *)path;
-/*!
- @abstract If the folder doesn't exist on the server this method will create it. Make sure the pathname
- has been set first.
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+/**
+ If the folder doesn't exist on the server this method will create it. Make sure the pathname
+ has been set first.
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)create;
-/*!
- @abstract This method will remove the folder and any messages contained within from the server.
- Be careful when using this method because there is no way to undo.
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+/**
+ This method will remove the folder and any messages contained within from the server.
+ Be careful when using this method because there is no way to undo.
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)delete;
-/*!
- @abstract The folder will be listed as subscribed on the server.
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+/**
+ The folder will be listed as subscribed on the server.
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)subscribe;
-/*!
- @abstract The folder will be listed as unsubscribed.
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+/**
+ The folder will be listed as unsubscribed.
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)unsubscribe;
-/*!
- @abstract Retrieves the message flags. You must AND/OR using the defines constants.
- Here is a list of message flags:
- CTFlagNew, CTFlagSeen, CTFlagFlagged, CTFlagDeleted,
- CTFlagAnswered, CTFlagForwarded.
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+/**
+ Retrieves the message flags. You must AND/OR using the defines constants.
+ Here is a list of message flags:
+ CTFlagNew, CTFlagSeen, CTFlagFlagged, CTFlagDeleted,
+ CTFlagAnswered, CTFlagForwarded.
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)flagsForMessage:(CTCoreMessage *)msg flags:(NSUInteger *)flags;
-/*!
- @abstract Sets the message's flags on the server, take a look at the
- documentation for flagsForMessage:
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+/**
+ Sets the message's flags on the server, take a look at the
+ documentation for flagsForMessage:
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)setFlags:(NSUInteger)flags forMessage:(CTCoreMessage *)msg;
-/*!
- @astract Deletes all messages contained in the folder that are marked for
- deletion. Deleting messages in IMAP is a little strange, first
- you need to set the message flag CTFlagDeleted to CTFlagSet, and
- then when you call expunge on the folder the message is contained
- in, it will be deleted.
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+/**
+ Deletes all messages contained in the folder that are marked for
+ deletion. Deleting messages in IMAP is a little strange, first
+ you need to set the message flag CTFlagDeleted to CTFlagSet, and
+ then when you call expunge on the folder the message is contained
+ in, it will be deleted.
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)expunge;
-/*!
- @abstract Copies a message to a folder
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
- */
+/**
+ Copies a message to a folder
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+*/
- (BOOL)copyMessage:(CTCoreMessage *)msg toPath:(NSString *)path;
-/*!
- @abstract Moves a message to a folder
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
- */
+/**
+ Moves a message to a folder
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+*/
- (BOOL)moveMessage:(CTCoreMessage *)msg toPath:(NSString *)path;
-/*!
- @abstract Returns the number of unread messages. This causes a round trip to the server, as it fetches
- the count for each call.
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+/**
+ Returns the number of unread messages. This causes a round trip to the server, as it fetches
+ the count for each call.
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)unreadMessageCount:(NSUInteger *)unseenCount;
-/*!
- @abstract Returns the number of messages in the folder. The count was retrieved when the folder connection was
- established, so to refresh the count you must disconnect and reconnect.
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+/**
+ Returns the number of messages in the folder. The count was retrieved when the folder connection was
+ established, so to refresh the count you must disconnect and reconnect.
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
*/
- (BOOL)totalMessageCount:(NSUInteger *)totalCount;
-/*!
- @abstract Returns the uid validity value for the folder, which can be used to determine if the
- local cached UID's are still valid, or if the server has changed UID's
+/**
+ Returns the uid validity value for the folder, which can be used to determine if the
+ local cached UID's are still valid, or if the server has changed UID's
*/
- (NSUInteger)uidValidity;
-/*!
- @abstract Returns the uid next value for the folder. The next message added to the mailbox
- will be assigned a UID greater than or equal to uidNext
+/**
+ Returns the uid next value for the folder. The next message added to the mailbox
+ will be assigned a UID greater than or equal to uidNext
*/
- (NSUInteger)uidNext;
View
269 Source/CTCoreMessage.h
@@ -32,13 +32,12 @@
#import <Foundation/Foundation.h>
#import <libetpan/libetpan.h>
-/*!
- @class CTCoreMessage
- CTCoreMessage is how you work with messages. The easiest way to instantiate a CTCoreMessage
- is to first setup a CTCoreAccount object and then get a CTCoreFolder object and then use it's
- convenience method messageWithUID: to get a message object you can work with.
+/**
+ CTCoreMessage is how you work with messages. The easiest way to instantiate a CTCoreMessage
+ is to first setup a CTCoreAccount object and then get a CTCoreFolder object and then use it's
+ convenience method messageWithUID: to get a message object you can work with.
- Anything that begins with "fetch", requires that an active network connection is present.
+ Anything that begins with "fetch", requires that an active network connection is present.
*/
@class CTCoreFolder, CTCoreAddress, CTCoreAttachment, CTMIME;
@@ -50,237 +49,265 @@
NSUInteger mySequenceNumber;
NSError *lastError;
}
-/*!
- @abstract If an error occurred (nil or return of NO) call this method to get the error
- */
+/**
+ If an error occurred (nil or return of NO) call this method to get the error
+*/
@property(nonatomic, retain) NSError *lastError;
-/*!
- @abstract If the body structure has been fetched, this will contain the MIME structure
- */
+/**
+ If the body structure has been fetched, this will contain the MIME structure
+*/
@property(retain) CTMIME *mime;
-/*!
- @abstract Used to instantiate an empty message object.
+/**
+ Used to instantiate an empty message object.
*/
- (id)init;
-/*!
- @abstract Used to instantiate a message object with the contents of a mailmessage struct
- (a LibEtPan type). The mailmessage struct does not include any body information,
- so after calling this method the message will have a body which is NULL.
+/**
+ Used to instantiate a message object with the contents of a mailmessage struct
+ (a LibEtPan type). The mailmessage struct does not include any body information,
+ so after calling this method the message will have a body which is NULL.
*/
- (id)initWithMessageStruct:(struct mailmessage *)message;
-/*!
- @abstract Used to instantiate a message object based off the contents of a file on disk.
- The file on disk must be a valid MIME message.
+/**
+ Used to instantiate a message object based off the contents of a file on disk.
+ The file on disk must be a valid MIME message.
*/
- (id)initWithFileAtPath:(NSString *)path;
-/*!
- @abstract Used to instantiate a message object based off a string
- that contains a valid MIME message
+/**
+ Used to instantiate a message object based off a string
+ that contains a valid MIME message
*/
- (id)initWithString:(NSString *)msgData;
/*
- @abstract Creates an empty message
+ Creates an empty message
*/
- (id)init;
-/*!
- @abstract If a method returns nil or in the case of a BOOL returns NO, call this to get the error that occured
- */
+/**
+ If a method returns nil or in the case of a BOOL returns NO, call this to get the error that occured
+*/
- (NSError *)lastError;
-/*!
- @abstract If the messages body structure hasn't been downloaded already it will be fetched from the server.
- The body structure is needed to get attachments or the message body
- @return Return YES on success, NO on error. Call method lastError to get error if one occurred
- */
+/**
+ If the messages body structure hasn't been downloaded already it will be fetched from the server.
+
+ The body structure is needed to get attachments or the message body
+ @return Return YES on success, NO on error. Call method lastError to get error if one occurred
+*/
- (BOOL)fetchBodyStructure;
-/*!
- @abstract This method returns the parsed message body as an NSString.
- This attempts to return a plain text body and skips HTML. If
- a plaintext body isn't found the HTML body is returned.
+/**
+ This method returns the parsed message body as an NSString.
+
+ This attempts to return a plain text body and skips HTML. If
+ a plaintext body isn't found the HTML body is returned.
*/
- (NSString *)body;
-/*!
- @abstract This method returns the html body as an NSString.
- */
+/**
+ This method returns the html body as an NSString.
+*/
- (NSString *)htmlBody;
-/*! @abstract Returns a message body as an NSString. First attempts
- to retrieve a plain text body, if that fails then
- tries for an HTML body.
- */
+/**
+ Returns a message body as an NSString.
+
+ First attempts to retrieve a plain text body, if that fails then
+ tries for an HTML body.
+*/
- (NSString *)bodyPreferringPlainText;
-/*!
- @abstract This method sets the message body. Plaintext only please!
+/**
+ This method sets the message body. Plaintext only please!
*/
- (void)setBody:(NSString *)body;
-/*!
- @abstract Use this method to set the body if you have HTML content.
+/**
+ Use this method to set the body if you have HTML content.
*/
- (void)setHTMLBody:(NSString *)body;
+/**
+ A list of attachments this message has
+*/
- (NSArray *)attachments;
+
+/**
+ Add an attachment to the message.
+
+ Only used when sending e-mail
+*/
- (void)addAttachment:(CTCoreAttachment *)attachment;
-/*!
- @abstract Returns the subject of the message.
+/**
+ Returns the subject of the message.
*/
- (NSString *)subject;
-/*!
- @abstract Will set the subject of the message, use this when composing e-mail.
+/**
+ Will set the subject of the message, use this when composing e-mail.
*/
- (void)setSubject:(NSString *)subject;
-/*! @abstract Returns the timezone of the sender of the message (got from the Date field timezone attribute) */
+/**
+ Returns the timezone of the sender of the message (got from the Date field timezone attribute)
+*/
- (NSTimeZone*)senderTimeZone;
-/*! @abstract Returns the date as given in the Date mail field (no timezone is applied) */
+/**
+ Returns the date as given in the Date mail field (no timezone is applied)
+*/
- (NSDate *)senderDate;
-/*! @abstract Returns the date in the Date field converted to GMT */
+/**
+ Returns the date in the Date field converted to GMT
+*/
- (NSDate *)sentDateGMT;
-/*!
- @abstract Returns the date in the Date field converted to the local timezone
- the local timezone is the one set in the device running this code
- */
+/**
+Returns the date in the Date field converted to the local timezone
+
+The local timezone is the one set in the device running this code
+*/
- (NSDate *)sentDateLocalTimeZone;
-/*!
- @abstract Returns YES if the message is unread.
- */
+/**
+ Returns YES if the message is unread.
+*/
- (BOOL)isUnread;
-/*!
- @abstract Returns YES if the message is recent and unread.
+/**
+ Returns YES if the message is recent and unread.
*/
- (BOOL)isNew;
-/*!
- @abstract Returns YES if the message is starred (flagged in IMAP terms).
- */
+/**
+ Returns YES if the message is starred (flagged in IMAP terms).
+*/
- (BOOL)isStarred;
-/*!
- @abstract A machine readable ID that is guaranteed unique by the
- host that generated the message
+/**
+ A machine readable ID that is guaranteed unique by the
+ host that generated the message
*/
- (NSString *)messageId;
-/*!
- @abstract Returns an NSUInteger containing the messages UID. This number is unique across sessions
+/**
+ Returns an NSUInteger containing the messages UID. This number is unique across sessions
*/
- (NSUInteger)uid;
-/*!
- @abstract Returns the message sequence number, this number cannot be used across sessions
+/**
+ Returns the message sequence number, this number cannot be used across sessions
*/
- (NSUInteger)sequenceNumber;
-/*!
- @abstract Returns the message size in bytes
- */
+/**
+ Returns the message size in bytes
+*/
- (NSUInteger)messageSize;
-/*!
- @abstract Returns the message flags. The flags contain if there user has replied, forwarded, read, delete etc.
- See MailCoreTypes.h for a list of constants
- */
+/**
+ Returns the message flags.
+
+ The flags contain if there user has replied, forwarded, read, delete etc.
+ See MailCoreTypes.h for a list of constants
+*/
- (NSUInteger)flags;
-/*!
- @abstract Set the message sequence number, this will NOT set any thing on the server.
- This is used to assign sequence numbers after retrieving the message list.
+/**
+ Set the message sequence number.
+
+ This will NOT set any thing on the server.
+ This is used to assign sequence numbers after retrieving the message list.
*/
- (void)setSequenceNumber:(NSUInteger)sequenceNumber;
-/*!
- @abstract Parses the from list, the result is an NSSet containing CTCoreAddress's
+/**
+ Parses the from list, the result is an NSSet containing CTCoreAddress's
*/
- (NSSet *)from;
-/*!
- @abstract Sets the message's from addresses
- @param addresses A NSSet containing CTCoreAddress's
+/**
+ Sets the message's from addresses
+ @param addresses A NSSet containing CTCoreAddress's
*/
- (void)setFrom:(NSSet *)addresses;
-/*!
- @abstract Returns the sender, which isn't always the actual person who sent the message, it's usually the
- address of the machine that sent the message. In reality, this method isn't very useful, use from: instead.
+/**
+ Returns the sender.
+
+ The sender which isn't always the actual person who sent the message, it's usually the
+ address of the machine that sent the message. In reality, this method isn't very useful, use from: instead.
*/
- (CTCoreAddress *)sender;
-/*!
- @abstract Returns the list of people the message was sent to, returns an NSSet containing CTAddress's.
+/**
+ Returns the list of people the message was sent to, returns an NSSet containing CTAddress's.
*/
- (NSSet *)to;
-/*!
- @abstract Sets the message's to addresses
- @param addresses A NSSet containing CTCoreAddress's
+/**
+ Sets the message's to addresses
+ @param addresses A NSSet containing CTCoreAddress's
*/
- (void)setTo:(NSSet *)addresses;
-/*!
- @abstract Returns the list of people the message was cced to, returns an NSSet containing CTAddress's.
+/**
+ Returns the list of people the message was cced to, returns an NSSet containing CTAddress's.
*/
- (NSSet *)cc;
-/*!
- @abstract Sets the message's cc addresses
- @param addresses A NSSet containing CTCoreAddress's
+/**
+ Sets the message's cc addresses
+ @param addresses A NSSet containing CTCoreAddress's
*/
- (void)setCc:(NSSet *)addresses;
-/*!
- @abstract Returns the list of people the message was bcced to, returns an NSSet containing CTAddress's.
+/**
+ Returns the list of people the message was bcced to, returns an NSSet containing CTAddress's.
*/
- (NSSet *)bcc;
-/*!
- @abstract Sets the message's bcc addresses
- @param addresses A NSSet containing CTCoreAddress's
+/**
+ Sets the message's bcc addresses
+ @param addresses A NSSet containing CTCoreAddress's
*/
- (void)setBcc:(NSSet *)addresses;
-/*!
- @abstract Returns the list of people the message was in reply-to, returns an NSSet containing CTAddress's.
+/**
+ Returns the list of people the message was in reply-to, returns an NSSet containing CTAddress's.
*/
- (NSSet *)replyTo;
-/*!
- @abstract Sets the message's reply to addresses
- @param addresses A NSSet containing CTCoreAddress's
+/**
+ Sets the message's reply to addresses
+ @param addresses A NSSet containing CTCoreAddress's
*/
- (void)setReplyTo:(NSSet *)addresses;
-/*!
- @abstract Returns the message rendered as the appropriate MIME and IMF content. Use this only if you
- want the raw encoding of the message.
+/**
+ Returns the message rendered as the appropriate MIME and IMF content.
+
+ Use this only if you want the raw encoding of the message.
*/
- (NSString *)render;
-/*!
- @abstract Returns the message in the format Mail.app uses, Emlx. This format stores the message
- headers, body, and flags.
+/**
+ Returns the message in the format Mail.app uses, Emlx.
+
+ This format stores the message headers, body, and flags.
*/
- (NSData *)messageAsEmlx;
-/*!
- @abstract Fetches from the server the rfc822 content of the message, which is the headers and the message body.
- @return Return nil on error. Call method lastError to get error if one occurred
+/**
+ Fetches from the server the rfc822 content of the message, which are the headers and the message body.
+ @return Return nil on error. Call method lastError to get error if one occurred
*/
- (NSString *)rfc822;
View
1  Source/CTCoreMessage.m
@@ -652,7 +652,6 @@ - (mailimap *)imapSession; {
return data->imap_session;
}
-/*********************************** myprivates ***********************************/
- (CTCoreAddress *)_addressFromMailbox:(struct mailimf_mailbox *)mailbox; {
CTCoreAddress *address = [CTCoreAddress address];
if (mailbox == NULL) {
View
7 Source/CTESMTP.h
@@ -32,10 +32,9 @@
#import <Foundation/Foundation.h>
#import "CTSMTP.h"
-/*!
- @class CTESMTP
- This class is used internally by CTSMTPConnection for ESMTP connections, clients
- should not use this directly.
+/*
+ This class is used internally by CTSMTPConnection for ESMTP connections, clients
+ should not use this directly.
*/
View
6 Source/CTMIME_SinglePart.h
@@ -53,9 +53,9 @@ typedef void (^CTProgressBlock)(size_t curr, size_t max);
@property(nonatomic, retain) NSData *data;
@property(nonatomic, readonly) size_t size;
-/*!
- @abstract If an error occurred (nil or return of NO) call this method to get the error
- */
+/*
+ If an error occurred (nil or return of NO) call this method to get the error
+*/
@property(nonatomic, retain) NSError *lastError;
+ (id)mimeSinglePartWithData:(NSData *)data;
View
13 Source/CTSMTP.h
@@ -32,19 +32,18 @@
#import <Foundation/Foundation.h>
#import <libetpan/libetpan.h>
-/*!
- @class CTSMTP
- This class is used internally by CTSMTPConnection for SMTP connections, clients
- should not use this directly.
+/*
+ This class is used internally by CTSMTPConnection for SMTP connections, clients
+ should not use this directly.
*/
@interface CTSMTP : NSObject {
mailsmtp *mySMTP; /* This resource is created and freed by CTSMTPConnection */
NSError *lastError;
}
-/*!
- @abstract If an error occurred (nil or return of NO) call this method to get the error
- */
+/*
+ If an error occurred (nil or return of NO) call this method to get the error
+*/
@property(nonatomic, retain) NSError *lastError;
- (id)initWithResource:(mailsmtp *)smtp;
View
25 Source/CTSMTPConnection.h
@@ -31,7 +31,7 @@
#import <Foundation/Foundation.h>
-/*!
+/**
@class CTSMTPConnection
This is not a class you instantiate! It has only one class method, and that is all you need to send e-mail.
First use CTCoreMessage to compose an e-mail and then pass the e-mail to the method sendMessage: with
@@ -43,18 +43,17 @@
@interface CTSMTPConnection : NSObject {
}
-/*!
- @abstract This method...it sends e-mail.
- @param message Just pass in a CTCoreMessage which has the body, subject, from, to etc. that you want
- @param server The server address
- @param username The username, if there is none then pass in an empty string. For some servers you may
- have to specify the username as username@domain
- @param password The password, if there is none then pass in an empty string.
- @param port The port to use, the standard port is 25
- @param useTLS Pass in YES, if you want to use SSL/TLS
- @param useAuth Pass in YES if you would like to use SASL authentication
- @param error Will contain an error when the method returns NO
- @result Returns YES on success, NO on error
+/**
+ This method...it sends e-mail.
+ @param message Just pass in a CTCoreMessage which has the body, subject, from, to etc. that you want
+ @param server The server address
+ @param username The username, if there is none then pass in an empty string. For some servers you may have to specify the username as username@domain
+ @param password The password, if there is none then pass in an empty string.
+ @param port The port to use, the standard port is 25
+ @param tls Pass in YES, if you want to use SSL/TLS
+ @param auth Pass in YES if you would like to use SASL authentication
+ @param error Will contain an error when the method returns NO
+ @return Returns YES on success, NO on error
*/
+ (BOOL)sendMessage:(CTCoreMessage *)message server:(NSString *)server username:(NSString *)username
password:(NSString *)password port:(unsigned int)port useTLS:(BOOL)tls useAuth:(BOOL)auth error:(NSError **)error;
View
74 Source/JRLog.h
@@ -1,74 +0,0 @@
-/*******************************************************************************
- JRLog.h
- Copyright (c) 2006-2007 Jonathan 'Wolf' Rentzsch: <http://rentzsch.com>
- Some rights reserved: <http://opensource.org/licenses/mit-license.php>
-
- ***************************************************************************/
-
-#import <Foundation/Foundation.h>
-
-// What you need to remember: Debug > Info > Warn > Error > Fatal.
-
-typedef enum {
- JRLogLevel_UNSET,
- JRLogLevel_Debug,
- JRLogLevel_Info,
- JRLogLevel_Warn,
- JRLogLevel_Error,
- JRLogLevel_Fatal,
- JRLogLevel_Off,
-} JRLogLevel;
-
-@interface NSObject (JRLogAdditions)
-+ (JRLogLevel)classJRLogLevel;
-+ (void)setClassJRLogLevel:(JRLogLevel)level_;
-
-+ (JRLogLevel)defaultJRLogLevel;
-+ (void)setDefaultJRLogLevel:(JRLogLevel)level_;
-@end
-
-BOOL IsJRLogLevelActive(id self_, JRLogLevel level_);
-void JRLog(id self_, JRLogLevel level_, unsigned line_, const char *file_, const char *function_, NSString *format_, ...);
-
-#define JRLOG_CONDITIONALLY(sender,LEVEL,format,...) \
- if(IsJRLogLevelActive(sender,LEVEL)){JRLog(sender,LEVEL,__LINE__,__FILE__,__PRETTY_FUNCTION__,(format),##__VA_ARGS__);}
-
-#if JRLogOverrideNSLog
-id self;
-#define NSLog JRLogInfo
-#endif
-
-//
-// Scary macros!
-// The 1st #if is a filter, which you can read "IF any of the symbols are defined, THEN don't log for that level, ELSE log for that level."
-//
-
-#if defined(JRLOGLEVEL_OFF) || defined(JRLOGLEVEL_FATAL) || defined(JRLOGLEVEL_ERROR) || defined(JRLOGLEVEL_WARN) || defined(JRLOGLEVEL_INFO)
- #define JRLogDebug(format,...)
-#else
- #define JRLogDebug(format,...) JRLOG_CONDITIONALLY(self, JRLogLevel_Debug, format, ##__VA_ARGS__)
-#endif
-
-#if defined(JRLOGLEVEL_OFF) || defined(JRLOGLEVEL_FATAL) || defined(JRLOGLEVEL_ERROR) || defined(JRLOGLEVEL_WARN)
- #define JRLogInfo(format,...)
-#else
- #define JRLogInfo(format,...) JRLOG_CONDITIONALLY(self, JRLogLevel_Info, format, ##__VA_ARGS__)
-#endif
-
-#if defined(JRLOGLEVEL_OFF) || defined(JRLOGLEVEL_FATAL) || defined(JRLOGLEVEL_ERROR)
- #define JRLogWarn(format,...)
-#else
- #define JRLogWarn(format,...) JRLOG_CONDITIONALLY(self, JRLogLevel_Warn, format, ##__VA_ARGS__)
-#endif
-
-#if defined(JRLOGLEVEL_OFF) || defined(JRLOGLEVEL_FATAL)
- #define JRLogError(format,...)
-#else
- #define JRLogError(format,...) JRLOG_CONDITIONALLY(self, JRLogLevel_Error, format, ##__VA_ARGS__)
-#endif
-
-#if defined(JRLOGLEVEL_OFF)
- #define JRLogFatal(format,...)
-#else
- #define JRLogFatal(format,...) JRLOG_CONDITIONALLY(self, JRLogLevel_Fatal, format, ##__VA_ARGS__)
-#endif
View
306 Source/JRLog.m
@@ -1,306 +0,0 @@
-/*******************************************************************************
- JRLog.m
- Copyright (c) 2006-2007 Jonathan 'Wolf' Rentzsch: <http://rentzsch.com>
- Some rights reserved: <http://opensource.org/licenses/mit-license.php>
-
- ***************************************************************************/
-
-#import "JRLog.h"
-#include <unistd.h>
-
-#if JRLogOverrideNSLog
-id self = nil;
-#endif
-#undef NSLog
-
-//
-// Globals
-//
-#pragma mark Globals
-
-BOOL gLoadedJRLogSettings = NO;
-JRLogLevel gDefaultJRLogLevel = JRLogLevel_Debug;
-
-//
-//
-//
-
-@interface NSObject (JRLogDestinationDO)
-- (void)logWithDictionary:(NSDictionary*)dictionary_;
-@end
-
-@interface JRLogOutput : NSObject {
- NSString *sessionUUID;
- BOOL tryDO;
- id destination;
-}
-+ (id)sharedOutput;
-@end
-@implementation JRLogOutput
-+ (id)sharedOutput {
- static JRLogOutput *output = nil;
- if (!output) {
- output = [[JRLogOutput alloc] init];
- }
- return output;
-}
-- (id)init {
- self = [super init];
- if (self) {
- sessionUUID = (id)CFUUIDCreateString(kCFAllocatorDefault, CFUUIDCreate(kCFAllocatorDefault));
-
-#if 0
- [[NSDistributedNotificationCenter defaultCenter] addObserver:self
- selector:@selector(destinationDOAvailable:)
- name:@"JRLogDestinationDOAvailable"
- object:nil];
- tryDO = YES;
-#endif
- }
- return self;
-}
-
-#if 0
-- (void)destinationDOAvailable:(NSNotification*)notification_ {
- tryDO = YES;
-}
-#endif
-
-- (void)logWithLevel:(JRLogLevel)callerLevel_
- instance:(NSString*)instance_
- file:(const char*)file_
- line:(unsigned)line_
- function:(const char*)function_
- message:(NSString*)message_
-{
-#if 0
- if (tryDO) {
- tryDO = NO;
- destination = [[NSConnection rootProxyForConnectionWithRegisteredName:@"JRLogDestinationDO" host:nil] retain];
- }
- if (destination) {
- @try {
- [destination logWithDictionary:[NSDictionary dictionaryWithObjectsAndKeys:
- [[NSBundle mainBundle] bundleIdentifier], @"bundleID",
- sessionUUID, @"sessionUUID",
- [NSNumber numberWithLong:getpid()], @"pid",
- [NSDate date], @"date",
- [NSNumber numberWithInt:callerLevel_], @"level",
- instance_, @"instance",
- [NSString stringWithUTF8String:file_], @"file",
- [NSNumber numberWithUnsignedInt:line_], @"line",
- [NSString stringWithUTF8String:function_], @"function",
- message_, @"message",
- nil]];
- } @catch(NSException *x) {
- if ([[x name] isEqualToString:NSObjectInaccessibleException]) {
- [destination release];
- destination = nil;
- } else {
- @throw x;
- }
- }
- } else {
- // "MyClass.m:123: blah blah"
- NSLog(@"%@:%u: %@",
- [[NSString stringWithUTF8String:file_] lastPathComponent],
- line_,
- message_);
- }
-#endif
-
- NSLog(@"%@:%u: %@",
- [[NSString stringWithUTF8String:file_] lastPathComponent],
- line_,
- message_);
-}
-@end
-
-//
-//
-//
-
-static JRLogLevel parseJRLogLevel(NSString *level_) {
- static NSDictionary *levelLookup = nil;
- if (!levelLookup) {
- levelLookup = [NSDictionary dictionaryWithObjectsAndKeys:
- [NSNumber numberWithInt:JRLogLevel_Debug], @"debug",
- [NSNumber numberWithInt:JRLogLevel_Info], @"info",
- [NSNumber numberWithInt:JRLogLevel_Warn], @"warn",
- [NSNumber numberWithInt:JRLogLevel_Error], @"error",
- [NSNumber numberWithInt:JRLogLevel_Fatal], @"fatal",
- [NSNumber numberWithInt:JRLogLevel_Off], @"off",
- nil];
- }
- NSNumber *result = [levelLookup objectForKey:[level_ lowercaseString]];
- return result ? [result intValue] : JRLogLevel_UNSET;
-}
-
-static void LoadJRLogSettings() {
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-
- // Load+interpret the Info.plist-based settings.
- NSMutableDictionary *settings = [NSMutableDictionary dictionary];
- [settings addEntriesFromDictionary:[[NSBundle mainBundle] infoDictionary]];
- [settings addEntriesFromDictionary:[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]];
-
- NSArray *keys = [settings allKeys];
- unsigned keyIndex = 0, keyCount = [keys count];
- for(; keyIndex < keyCount; keyIndex++) {
- NSString *key = [keys objectAtIndex:keyIndex];
- if ([key hasPrefix:@"JRLogLevel"]) {
- JRLogLevel level = parseJRLogLevel([settings objectForKey:key]);
- if (JRLogLevel_UNSET == level) {
- NSLog(@"JRLog: can't parse \"%@\" JRLogLevel value for key \"%@\"", [settings objectForKey:key], key);
- } else {
- NSArray *keyNames = [key componentsSeparatedByString:@"."];
- if ([keyNames count] == 2) {
- // It's a pseudo-keypath: JRLogLevel.MyClassName.
- Class c = NSClassFromString([keyNames lastObject]);
- if (c) {
- [c setClassJRLogLevel:level];
- } else {
- NSLog(@"JRLog: unknown class \"%@\"", [keyNames lastObject]);
- }
- } else {
- // Just a plain "JRLogLevel": it's for the default level.
- [NSObject setDefaultJRLogLevel:level];
- }
- }
- }
- }
-
- [pool release];
-}
-
-BOOL IsJRLogLevelActive(id self_, JRLogLevel callerLevel_) {
- assert(callerLevel_ >= JRLogLevel_Debug && callerLevel_ <= JRLogLevel_Fatal);
-
- // Setting the default level to OFF disables all logging, regardless of everything else.
- if (JRLogLevel_Off == gDefaultJRLogLevel)
- return NO;
- return YES;
-
-}
-
-#if 0
-BOOL IsJRLogLevelActive(id self_, JRLogLevel callerLevel_) {
- assert(callerLevel_ >= JRLogLevel_Debug && callerLevel_ <= JRLogLevel_Fatal);
-
- if (!gLoadedJRLogSettings) {
- gLoadedJRLogSettings = YES;
- LoadJRLogSettings();
- }
-
- // Setting the default level to OFF disables all logging, regardless of everything else.
- if (JRLogLevel_Off == gDefaultJRLogLevel)
- return NO;
-
- JRLogLevel currentLevel;
- if (self_) {
- currentLevel = [[self_ class] classJRLogLevel];
- if (JRLogLevel_UNSET == currentLevel) {
- currentLevel = gDefaultJRLogLevel;
- }
- } else {
- currentLevel = gDefaultJRLogLevel;
- // TODO It would be cool if we could use the file's name was a symbol to set logging levels for JRCLog... functions.
- }
-
- return callerLevel_ >= currentLevel;
-}
-#endif
-
- void
-JRLog(
- id self_,
- JRLogLevel callerLevel_,
- unsigned line_,
- const char *file_,
- const char *function_,
- NSString *format_,
- ...)
-{
- assert(callerLevel_ >= JRLogLevel_Debug && callerLevel_ <= JRLogLevel_Fatal);
- assert(file_);
- assert(function_);
- assert(format_);
-
- //
- va_list args;
- va_start(args, format_);
- NSString *message = [[NSString alloc] initWithFormat:format_ arguments:args];
- va_end(args);
-
- [[JRLogOutput sharedOutput] logWithLevel:callerLevel_
- instance:self_ ? [NSString stringWithFormat:@"<%@: %p>", [self_ class], self_] : @"nil"
- file:file_
- line:line_
- function:function_
- message:message];
-
- if (JRLogLevel_Fatal == callerLevel_) {
- exit(0);
- }
-}
-
-@implementation NSObject (JRLogAdditions)
-
-#if 0
-NSMapTable *gClassLoggingLevels = NULL;
-+ (void)load {
- if (!gClassLoggingLevels) {
- gClassLoggingLevels = NSCreateMapTable(NSIntMapKeyCallBacks, NSIntMapValueCallBacks, 32);
- }
-}
-
-+ (JRLogLevel)classJRLogLevel {
- void *mapValue = NSMapGet(gClassLoggingLevels, self);
- if (mapValue) {
- return (JRLogLevel)mapValue;
- } else {
- Class superclass = [self superclass];
- return superclass ? [superclass classJRLogLevel] : JRLogLevel_UNSET;
- }
-}
-
-+ (void)setClassJRLogLevel:(JRLogLevel)level_ {
- if (JRLogLevel_UNSET == level_) {
- NSMapRemove(gClassLoggingLevels, self);
- } else {
- NSMapInsert(gClassLoggingLevels, self, (const void*)level_);
- }
-}
-
-+ (JRLogLevel)defaultJRLogLevel {
- return gDefaultJRLogLevel;
-}
-
-+ (void)setDefaultJRLogLevel:(JRLogLevel)level_ {
- assert(level_ >= JRLogLevel_Debug && level_ <= JRLogLevel_Off);
- gDefaultJRLogLevel = level_;
-}
-#endif
-
-+ (void)load {
-}
-
-+ (JRLogLevel)classJRLogLevel {
- return gDefaultJRLogLevel;
-}
-
-+ (void)setClassJRLogLevel:(JRLogLevel)level_ {
-}
-
-
-+ (JRLogLevel)defaultJRLogLevel {
- return gDefaultJRLogLevel;
-}
-
-
-+ (void)setDefaultJRLogLevel:(JRLogLevel)level_ {
- assert(level_ >= JRLogLevel_Debug && level_ <= JRLogLevel_Off);
- gDefaultJRLogLevel = level_;
-}
-
-@end
View
8 Source/MailCoreUtilities.h
@@ -32,16 +32,16 @@
#import <Foundation/Foundation.h>
#import <libetpan/libetpan.h>
-/*!
- @abstract Enables logging of all streams, data is output to standard out.
+/**
+ Enables logging of all streams, data is output to standard out.
*/
void MailCoreEnableLogging();
void MailCoreDisableLogging();
NSError* MailCoreCreateError(int errcode, NSString *description);
-/*!
- @abstract Translates the LibEtPan error code into NSError with error description
+/**
+ Translates the LibEtPan error code into NSError with error description
*/
NSError* MailCoreCreateErrorFromCode(int errcode);
View
1  Source/MailCoreUtilities.m
@@ -30,7 +30,6 @@
*/
#import "MailCoreUtilities.h"
-#import "JRLog.h"
#import "MailCoreTypes.h"
/* direction is 1 for send, 0 for receive, -1 when it does not apply */
View
1  build_docs.sh
@@ -0,0 +1 @@
+appledoc --no-create-docset --no-install-docset --project-name MailCore --project-company "Central Atomics Inc." --company-id com.centralatomics --output ~/help Source
Please sign in to comment.
Something went wrong with that request. Please try again.