diff options
author | Ryan Johnson <ryan@iambismark.net> | 2013-07-10 11:23:32 -0500 |
---|---|---|
committer | Ryan Johnson <ryan@iambismark.net> | 2013-07-10 11:23:32 -0500 |
commit | 31762d8a7434268f08ae7dfbf06edc95754efb25 (patch) | |
tree | fb2dc760e9b93e0358cf37200c50ff48b531a751 /src/objc/abstract | |
parent | 398e820c4ce6047712effaba5f1c08d095b7c68c (diff) |
Fixes for PR feedback
* headerForName -> headerValueForName
* setExtraHeaders made private, removed extraHeaders
* added removeHeaderForName
Diffstat (limited to 'src/objc/abstract')
-rw-r--r-- | src/objc/abstract/MCOMessageHeader.h | 4 | ||||
-rw-r--r-- | src/objc/abstract/MCOMessageHeader.mm | 11 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/objc/abstract/MCOMessageHeader.h b/src/objc/abstract/MCOMessageHeader.h index 134a9598..4177dec9 100644 --- a/src/objc/abstract/MCOMessageHeader.h +++ b/src/objc/abstract/MCOMessageHeader.h @@ -58,7 +58,9 @@ @property (nonatomic, copy) NSString * userAgent; - (void)addHeaderValue:(NSString *)value forName:(NSString *)name; -- (NSString *)headerForName:(NSString *)name; +- (void)removeHeaderForName:(NSString *)name; +- (NSString *)headerValueForName:(NSString *)name; +- (NSArray * /* NSString */)allHeadersNames; /** Extracted subject (also remove square brackets).*/ - (NSString *) extractedSubject; diff --git a/src/objc/abstract/MCOMessageHeader.mm b/src/objc/abstract/MCOMessageHeader.mm index 3c5d4937..429d3761 100644 --- a/src/objc/abstract/MCOMessageHeader.mm +++ b/src/objc/abstract/MCOMessageHeader.mm @@ -98,8 +98,15 @@ MCO_OBJC_SYNTHESIZE_STRING(setUserAgent, userAgent) _nativeHeader->addHeader(MCO_FROM_OBJC(mailcore::String, name), MCO_FROM_OBJC(mailcore::String, value)); } -- (NSString *)headerForName:(NSString *)name { - return MCO_TO_OBJC(_nativeHeader->headerForName((MCO_FROM_OBJC(mailcore::String, name)))); +- (NSString *)headerValueForName:(NSString *)name { + return MCO_TO_OBJC(_nativeHeader->headerValueForName((MCO_FROM_OBJC(mailcore::String, name)))); +} +- (void)removeHeaderForName:(NSString *)name { + _nativeHeader->removeHeader(MCO_FROM_OBJC(mailcore::String, name)); +} + +- (NSArray * /* NSString */)allHeadersNames { + return MCO_TO_OBJC(_nativeHeader->allExtraHeadersNames()); } - (NSString *) extractedSubject |