]> git.saurik.com Git - apple/security.git/blobdiff - Security/authd/object.h
Security-57031.1.35.tar.gz
[apple/security.git] / Security / authd / object.h
diff --git a/Security/authd/object.h b/Security/authd/object.h
new file mode 100644 (file)
index 0000000..c4525fb
--- /dev/null
@@ -0,0 +1,36 @@
+/* Copyright (c) 2012 Apple Inc. All Rights Reserved. */
+
+#ifndef _SECURITY_AUTH_OBJECT_H_
+#define _SECURITY_AUTH_OBJECT_H_
+
+#include "authd_private.h"
+#include <CoreFoundation/CoreFoundation.h>
+#include <CoreFoundation/CFRuntime.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+    
+#define __AUTH_BASE_STRUCT_HEADER__ \
+    CFRuntimeBase _base;
+    
+struct _auth_base_s {
+    __AUTH_BASE_STRUCT_HEADER__;
+};
+
+#define AUTH_TYPE(type) const CFRuntimeClass type
+    
+#define AUTH_TYPE_INSTANCE(name, ...) \
+    AUTH_TYPE(_auth_type_##name) = { \
+        .version = 0, \
+        .className = #name "_t", \
+        __VA_ARGS__ \
+    }
+
+#define AUTH_CLASS_SIZE(name) (sizeof(struct _##name##_s) - sizeof(CFRuntimeBase))
+    
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* !_SECURITY_AUTH_OBJECT_H_ */