pEpObjCAdapter/PEPSession.h
author Dirk Zimmermann <dirk@pep-project.org>
Thu, 17 May 2018 09:33:33 +0200
changeset 616 9e50cc7cd612
parent 573 bc2c03efe133
permissions -rw-r--r--
IOSAD-93 consistently using precomposedStringWithCanonicalMapping, stringWithUTF8String
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
dirk@573
    14
#import "NSNumber+PEPRating.h"
dirk@573
    15
andreas@272
    16
/**
andreas@272
    17
 Fake session to handle to the client.
andreas@272
    18
andreas@272
    19
 Assures all calls are handled on the correct internal session for the thread it is called on.
andreas@391
    20
 You can instantiate and use this session how often and wherever you want. Also over multiple threads.
andreas@272
    21
andreas@272
    22
 Note: You must call `cleanup()` once before your process gets terminated to be able to gracefully shutdown.
andreas@290
    23
 It is the clients responsibility not to make any calls to PEPSession in between the last call
andreas@295
    24
 to `cleanup()` and getting terminated.
andreas@272
    25
 */
dirk@303
    26
@interface PEPSession : NSObject <PEPSessionProtocol>
andreas@270
    27
andreas@276
    28
/**
andreas@276
    29
 You must call this method once before your process gets terminated to be able to gracefully shutdown.
andreas@290
    30
 You must not make any calls to PEPSession in between the last call to `cleanup()` and getting terminated.
andreas@290
    31
andreas@290
    32
 Only for performance reasons: call this method only if you have to.
andreas@276
    33
 */
dirk@291
    34
+ (void)cleanup;
andreas@272
    35
andreas@270
    36
@end