view dstep/corefoundation/CFError.d @ 11:07194b026fa4

Added bindings to a couple of frameworks, new license + some other things
author Jacob Carlborg <doob@me.com>
date Sat, 01 Aug 2009 15:03:28 +0200
parents
children
line wrap: on
line source

/**
 * Copyright: Copyright (c) 2009 Jacob Carlborg.
 * Authors: Jacob Carlborg
 * Version: Initial created: Jul 12, 2009 
 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
 */
module dstep.corefoundation.CFError;

import dstep.corefoundation.CFBase;
import dstep.corefoundation.CFDictionary;
import dstep.corefoundation.CFString;
import dstep.objc.bridge.Bridge;
import dstep.objc.objc : id;

struct __CFError;
alias __CFError* CFErrorRef;

extern (C)
{
	extern
	{
		const CFStringRef kCFErrorDomainPOSIX;
		const CFStringRef kCFErrorDomainOSStatus;
		const CFStringRef kCFErrorDomainMach;
		const CFStringRef kCFErrorDomainCocoa;
		const CFStringRef kCFErrorLocalizedDescriptionKey;
		const CFStringRef kCFErrorLocalizedFailureReasonKey;
		const CFStringRef kCFErrorLocalizedRecoverySuggestionKey;
		const CFStringRef kCFErrorDescriptionKey;
		const CFStringRef kCFErrorUnderlyingErrorKey;
	}
}

extern (C)
{
	uint CFErrorGetTypeID ();
	CFErrorRef CFErrorCreate (CFAllocatorRef allocator, CFStringRef domain, int code, CFDictionaryRef userInfo);
	CFErrorRef CFErrorCreateWithUserInfoKeysAndValues (CFAllocatorRef allocator, CFStringRef domain, int code, void** userInfoKeys, void** userInfoValues, int numUserInfoValues);
	CFStringRef CFErrorGetDomain (CFErrorRef err);
	int CFErrorGetCode (CFErrorRef err);
	CFDictionaryRef CFErrorCopyUserInfo (CFErrorRef err);
	CFStringRef CFErrorCopyDescription (CFErrorRef err);
	CFStringRef CFErrorCopyFailureReason (CFErrorRef err);
	CFStringRef CFErrorCopyRecoverySuggestion (CFErrorRef err);
}