X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/c38e3ce98599a410a47dc10253faa4d5830f13b2..427c49bcad63d042b29ada2ac27e3dfc4845c779:/authd/object.h?ds=inline diff --git a/authd/object.h b/authd/object.h new file mode 100644 index 00000000..7731f788 --- /dev/null +++ b/authd/object.h @@ -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 +#include + +#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_ */