Mercurial > projects > dstep
comparison dstep/corefoundation/CFMessagePort.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.CFMessagePort; | |
8 | |
9 import dstep.corefoundation.CFBase; | |
10 import dstep.corefoundation.CFData; | |
11 import dstep.corefoundation.CFDictionary; | |
12 import dstep.corefoundation.CFRunLoop; | |
13 import dstep.corefoundation.CFString; | |
14 import dstep.objc.bridge.Bridge; | |
15 import dstep.objc.objc : id; | |
16 | |
17 struct __CFMessagePort; | |
18 alias __CFMessagePort* CFMessagePortRef; | |
19 | |
20 extern (C) | |
21 { | |
22 alias void function (CFMessagePortRef, void*) CFMessagePortInvalidationCallBack; | |
23 alias CFDataRef function (CFMessagePortRef, int, CFDataRef, void*) CFMessagePortCallBack; | |
24 } | |
25 | |
26 enum | |
27 { | |
28 kCFMessagePortSuccess = 0, | |
29 kCFMessagePortSendTimeout = -1, | |
30 kCFMessagePortReceiveTimeout = -2, | |
31 kCFMessagePortIsInvalid = -3, | |
32 kCFMessagePortTransportError = -4 | |
33 } | |
34 | |
35 struct CFMessagePortContext | |
36 { | |
37 int version_; | |
38 void* info; | |
39 } | |
40 | |
41 extern (C) | |
42 { | |
43 uint CFMessagePortGetTypeID (); | |
44 CFMessagePortRef CFMessagePortCreateLocal (CFAllocatorRef allocator, CFStringRef name, CFMessagePortCallBack* callout, CFMessagePortContext* context, char* shouldFreeInfo); | |
45 CFMessagePortRef CFMessagePortCreateRemote (CFAllocatorRef allocator, CFStringRef name); | |
46 ubyte CFMessagePortIsRemote (CFMessagePortRef ms); | |
47 CFStringRef CFMessagePortGetName (CFMessagePortRef ms); | |
48 ubyte CFMessagePortSetName (CFMessagePortRef ms, CFStringRef newName); | |
49 void CFMessagePortGetContext (CFMessagePortRef ms, CFMessagePortContext* context); | |
50 void CFMessagePortInvalidate (CFMessagePortRef ms); | |
51 ubyte CFMessagePortIsValid (CFMessagePortRef ms); | |
52 CFMessagePortInvalidationCallBack* CFMessagePortGetInvalidationCallBack (CFMessagePortRef ms); | |
53 void CFMessagePortSetInvalidationCallBack (CFMessagePortRef ms, CFMessagePortInvalidationCallBack* callout); | |
54 int CFMessagePortSendRequest (CFMessagePortRef remote, int msgid, CFDataRef data, double sendTimeout, double rcvTimeout, CFStringRef replyMode, CFDataRef* returnData); | |
55 CFRunLoopSourceRef CFMessagePortCreateRunLoopSource (CFAllocatorRef allocator, CFMessagePortRef local, int order); | |
56 } |