pEpObjCAdapterFramework/PEPNotifyHandshakeDelegate.h
author Dirk Zimmermann <dz@pep.security>
Fri, 06 Sep 2019 11:03:27 +0200
branchIOS-1784
changeset 1225 6d89f5f624db
parent 1123 412481bbb6b2
child 1354 1b855c066fd1
permissions -rw-r--r--
IOS-1784 Separate concerns.
dirk@694
     1
//
dirk@694
     2
//  PEPNotifyHandshakeDelegate.h
dirk@694
     3
//  pEpObjCAdapter
dirk@694
     4
//
dirk@694
     5
//  Created by Dirk Zimmermann on 05.10.18.
dirk@694
     6
//  Copyright © 2018 p≡p. All rights reserved.
dirk@694
     7
//
dirk@694
     8
dirk@694
     9
#import <Foundation/Foundation.h>
dirk@694
    10
dz@949
    11
#import "PEPEngineTypes.h"
dirk@694
    12
dirk@694
    13
@class PEPIdentity;
dirk@694
    14
dz@1121
    15
/**
dz@1121
    16
 Handles notifications from the engine to the app that involve UI.
dz@1121
    17
 */
dirk@694
    18
@protocol PEPNotifyHandshakeDelegate <NSObject>
dirk@694
    19
dz@1121
    20
/**
dz@1121
    21
 Requests the app to show a handshake dialog, or change the icon that represents
dz@1121
    22
 the key-sync state (as in, grouped, or sole, etc.).
dz@1121
    23
dz@1121
    24
 After the dialog has been shown, the user's choices can be communicated back to the engine
dz@1123
    25
 via [PEPSessionProtocol deliverHandshakeResult:identitiesSharing:error].
dz@1121
    26
dz@1121
    27
 @param object This can be used to thread information from the app through the sync-loop back to
dz@1121
    28
               the app. Currently unused and always nil.
dz@1121
    29
 @param me The own identity.
dz@1121
    30
           Note that in some cases, only the most essential properties are set.
dz@1121
    31
 @param partner The partner identity.
dz@1121
    32
                Note that in some cases, only the most essential properties are set.
dz@1121
    33
 @param signal The kind of action that is happening or requested.
dz@1121
    34
 @return A status indicating errors in the immediate/synchronous handling of the call.
dz@1121
    35
         The (delayed) response from the user are communicated to the engine
dz@1123
    36
         via separate method calls, as noted in the discussion.
dz@1121
    37
 */
dz@950
    38
- (PEPStatus)notifyHandshake:(void * _Nullable)object
dz@950
    39
                          me:(PEPIdentity * _Nonnull)me
dz@950
    40
                     partner:(PEPIdentity * _Nonnull)partner
dz@950
    41
                      signal:(PEPSyncHandshakeSignal)signal;
dirk@694
    42
dirk@694
    43
@end