Adapter for libpepmime, offering ObjC API.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

31 lines
753 B

//
// PEPMessage+PEPMessage_MIME.m
// pEpMimeObjCAdapter_macOS
//
// Created by Andreas Buff on 01.07.21.
//
#import "PEPMessage+PEPMessage_MIME.h"
#import "PEPMessage2MIMEUtil.h"
#import "PEPMIME2PEPMessageUtil.h"
@implementation PEPMessage (PEPMessage_MIME)
- (instancetype) initWithMimeData:(NSData *)mimeData {
if (self = [self init]) {
PEPMIME2PEPMessageUtil *util = [PEPMIME2PEPMessageUtil new];
NSError *error = nil;
self = [util pEpMessageWithMimeData:mimeData error:&error];
}
return self;
}
- (NSData*)mimeData {
PEPMessage2MIMEUtil *util = [PEPMessage2MIMEUtil new];
NSError *error = nil;
NSData *mimeData = [util mimeDataFromPEPMessage:self error:&error];
return mimeData;
}
@end