]> git.saurik.com Git - apple/security.git/blobdiff - utilities/src/SecXPCError.h
Security-55471.tar.gz
[apple/security.git] / utilities / src / SecXPCError.h
diff --git a/utilities/src/SecXPCError.h b/utilities/src/SecXPCError.h
new file mode 100644 (file)
index 0000000..0a5896b
--- /dev/null
@@ -0,0 +1,33 @@
+//
+//  SecXPCError.h
+//  utilities
+//
+//  Created by John Hurley on 5/6/13.
+//  Copyright (c) 2013 Apple Inc. All rights reserved.
+//
+
+#ifndef _UTILITIES_SECXPCERROR_H_
+#define _UTILITIES_SECXPCERROR_H_
+
+#include <CoreFoundation/CFString.h>
+#include <CoreFoundation/CFError.h>
+#include <xpc/xpc.h>
+
+__BEGIN_DECLS
+
+extern CFStringRef sSecXPCErrorDomain;
+
+enum {
+    kSecXPCErrorSuccess = 0,
+    kSecXPCErrorUnexpectedType = 1,
+    kSecXPCErrorUnexpectedNull = 2,
+    kSecXPCErrorConnectionFailed = 3,
+    kSecXPCErrorUnknown = 4,
+};
+
+CFErrorRef SecCreateCFErrorWithXPCObject(xpc_object_t xpc_error);
+xpc_object_t SecCreateXPCObjectWithCFError(CFErrorRef error);
+
+__END_DECLS
+
+#endif /* UTILITIES_SECXPCERROR_H */