]> git.saurik.com Git - apple/security.git/blobdiff - OSX/sec/SOSCircle/SecureObjectSync/SOSCirclePriv.h
Security-59306.11.20.tar.gz
[apple/security.git] / OSX / sec / SOSCircle / SecureObjectSync / SOSCirclePriv.h
diff --git a/OSX/sec/SOSCircle/SecureObjectSync/SOSCirclePriv.h b/OSX/sec/SOSCircle/SecureObjectSync/SOSCirclePriv.h
deleted file mode 100644 (file)
index b673a2c..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-//  SOSCirclePriv.h
-//  sec
-//
-//  Created by Richard Murphy on 12/4/14.
-//
-//
-
-#ifndef sec_SOSCirclePriv_h
-#define sec_SOSCirclePriv_h
-
-#include <CoreFoundation/CFRuntime.h>
-#include <CoreFoundation/CoreFoundation.h>
-#include <Security/SecureObjectSync/SOSGenCount.h>
-
-enum {
-    kOnlyCompatibleVersion = 1, // Sometime in the future this name will be improved to reflect history.
-    kAlwaysIncompatibleVersion = UINT64_MAX,
-};
-
-struct __OpaqueSOSCircle {
-    CFRuntimeBase _base;
-    CFStringRef name;
-    SOSGenCountRef generation;
-    CFMutableSetRef peers;
-    CFMutableSetRef applicants;
-    CFMutableSetRef rejected_applicants;
-    CFMutableDictionaryRef signatures;
-};
-
-
-static inline void SOSCircleAssertStable(SOSCircleRef circle) {
-    assert(circle);
-    assert(circle->name);
-    assert(circle->generation);
-    assert(circle->peers);
-    assert(circle->applicants);
-    assert(circle->rejected_applicants);
-    assert(circle->signatures);
-}
-
-
-static inline SOSCircleRef SOSCircleConvertAndAssertStable(CFTypeRef circleAsType) {
-    if (CFGetTypeID(circleAsType) != SOSCircleGetTypeID()) return NULL;
-    SOSCircleRef circle = (SOSCircleRef) circleAsType;
-    SOSCircleAssertStable(circle);
-    return circle;
-}
-
-
-static inline bool SOSCircleIsOffering(SOSCircleRef circle) {
-    return SOSCircleCountRetiredPeers(circle) == 0 &&  SOSCircleCountPeers(circle) == 1;
-}
-
-#endif