]> git.saurik.com Git - apple/security.git/blobdiff - SecurityTests/regressions/test/testsecevent.h
Security-57031.1.35.tar.gz
[apple/security.git] / SecurityTests / regressions / test / testsecevent.h
diff --git a/SecurityTests/regressions/test/testsecevent.h b/SecurityTests/regressions/test/testsecevent.h
new file mode 100644 (file)
index 0000000..140bc37
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * testsecevent.h
+ */
+
+#ifndef _TESTSECEVENT_H_
+#define _TESTSECEVENT_H_  1
+#include <Security/SecKeychain.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define is_sec_event(EVENT, KEYCHAIN, ITEM, PID, TESTNAME) \
+( \
+       test_is_sec_event((EVENT), (KEYCHAIN), (ITEM), (PID), (TESTNAME), \
+               test_directive, test_reason, __FILE__, __LINE__) \
+)
+
+#define no_sec_event(TESTNAME) \
+( \
+       test_is_sec_event(0, NULL, NULL, NULL, (TESTNAME), \
+               test_directive, test_reason, __FILE__, __LINE__) \
+)
+
+OSStatus test_sec_event_register(SecKeychainEventMask mask);
+
+OSStatus test_sec_event_deregister();
+
+int test_is_sec_event(SecKeychainEvent event, SecKeychainRef *keychain,
+       SecKeychainItemRef *item, pid_t *pid, const char *description,
+       const char *directive, const char *reason, const char *file,
+       unsigned line); 
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* !_TESTSECEVENT_H_ */