aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc/imap
diff options
context:
space:
mode:
Diffstat (limited to 'src/objc/imap')
-rw-r--r--src/objc/imap/MCOIMAPMessage.h2
-rw-r--r--src/objc/imap/MCOIMAPMessage.mm8
-rw-r--r--src/objc/imap/MCOIMAPMessagePart.h2
-rw-r--r--src/objc/imap/MCOIMAPMessagePart.mm8
-rw-r--r--src/objc/imap/MCOIMAPMultipart.h2
-rw-r--r--src/objc/imap/MCOIMAPMultipart.mm8
-rw-r--r--src/objc/imap/MCOIMAPPart.h2
-rw-r--r--src/objc/imap/MCOIMAPPart.mm8
-rw-r--r--src/objc/imap/MCOIMAPSession.h9
-rw-r--r--src/objc/imap/MCOIMAPSession.mm3
10 files changed, 12 insertions, 40 deletions
diff --git a/src/objc/imap/MCOIMAPMessage.h b/src/objc/imap/MCOIMAPMessage.h
index 06e437d8..7de1fd69 100644
--- a/src/objc/imap/MCOIMAPMessage.h
+++ b/src/objc/imap/MCOIMAPMessage.h
@@ -29,7 +29,7 @@
@protocol MCOHTMLRendererIMAPDelegate;
-@interface MCOIMAPMessage : MCOAbstractMessage <NSCopying>
+@interface MCOIMAPMessage : MCOAbstractMessage
/** IMAP UID of the message. */
@property (nonatomic, assign) uint32_t uid;
diff --git a/src/objc/imap/MCOIMAPMessage.mm b/src/objc/imap/MCOIMAPMessage.mm
index c9bfcbb9..2dc71217 100644
--- a/src/objc/imap/MCOIMAPMessage.mm
+++ b/src/objc/imap/MCOIMAPMessage.mm
@@ -27,14 +27,6 @@
MCORegisterClass(self, &typeid(nativeType));
}
-- (id) copyWithZone:(NSZone *)zone
-{
- nativeType * nativeObject = (nativeType *) [self mco_mcObject]->copy();
- id result = [[self class] mco_objectWithMCObject:nativeObject];
- MC_SAFE_RELEASE(nativeObject);
- return [result retain];
-}
-
+ (NSObject *) mco_objectWithMCObject:(mailcore::Object *)object
{
mailcore::IMAPMessage * msg = (mailcore::IMAPMessage *) object;
diff --git a/src/objc/imap/MCOIMAPMessagePart.h b/src/objc/imap/MCOIMAPMessagePart.h
index b602d93a..1e2be559 100644
--- a/src/objc/imap/MCOIMAPMessagePart.h
+++ b/src/objc/imap/MCOIMAPMessagePart.h
@@ -14,7 +14,7 @@
#import <MailCore/MCOAbstractMessagePart.h>
-@interface MCOIMAPMessagePart : MCOAbstractMessagePart <NSCopying>
+@interface MCOIMAPMessagePart : MCOAbstractMessagePart
/** A part identifier is of the form 1.2.1*/
@property (nonatomic, copy) NSString * partID;
diff --git a/src/objc/imap/MCOIMAPMessagePart.mm b/src/objc/imap/MCOIMAPMessagePart.mm
index 827636b3..05a7e102 100644
--- a/src/objc/imap/MCOIMAPMessagePart.mm
+++ b/src/objc/imap/MCOIMAPMessagePart.mm
@@ -22,14 +22,6 @@
MCORegisterClass(self, &typeid(nativeType));
}
-- (id) copyWithZone:(NSZone *)zone
-{
- nativeType * nativeObject = (nativeType *) [self mco_mcObject]->copy();
- id result = [[self class] mco_objectWithMCObject:nativeObject];
- MC_SAFE_RELEASE(nativeObject);
- return [result retain];
-}
-
+ (NSObject *) mco_objectWithMCObject:(mailcore::Object *)object
{
mailcore::IMAPMessagePart * part = (mailcore::IMAPMessagePart *) object;
diff --git a/src/objc/imap/MCOIMAPMultipart.h b/src/objc/imap/MCOIMAPMultipart.h
index 0e0bb0eb..408b6593 100644
--- a/src/objc/imap/MCOIMAPMultipart.h
+++ b/src/objc/imap/MCOIMAPMultipart.h
@@ -14,7 +14,7 @@
#import <MailCore/MCOAbstractMultipart.h>
-@interface MCOIMAPMultipart : MCOAbstractMultipart <NSCopying>
+@interface MCOIMAPMultipart : MCOAbstractMultipart
/** A part identifier looks like 1.2.1 */
@property (nonatomic, copy) NSString * partID;
diff --git a/src/objc/imap/MCOIMAPMultipart.mm b/src/objc/imap/MCOIMAPMultipart.mm
index fdfe4e7a..c3761ade 100644
--- a/src/objc/imap/MCOIMAPMultipart.mm
+++ b/src/objc/imap/MCOIMAPMultipart.mm
@@ -22,14 +22,6 @@
MCORegisterClass(self, &typeid(nativeType));
}
-- (id) copyWithZone:(NSZone *)zone
-{
- nativeType * nativeObject = (nativeType *) [self mco_mcObject]->copy();
- id result = [[self class] mco_objectWithMCObject:nativeObject];
- MC_SAFE_RELEASE(nativeObject);
- return [result retain];
-}
-
+ (NSObject *) mco_objectWithMCObject:(mailcore::Object *)object
{
mailcore::IMAPMultipart * part = (mailcore::IMAPMultipart *) object;
diff --git a/src/objc/imap/MCOIMAPPart.h b/src/objc/imap/MCOIMAPPart.h
index 029135bf..f7bec632 100644
--- a/src/objc/imap/MCOIMAPPart.h
+++ b/src/objc/imap/MCOIMAPPart.h
@@ -16,7 +16,7 @@
/** Represents a single IMAP message part */
-@interface MCOIMAPPart : MCOAbstractPart <NSCopying>
+@interface MCOIMAPPart : MCOAbstractPart
/** A part identifier looks like 1.2.1 */
@property (nonatomic, copy) NSString * partID;
diff --git a/src/objc/imap/MCOIMAPPart.mm b/src/objc/imap/MCOIMAPPart.mm
index 80b86d23..80fc2f1e 100644
--- a/src/objc/imap/MCOIMAPPart.mm
+++ b/src/objc/imap/MCOIMAPPart.mm
@@ -22,14 +22,6 @@
MCORegisterClass(self, &typeid(nativeType));
}
-- (id) copyWithZone:(NSZone *)zone
-{
- nativeType * nativeObject = (nativeType *) [self mco_mcObject]->copy();
- id result = [[self class] mco_objectWithMCObject:nativeObject];
- MC_SAFE_RELEASE(nativeObject);
- return [result retain];
-}
-
+ (NSObject *) mco_objectWithMCObject:(mailcore::Object *)object
{
mailcore::IMAPPart * part = (mailcore::IMAPPart *) object;
diff --git a/src/objc/imap/MCOIMAPSession.h b/src/objc/imap/MCOIMAPSession.h
index 0358f7ad..3a6cbc6f 100644
--- a/src/objc/imap/MCOIMAPSession.h
+++ b/src/objc/imap/MCOIMAPSession.h
@@ -40,16 +40,19 @@
@interface MCOIMAPSession : NSObject
/** This is the hostname of the IMAP server to connect to. */
-@property (nonatomic, strong) NSString *hostname;
+@property (nonatomic, copy) NSString *hostname;
/** This is the port of the IMAP server to connect to. */
@property (nonatomic, assign) unsigned int port;
/** This is the username of the account. */
-@property (nonatomic, strong) NSString *username;
+@property (nonatomic, copy) NSString *username;
/** This is the password of the account. */
-@property (nonatomic, strong) NSString *password;
+@property (nonatomic, copy) NSString *password;
+
+/** This is the OAuth2 token. */
+@property (nonatomic, copy) NSString *OAuth2Token;
/**
This is the authentication type to use to connect.
diff --git a/src/objc/imap/MCOIMAPSession.mm b/src/objc/imap/MCOIMAPSession.mm
index 43f366e6..1dff0f1f 100644
--- a/src/objc/imap/MCOIMAPSession.mm
+++ b/src/objc/imap/MCOIMAPSession.mm
@@ -35,7 +35,7 @@ public:
mSession = session;
}
- virtual void log(void * context, void * sender, ConnectionLogType logType, Data * data)
+ virtual void log(void * sender, ConnectionLogType logType, Data * data)
{
[mSession _logWithSender:sender connectionType:(MCOConnectionLogType)logType data:MCO_TO_OBJC(data)];
}
@@ -77,6 +77,7 @@ MCO_OBJC_SYNTHESIZE_STRING(setHostname, hostname)
MCO_OBJC_SYNTHESIZE_SCALAR(unsigned int, unsigned int, setPort, port)
MCO_OBJC_SYNTHESIZE_STRING(setUsername, username)
MCO_OBJC_SYNTHESIZE_STRING(setPassword, password)
+MCO_OBJC_SYNTHESIZE_STRING(setOAuth2Token, OAuth2Token)
MCO_OBJC_SYNTHESIZE_SCALAR(MCOAuthType, mailcore::AuthType, setAuthType, authType)
MCO_OBJC_SYNTHESIZE_SCALAR(MCOConnectionType, mailcore::ConnectionType, setConnectionType, connectionType)
MCO_OBJC_SYNTHESIZE_SCALAR(NSTimeInterval, time_t, setTimeout, timeout)