]> git.saurik.com Git - apple/security.git/blobdiff - OSX/sec/SOSCircle/SecureObjectSync/SOSTransportKeyParameter.h
Security-58286.1.32.tar.gz
[apple/security.git] / OSX / sec / SOSCircle / SecureObjectSync / SOSTransportKeyParameter.h
index 0f1c4af858cc1c8cd99bb61f66e60a6cd97c4e9e..6df1521e167851bb1e98e6343864df81b7e0dada 100644 (file)
@@ -2,36 +2,28 @@
 #ifndef SOSTransportKeyParameter_h
 #define SOSTransportKeyParameter_h
 
-#include <CoreFoundation/CoreFoundation.h>
-#include <CoreFoundation/CFRuntime.h>
-#include <Security/SecureObjectSync/SOSAccount.h>
-
-typedef struct __OpaqueSOSTransportKeyParameter * SOSTransportKeyParameterRef;
-
-struct __OpaqueSOSTransportKeyParameter {
-    CFRuntimeBase   _base;
-    SOSAccountRef   account;
-    /* Connections from CF land to vtable land */
-    CFStringRef             (*copyDescription)(SOSTransportKeyParameterRef object);
-    void                    (*destroy)(SOSTransportKeyParameterRef object);
-    
-    
-    // TODO: Make this take broader parameters and assemble the key parameters blob?
-    bool                    (*publishCloudParameters)(SOSTransportKeyParameterRef transport, CFDataRef data, CFErrorRef* error);
-    bool                    (*handleKeyParameterChanges)(SOSTransportKeyParameterRef transport, CFDataRef data, CFErrorRef error);
-    bool                    (*setToNewAccount)(SOSTransportKeyParameterRef transport, SOSAccountRef account);
-    CFIndex                 (*getTransportType)(SOSTransportKeyParameterRef transport, CFErrorRef *error);
-};
-
-bool SOSTransportKeyParameterPublishCloudParameters(SOSTransportKeyParameterRef transport, CFDataRef data, CFErrorRef* error);
-
-SOSTransportKeyParameterRef SOSTransportKeyParameterCreateForSubclass(size_t size, SOSAccountRef account, CFErrorRef *error);
-bool SOSTransportKeyParameterHandleKeyParameterChanges(SOSTransportKeyParameterRef transport, CFDataRef data, CFErrorRef error);
-bool SOSTransportKeyParameterHandleNewAccount(SOSTransportKeyParameterRef transport, SOSAccountRef account);
-CFTypeID SOSTransportKeyParameterGetTypeID(void);
-
-SOSAccountRef SOSTransportKeyParameterGetAccount(SOSTransportKeyParameterRef transport);
-CFIndex SOSTransportKeyParameterGetTransportType(SOSTransportKeyParameterRef transport, CFErrorRef *error);
-bool SOSTransportKeyParameterPublishLastKeyParameters(SOSTransportKeyParameterRef transport, CFDataRef Parameters, CFErrorRef *error);
+#import <Security/SecureObjectSync/SOSAccountPriv.h>
+
+@interface CKKeyParameter : NSObject
+{
+    SOSAccount* account;
+}
+
+@property (atomic) SOSAccount* account;
+
+-(id) initWithAccount:(SOSAccount*) account;
+
+-(bool) SOSTransportKeyParameterPublishCloudParameters:(CKKeyParameter*) transport data:(CFDataRef)newParameters err:(CFErrorRef*) error;
+
+-(bool) SOSTransportKeyParameterHandleKeyParameterChanges:(CKKeyParameter*) transport  data:(CFDataRef) data err:(CFErrorRef) error;
+-(void) SOSTransportKeyParameterHandleNewAccount:(CKKeyParameter*) transport acct:(SOSAccount*) account;
+
+-(SOSAccount*) SOSTransportKeyParameterGetAccount:(CKKeyParameter*) transport;
+-(CFIndex) SOSTransportKeyParameterGetTransportType:(CKKeyParameter*) transport err:(CFErrorRef *)error;
+
+-(bool) SOSTransportKeyParameterKVSAppendKeyInterests:(CKKeyParameter*)transport ak:(CFMutableArrayRef)alwaysKeys firstUnLock:(CFMutableArrayRef)afterFirstUnlockKeys unlocked:(CFMutableArrayRef) unlockedKeys err:(CFErrorRef *)error;
+
+@end
+
 
 #endif