X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/72a12576750f52947eb043106ba5c12c0d07decf..b1ab9ed8d0e0f1c3b66d7daa8fd5564444c56195:/libsecurity_transform/lib/misc.h diff --git a/libsecurity_transform/lib/misc.h b/libsecurity_transform/lib/misc.h new file mode 100644 index 00000000..5bee0f84 --- /dev/null +++ b/libsecurity_transform/lib/misc.h @@ -0,0 +1,36 @@ +/* + * misc.h + * libsecurity_transform + * + * Created by JOsborne on 3/19/10. + * Copyright 2010 Apple. All rights reserved. + * + */ + +#ifndef __INCLUDED_TRANSFORMS_MISC_H__ +#define __INCLUDED_TRANSFORMS_MISC_H__ + +#include +#include "SecTransform.h" + +#ifdef __cplusplus +extern "C" { +#endif + + + CFErrorRef fancy_error(CFStringRef domain, CFIndex code, CFStringRef description); + extern void graphviz(FILE *f, SecTransformRef tr); + extern void CFfprintf(FILE *f, const char *format, ...); + CFErrorRef GetNoMemoryError(); + CFErrorRef GetNoMemoryErrorAndRetain(); + void CFSafeRelease(CFTypeRef object); + + // NOTE: the return may or allocate a fair bit more space then it needs. + // Use it for short lived conversions (or strdup the result). + extern char *utf8(CFStringRef s); + +#ifdef __cplusplus +} +#endif + +#endif