2 * Copyright (c) 2017 - 2018 Apple Inc. All Rights Reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
24 #import <Foundation/Foundation.h>
25 #import <Security/SecureObjectSync/SOSCloudCircle.h>
26 #import <Security/SecureObjectSync/SOSTypes.h>
28 NS_ASSUME_NONNULL_BEGIN
30 @
class KCPairingChannelContext
;
32 @protocol DevicePairingProtocol
<NSObject
>
33 - (void)exchangePacket
:(NSData
*_Nullable
)data complete
:(void (^)(bool complete
, NSData
*_Nullable result
, NSError
*_Nullable error
))complete
;
34 - (void)validateStart
:(void(^)(bool result
, NSError
* _Nullable error
))complete
;
37 @protocol SecRemoteDeviceProtocol
<NSObject
>
40 - (void)secItemAdd
:(NSDictionary
*)input complete
:(void (^)(OSStatus
, NSDictionary
* _Nullable
))reply
;
41 - (void)secItemCopyMatching
:(NSDictionary
*)input complete
:(void (^)(OSStatus
, NSArray
<NSDictionary
*>* _Nullable
))replyreply
;
44 - (void)setUserCredentials
:(NSString
*)username password
:(NSString
*)password complete
:(void (^)(bool success
, NSError
*error
))complete
;
45 - (void)setupSOSCircle
:(NSString
*)username password
:(NSString
*)password complete
:(void (^)(bool success
, NSError
*_Nullable error
))complete
;
46 - (void)sosCircleStatus
:(void(^)(SOSCCStatus status
, NSError
*_Nullable error
))complete
;
47 - (void)sosCircleStatusNonCached
:(void(^)(SOSCCStatus status
, NSError
*_Nullable error
))complete
;
48 - (void)sosViewStatus
:(NSString
*) view withCompletion
: (void(^)(SOSViewResultCode status
, NSError
* _Nullable error
))complete
;
49 - (void)sosICKStatus
: (void(^)(bool status
))complete
;
50 - (void)sosCachedViewBitmask
: (void(^)(uint64_t bitmask
))complete
;
51 - (void)sosPeerID
:(void(^)(NSString
* _Nullable peerID
))complete
;
52 - (void)sosPeerSerial
:(void(^)(NSString
* _Nullable peerSerial
))complete
;
53 - (void)sosCirclePeerIDs
:(void(^)(NSArray
<NSString
*> * _Nullable peerIDs
))complete
;
54 - (void)sosRequestToJoin
:(void(^)(bool success
, NSString
*peerID
, NSError
* _Nullable error
))complete
;
55 - (void)sosLeaveCircle
: (void(^)(bool success
, NSError
* _Nullable error
))complete
;
56 - (void)sosApprovePeer
:(NSString
*)peerID complete
:(void(^)(BOOL success
, NSError
* _Nullable error
))complete
;
57 - (void)sosGhostBust
:(SOSAccountGhostBustingOptions
)options complete
:(void(^)(bool busted
, NSError
*error
))complete
;
58 - (void)sosCircleHash
: (void(^)(NSString
*data
, NSError
* _Nullable error
))complete
;
62 - (void)sosWaitForInitialSync
:(void(^)(bool success
, NSError
* _Nullable error
))complete
;
63 - (void)sosEnableAllViews
:(void(^)(BOOL success
, NSError
* _Nullable error
))complete
;
66 - (void)deviceInfo
:(void (^)(NSString
*_Nullable mid
, NSString
*_Nullable serial
, NSError
* _Nullable error
))complete
;
69 - (void)pairingChannelSetup
:(bool)initiator pairingContext
:(KCPairingChannelContext
* _Nullable
)context complete
:(void (^)(id
<DevicePairingProtocol
> _Nullable
, NSError
* _Nullable error
))complete
;
72 - (void)diagnosticsLeaks
:(void(^)(bool success
, NSString
*_Nullable outout
, NSError
* _Nullable error
))complete
;
73 - (void)diagnosticsCPUUsage
:(void(^)(bool success
, uint64_t user_usec
, uint64_t sys_usec
, NSError
*_Nullable error
))complete
;
74 - (void)diagnosticsDiskUsage
:(void(^)(bool success
, uint64_t usage
, NSError
* _Nullable error
))complete
;
77 - (void)selfPeersForView
:(NSString
*)view complete
:(void (^)(NSArray
<NSDictionary
*> *result
, NSError
*error
))complete
;
80 - (void)otReset
:(NSString
*)altDSID complete
:(void (^)(bool success
, NSError
*_Nullable error
))complete
;
82 - (void)otPeerID
:(NSString
*)altDSID complete
:(void (^)(NSString
*peerID
, NSError
*_Nullable error
))complete
;
83 - (void)otInCircle
:(NSString
*)altDSID complete
:(void (^)(bool inCircle
, NSError
*_Nullable error
))complete
;