pEpObjCAdapter/PEPMessageUtil.h
author Dirk Zimmermann <dirk@pep-project.org>
Mon, 16 Apr 2018 11:01:22 +0200
changeset 580 0a0ba4c4ba91
parent 577 6e6f13e2e4d3
child 597 aa68b6d6a966
permissions -rw-r--r--
IOSAD-91 rm more kPep-constants related to attachments
     1 //
     2 //  PEPMessageUtil.h
     3 //  pEpiOSAdapter
     4 //
     5 //  Created by Volker Birk on 09.07.15.
     6 //  Copyright (c) 2015 p≡p. All rights reserved.
     7 //
     8 
     9 #import <Foundation/Foundation.h>
    10 
    11 #include "message_api.h"
    12 
    13 @class PEPIdentity;
    14 @class PEPMessage;
    15 
    16 NSArray * _Nonnull PEP_arrayFromStringlist(stringlist_t * _Nonnull sl);
    17 stringlist_t * _Nullable PEP_arrayToStringlist(NSArray * _Nullable array);
    18 
    19 pEp_identity * _Nonnull PEP_identityToStruct(PEPIdentity * _Nonnull identity);
    20 
    21 /**
    22  If the ident does not contain an address, no PEPIdentity can be constructed.
    23  */
    24 PEPIdentity * _Nullable PEP_identityFromStruct(pEp_identity * _Nonnull ident);
    25 
    26 pEp_identity * _Nullable PEP_identityDictToStruct(NSDictionary * _Nullable dict);
    27 NSDictionary * _Nonnull PEP_identityDictFromStruct(pEp_identity * _Nullable ident);
    28 
    29 PEPMessage * _Nullable pEpMessageFromStruct(message * _Nullable msg);
    30 
    31 message * _Nullable PEP_messageDictToStruct(NSDictionary * _Nullable dict);
    32 NSDictionary * _Nonnull PEP_messageDictFromStruct(message * _Nullable msg);
    33 
    34 #pragma mark -- Constants
    35 
    36 /** The name of the user */
    37 extern NSString *const _Nonnull kPepUsername;
    38 
    39 /** Email address of the contact */
    40 extern NSString *const _Nonnull kPepAddress;
    41 
    42 /**
    43  A user ID, used by pEp to map multiple identities to a single user.
    44  This should be a stable ID.
    45  pEp identities set up with mySelf() get a special user ID.
    46  */
    47 extern NSString *const _Nonnull kPepUserID;
    48 
    49 /**
    50  Dict key for value isOwn/me.
    51  isOwn indicates the identity is representing me. 
    52  */
    53 extern NSString *const _Nonnull kPepIsOwn;
    54 
    55 /** The fingerprint for the key for this contact. */
    56 extern NSString *const _Nonnull kPepFingerprint;
    57 
    58 /** In an email, the identity this email is from */
    59 extern NSString *const _Nonnull kPepFrom;
    60 
    61 /** In an email, the `NSArray` of to recipients */
    62 extern NSString *const _Nonnull kPepTo;
    63 
    64 /** In an email, the `NSArray` of CC recipients */
    65 extern NSString *const _Nonnull kPepCC;
    66 
    67 /** In an email, the `NSArray` of BCC recipients */
    68 extern NSString *const _Nonnull kPepBCC;
    69 
    70 /** The subject of an email */
    71 extern NSString *const _Nonnull kPepShortMessage;
    72 
    73 /** The text message of an email */
    74 extern NSString *const _Nonnull kPepLongMessage;
    75 
    76 /** HTML message part, if any */
    77 extern NSString *const _Nonnull kPepLongMessageFormatted;
    78 
    79 /** NSNumber denoting a boolean. True if that message is supposed to be sent. */
    80 extern NSString *const _Nonnull kPepOutgoing;
    81 
    82 /** Sent date of the message (NSDate) */
    83 extern NSString *const _Nonnull kPepSent;
    84 
    85 /** Received date of the message (NSDate) */
    86 extern NSString *const _Nonnull kPepReceived;
    87 
    88 /** The message ID */
    89 extern NSString *const _Nonnull kPepID;
    90 
    91 extern NSString *const _Nonnull kPepReceivedBy;
    92 extern NSString *const _Nonnull kPepReplyTo;
    93 extern NSString *const _Nonnull kPepInReplyTo;
    94 extern NSString *const _Nonnull kPepReferences;
    95 extern NSString *const _Nonnull kPepKeywords;
    96 extern NSString *const _Nonnull kPepOptFields;
    97 
    98 /** NSArray of attachment dicts */
    99 extern NSString *const _Nonnull kPepAttachments;
   100 
   101 /** The pEp internal communication type */
   102 extern NSString *const _Nonnull kPepCommType;
   103 
   104 /** The raw message created by pEp (NSData) */
   105 extern NSString *const _Nonnull kPepRawMessage;
   106 
   107 /** NSError parameters will use this domain */
   108 extern NSString *const _Nonnull PEPSessionErrorDomain;
   109 
   110 /** Optional field "X-pEp-Version" */
   111 extern NSString *const _Nonnull kXpEpVersion;
   112 
   113 /** Optional field "X-EncStatus" */
   114 extern NSString *const _Nonnull kXEncStatus;
   115 
   116 /** Optional field "X-KeyList" */
   117 extern NSString *const _Nonnull kXKeylist;
   118 
   119 /** Key for the boolean flag that denotes own identities */
   120 extern NSString *const _Nonnull kPepIsOwnIdentity;