]> git.saurik.com Git - apple/security.git/blobdiff - Security/sec/SOSCircle/SecureObjectSync/SOSTransportKeyParameter.h
Security-57031.1.35.tar.gz
[apple/security.git] / Security / sec / SOSCircle / SecureObjectSync / SOSTransportKeyParameter.h
diff --git a/Security/sec/SOSCircle/SecureObjectSync/SOSTransportKeyParameter.h b/Security/sec/SOSCircle/SecureObjectSync/SOSTransportKeyParameter.h
new file mode 100644 (file)
index 0000000..64d8ed4
--- /dev/null
@@ -0,0 +1,34 @@
+
+#ifndef SOSTransportKeyParameter_h
+#define SOSTransportKeyParameter_h
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <CoreFoundation/CFRuntime.h>
+#include <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);
+};
+
+bool SOSTrasnportKeyParameterPublishCloudParameters(SOSTransportKeyParameterRef transport, CFDataRef data, CFErrorRef* error);
+
+bool SOSTrasnportKeyParameterPublishCloudParameters(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 SOSTransportKeyParameterGetAccount(SOSTransportKeyParameterRef transport);
+
+#endif