Mercurial > projects > dstep
annotate dstep/diskarbitration/DiskArbitration.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 |
rev | line source |
---|---|
11
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
1 /** |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
3 * Authors: Jacob Carlborg |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
4 * Version: Initial created: Jul 21, 2009 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
6 */ |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
7 module dstep.diskarbitration.DiskArbitration; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
8 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
9 public: |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
10 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
11 import dstep.corefoundation.CoreFoundation; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
12 import dstep.diskarbitration.DADisk; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
13 import dstep.diskarbitration.DADissenter; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
14 import dstep.diskarbitration.DASession; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
15 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
16 alias uint DADiskMountOptions; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
17 alias uint DADiskRenameOptions; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
18 alias uint DADiskUnmountOptions; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
19 alias uint DADiskEjectOptions; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
20 alias uint DADiskClaimOptions; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
21 alias uint DADiskOptions; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
22 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
23 extern (C) |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
24 { |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
25 alias void function (DADiskRef, DADissenterRef, void*) DADiskRenameCallback; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
26 alias DADissenterRef function (DADiskRef, void*) DADiskMountApprovalCallback; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
27 alias void function (DADiskRef, CFArrayRef, void*) DADiskDescriptionChangedCallback; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
28 alias void function (DADiskRef, void*) DADiskAppearedCallback; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
29 alias DADissenterRef function (DADiskRef, void*) DADiskEjectApprovalCallback; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
30 alias void function (DADiskRef, void*) DADiskDisappearedCallback; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
31 alias void function (DADiskRef, DADissenterRef, void*) DADiskUnmountCallback; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
32 alias void function (DADiskRef, DADissenterRef, void*) DADiskMountCallback; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
33 alias void function (DADiskRef, DADissenterRef, void*) DADiskClaimCallback; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
34 alias DADissenterRef function (DADiskRef, void*) DADiskUnmountApprovalCallback; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
35 alias void function (DADiskRef, void*) DADiskPeekCallback; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
36 alias DADissenterRef function (DADiskRef, void*) DADiskClaimReleaseCallback; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
37 alias void function (DADiskRef, DADissenterRef, void*) DADiskEjectCallback; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
38 } |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
39 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
40 extern (C) |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
41 { |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
42 extern |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
43 { |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
44 CFDictionaryRef kDADiskDescriptionMatchMediaUnformatted; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
45 CFDictionaryRef kDADiskDescriptionMatchMediaWhole; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
46 CFDictionaryRef kDADiskDescriptionMatchVolumeMountable; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
47 CFDictionaryRef kDADiskDescriptionMatchVolumeUnrecognized; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
48 CFArrayRef kDADiskDescriptionWatchVolumeName; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
49 CFArrayRef kDADiskDescriptionWatchVolumePath; |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
50 } |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
51 } |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
52 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
53 enum |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
54 { |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
55 kDADiskMountOptionDefault = 0x00000000, |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
56 kDADiskMountOptionWhole = 0x00000001 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
57 } |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
58 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
59 enum |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
60 { |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
61 kDADiskRenameOptionDefault = 0x00000000 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
62 } |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
63 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
64 enum |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
65 { |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
66 kDADiskUnmountOptionDefault = 0x00000000, |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
67 kDADiskUnmountOptionForce = 0x00080000, |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
68 kDADiskUnmountOptionWhole = 0x00000001 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
69 } |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
70 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
71 enum |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
72 { |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
73 kDADiskEjectOptionDefault = 0x00000000 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
74 } |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
75 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
76 enum |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
77 { |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
78 kDADiskClaimOptionDefault = 0x00000000 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
79 } |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
80 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
81 enum |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
82 { |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
83 kDADiskOptionDefault = 0x00000000, |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
84 kDADiskOptionEjectUponLogout = 0x00000001, |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
85 kDADiskOptionMountAutomatic = 0x00000010, |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
86 kDADiskOptionMountAutomaticNoDefer = 0x00000020, |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
87 kDADiskOptionPrivate = 0x00000100 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
88 } |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
89 |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
90 extern (C) |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
91 { |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
92 void DARegisterDiskAppearedCallback (DASessionRef session, CFDictionaryRef match, DADiskAppearedCallback callback, void* context); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
93 void DARegisterDiskDescriptionChangedCallback (DASessionRef session, CFDictionaryRef match, CFArrayRef watch, DADiskDescriptionChangedCallback callback, void* context); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
94 void DARegisterDiskDisappearedCallback (DASessionRef session, CFDictionaryRef match, DADiskDisappearedCallback callback, void* context); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
95 void DADiskMount (DADiskRef disk, CFURLRef path, uint options, DADiskMountCallback callback, void* context); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
96 void DADiskMountWithArguments (DADiskRef disk, CFURLRef path, uint options, DADiskMountCallback callback, void* context, CFStringRef* arguments); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
97 void DARegisterDiskMountApprovalCallback (DAApprovalSessionRef session, CFDictionaryRef match, DADiskMountApprovalCallback callback, void* context); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
98 void DADiskRename (DADiskRef disk, CFStringRef name, uint options, DADiskRenameCallback callback, void* context); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
99 void DADiskUnmount (DADiskRef disk, uint options, DADiskUnmountCallback callback, void* context); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
100 void DARegisterDiskUnmountApprovalCallback (DAApprovalSessionRef session, CFDictionaryRef match, DADiskUnmountApprovalCallback callback, void* context); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
101 void DADiskEject (DADiskRef disk, uint options, DADiskEjectCallback callback, void* context); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
102 void DARegisterDiskEjectApprovalCallback (DAApprovalSessionRef session, CFDictionaryRef match, DADiskEjectApprovalCallback callback, void* context); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
103 void DADiskClaim (DADiskRef disk, uint options, DADiskClaimReleaseCallback release, void* releaseContext, DADiskClaimCallback callback, void* callbackContext); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
104 ubyte DADiskIsClaimed (DADiskRef disk); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
105 void DADiskUnclaim (DADiskRef disk); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
106 void DARegisterDiskPeekCallback (DASessionRef session, CFDictionaryRef match, int order, DADiskPeekCallback callback, void* context); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
107 uint DADiskGetOptions (DADiskRef disk); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
108 int DADiskSetOptions (DADiskRef disk, uint options, ubyte value); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
109 void DAUnregisterCallback (DASessionRef session, void* callback, void* context); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
110 void DAUnregisterApprovalCallback (DAApprovalSessionRef session, void* callback, void* context); |
07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
Jacob Carlborg <doob@me.com>
parents:
diff
changeset
|
111 } |