mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-20 14:13:19 +00:00
Monotone-Parent: a164259525f718f804b625a9f09b4c3b3c9e83f8
Monotone-Revision: 11f4bdac420d36e45b12ca5d1d393ec34f43c609 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-11-10T00:02:30 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -34,6 +34,8 @@
|
||||
#import <NGExtensions/NGBase64Coding.h>
|
||||
#import <NGImap4/NGImap4Connection.h>
|
||||
|
||||
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
|
||||
|
||||
#import "SOGoMailObject.h"
|
||||
#import "SOGoMailManager.h"
|
||||
|
||||
@@ -305,7 +307,9 @@ static BOOL debugOn = NO;
|
||||
|
||||
/* factory */
|
||||
|
||||
+ (Class)bodyPartClassForKey:(NSString *)_key inContext:(id)_ctx {
|
||||
+ (Class) bodyPartClassForKey: (NSString *) _key
|
||||
inContext: (id) _ctx
|
||||
{
|
||||
NSString *pe;
|
||||
|
||||
pe = [_key pathExtension];
|
||||
@@ -335,6 +339,36 @@ static BOOL debugOn = NO;
|
||||
return self;
|
||||
}
|
||||
|
||||
+ (Class) bodyPartClassForMimeType: (NSString *) mimeType
|
||||
inContext: (id) _ctx
|
||||
{
|
||||
NSString *classString;
|
||||
Class klazz;
|
||||
|
||||
if ([mimeType isEqualToString: @"image/gif"]
|
||||
|| [mimeType isEqualToString: @"image/png"]
|
||||
|| [mimeType isEqualToString: @"image/jpg"])
|
||||
classString = @"SOGoImageMailBodyPart";
|
||||
else if ([mimeType isEqualToString: @"text/calendar"])
|
||||
classString = @"SOGoCalendarMailBodyPart";
|
||||
else if ([mimeType isEqualToString: @"text/x-vcard"])
|
||||
classString = @"SOGoVCardMailBodyPart";
|
||||
else if ([mimeType isEqualToString: @"message/rfc822"])
|
||||
classString = @"SOGoMessageMailBodyPart";
|
||||
else
|
||||
{
|
||||
NSLog (@"unhandled mime type: '%@'", mimeType);
|
||||
classString = nil;
|
||||
}
|
||||
|
||||
if (classString)
|
||||
klazz = NSClassFromString (classString);
|
||||
else
|
||||
klazz = Nil;
|
||||
|
||||
return klazz;
|
||||
}
|
||||
|
||||
/* etag support */
|
||||
|
||||
- (id)davEntityTag {
|
||||
|
||||
Reference in New Issue
Block a user