aboutsummaryrefslogtreecommitdiff
path: root/src/experimental/httpget.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-05 22:41:51 +0000
commitec05778d5718a7912e506764d443a78d6a6179e3 (patch)
tree78a9a01532180030c095acefc45763f07c14edb8 /src/experimental/httpget.cpp
parentb20414ac1fe80a71a90601f4cd1767fa7014a9ba (diff)
downloadlibbu++-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.cpp48
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
10Bu::HttpGet::HttpGet( const Bu::Url &uSrc, const Bu::String &sMethod ) : 10Bu::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
18Bu::HttpGet::~HttpGet() 18Bu::HttpGet::~HttpGet()
@@ -25,28 +25,28 @@ void Bu::HttpGet::close()
25 25
26void Bu::HttpGet::get() 26void 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
37Bu::size Bu::HttpGet::read( void * /*pBuf*/, Bu::size /*nBytes*/ ) 37Bu::size Bu::HttpGet::read( void * /*pBuf*/, Bu::size /*nBytes*/ )
38{ 38{
39 return 0; 39 return 0;
40} 40}
41 41
42Bu::size Bu::HttpGet::write( const void * /*pBuf*/, Bu::size /*nBytes*/ ) 42Bu::size Bu::HttpGet::write( const void * /*pBuf*/, Bu::size /*nBytes*/ )
43{ 43{
44 return 0; 44 return 0;
45} 45}
46 46
47Bu::size Bu::HttpGet::tell() 47Bu::size Bu::HttpGet::tell()
48{ 48{
49 return 0; 49 return 0;
50} 50}
51 51
52void Bu::HttpGet::seek( Bu::size ) 52void Bu::HttpGet::seek( Bu::size )
@@ -63,12 +63,12 @@ void Bu::HttpGet::setPosEnd( Bu::size )
63 63
64bool Bu::HttpGet::isEos() 64bool Bu::HttpGet::isEos()
65{ 65{
66 return false; 66 return false;
67} 67}
68 68
69bool Bu::HttpGet::isOpen() 69bool Bu::HttpGet::isOpen()
70{ 70{
71 return true; 71 return true;
72} 72}
73 73
74void Bu::HttpGet::flush() 74void Bu::HttpGet::flush()
@@ -77,32 +77,32 @@ void Bu::HttpGet::flush()
77 77
78bool Bu::HttpGet::canRead() 78bool Bu::HttpGet::canRead()
79{ 79{
80 return true; 80 return true;
81} 81}
82 82
83bool Bu::HttpGet::canWrite() 83bool Bu::HttpGet::canWrite()
84{ 84{
85 return false; 85 return false;
86} 86}
87 87
88bool Bu::HttpGet::isReadable() 88bool Bu::HttpGet::isReadable()
89{ 89{
90 return true; 90 return true;
91} 91}
92 92
93bool Bu::HttpGet::isWritable() 93bool Bu::HttpGet::isWritable()
94{ 94{
95 return false; 95 return false;
96} 96}
97 97
98bool Bu::HttpGet::isSeekable() 98bool Bu::HttpGet::isSeekable()
99{ 99{
100 return false; 100 return false;
101} 101}
102 102
103bool Bu::HttpGet::isBlocking() 103bool Bu::HttpGet::isBlocking()
104{ 104{
105 return true; 105 return true;
106} 106}
107 107
108void Bu::HttpGet::setBlocking( bool /*bBlocking*/ ) 108void Bu::HttpGet::setBlocking( bool /*bBlocking*/ )
@@ -111,16 +111,16 @@ void Bu::HttpGet::setBlocking( bool /*bBlocking*/ )
111 111
112Bu::size Bu::HttpGet::getSize() const 112Bu::size Bu::HttpGet::getSize() const
113{ 113{
114 return 0; 114 return 0;
115} 115}
116 116
117Bu::size Bu::HttpGet::getBlockSize() const 117Bu::size Bu::HttpGet::getBlockSize() const
118{ 118{
119 return 0; 119 return 0;
120} 120}
121 121
122Bu::String Bu::HttpGet::getLocation() const 122Bu::String Bu::HttpGet::getLocation() const
123{ 123{
124 return uSrc.getUrl(); 124 return uSrc.getUrl();
125} 125}
126 126