]> git.saurik.com Git - apple/security.git/blob - OSX/authd/object.h
Security-57336.1.9.tar.gz
[apple/security.git] / OSX / authd / object.h
1 /* Copyright (c) 2012 Apple Inc. All Rights Reserved. */
2
3 #ifndef _SECURITY_AUTH_OBJECT_H_
4 #define _SECURITY_AUTH_OBJECT_H_
5
6 #include "authd_private.h"
7 #include <CoreFoundation/CoreFoundation.h>
8 #include <CoreFoundation/CFRuntime.h>
9
10 #if defined(__cplusplus)
11 extern "C" {
12 #endif
13
14 #define __AUTH_BASE_STRUCT_HEADER__ \
15 CFRuntimeBase _base;
16
17 struct _auth_base_s {
18 __AUTH_BASE_STRUCT_HEADER__;
19 };
20
21 #define AUTH_TYPE(type) const CFRuntimeClass type
22
23 #define AUTH_TYPE_INSTANCE(name, ...) \
24 AUTH_TYPE(_auth_type_##name) = { \
25 .version = 0, \
26 .className = #name "_t", \
27 __VA_ARGS__ \
28 }
29
30 #define AUTH_CLASS_SIZE(name) (sizeof(struct _##name##_s) - sizeof(CFRuntimeBase))
31
32 #if defined(__cplusplus)
33 }
34 #endif
35
36 #endif /* !_SECURITY_AUTH_OBJECT_H_ */