diff options
author | Paul Young <paulyoungonline@gmail.com> | 2013-07-03 17:06:20 -0400 |
---|---|---|
committer | Paul Young <paulyoungonline@gmail.com> | 2013-07-03 17:06:20 -0400 |
commit | a2f9f56ec6dc3fccb5a3b237ca62d3156cfa1883 (patch) | |
tree | 1a3c0ebae239e6571bb1c5d02e5921d299f9a399 /src/objc/abstract | |
parent | cc9b898f07b3f750b910cfea73c0e223984f7cad (diff) | |
parent | 9fe6ce12c4880a6c2f2a4180752987dd30d65c89 (diff) |
Merge branch 'master' into message-rendering-with-session
Conflicts:
build-mac/mailcore2.xcodeproj/project.pbxproj
Diffstat (limited to 'src/objc/abstract')
-rw-r--r-- | src/objc/abstract/MCOAbstractMessage.mm | 8 | ||||
-rw-r--r-- | src/objc/abstract/MCOAbstractPart.mm | 8 | ||||
-rw-r--r-- | src/objc/abstract/MCOConstants.h | 26 | ||||
-rw-r--r-- | src/objc/abstract/MCOMessageHeader.mm | 6 |
4 files changed, 46 insertions, 2 deletions
diff --git a/src/objc/abstract/MCOAbstractMessage.mm b/src/objc/abstract/MCOAbstractMessage.mm index 6fedcc8a..05530845 100644 --- a/src/objc/abstract/MCOAbstractMessage.mm +++ b/src/objc/abstract/MCOAbstractMessage.mm @@ -28,6 +28,12 @@ return _message; } +- (id) init +{ + MCAssert(0); + return nil; +} + - (id) initWithMCMessage:(mailcore::AbstractMessage *)message { self = [super init]; @@ -40,7 +46,7 @@ - (void) dealloc { - _message->release(); + MC_SAFE_RELEASE(_message); [super dealloc]; } diff --git a/src/objc/abstract/MCOAbstractPart.mm b/src/objc/abstract/MCOAbstractPart.mm index 8b2b008d..7a37dcaf 100644 --- a/src/objc/abstract/MCOAbstractPart.mm +++ b/src/objc/abstract/MCOAbstractPart.mm @@ -27,6 +27,12 @@ return _part; } +- (id) init +{ + MCAssert(0); + return nil; +} + - (id) initWithMCPart:(mailcore::AbstractPart *)part { self = [super init]; @@ -39,7 +45,7 @@ - (void) dealloc { - _part->release(); + MC_SAFE_RELEASE(_part); [super dealloc]; } diff --git a/src/objc/abstract/MCOConstants.h b/src/objc/abstract/MCOConstants.h index 8fafabf3..5ec21422 100644 --- a/src/objc/abstract/MCOConstants.h +++ b/src/objc/abstract/MCOConstants.h @@ -33,6 +33,8 @@ typedef enum { MCOAuthTypeSASLNTLM = 1 << 6, /** Kerberos 4 authentication.*/ MCOAuthTypeSASLKerberosV4 = 1 << 7, + /** OAuth2 authentication.*/ + MCOAuthTypeXOAuth2 = 1 << 8, } MCOAuthType; /** It's the IMAP flags of the folder.*/ @@ -324,4 +326,28 @@ typedef enum { MCOErrorInvalidAccount, } MCOErrorCode; +/** Here's the list of connection log types.*/ +typedef enum { + /** Received data.*/ + MCOConnectionLogTypeReceived, + /** Sent data.*/ + MCOConnectionLogTypeSent, + /** Sent private data. It can be a password.*/ + MCOConnectionLogTypeSentPrivate, + /** Parse error.*/ + MCOConnectionLogTypeErrorParse, + /** Error while receiving data. The data passed to the log will be nil.*/ + MCOConnectionLogTypeErrorReceived, + /** Error while sending dataThe data passed to the log will be nil.*/ + MCOConnectionLogTypeErrorSent, +} MCOConnectionLogType; + +/** + It's a network traffic logger. + @param connectionID is the identifier of the underlaying network socket. + @param type is the type of the log. + @param data is the data related to the log. + */ +typedef void (^MCOConnectionLogger)(void * connectionID, MCOConnectionLogType type, NSData * data); + #endif diff --git a/src/objc/abstract/MCOMessageHeader.mm b/src/objc/abstract/MCOMessageHeader.mm index 6729894d..427131b0 100644 --- a/src/objc/abstract/MCOMessageHeader.mm +++ b/src/objc/abstract/MCOMessageHeader.mm @@ -67,6 +67,12 @@ return self; } +- (void) dealloc +{ + _nativeHeader->release(); + [super dealloc]; +} + + (MCOMessageHeader *) messageHeaderWithMCMessageHeader:(mailcore::MessageHeader *)header { if (header == NULL) |