diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-11-05 22:41:51 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-11-05 22:41:51 +0000 |
commit | ec05778d5718a7912e506764d443a78d6a6179e3 (patch) | |
tree | 78a9a01532180030c095acefc45763f07c14edb8 /src/experimental/httpget.cpp | |
parent | b20414ac1fe80a71a90601f4cd1767fa7014a9ba (diff) | |
download | libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.gz libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.bz2 libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.tar.xz libbu++-ec05778d5718a7912e506764d443a78d6a6179e3.zip |
Converted tabs to spaces with tabconv.
Diffstat (limited to 'src/experimental/httpget.cpp')
-rw-r--r-- | src/experimental/httpget.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/experimental/httpget.cpp b/src/experimental/httpget.cpp index 7a8a89a..70c722c 100644 --- a/src/experimental/httpget.cpp +++ b/src/experimental/httpget.cpp | |||
@@ -8,11 +8,11 @@ | |||
8 | #include "bu/httpget.h" | 8 | #include "bu/httpget.h" |
9 | 9 | ||
10 | Bu::HttpGet::HttpGet( const Bu::Url &uSrc, const Bu::String &sMethod ) : | 10 | Bu::HttpGet::HttpGet( const Bu::Url &uSrc, const Bu::String &sMethod ) : |
11 | uSrc( uSrc ), | 11 | uSrc( uSrc ), |
12 | sMethod( sMethod ), | 12 | sMethod( sMethod ), |
13 | sSrv( uSrc.getHost(), uSrc.getPort() ) | 13 | sSrv( uSrc.getHost(), uSrc.getPort() ) |
14 | { | 14 | { |
15 | sSrv.write( sMethod + " " + uSrc.getFullPath() + " HTTP/1.1\r\n" ); | 15 | sSrv.write( sMethod + " " + uSrc.getFullPath() + " HTTP/1.1\r\n" ); |
16 | } | 16 | } |
17 | 17 | ||
18 | Bu::HttpGet::~HttpGet() | 18 | Bu::HttpGet::~HttpGet() |
@@ -25,28 +25,28 @@ void Bu::HttpGet::close() | |||
25 | 25 | ||
26 | void Bu::HttpGet::get() | 26 | void Bu::HttpGet::get() |
27 | { | 27 | { |
28 | for( MimeHash::iterator i = hMimeOut.begin(); i; i++ ) | 28 | for( MimeHash::iterator i = hMimeOut.begin(); i; i++ ) |
29 | { | 29 | { |
30 | sSrv.write( i.getKey() + ": " + i.getValue() + "\r\n" ); | 30 | sSrv.write( i.getKey() + ": " + i.getValue() + "\r\n" ); |
31 | } | 31 | } |
32 | sSrv.write("\r\n", 2 ); | 32 | sSrv.write("\r\n", 2 ); |
33 | 33 | ||
34 | // sSrv.read( | 34 | // sSrv.read( |
35 | } | 35 | } |
36 | 36 | ||
37 | Bu::size Bu::HttpGet::read( void * /*pBuf*/, Bu::size /*nBytes*/ ) | 37 | Bu::size Bu::HttpGet::read( void * /*pBuf*/, Bu::size /*nBytes*/ ) |
38 | { | 38 | { |
39 | return 0; | 39 | return 0; |
40 | } | 40 | } |
41 | 41 | ||
42 | Bu::size Bu::HttpGet::write( const void * /*pBuf*/, Bu::size /*nBytes*/ ) | 42 | Bu::size Bu::HttpGet::write( const void * /*pBuf*/, Bu::size /*nBytes*/ ) |
43 | { | 43 | { |
44 | return 0; | 44 | return 0; |
45 | } | 45 | } |
46 | 46 | ||
47 | Bu::size Bu::HttpGet::tell() | 47 | Bu::size Bu::HttpGet::tell() |
48 | { | 48 | { |
49 | return 0; | 49 | return 0; |
50 | } | 50 | } |
51 | 51 | ||
52 | void Bu::HttpGet::seek( Bu::size ) | 52 | void Bu::HttpGet::seek( Bu::size ) |
@@ -63,12 +63,12 @@ void Bu::HttpGet::setPosEnd( Bu::size ) | |||
63 | 63 | ||
64 | bool Bu::HttpGet::isEos() | 64 | bool Bu::HttpGet::isEos() |
65 | { | 65 | { |
66 | return false; | 66 | return false; |
67 | } | 67 | } |
68 | 68 | ||
69 | bool Bu::HttpGet::isOpen() | 69 | bool Bu::HttpGet::isOpen() |
70 | { | 70 | { |
71 | return true; | 71 | return true; |
72 | } | 72 | } |
73 | 73 | ||
74 | void Bu::HttpGet::flush() | 74 | void Bu::HttpGet::flush() |
@@ -77,32 +77,32 @@ void Bu::HttpGet::flush() | |||
77 | 77 | ||
78 | bool Bu::HttpGet::canRead() | 78 | bool Bu::HttpGet::canRead() |
79 | { | 79 | { |
80 | return true; | 80 | return true; |
81 | } | 81 | } |
82 | 82 | ||
83 | bool Bu::HttpGet::canWrite() | 83 | bool Bu::HttpGet::canWrite() |
84 | { | 84 | { |
85 | return false; | 85 | return false; |
86 | } | 86 | } |
87 | 87 | ||
88 | bool Bu::HttpGet::isReadable() | 88 | bool Bu::HttpGet::isReadable() |
89 | { | 89 | { |
90 | return true; | 90 | return true; |
91 | } | 91 | } |
92 | 92 | ||
93 | bool Bu::HttpGet::isWritable() | 93 | bool Bu::HttpGet::isWritable() |
94 | { | 94 | { |
95 | return false; | 95 | return false; |
96 | } | 96 | } |
97 | 97 | ||
98 | bool Bu::HttpGet::isSeekable() | 98 | bool Bu::HttpGet::isSeekable() |
99 | { | 99 | { |
100 | return false; | 100 | return false; |
101 | } | 101 | } |
102 | 102 | ||
103 | bool Bu::HttpGet::isBlocking() | 103 | bool Bu::HttpGet::isBlocking() |
104 | { | 104 | { |
105 | return true; | 105 | return true; |
106 | } | 106 | } |
107 | 107 | ||
108 | void Bu::HttpGet::setBlocking( bool /*bBlocking*/ ) | 108 | void Bu::HttpGet::setBlocking( bool /*bBlocking*/ ) |
@@ -111,16 +111,16 @@ void Bu::HttpGet::setBlocking( bool /*bBlocking*/ ) | |||
111 | 111 | ||
112 | Bu::size Bu::HttpGet::getSize() const | 112 | Bu::size Bu::HttpGet::getSize() const |
113 | { | 113 | { |
114 | return 0; | 114 | return 0; |
115 | } | 115 | } |
116 | 116 | ||
117 | Bu::size Bu::HttpGet::getBlockSize() const | 117 | Bu::size Bu::HttpGet::getBlockSize() const |
118 | { | 118 | { |
119 | return 0; | 119 | return 0; |
120 | } | 120 | } |
121 | 121 | ||
122 | Bu::String Bu::HttpGet::getLocation() const | 122 | Bu::String Bu::HttpGet::getLocation() const |
123 | { | 123 | { |
124 | return uSrc.getUrl(); | 124 | return uSrc.getUrl(); |
125 | } | 125 | } |
126 | 126 | ||