]> git.saurik.com Git - apple/security.git/blob - libsecurity_transform/lib/misc.h
Security-55471.tar.gz
[apple/security.git] / libsecurity_transform / lib / misc.h
1 /*
2 * misc.h
3 * libsecurity_transform
4 *
5 * Created by JOsborne on 3/19/10.
6 * Copyright 2010 Apple. All rights reserved.
7 *
8 */
9
10 #ifndef __INCLUDED_TRANSFORMS_MISC_H__
11 #define __INCLUDED_TRANSFORMS_MISC_H__
12
13 #include <stdio.h>
14 #include "SecTransform.h"
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20
21 CFErrorRef fancy_error(CFStringRef domain, CFIndex code, CFStringRef description);
22 extern void graphviz(FILE *f, SecTransformRef tr);
23 extern void CFfprintf(FILE *f, const char *format, ...);
24 CFErrorRef GetNoMemoryError();
25 CFErrorRef GetNoMemoryErrorAndRetain();
26 void CFSafeRelease(CFTypeRef object);
27
28 // NOTE: the return may or allocate a fair bit more space then it needs.
29 // Use it for short lived conversions (or strdup the result).
30 extern char *utf8(CFStringRef s);
31
32 #ifdef __cplusplus
33 }
34 #endif
35
36 #endif