]> git.saurik.com Git - apple/security.git/blob - authd/authutilities.h
Security-55471.tar.gz
[apple/security.git] / authd / authutilities.h
1 /* Copyright (c) 2012 Apple Inc. All rights reserved. */
2
3 #ifndef _SECURITY_AUTH_UTILITIES_H_
4 #define _SECURITY_AUTH_UTILITIES_H_
5
6 #include <xpc/xpc.h>
7 #include <CoreFoundation/CoreFoundation.h>
8 #include <Security/Authorization.h>
9
10 #if defined(__cplusplus)
11 extern "C" {
12 #endif
13
14 AuthorizationItemSet * DeserializeItemSet(const xpc_object_t);
15 xpc_object_t SerializeItemSet(const AuthorizationItemSet*);
16 void FreeItemSet(AuthorizationItemSet*);
17
18 char * _copy_cf_string(CFTypeRef,const char*);
19 int64_t _get_cf_int(CFTypeRef,int64_t);
20 bool _get_cf_bool(CFTypeRef,bool);
21
22 bool _compare_string(const char *, const char *);
23 char * _copy_string(const char *);
24 void * _copy_data(const void * data, size_t dataLen);
25
26 bool _cf_set_iterate(CFSetRef, bool(^iterator)(CFTypeRef value));
27 bool _cf_bag_iterate(CFBagRef, bool(^iterator)(CFTypeRef value));
28 bool _cf_dictionary_iterate(CFDictionaryRef, bool(^iterator)(CFTypeRef key,CFTypeRef value));
29
30 #if defined(__cplusplus)
31 }
32 #endif
33
34 #endif /* !_SECURITY_AUTH_UTILITIES_H_ */