comparison dstep/coreservices/cfnetwork/CFHTTPStream.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.CFHTTPStream;
8
9 //import dstep.Availability;
10 import dstep.coreservices.cfnetwork.CFHTTPMessage;
11 import dstep.coreservices.cfnetwork.CFNetworkDefs;
12 import dstep.corefoundation.CFBase;
13 import dstep.corefoundation.CFStream;
14
15 alias int CFStreamErrorHTTP;
16
17 extern (C)
18 {
19 extern
20 {
21 const int kCFStreamErrorDomainHTTP;
22 const CFStringRef kCFStreamPropertyHTTPResponseHeader;
23 const CFStringRef kCFStreamPropertyHTTPFinalURL;
24 const CFStringRef kCFStreamPropertyHTTPFinalRequest;
25 const CFStringRef kCFStreamPropertyHTTPProxy;
26 const CFStringRef kCFStreamPropertyHTTPProxyHost;
27 const CFStringRef kCFStreamPropertyHTTPProxyPort;
28 const CFStringRef kCFStreamPropertyHTTPSProxyHost;
29 const CFStringRef kCFStreamPropertyHTTPSProxyPort;
30 const CFStringRef kCFStreamPropertyHTTPShouldAutoredirect;
31 const CFStringRef kCFStreamPropertyHTTPAttemptPersistentConnection;
32 const CFStringRef kCFStreamPropertyHTTPRequestBytesWrittenCount;
33 }
34 }
35
36 enum /*CFStreamErrorHTTP*/
37 {
38 kCFStreamErrorHTTPParseFailure = -1,
39 kCFStreamErrorHTTPRedirectionLoop = -2,
40 kCFStreamErrorHTTPBadURL = -3
41 }
42
43 extern (C)
44 {
45 CFReadStreamRef CFReadStreamCreateForHTTPRequest (CFAllocatorRef alloc, CFHTTPMessageRef request);
46 CFReadStreamRef CFReadStreamCreateForStreamedHTTPRequest (CFAllocatorRef alloc, CFHTTPMessageRef requestHeaders, CFReadStreamRef requestBody);
47 void CFHTTPReadStreamSetRedirectsAutomatically (CFReadStreamRef httpStream, ubyte shouldAutoRedirect);
48 void CFHTTPReadStreamSetProxy (CFReadStreamRef httpStream, CFStringRef proxyHost, int proxyPort);
49 }