aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc
diff options
context:
space:
mode:
Diffstat (limited to 'src/objc')
-rw-r--r--src/objc/rfc822/MCOAttachment.h14
-rw-r--r--src/objc/rfc822/MCOAttachment.mm19
2 files changed, 32 insertions, 1 deletions
diff --git a/src/objc/rfc822/MCOAttachment.h b/src/objc/rfc822/MCOAttachment.h
index 8094d474..03ccbeab 100644
--- a/src/objc/rfc822/MCOAttachment.h
+++ b/src/objc/rfc822/MCOAttachment.h
@@ -41,7 +41,19 @@
/** Returns string representation according to charset*/
- (NSString *) decodedString;
-
+
+/** Adds a custom parameter.*/
+- (void) setExtraParameterValue:(NSString *)value forName:(NSString *)name;
+
+/** Remove a given custom parameter.*/
+- (void) removeExtraParameterForName:(NSString *)name;
+
+/** Returns the value of a given custom parameter.*/
+- (NSString *) extraParameterValueForName:(NSString *)name;
+
+/** Returns an array with the names of all custom headers.*/
+- (NSArray * /* NSString */) allExtraParametersNames;
+
@end
#endif
diff --git a/src/objc/rfc822/MCOAttachment.mm b/src/objc/rfc822/MCOAttachment.mm
index afaf96af..3892ee78 100644
--- a/src/objc/rfc822/MCOAttachment.mm
+++ b/src/objc/rfc822/MCOAttachment.mm
@@ -90,4 +90,23 @@ MCO_OBJC_SYNTHESIZE_DATA(setData, data)
return [NSString mco_stringWithMCString:result];
}
+- (void) setExtraParameterValue:(NSString *)value forName:(NSString *)name
+{
+ MCO_NATIVE_INSTANCE->setExtraParameter(MCO_FROM_OBJC(mailcore::String, name), MCO_FROM_OBJC(mailcore::String, value));
+}
+
+- (NSString *) extraParameterValueForName:(NSString *)name
+{
+ return MCO_TO_OBJC(MCO_NATIVE_INSTANCE->extraParameterValueForName((MCO_FROM_OBJC(mailcore::String, name))));
+}
+- (void) removeExtraParameterForName:(NSString *)name
+{
+ MCO_NATIVE_INSTANCE->removeExtraParameter(MCO_FROM_OBJC(mailcore::String, name));
+}
+
+- (NSArray * /* NSString */) allExtraParametersNames
+{
+ return MCO_TO_OBJC(MCO_NATIVE_INSTANCE->allExtraParametersNames());
+}
+
@end