pEpObjCAdapter/PEPInternalSession.h
author Dirk Zimmermann <dz@pep.security>
Thu, 21 Mar 2019 15:02:02 +0100
branchIOS-1475_exp_dirk_001
changeset 905 929095fe2998
parent 879 4a05246fcdc0
parent 902 32760267cd59
permissions -rw-r--r--
IOS-1475 Merge in refactor.
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@879
    12
#import "pEpEngine.h"
dz@838
    13
dz@838
    14
#import <PEPObjCAdapterFramework/PEPSessionProtocol.h>
dz@838
    15
andreas@276
    16
#import "PEPObjCAdapter.h"
andreas@272
    17
andreas@269
    18
/**
andreas@310
    19
 Represents a real pEp session (in contrast to PEPSession, which is a fake session to handle to the client).
andreas@273
    20
 Never expose this class to the client.
andreas@273
    21
 - You must use one session on one thread only to assure no concurrent calls to one session take place.
andreas@273
    22
 - 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
    23
 - 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
    24
andreas@290
    25
 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
    26
 */
dirk@303
    27
@interface PEPInternalSession : NSObject <PEPSessionProtocol>
andreas@272
    28
andreas@272
    29
@property (nonatomic) PEP_SESSION _Nullable session;
andreas@272
    30
andreas@416
    31
/**
andreas@416
    32
 Configures the session's unecryptedSubjectEnabled value.
andreas@416
    33
andreas@416
    34
 @param enabled Whether or not mail subjects should be encrypted when using this session
andreas@416
    35
 */
dirk@601
    36
- (void)configUnEncryptedSubjectEnabled:(BOOL)enabled;
andreas@416
    37
andreas@269
    38
@end