comparison dstep/corefoundation/CFURL.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
comparison
equal deleted inserted replaced
10:27e00625790b 11:07194b026fa4
1 /**
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
3 * Authors: Jacob Carlborg
4 * Version: Initial created: Jul 12, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */
7 module dstep.corefoundation.CFURL;
8
9 import dstep.corefoundation.CFBase;
10 import dstep.corefoundation.CFData;
11 import dstep.corefoundation.CFString;
12 import dstep.coreservices.carboncore.Files : FSRef;
13 import dstep.objc.bridge.Bridge;
14 import dstep.objc.objc : id;
15
16 alias int CFURLPathStyle;
17 struct __CFURL;
18 alias __CFURL* CFURLRef;
19 alias int CFURLComponentType;
20
21 enum
22 {
23 kCFURLPOSIXPathStyle = 0,
24 kCFURLHFSPathStyle,
25 kCFURLWindowsPathStyle
26 }
27
28 enum
29 {
30 kCFURLComponentScheme = 1,
31 kCFURLComponentNetLocation = 2,
32 kCFURLComponentPath = 3,
33 kCFURLComponentResourceSpecifier = 4,
34 kCFURLComponentUser = 5,
35 kCFURLComponentPassword = 6,
36 kCFURLComponentUserInfo = 7,
37 kCFURLComponentHost = 8,
38 kCFURLComponentPort = 9,
39 kCFURLComponentParameterString = 10,
40 kCFURLComponentQuery = 11,
41 kCFURLComponentFragment = 12
42 }
43
44 extern (C)
45 {
46 uint CFURLGetTypeID ();
47 CFURLRef CFURLCreateWithBytes (CFAllocatorRef allocator, char* URLBytes, int length, uint encoding, CFURLRef baseURL);
48 CFDataRef CFURLCreateData (CFAllocatorRef allocator, CFURLRef url, uint encoding, ubyte escapeWhitespace);
49 CFURLRef CFURLCreateWithString (CFAllocatorRef allocator, CFStringRef URLString, CFURLRef baseURL);
50 CFURLRef CFURLCreateAbsoluteURLWithBytes (CFAllocatorRef alloc, char* relativeURLBytes, int length, uint encoding, CFURLRef baseURL, ubyte useCompatibilityMode);
51 CFURLRef CFURLCreateWithFileSystemPath (CFAllocatorRef allocator, CFStringRef filePath, int pathStyle, ubyte isDirectory);
52 CFURLRef CFURLCreateFromFileSystemRepresentation (CFAllocatorRef allocator, char* buffer, int bufLen, ubyte isDirectory);
53 CFURLRef CFURLCreateWithFileSystemPathRelativeToBase (CFAllocatorRef allocator, CFStringRef filePath, int pathStyle, ubyte isDirectory, CFURLRef baseURL);
54 CFURLRef CFURLCreateFromFileSystemRepresentationRelativeToBase (CFAllocatorRef allocator, char* buffer, int bufLen, ubyte isDirectory, CFURLRef baseURL);
55 ubyte CFURLGetFileSystemRepresentation (CFURLRef url, ubyte resolveAgainstBase, char* buffer, int maxBufLen);
56 CFURLRef CFURLCopyAbsoluteURL (CFURLRef relativeURL);
57 CFStringRef CFURLGetString (CFURLRef anURL);
58 CFURLRef CFURLGetBaseURL (CFURLRef anURL);
59 ubyte CFURLCanBeDecomposed (CFURLRef anURL);
60 CFStringRef CFURLCopyScheme (CFURLRef anURL);
61 CFStringRef CFURLCopyNetLocation (CFURLRef anURL);
62 CFStringRef CFURLCopyPath (CFURLRef anURL);
63 CFStringRef CFURLCopyStrictPath (CFURLRef anURL, char* isAbsolute);
64 CFStringRef CFURLCopyFileSystemPath (CFURLRef anURL, int pathStyle);
65 ubyte CFURLHasDirectoryPath (CFURLRef anURL);
66 CFStringRef CFURLCopyResourceSpecifier (CFURLRef anURL);
67 CFStringRef CFURLCopyHostName (CFURLRef anURL);
68 int CFURLGetPortNumber (CFURLRef anURL);
69 CFStringRef CFURLCopyUserName (CFURLRef anURL);
70 CFStringRef CFURLCopyPassword (CFURLRef anURL);
71 CFStringRef CFURLCopyParameterString (CFURLRef anURL, CFStringRef charactersToLeaveEscaped);
72 CFStringRef CFURLCopyQueryString (CFURLRef anURL, CFStringRef charactersToLeaveEscaped);
73 CFStringRef CFURLCopyFragment (CFURLRef anURL, CFStringRef charactersToLeaveEscaped);
74 CFStringRef CFURLCopyLastPathComponent (CFURLRef url);
75 CFStringRef CFURLCopyPathExtension (CFURLRef url);
76 CFURLRef CFURLCreateCopyAppendingPathComponent (CFAllocatorRef allocator, CFURLRef url, CFStringRef pathComponent, ubyte isDirectory);
77 CFURLRef CFURLCreateCopyDeletingLastPathComponent (CFAllocatorRef allocator, CFURLRef url);
78 CFURLRef CFURLCreateCopyAppendingPathExtension (CFAllocatorRef allocator, CFURLRef url, CFStringRef extension);
79 CFURLRef CFURLCreateCopyDeletingPathExtension (CFAllocatorRef allocator, CFURLRef url);
80 int CFURLGetBytes (CFURLRef url, char* buffer, int bufferLength);
81 CFRange CFURLGetByteRangeForComponent (CFURLRef url, int component, CFRange* rangeIncludingSeparators);
82 CFStringRef CFURLCreateStringByReplacingPercentEscapes (CFAllocatorRef allocator, CFStringRef originalString, CFStringRef charactersToLeaveEscaped);
83 CFStringRef CFURLCreateStringByReplacingPercentEscapesUsingEncoding (CFAllocatorRef allocator, CFStringRef origString, CFStringRef charsToLeaveEscaped, uint encoding);
84 CFStringRef CFURLCreateStringByAddingPercentEscapes (CFAllocatorRef allocator, CFStringRef originalString, CFStringRef charactersToLeaveUnescaped, CFStringRef legalURLCharactersToBeEscaped, uint encoding);
85 CFURLRef CFURLCreateFromFSRef (CFAllocatorRef allocator, FSRef* fsRef);
86 ubyte CFURLGetFSRef (CFURLRef url, FSRef* fsRef);
87 }