2 // CKKSMockOctagonAdapter.h
5 // Created by Love Hörnquist Åstrand on 6/19/19.
8 #import <Foundation/Foundation.h>
10 #import "keychain/ckks/CKKSPeer.h"
11 #import "keychain/ckks/CKKSListenerCollection.h"
12 #import "keychain/ot/OctagonCKKSPeerAdapter.h"
14 NS_ASSUME_NONNULL_BEGIN
16 @interface CKKSMockOctagonPeer
: NSObject
<CKKSPeer
, CKKSRemotePeerProtocol
>
18 @property NSString
* peerID
;
19 @
property (nullable
) SFECPublicKey
* publicEncryptionKey
;
20 @
property (nullable
) SFECPublicKey
* publicSigningKey
;
21 @
property (nullable
) NSSet
<NSString
*>* viewList
;
23 - (instancetype
)initWithOctagonPeerID
:(NSString
*)syncingPeerID
24 publicEncryptionKey
:(SFECPublicKey
* _Nullable
)publicEncryptionKey
25 publicSigningKey
:(SFECPublicKey
* _Nullable
)publicSigningKey
26 viewList
:(NSSet
<NSString
*>* _Nullable
)viewList
;
29 @interface CKKSMockOctagonAdapter
: NSObject
<CKKSPeerProvider
>
30 @property CKKSListenerCollection
* peerChangeListeners
;
31 @property OctagonSelfPeer
* selfOTPeer
;
32 @
property (nullable
) NSSet
<NSString
*>* selfViewList
;
34 @property NSMutableSet
<id
<CKKSRemotePeerProtocol
>>* trustedPeers
;
35 @
property (readonly
) NSString
* providerID
;
37 - (instancetype
)initWithSelfPeer
:(OctagonSelfPeer
*)selfPeer
38 trustedPeers
:(NSSet
<id
<CKKSRemotePeerProtocol
>>*)trustedPeers
39 essential
:(BOOL
)essential
;