Mercurial > projects > dstep
comparison dstep/coreservices/carboncore/Aliases.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 21, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.coreservices.carboncore.Aliases; | |
8 | |
9 //import dstep.AvailabilityMacros; | |
10 import dstep.corefoundation.CFBase; | |
11 import dstep.coreservices.carboncore.Files; | |
12 import dstep.coreservices.carboncore.MacTypes; | |
13 import dstep.coreservices.carboncore.UTCUtils; | |
14 import dstep.objc.bridge.TypeEncoding; | |
15 | |
16 alias uint FSAliasInfoBitmap; | |
17 alias AliasRecord* AliasPtr; | |
18 alias AliasPtr* AliasHandle; | |
19 alias FSAliasInfo* FSAliasInfoPtr; | |
20 alias short AliasInfoType; | |
21 | |
22 extern (C) | |
23 { | |
24 alias ubyte function (FSRef*, char*, char*) FSAliasFilterProcPtr; | |
25 } | |
26 | |
27 // This is needed otherwise the enums will fail compiling with gdc | |
28 version (GNU) | |
29 { | |
30 private | |
31 { | |
32 const __rAliasType = getOSType!("alis"); | |
33 | |
34 } | |
35 } | |
36 | |
37 enum | |
38 { | |
39 kFSAliasInfoNone = 0x00000000, | |
40 kFSAliasInfoVolumeCreateDate = 0x00000001, | |
41 kFSAliasInfoTargetCreateDate = 0x00000002, | |
42 kFSAliasInfoFinderInfo = 0x00000004, | |
43 kFSAliasInfoIsDirectory = 0x00000008, | |
44 kFSAliasInfoIDs = 0x00000010, | |
45 kFSAliasInfoFSInfo = 0x00000020, | |
46 kFSAliasInfoVolumeFlags = 0x00000040 | |
47 } | |
48 | |
49 enum | |
50 { | |
51 rAliasType = getOSType!("alis") | |
52 } | |
53 | |
54 enum | |
55 { | |
56 kARMMountVol = 0x00000001, | |
57 kARMNoUI = 0x00000002, | |
58 kARMMultVols = 0x00000008, | |
59 kARMSearch = 0x00000100, | |
60 kARMSearchMore = 0x00000200, | |
61 kARMSearchRelFirst = 0x00000400, | |
62 kARMTryFileIDFirst = 0x00000800 | |
63 } | |
64 | |
65 enum | |
66 { | |
67 asiZoneName = -3, | |
68 asiServerName = -2, | |
69 asiVolumeName = -1, | |
70 asiAliasName = 0, | |
71 asiParentName = 1 | |
72 } | |
73 | |
74 enum | |
75 { | |
76 kResolveAliasFileNoUI = 0x00000001, | |
77 kResolveAliasTryFileIDFirst = 0x00000002 | |
78 } | |
79 | |
80 struct AliasRecord | |
81 { | |
82 char* hidden; | |
83 } | |
84 | |
85 | |
86 struct FSAliasInfo | |
87 { | |
88 UTCDateTime volumeCreateDate; | |
89 UTCDateTime targetCreateDate; | |
90 uint fileType; | |
91 uint fileCreator; | |
92 uint parentDirID; | |
93 uint nodeID; | |
94 ushort filesystemID; | |
95 ushort signature; | |
96 ubyte volumeIsBootVolume; | |
97 ubyte volumeIsAutomounted; | |
98 ubyte volumeIsEjectable; | |
99 ubyte volumeHasPersistentFileIDs; | |
100 ubyte isDirectory; | |
101 } | |
102 | |
103 extern (C) | |
104 { | |
105 short FSNewAlias (FSRef* fromFile, FSRef* target, AliasHandle* inAlias); | |
106 short FSNewAliasMinimal (FSRef* target, AliasHandle* inAlias); | |
107 short FSIsAliasFile (FSRef* fileRef, char* aliasFileFlag, char* folderFlag); | |
108 short FSResolveAliasWithMountFlags (FSRef* fromFile, AliasHandle inAlias, FSRef* target, char* wasChanged, uint mountFlags); | |
109 short FSResolveAlias (FSRef* fromFile, AliasHandle alias_, FSRef* target, char* wasChanged); | |
110 short FSResolveAliasFileWithMountFlags (FSRef* theRef, ubyte resolveAliasChains, char* targetIsFolder, char* wasAliased, uint mountFlags); | |
111 short FSResolveAliasFile (FSRef* theRef, ubyte resolveAliasChains, char* targetIsFolder, char* wasAliased); | |
112 short FSFollowFinderAlias (FSRef* fromFile, AliasHandle alias_, ubyte logon, FSRef* target, char* wasChanged); | |
113 short FSUpdateAlias (FSRef* fromFile, FSRef* target, AliasHandle alias_, char* wasChanged); | |
114 short FSNewAliasUnicode (FSRef* fromFile, FSRef* targetParentRef, uint targetNameLength, wchar* targetName, AliasHandle* inAlias, char* isDirectory); | |
115 short FSNewAliasMinimalUnicode (FSRef* targetParentRef, uint targetNameLength, wchar* targetName, AliasHandle* inAlias, char* isDirectory); | |
116 int FSNewAliasFromPath (char* fromFilePath, char* targetPath, uint flags, AliasHandle* inAlias, char* isDirectory); | |
117 int FSMatchAliasBulk (FSRef* fromFile, uint rulesMask, AliasHandle inAlias, short* aliasCount, FSRef* aliasList, char* needsUpdate, FSAliasFilterProcPtr aliasFilter, void* yourDataPtr); | |
118 int FSCopyAliasInfo (AliasHandle inAlias, HFSUniStr255* targetName, HFSUniStr255* volumeName, CFStringRef* pathString, FSAliasInfoBitmap* whichInfo, FSAliasInfo* info); | |
119 int GetAliasSize (AliasHandle alias_); | |
120 uint GetAliasUserType (AliasHandle alias_); | |
121 void SetAliasUserType (AliasHandle alias_, uint userType); | |
122 int GetAliasSizeFromPtr (AliasRecord* alias_); | |
123 uint GetAliasUserTypeFromPtr (AliasRecord* alias_); | |
124 void SetAliasUserTypeWithPtr (AliasPtr alias_, uint userType); | |
125 } |