pEpObjCAdapter/PEPInternalSession.h
author Dirk Zimmermann <dz@pep.security>
Wed, 20 Mar 2019 16:40:35 +0100
branchIOS-1480
changeset 902 32760267cd59
parent 838 bb34102cc016
child 905 929095fe2998
child 1104 802191d6d984
permissions -rw-r--r--
IOS-1480 Avoid framework imports.
     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 
    13 #import "sync_api.h"
    14 
    15 #import "PEPObjCAdapter.h"
    16 
    17 /**
    18  Represents a real pEp session (in contrast to PEPSession, which is a fake session to handle to the client).
    19  Never expose this class to the client.
    20  - You must use one session on one thread only to assure no concurrent calls to one session take place.
    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.
    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.
    23 
    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.
    25  */
    26 @interface PEPInternalSession : NSObject <PEPSessionProtocol>
    27 
    28 @property (nonatomic) PEP_SESSION _Nullable session;
    29 
    30 /**
    31  Configures the session's unecryptedSubjectEnabled value.
    32 
    33  @param enabled Whether or not mail subjects should be encrypted when using this session
    34  */
    35 - (void)configUnEncryptedSubjectEnabled:(BOOL)enabled;
    36 
    37 @end