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