pEpObjCAdapter/PEPInternalSession.h
author Dirk Zimmermann <dz@pep.security>
Fri, 20 Sep 2019 17:00:26 +0200
branchIOSAD-132
changeset 1259 0cc3891ea776
parent 1104 802191d6d984
permissions -rw-r--r--
IOSAD-132 Add PEPStatusCannotDeleteKey (PEP_CANNOT_DELETE_KEY).
andreas@269
     1
//
andreas@269
     2
//  PEPSession.h
andreas@269
     3
//  pEpiOSAdapter
andreas@269
     4
//
andreas@269
     5
//  Created by Volker Birk on 08.07.15.
andreas@269
     6
//  Copyright (c) 2015 p≡p. All rights reserved.
andreas@269
     7
//
andreas@269
     8
andreas@269
     9
#import <Foundation/Foundation.h>
andreas@269
    10
dz@902
    11
#import "PEPSessionProtocol.h"
dz@838
    12
dz@838
    13
#import "sync_api.h"
dz@838
    14
andreas@276
    15
#import "PEPObjCAdapter.h"
andreas@272
    16
andreas@269
    17
/**
andreas@310
    18
 Represents a real pEp session (in contrast to PEPSession, which is a fake session to handle to the client).
andreas@273
    19
 Never expose this class to the client.
andreas@273
    20
 - You must use one session on one thread only to assure no concurrent calls to one session take place.
andreas@273
    21
 - As long as you can assure the session is not accessed from anywhere else, it is OK to init/deinit a session on another thread than the one it is used on.
andreas@273
    22
 - N threads <-> N sessions, with the constraint that a session is never used in a pEpEngine call more than once at the same time.
andreas@290
    23
andreas@290
    24
 Also the Engine requires that the first session is created on the main thread and is kept allive until all other created sessions have been terminated.
andreas@269
    25
 */
dirk@303
    26
@interface PEPInternalSession : NSObject <PEPSessionProtocol>
andreas@272
    27
andreas@272
    28
@property (nonatomic) PEP_SESSION _Nullable session;
andreas@272
    29
dz@1104
    30
- (_Nullable instancetype)init;
dz@1104
    31
andreas@416
    32
/**
andreas@416
    33
 Configures the session's unecryptedSubjectEnabled value.
andreas@416
    34
andreas@416
    35
 @param enabled Whether or not mail subjects should be encrypted when using this session
andreas@416
    36
 */
dirk@601
    37
- (void)configUnEncryptedSubjectEnabled:(BOOL)enabled;
andreas@416
    38
andreas@269
    39
@end