]> git.saurik.com Git - apple/security.git/blob - keychain/Trieste/OctagonTestHarnessXPCService/SecRemoteDeviceProtocol.h
Security-59306.11.20.tar.gz
[apple/security.git] / keychain / Trieste / OctagonTestHarnessXPCService / SecRemoteDeviceProtocol.h
1 /*
2 * Copyright (c) 2017 - 2018 Apple Inc. All Rights Reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
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
11 * file.
12 *
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.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24 #import <Foundation/Foundation.h>
25 #import <Security/SecureObjectSync/SOSCloudCircle.h>
26 #import <Security/SecureObjectSync/SOSTypes.h>
27
28 NS_ASSUME_NONNULL_BEGIN
29
30 @class KCPairingChannelContext;
31
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;
35 @end
36
37 @protocol SecRemoteDeviceProtocol <NSObject>
38
39 // Local Keychain
40 - (void)secItemAdd:(NSDictionary *)input complete:(void (^)(OSStatus, NSDictionary * _Nullable))reply;
41 - (void)secItemCopyMatching:(NSDictionary *)input complete:(void (^)(OSStatus, NSArray<NSDictionary *>* _Nullable))replyreply;
42
43 // SOS trust
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;
59
60
61 // SOS syncing
62 - (void)sosWaitForInitialSync:(void(^)(bool success, NSError * _Nullable error))complete;
63 - (void)sosEnableAllViews:(void(^)(BOOL success, NSError * _Nullable error))complete;
64
65 // IdMS interface
66 - (void)deviceInfo:(void (^)(NSString *_Nullable mid, NSString *_Nullable serial, NSError * _Nullable error))complete;
67
68 // Pairing
69 - (void)pairingChannelSetup:(bool)initiator pairingContext:(KCPairingChannelContext * _Nullable)context complete:(void (^)(id<DevicePairingProtocol> _Nullable, NSError * _Nullable error))complete;
70
71 // Diagnostics
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;
75
76 // CKKS
77 - (void)selfPeersForView:(NSString *)view complete:(void (^)(NSArray<NSDictionary *> *result, NSError *error))complete;
78
79 // Octagon
80 - (void)otReset:(NSString *)altDSID complete:(void (^)(bool success, NSError *_Nullable error))complete;
81
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;
84
85 @end
86
87 NS_ASSUME_NONNULL_END