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