pEpObjCAdapter/PEPSession.h
author Dirk Zimmermann <dirk@pep-project.org>
Fri, 10 Nov 2017 10:28:20 +0100
changeset 367 7dedf5391bb3
parent 303 e85f56111494
child 391 3a63cf867f1f
permissions -rw-r--r--
IOSAD-63 PEPMessage -> PEPMessageUtil
andreas@270
     1
//
andreas@270
     2
//  PEPSession.h
andreas@270
     3
//  pEpObjCAdapter
andreas@270
     4
//
andreas@270
     5
//  Created by Andreas Buff on 11.10.17.
andreas@270
     6
//  Copyright © 2017 p≡p. All rights reserved.
andreas@270
     7
//
andreas@270
     8
andreas@270
     9
#import <Foundation/Foundation.h>
andreas@270
    10
dirk@303
    11
#import "PEPSessionProtocol.h"
dirk@367
    12
#import "PEPMessageUtil.h"
andreas@272
    13
andreas@272
    14
/**
andreas@272
    15
 Fake session to handle to the client.
andreas@272
    16
andreas@272
    17
 Assures all calls are handled on the correct internal session for the thread it is called on.
andreas@272
    18
 You can instatntiate and use this session how often and wherever you want. Also over multiple threads.
andreas@272
    19
andreas@272
    20
 Note: You must call `cleanup()` once before your process gets terminated to be able to gracefully shutdown.
andreas@290
    21
 It is the clients responsibility not to make any calls to PEPSession in between the last call
andreas@295
    22
 to `cleanup()` and getting terminated.
andreas@272
    23
 */
dirk@303
    24
@interface PEPSession : NSObject <PEPSessionProtocol>
andreas@270
    25
andreas@276
    26
/**
andreas@276
    27
 You must call this method once before your process gets terminated to be able to gracefully shutdown.
andreas@290
    28
 You must not make any calls to PEPSession in between the last call to `cleanup()` and getting terminated.
andreas@290
    29
andreas@290
    30
 Only for performance reasons: call this method only if you have to.
andreas@276
    31
 */
dirk@291
    32
+ (void)cleanup;
andreas@272
    33
andreas@270
    34
@end