pEpObjCAdapter/PEPMessage.h
changeset 187 1f630a05e444
child 198 55e448e712a6
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/pEpObjCAdapter/PEPMessage.h	Wed May 17 09:27:57 2017 +0200
     1.3 @@ -0,0 +1,114 @@
     1.4 +//
     1.5 +//  MCOAbstractMessage+PEPMessage.h
     1.6 +//  pEpiOSAdapter
     1.7 +//
     1.8 +//  Created by Volker Birk on 09.07.15.
     1.9 +//  Copyright (c) 2015 p≡p. All rights reserved.
    1.10 +//
    1.11 +
    1.12 +#import <Foundation/Foundation.h>
    1.13 +
    1.14 +#include "message_api.h"
    1.15 +
    1.16 +NSArray * _Nonnull PEP_arrayFromStringlist(stringlist_t * _Nonnull sl);
    1.17 +stringlist_t * _Nullable PEP_arrayToStringlist(NSArray * _Nullable array);
    1.18 +
    1.19 +pEp_identity * _Nullable PEP_identityDictToStruct(NSDictionary * _Nullable dict);
    1.20 +NSDictionary * _Nonnull PEP_identityDictFromStruct(pEp_identity * _Nullable ident);
    1.21 +
    1.22 +message * _Nullable PEP_messageDictToStruct(NSDictionary * _Nullable dict);
    1.23 +NSDictionary * _Nonnull PEP_messageDictFromStruct(message * _Nullable msg);
    1.24 +
    1.25 +#pragma mark -- Constants
    1.26 +
    1.27 +/** The name of the user */
    1.28 +extern NSString *const _Nonnull kPepUsername;
    1.29 +
    1.30 +/** Email address of the contact */
    1.31 +extern NSString *const _Nonnull kPepAddress;
    1.32 +
    1.33 +/**
    1.34 + A user ID, used by pEp to map multiple identities to a single user.
    1.35 + This should be a stable ID (e.g. derived from the address book if possible).
    1.36 + pEp identities set up with mySelf() get a special user ID.
    1.37 + */
    1.38 +extern NSString *const _Nonnull kPepUserID;
    1.39 +
    1.40 +/** The fingerprint for the key for this contact. */
    1.41 +extern NSString *const _Nonnull kPepFingerprint;
    1.42 +
    1.43 +/** NSNumber denoting a boolean, true if that identity was setup with mySelf() */
    1.44 +extern NSString *const _Nonnull kPepIsMe;
    1.45 +
    1.46 +/** In an email, the identity this email is from */
    1.47 +extern NSString *const _Nonnull kPepFrom;
    1.48 +
    1.49 +/** In an email, the `NSArray` of to recipients */
    1.50 +extern NSString *const _Nonnull kPepTo;
    1.51 +
    1.52 +/** In an email, the `NSArray` of CC recipients */
    1.53 +extern NSString *const _Nonnull kPepCC;
    1.54 +
    1.55 +/** In an email, the `NSArray` of BCC recipients */
    1.56 +extern NSString *const _Nonnull kPepBCC;
    1.57 +
    1.58 +/** The subject of an email */
    1.59 +extern NSString *const _Nonnull kPepShortMessage;
    1.60 +
    1.61 +/** The text message of an email */
    1.62 +extern NSString *const _Nonnull kPepLongMessage;
    1.63 +
    1.64 +/** HTML message part, if any */
    1.65 +extern NSString *const _Nonnull kPepLongMessageFormatted;
    1.66 +
    1.67 +/** NSNumber denoting a boolean. True if that message is supposed to be sent. */
    1.68 +extern NSString *const _Nonnull kPepOutgoing;
    1.69 +
    1.70 +/** Sent date of the message (NSDate) */
    1.71 +extern NSString *const _Nonnull kPepSent;
    1.72 +
    1.73 +/** Received date of the message (NSDate) */
    1.74 +extern NSString *const _Nonnull kPepReceived;
    1.75 +
    1.76 +/** The message ID */
    1.77 +extern NSString *const _Nonnull kPepID;
    1.78 +
    1.79 +extern NSString *const _Nonnull kPepReceivedBy;
    1.80 +extern NSString *const _Nonnull kPepReplyTo;
    1.81 +extern NSString *const _Nonnull kPepInReplyTo;
    1.82 +extern NSString *const _Nonnull kPepReferences;
    1.83 +extern NSString *const _Nonnull kPepKeywords;
    1.84 +extern NSString *const _Nonnull kPepOptFields;
    1.85 +
    1.86 +/** NSArray of attachment dicts */
    1.87 +extern NSString *const _Nonnull kPepAttachments;
    1.88 +
    1.89 +/** The binary NSData representing the content of an attachment */
    1.90 +extern NSString *const _Nonnull kPepMimeData;
    1.91 +
    1.92 +/** The NSString filename of an attachment, if any */
    1.93 +extern NSString *const _Nonnull kPepMimeFilename;
    1.94 +
    1.95 +/** The mime type of an attachment */
    1.96 +extern NSString *const _Nonnull kPepMimeType;
    1.97 +
    1.98 +/** The content ID of an attachment */
    1.99 +extern NSString *const _Nonnull kPepContentID;
   1.100 +
   1.101 +/** The pEp internal communication type */
   1.102 +extern NSString *const _Nonnull kPepCommType;
   1.103 +
   1.104 +/** The raw message created by pEp (NSData) */
   1.105 +extern NSString *const _Nonnull kPepRawMessage;
   1.106 +
   1.107 +/** NSError parameters will use this domain */
   1.108 +extern NSString *const _Nonnull PEPSessionErrorDomain;
   1.109 +
   1.110 +/** Optional field "X-pEp-Version" */
   1.111 +extern NSString *const _Nonnull kXpEpVersion;
   1.112 +
   1.113 +/** Optional field "X-EncStatus" */
   1.114 +extern NSString *const _Nonnull kXEncStatus;
   1.115 +
   1.116 +/** Optional field "X-KeyList" */
   1.117 +extern NSString *const _Nonnull kXKeylist;