#ifndef _SECCFERROR_H_
#define _SECCFERROR_H_
#include <CoreFoundation/CoreFoundation.h>
#define kSecKernDomain kCFErrorDomainMach
bool SecKernError(kern_return_t result, CFErrorRef *error, CFStringRef format, ...);
#define kSecErrnoDomain kCFErrorDomainPOSIX
bool SecCheckErrno(int result, CFErrorRef *error, CFStringRef format, ...);
#define kSecErrorDomain kCFErrorDomainOSStatus
bool SecError(OSStatus status, CFErrorRef *error, CFStringRef format, ...);
void SecCFCreateError(CFIndex errorCode, CFStringRef domain, CFStringRef descriptionString,
CFErrorRef previousError, CFErrorRef *newError);
void SecCFCreateErrorWithFormat(CFIndex errorCode, CFStringRef domain, CFErrorRef previousError, CFErrorRef *newError,
CFDictionaryRef formatoptions, CFStringRef descriptionString, ...)
CF_FORMAT_FUNCTION(6,7);
void SecCFCreateErrorWithFormatAndArguments(CFIndex errorCode, CFStringRef domain,
CFErrorRef previousError, CFErrorRef *newError,
CFDictionaryRef formatoptions, CFStringRef descriptionString, va_list args)
CF_FORMAT_FUNCTION(6, 0);
#endif