blob: 2267f77521fa5b04bf68393fc9818f0f0eb27975 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
//
// MCOMultipart.m
// mailcore2
//
// Created by DINH Viêt Hoà on 3/22/13.
// Copyright (c) 2013 MailCore. All rights reserved.
//
#import "MCOMultipart.h"
#include "MCRFC822.h"
#import "NSObject+MCO.h"
#import "MCOAbstractPart+Private.h"
@implementation MCOMultipart
#define nativeType mailcore::Multipart
+ (void) load
{
MCORegisterClass(self, &typeid(nativeType));
}
- (id) copyWithZone:(NSZone *)zone
{
nativeType * nativeObject = (nativeType *) [self mco_mcObject]->copy();
id result = [[self class] mco_objectWithMCObject:nativeObject];
MC_SAFE_RELEASE(nativeObject);
return [result retain];
}
+ (id) mco_objectWithMCObject:(mailcore::Object *)object
{
mailcore::Attachment * attachment = (mailcore::Attachment *) object;
return [[[self alloc] initWithMCPart:attachment] autorelease];
}
@end
|