New constant kPepRawMessage
authorDirk Zimmermann <dirk@pep-project.org>
Fri, 29 Jul 2016 13:12:39 +0200
changeset 137b676bab371f0
parent 136 7886ce2b0e22
child 138 6adb106948b6
New constant kPepRawMessage
pEpiOSAdapter/PEPMessage.h
pEpiOSAdapter/PEPMessage.m
pEpiOSAdapter/PEPSession.h
pEpiOSAdapter/PEPSession.m
     1.1 --- a/pEpiOSAdapter/PEPMessage.h	Wed Jul 27 19:41:45 2016 +0200
     1.2 +++ b/pEpiOSAdapter/PEPMessage.h	Fri Jul 29 13:12:39 2016 +0200
     1.3 @@ -17,3 +17,84 @@
     1.4  
     1.5  message *PEP_messageDictToStruct(NSDictionary *dict);
     1.6  NSDictionary *PEP_messageDictFromStruct(message *msg);
     1.7 +
     1.8 +#pragma mark -- Constants
     1.9 +
    1.10 +/** The name of the user */
    1.11 +extern NSString *const _Nonnull kPepUsername;
    1.12 +
    1.13 +/** Email address of the contact */
    1.14 +extern NSString *const _Nonnull kPepAddress;
    1.15 +
    1.16 +/**
    1.17 + A user ID, used by pEp to map multiple identities to a single user.
    1.18 + This should be a stable ID (e.g. derived from the address book if possible).
    1.19 + pEp identities set up with mySelf() get a special user ID.
    1.20 + */
    1.21 +extern NSString *const _Nonnull kPepUserID;
    1.22 +
    1.23 +/** The fingerprint for the key for this contact. */
    1.24 +extern NSString *const _Nonnull kPepFingerprint;
    1.25 +
    1.26 +/** NSNumber denoting a boolean, true if that identity was setup with mySelf() */
    1.27 +extern NSString *const _Nonnull kPepIsMe;
    1.28 +
    1.29 +/** In an email, the identity this email is from */
    1.30 +extern NSString *const _Nonnull kPepFrom;
    1.31 +
    1.32 +/** In an email, the `NSArray` of to recipients */
    1.33 +extern NSString *const _Nonnull kPepTo;
    1.34 +
    1.35 +/** In an email, the `NSArray` of CC recipients */
    1.36 +extern NSString *const _Nonnull kPepCC;
    1.37 +
    1.38 +/** In an email, the `NSArray` of BCC recipients */
    1.39 +extern NSString *const _Nonnull kPepBCC;
    1.40 +
    1.41 +/** The subject of an email */
    1.42 +extern NSString *const _Nonnull kPepShortMessage;
    1.43 +
    1.44 +/** The text message of an email */
    1.45 +extern NSString *const _Nonnull kPepLongMessage;
    1.46 +
    1.47 +/** HTML message part, if any */
    1.48 +extern NSString *const _Nonnull kPepLongMessageFormatted;
    1.49 +
    1.50 +/** NSNumber denoting a boolean. True if that message is supposed to be sent. */
    1.51 +extern NSString *const _Nonnull kPepOutgoing;
    1.52 +
    1.53 +/** Sent date of the message (NSDate) */
    1.54 +extern NSString *const _Nonnull kPepSent;
    1.55 +
    1.56 +/** Received date of the message (NSDate) */
    1.57 +extern NSString *const _Nonnull kPepReceived;
    1.58 +
    1.59 +/** The message ID */
    1.60 +extern NSString *const _Nonnull kPepID;
    1.61 +
    1.62 +extern NSString *const _Nonnull kPepReceivedBy;
    1.63 +extern NSString *const _Nonnull kPepReplyTo;
    1.64 +extern NSString *const _Nonnull kPepInReplyTo;
    1.65 +extern NSString *const _Nonnull kPepReferences;
    1.66 +extern NSString *const _Nonnull kPepOptFields;
    1.67 +
    1.68 +/** NSArray of attachment dicts */
    1.69 +extern NSString *const _Nonnull kPepAttachments;
    1.70 +
    1.71 +/** The binary NSData representing the content of an attachment */
    1.72 +extern NSString *const _Nonnull kPepMimeData;
    1.73 +
    1.74 +/** The NSString filename of an attachment, if any */
    1.75 +extern NSString *const _Nonnull kPepMimeFilename;
    1.76 +
    1.77 +/** The mime type of an attachment */
    1.78 +extern NSString *const _Nonnull kPepMimeType;
    1.79 +
    1.80 +/** The pEp internal communication type */
    1.81 +extern NSString *const _Nonnull kPepCommType;
    1.82 +
    1.83 +/** The raw message created by pEp (NSData) */
    1.84 +extern NSString *const _Nonnull kPepRawMessage;
    1.85 +
    1.86 +/** NSError parameters will use this domain */
    1.87 +extern NSString *const _Nonnull PEPSessionErrorDomain;
    1.88 \ No newline at end of file
     2.1 --- a/pEpiOSAdapter/PEPMessage.m	Wed Jul 27 19:41:45 2016 +0200
     2.2 +++ b/pEpiOSAdapter/PEPMessage.m	Fri Jul 29 13:12:39 2016 +0200
     2.3 @@ -8,6 +8,58 @@
     2.4  
     2.5  #import "PEPMessage.h"
     2.6  
     2.7 +#pragma mark -- Constants
     2.8 +
     2.9 +NSString *const kPepUsername = @"username";
    2.10 +
    2.11 +NSString *const kPepAddress = @"address";
    2.12 +
    2.13 +NSString *const kPepUserID = @"user_id";
    2.14 +
    2.15 +NSString *const kPepFingerprint = @"fpr";
    2.16 +
    2.17 +NSString *const kPepIsMe = @"me";
    2.18 +
    2.19 +NSString *const kPepFrom = @"from";
    2.20 +
    2.21 +NSString *const kPepTo = @"to";
    2.22 +
    2.23 +NSString *const kPepCC = @"cc";
    2.24 +
    2.25 +NSString *const kPepBCC = @"bcc";
    2.26 +
    2.27 +NSString *const kPepShortMessage = @"shortmsg";
    2.28 +
    2.29 +NSString *const kPepLongMessage = @"longmsg";
    2.30 +
    2.31 +NSString *const kPepLongMessageFormatted = @"longmsg_formatted";
    2.32 +
    2.33 +NSString *const kPepOutgoing = @"outgoing";
    2.34 +
    2.35 +NSString *const kPepSent = @"sent";
    2.36 +
    2.37 +NSString *const kPepReceived = @"recv";
    2.38 +
    2.39 +NSString *const kPepID = @"id";
    2.40 +
    2.41 +NSString *const kPepReceivedBy = @"recv_by";
    2.42 +NSString *const kPepReplyTo = @"reply_to";
    2.43 +NSString *const kPepInReplyTo = @"in_reply_to";
    2.44 +NSString *const kPepReferences = @"references";
    2.45 +NSString *const kPepOptFields = @"opt_fields";
    2.46 +
    2.47 +NSString *const kPepAttachments = @"attachments";
    2.48 +
    2.49 +NSString *const kPepMimeData = @"data";
    2.50 +
    2.51 +NSString *const kPepMimeFilename = @"filename";
    2.52 +
    2.53 +NSString *const kPepMimeType = @"mimeType";
    2.54 +
    2.55 +NSString *const kPepCommType = @"comm_type";
    2.56 +
    2.57 +NSString *const kPepRawMessage = @"raw_message";
    2.58 +
    2.59  NSArray *PEP_arrayFromStringlist(stringlist_t *sl)
    2.60  {
    2.61      NSMutableArray *array = [NSMutableArray array];
    2.62 @@ -289,7 +341,6 @@
    2.63      return nil;
    2.64  }
    2.65  
    2.66 -
    2.67  message *PEP_messageDictToStruct(NSDictionary *dict)
    2.68  {
    2.69      // Direction default to incoming
     3.1 --- a/pEpiOSAdapter/PEPSession.h	Wed Jul 27 19:41:45 2016 +0200
     3.2 +++ b/pEpiOSAdapter/PEPSession.h	Fri Jul 29 13:12:39 2016 +0200
     3.3 @@ -13,41 +13,6 @@
     3.4  
     3.5  @class PEPSession;
     3.6  
     3.7 -#pragma mark -- Constants
     3.8 -
     3.9 -extern NSString *const _Nonnull kPepUsername;
    3.10 -extern NSString *const _Nonnull kPepAddress;
    3.11 -extern NSString *const _Nonnull kPepUserID;
    3.12 -extern NSString *const _Nonnull kPepFingerprint;
    3.13 -extern NSString *const _Nonnull kPepIsMe;
    3.14 -
    3.15 -extern NSString *const _Nonnull kPepFrom;
    3.16 -extern NSString *const _Nonnull kPepTo;
    3.17 -extern NSString *const _Nonnull kPepShortMessage;
    3.18 -extern NSString *const _Nonnull kPepLongMessage;
    3.19 -extern NSString *const _Nonnull kPepOutgoing;
    3.20 -extern NSString *const _Nonnull kPepSent;
    3.21 -extern NSString *const _Nonnull kPepReceived;
    3.22 -extern NSString *const _Nonnull kPepReceivedBy;
    3.23 -extern NSString *const _Nonnull kPepCC;
    3.24 -extern NSString *const _Nonnull kPepBCC;
    3.25 -extern NSString *const _Nonnull kPepReplyTo;
    3.26 -extern NSString *const _Nonnull kPepInReplyTo;
    3.27 -extern NSString *const _Nonnull kPepReferences;
    3.28 -extern NSString *const _Nonnull kPepOptFields;
    3.29 -extern NSString *const _Nonnull kPepLongMessageFormatted;
    3.30 -extern NSString *const _Nonnull kPepAttachments;
    3.31 -extern NSString *const _Nonnull kPepID;
    3.32 -
    3.33 -extern NSString *const _Nonnull kPepMimeData;
    3.34 -extern NSString *const _Nonnull kPepMimeFilename;
    3.35 -extern NSString *const _Nonnull kPepMimeType;
    3.36 -
    3.37 -extern NSString *const _Nonnull kPepCommType;
    3.38 -
    3.39 -/** NSError parameters will use this domain */
    3.40 -extern NSString *const _Nonnull PEPSessionErrorDomain;
    3.41 -
    3.42  /** Callback type for doing something with a session */
    3.43  typedef void (^PEPSessionBlock)(PEPSession * _Nonnull session);
    3.44  
     4.1 --- a/pEpiOSAdapter/PEPSession.m	Wed Jul 27 19:41:45 2016 +0200
     4.2 +++ b/pEpiOSAdapter/PEPSession.m	Fri Jul 29 13:12:39 2016 +0200
     4.3 @@ -11,82 +11,6 @@
     4.4  #import "PEPIOSAdapter+Internal.h"
     4.5  #import "PEPMessage.h"
     4.6  
     4.7 -#pragma mark -- Constants
     4.8 -
     4.9 -/** The name of the user */
    4.10 -NSString *const kPepUsername = @"username";
    4.11 -
    4.12 -/** Email address of the contact */
    4.13 -NSString *const kPepAddress = @"address";
    4.14 -
    4.15 -/**
    4.16 - A user ID, used by pEp to map multiple identities to a single user.
    4.17 - This should be a stable ID (e.g. derived from the address book if possible).
    4.18 - pEp identities set up with mySelf() get a special user ID.
    4.19 - */
    4.20 -NSString *const kPepUserID = @"user_id";
    4.21 -
    4.22 -/** The fingerprint for the key for this contact. */
    4.23 -NSString *const kPepFingerprint = @"fpr";
    4.24 -
    4.25 -/** NSNumber denoting a boolean, true if that identity was setup with mySelf() */
    4.26 -NSString *const kPepIsMe = @"me";
    4.27 -
    4.28 -/** In an email, the identity this email is from */
    4.29 -NSString *const kPepFrom = @"from";
    4.30 -
    4.31 -/** In an email, the `NSArray` of to recipients */
    4.32 -NSString *const kPepTo = @"to";
    4.33 -
    4.34 -/** In an email, the `NSArray` of CC recipients */
    4.35 -NSString *const kPepCC = @"cc";
    4.36 -
    4.37 -/** In an email, the `NSArray` of BCC recipients */
    4.38 -NSString *const kPepBCC = @"bcc";
    4.39 -
    4.40 -/** The subject of an email */
    4.41 -NSString *const kPepShortMessage = @"shortmsg";
    4.42 -
    4.43 -/** The text message of an email */
    4.44 -NSString *const kPepLongMessage = @"longmsg";
    4.45 -
    4.46 -/** HTML message part, if any */
    4.47 -NSString *const kPepLongMessageFormatted = @"longmsg_formatted";
    4.48 -
    4.49 -/** NSNumber denoting a boolean. True if that message is supposed to be sent. */
    4.50 -NSString *const kPepOutgoing = @"outgoing";
    4.51 -
    4.52 -/** NSDate (sent date) */
    4.53 -NSString *const kPepSent = @"sent";
    4.54 -
    4.55 -/** NSDate (received date) */
    4.56 -
    4.57 -NSString *const kPepReceived = @"recv";
    4.58 -
    4.59 -/** The message ID */
    4.60 -NSString *const kPepID = @"id";
    4.61 -
    4.62 -NSString *const kPepReceivedBy = @"recv_by";
    4.63 -NSString *const kPepReplyTo = @"reply_to";
    4.64 -NSString *const kPepInReplyTo = @"in_reply_to";
    4.65 -NSString *const kPepReferences = @"references";
    4.66 -NSString *const kPepOptFields = @"opt_fields";
    4.67 -
    4.68 -/** NSArray of attachment dicts */
    4.69 -NSString *const kPepAttachments = @"attachments";
    4.70 -
    4.71 -/** The binary NSData representing the content of an attachment */
    4.72 -NSString *const kPepMimeData = @"data";
    4.73 -
    4.74 -/** The NSString filename of an attachment, if any */
    4.75 -NSString *const kPepMimeFilename = @"filename";
    4.76 -
    4.77 -/** The mime type of an attachment */
    4.78 -NSString *const kPepMimeType = @"mimeType";
    4.79 -
    4.80 -/** The pEp internal communication type */
    4.81 -NSString *const kPepCommType = @"comm_type";
    4.82 -
    4.83  @interface PEPSession ()
    4.84  
    4.85  @property (nonatomic) PEP_SESSION session;