]> git.saurik.com Git - apple/security.git/blobdiff - Security/authd/authutilities.h
Security-57031.1.35.tar.gz
[apple/security.git] / Security / authd / authutilities.h
diff --git a/Security/authd/authutilities.h b/Security/authd/authutilities.h
new file mode 100644 (file)
index 0000000..ebe1e5a
--- /dev/null
@@ -0,0 +1,34 @@
+/* Copyright (c) 2012-2013 Apple Inc. All Rights Reserved. */
+
+#ifndef _SECURITY_AUTH_UTILITIES_H_
+#define _SECURITY_AUTH_UTILITIES_H_
+
+#include <xpc/xpc.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <Security/Authorization.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+AuthorizationItemSet * DeserializeItemSet(const xpc_object_t);
+xpc_object_t SerializeItemSet(const AuthorizationItemSet*);
+void FreeItemSet(AuthorizationItemSet*);
+
+char * _copy_cf_string(CFTypeRef,const char*);
+int64_t _get_cf_int(CFTypeRef,int64_t);
+bool _get_cf_bool(CFTypeRef,bool);
+
+bool _compare_string(const char *, const char *);
+char * _copy_string(const char *);
+void * _copy_data(const void * data, size_t dataLen);
+
+bool _cf_set_iterate(CFSetRef, bool(^iterator)(CFTypeRef value));
+bool _cf_bag_iterate(CFBagRef, bool(^iterator)(CFTypeRef value));
+bool _cf_dictionary_iterate(CFDictionaryRef, bool(^iterator)(CFTypeRef key,CFTypeRef value));
+    
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* !_SECURITY_AUTH_UTILITIES_H_ */