]> git.saurik.com Git - apple/security.git/blobdiff - keychain/ckks/CKKSControl.h
Security-58286.260.20.tar.gz
[apple/security.git] / keychain / ckks / CKKSControl.h
index 32aedf6398018dd15d4c4df85ca407f7cb371a80..98849613d0f36feca85697ee18221f9f5c8a1cdf 100644 (file)
 
 NS_ASSUME_NONNULL_BEGIN
 
+
+typedef NS_ENUM(NSUInteger, CKKSKnownBadState) {
+    CKKSKnownStatePossiblyGood = 0,  // State might be good: give your operation a shot!
+    CKKSKnownStateTLKsMissing = 1,   // CKKS doesn't have the TLKs: your operation will likely not succeed
+    CKKSKnownStateWaitForUnlock = 2, // CKKS has some important things to do, but the device is locked. Your operation will likely not succeed
+};
+
 @interface CKKSControl : NSObject
 
 - (instancetype)init NS_UNAVAILABLE;
@@ -35,20 +42,22 @@ NS_ASSUME_NONNULL_BEGIN
 
 - (void)rpcStatus:(NSString* _Nullable)viewName
             reply:(void (^)(NSArray<NSDictionary*>* _Nullable result, NSError* _Nullable error))reply;
+- (void)rpcFastStatus:(NSString* _Nullable)viewName
+                reply:(void (^)(NSArray<NSDictionary*>* _Nullable result, NSError* _Nullable error))reply;
 - (void)rpcResetLocal:(NSString* _Nullable)viewName reply:(void (^)(NSError* _Nullable error))reply;
-- (void)rpcResetCloudKit:(NSString* _Nullable)viewName reply:(void (^)(NSError* _Nullable error))reply;
+- (void)rpcResetCloudKit:(NSString* _Nullable)viewName reply:(void (^)(NSError* _Nullable error))reply __deprecated_msg("use rpcResetCloudKit:reason:reply:");
+- (void)rpcResetCloudKit:(NSString* _Nullable)viewName reason:(NSString *)reason reply:(void (^)(NSError* _Nullable error))reply;
 - (void)rpcResync:(NSString* _Nullable)viewName reply:(void (^)(NSError* _Nullable error))reply;
 - (void)rpcFetchAndProcessChanges:(NSString* _Nullable)viewName reply:(void (^)(NSError* _Nullable error))reply;
 - (void)rpcFetchAndProcessClassAChanges:(NSString* _Nullable)viewName reply:(void (^)(NSError* _Nullable error))reply;
 - (void)rpcPushOutgoingChanges:(NSString* _Nullable)viewName reply:(void (^)(NSError* _Nullable error))reply;
 
-- (void)rpcPerformanceCounters:             (void(^)(NSDictionary <NSString *,NSNumber *> *,NSError*))reply;
-- (void)rpcGetAnalyticsSysdiagnoseWithReply:(void (^)(NSString* sysdiagnose, NSError* error))reply;
-- (void)rpcGetAnalyticsJSONWithReply:       (void (^)(NSData* json, NSError* error))reply;
-- (void)rpcForceUploadAnalyticsWithReply:   (void (^)(BOOL success, NSError* error))reply;
+- (void)rpcPerformanceCounters:(void(^)(NSDictionary <NSString *,NSNumber *> *,NSError*))reply;
+- (void)rpcGetCKDeviceIDWithReply:(void (^)(NSString* ckdeviceID))reply;
 
 // convenience wrapper for rpcStatus:reply:
 - (void)rpcTLKMissing:(NSString* _Nullable)viewName reply:(void (^)(bool missing))reply;
+- (void)rpcKnownBadState:(NSString* _Nullable)viewName reply:(void (^)(CKKSKnownBadState))reply;
 
 + (CKKSControl* _Nullable)controlObject:(NSError* _Nullable __autoreleasing* _Nullable)error;