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)setUserCredentials
:(NSString
*)username password
:(NSString
*)password complete
:(void (^)(bool success
, NSError
*error
))complete
;
41 - (void)setupSOSCircle
:(NSString
*)username password
:(NSString
*)password complete
:(void (^)(bool success
, NSError
*_Nullable error
))complete
;
42 - (void)sosCircleStatus
:(void(^)(SOSCCStatus status
, NSError
*_Nullable error
))complete
;
43 - (void)sosCircleStatusNonCached
:(void(^)(SOSCCStatus status
, NSError
*_Nullable error
))complete
;
44 - (void)sosViewStatus
:(NSString
*) view withCompletion
: (void(^)(SOSViewResultCode status
, NSError
* _Nullable error
))complete
;
45 - (void)sosICKStatus
: (void(^)(bool status
))complete
;
46 - (void)sosCachedViewBitmask
: (void(^)(uint64_t bitmask
))complete
;
47 - (void)sosPeerID
:(void(^)(NSString
* _Nullable peerID
))complete
;
48 - (void)sosPeerSerial
:(void(^)(NSString
* _Nullable peerSerial
))complete
;
49 - (void)sosCirclePeerIDs
:(void(^)(NSArray
<NSString
*> * _Nullable peerIDs
))complete
;
50 - (void)sosRequestToJoin
:(void(^)(bool success
, NSString
*peerID
, NSError
* _Nullable error
))complete
;
51 - (void)sosLeaveCircle
: (void(^)(bool success
, NSError
* _Nullable error
))complete
;
52 - (void)sosApprovePeer
:(NSString
*)peerID complete
:(void(^)(BOOL success
, NSError
* _Nullable error
))complete
;
53 - (void)sosGhostBust
:(SOSAccountGhostBustingOptions
)options complete
:(void(^)(bool busted
, NSError
*error
))complete
;
54 - (void)sosCircleHash
: (void(^)(NSString
*data
, NSError
* _Nullable error
))complete
;
58 - (void)sosWaitForInitialSync
:(void(^)(bool success
, NSError
* _Nullable error
))complete
;
59 - (void)sosEnableAllViews
:(void(^)(BOOL success
, NSError
* _Nullable error
))complete
;
62 - (void)deviceInfo
:(void (^)(NSString
*_Nullable mid
, NSString
*_Nullable serial
, NSError
* _Nullable error
))complete
;
65 - (void)pairingChannelSetup
:(bool)initiator pairingContext
:(KCPairingChannelContext
* _Nullable
)context complete
:(void (^)(id
<DevicePairingProtocol
> _Nullable
, NSError
* _Nullable error
))complete
;
68 - (void)diagnosticsLeaks
:(void(^)(bool success
, NSString
*_Nullable outout
, NSError
* _Nullable error
))complete
;
69 - (void)diagnosticsCPUUsage
:(void(^)(bool success
, uint64_t user_usec
, uint64_t sys_usec
, NSError
*_Nullable error
))complete
;
70 - (void)diagnosticsDiskUsage
:(void(^)(bool success
, uint64_t usage
, NSError
* _Nullable error
))complete
;
73 - (void)otReset
:(NSString
*)altDSID complete
:(void (^)(bool success
, NSError
*_Nullable error
))complete
;
75 - (void)otPeerID
:(NSString
*)altDSID complete
:(void (^)(NSString
*peerID
, NSError
*_Nullable error
))complete
;
76 - (void)otInCircle
:(NSString
*)altDSID complete
:(void (^)(bool inCircle
, NSError
*_Nullable error
))complete
;