aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-12-11 14:24:03 -0800
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-12-11 14:24:03 -0800
commit475d817e0230342443203f3b9b3dfe2a45a71779 (patch)
tree74803f62785a268e477fb82f96f98fc7e65f1686 /src/objc
parent129a55d2098fbb114fcb7e785b31ce270e9cfda0 (diff)
Fixed analyzer issues and warnings (#993 and fixed #992)
Diffstat (limited to 'src/objc')
-rw-r--r--src/objc/imap/MCOIMAPIdentity.h3
-rw-r--r--src/objc/imap/MCOIMAPIdentity.mm5
2 files changed, 8 insertions, 0 deletions
diff --git a/src/objc/imap/MCOIMAPIdentity.h b/src/objc/imap/MCOIMAPIdentity.h
index 1690c0e3..69f18c96 100644
--- a/src/objc/imap/MCOIMAPIdentity.h
+++ b/src/objc/imap/MCOIMAPIdentity.h
@@ -37,6 +37,9 @@
/** Retrieve a custom field in the identity */
- (void) setInfo:(NSString *)value forKey:(NSString *)key;
+/** Remove all info keys including vendor, name and version */
+- (void) removeAllInfos;
+
@end
#endif
diff --git a/src/objc/imap/MCOIMAPIdentity.mm b/src/objc/imap/MCOIMAPIdentity.mm
index 0beb092b..08a73b2d 100644
--- a/src/objc/imap/MCOIMAPIdentity.mm
+++ b/src/objc/imap/MCOIMAPIdentity.mm
@@ -82,6 +82,11 @@ MCO_OBJC_SYNTHESIZE_STRING(setVersion, version)
MCO_NATIVE_INSTANCE->setInfoForKey([key mco_mcString], [value mco_mcString]);
}
+- (void) removeAllInfos
+{
+ MCO_NATIVE_INSTANCE->removeAllInfos();
+}
+
+ (MCOIMAPIdentity *) identityWithVendor:(NSString *)vendor
name:(NSString *)name
version:(NSString *)version