view dstep/corefoundation/CFURLAccess.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.CFURLAccess;

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

alias int CFURLError;

extern (C)
{
	extern
	{
		const CFStringRef kCFURLFileExists;
		const CFStringRef kCFURLFileDirectoryContents;
		const CFStringRef kCFURLFileLength;
		const CFStringRef kCFURLFileLastModificationTime;
		const CFStringRef kCFURLFilePOSIXMode;
		const CFStringRef kCFURLFileOwnerID;
		const CFStringRef kCFURLHTTPStatusCode;
		const CFStringRef kCFURLHTTPStatusLine;
	}
}

enum
{
	kCFURLUnknownError = -10,
	kCFURLUnknownSchemeError = -11,
	kCFURLResourceNotFoundError = -12,
	kCFURLResourceAccessViolationError = -13,
	kCFURLRemoteHostUnavailableError = -14,
	kCFURLImproperArgumentsError = -15,
	kCFURLUnknownPropertyKeyError = -16,
	kCFURLPropertyKeyUnavailableError = -17,
	kCFURLTimeoutError = -18
}

extern (C)
{
	ubyte CFURLCreateDataAndPropertiesFromResource (CFAllocatorRef alloc, CFURLRef url, CFDataRef* resourceData, CFDictionaryRef* properties, CFArrayRef desiredProperties, int* errorCode);
	ubyte CFURLWriteDataAndPropertiesToResource (CFURLRef url, CFDataRef dataToWrite, CFDictionaryRef propertiesToWrite, int* errorCode);
	ubyte CFURLDestroyResource (CFURLRef url, int* errorCode);
	void* CFURLCreatePropertyFromResource (CFAllocatorRef alloc, CFURLRef url, CFStringRef property, int* errorCode);
}