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.
     1 //
     2 //  PEPSession.h
     3 //  pEpiOSAdapter
     4 //
     5 //  Created by Volker Birk on 08.07.15.
     6 //  Copyright (c) 2015 p≡p. All rights reserved.
     7 //
     8 
     9 #import <Foundation/Foundation.h>
    10 
    11 #import "PEPSessionProtocol.h"
    12 #import "pEpEngine.h"
    13 
    14 #import <PEPObjCAdapterFramework/PEPSessionProtocol.h>
    15 
    16 #import "PEPObjCAdapter.h"
    17 
    18 /**
    19  Represents a real pEp session (in contrast to PEPSession, which is a fake session to handle to the client).
    20  Never expose this class to the client.
    21  - You must use one session on one thread only to assure no concurrent calls to one session take place.
    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.
    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.
    24 
    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.
    26  */
    27 @interface PEPInternalSession : NSObject <PEPSessionProtocol>
    28 
    29 @property (nonatomic) PEP_SESSION _Nullable session;
    30 
    31 /**
    32  Configures the session's unecryptedSubjectEnabled value.
    33 
    34  @param enabled Whether or not mail subjects should be encrypted when using this session
    35  */
    36 - (void)configUnEncryptedSubjectEnabled:(BOOL)enabled;
    37 
    38 @end