comparison dstep/coreservices/cfnetwork/CFHost.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 22, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */
7 module dstep.coreservices.cfnetwork.CFHost;
8
9 //import dstep.Availability;
10 import dstep.coreservices.cfnetwork.CFNetworkDefs;
11 import dstep.corefoundation.CFStream;
12 import dstep.corefoundation.CoreFoundation;
13
14 struct __CFHost;
15
16 alias __CFHost* CFHostRef;
17 alias int CFHostInfoType;
18
19 extern (C)
20 {
21 alias void function (CFHostRef, int, CFStreamError*, void*) CFHostClientCallBack;
22 }
23
24 extern (C)
25 {
26 extern
27 {
28 const int kCFStreamErrorDomainNetDB;
29 const int kCFStreamErrorDomainSystemConfiguration;
30 }
31 }
32
33 enum /*CFHostInfoType*/
34 {
35 kCFHostAddresses = 0,
36 kCFHostNames = 1,
37 kCFHostReachability = 2
38 }
39
40 struct CFHostClientContext
41 {
42 int version_;
43 void* info;
44 CFAllocatorRetainCallBack retain;
45 CFAllocatorReleaseCallBack release;
46 CFAllocatorCopyDescriptionCallBack copyDescription;
47 }
48
49 extern (C)
50 {
51 uint CFHostGetTypeID ();
52 CFHostRef CFHostCreateWithName (CFAllocatorRef allocator, CFStringRef hostname);
53 CFHostRef CFHostCreateWithAddress (CFAllocatorRef allocator, CFDataRef addr);
54 CFHostRef CFHostCreateCopy (CFAllocatorRef alloc, CFHostRef host);
55 ubyte CFHostStartInfoResolution (CFHostRef theHost, int info, CFStreamError* error);
56 CFArrayRef CFHostGetAddressing (CFHostRef theHost, char* hasBeenResolved);
57 CFArrayRef CFHostGetNames (CFHostRef theHost, char* hasBeenResolved);
58 CFDataRef CFHostGetReachability (CFHostRef theHost, char* hasBeenResolved);
59 void CFHostCancelInfoResolution (CFHostRef theHost, int info);
60 ubyte CFHostSetClient (CFHostRef theHost, CFHostClientCallBack clientCB, CFHostClientContext* clientContext);
61 void CFHostScheduleWithRunLoop (CFHostRef theHost, CFRunLoopRef runLoop, CFStringRef runLoopMode);
62 void CFHostUnscheduleFromRunLoop (CFHostRef theHost, CFRunLoopRef runLoop, CFStringRef runLoopMode);
63 }