diff options
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 |