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) 11extern "C" { 12#endif 13 14AuthorizationItemSet * DeserializeItemSet(const xpc_object_t); 15xpc_object_t SerializeItemSet(const AuthorizationItemSet*); 16void FreeItemSet(AuthorizationItemSet*); 17 18char * _copy_cf_string(CFTypeRef,const char*); 19int64_t _get_cf_int(CFTypeRef,int64_t); 20bool _get_cf_bool(CFTypeRef,bool); 21 22bool _compare_string(const char *, const char *); 23char * _copy_string(const char *); 24void * _copy_data(const void * data, size_t dataLen); 25 26bool _cf_set_iterate(CFSetRef, bool(^iterator)(CFTypeRef value)); 27bool _cf_bag_iterate(CFBagRef, bool(^iterator)(CFTypeRef value)); 28bool _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_ */ 35