aboutsummaryrefslogtreecommitdiff
path: root/src/httpget.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-01-20 18:09:04 +0000
committerMike Buland <eichlan@xagasoft.com>2011-01-20 18:09:04 +0000
commit393f1b414746a7f1977971dd7659dd2b47092b11 (patch)
tree81d0ca1ee70ab86a7d79c1991abe5c387b655fb2 /src/httpget.h
parentc259f95bd0e58b247940a339bb9b4b401b4e9438 (diff)
parent7e25a863325dc3e9762397e700030969e093b087 (diff)
downloadlibbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.gz
libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.bz2
libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.xz
libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.zip
Wow! Merged the branch, streams are updated, and there's no more FString, run
the fixstrings.sh script in the support directory to (hopefully) automatically update your projects.
Diffstat (limited to '')
-rw-r--r--src/httpget.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/httpget.h b/src/httpget.h
index 783f880..a58e8ac 100644
--- a/src/httpget.h
+++ b/src/httpget.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2007-2010 Xagasoft, All rights reserved. 2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 * 3 *
4 * This file is part of the libbu++ library and is released under the 4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE. 5 * terms of the license contained in the file LICENSE.
@@ -9,7 +9,7 @@
9#define BU_HTTP_GET_H 9#define BU_HTTP_GET_H
10 10
11#include "bu/stream.h" 11#include "bu/stream.h"
12#include "bu/fstring.h" 12#include "bu/string.h"
13#include "bu/url.h" 13#include "bu/url.h"
14#include "bu/tcpsocket.h" 14#include "bu/tcpsocket.h"
15#include "bu/hash.h" 15#include "bu/hash.h"
@@ -19,21 +19,21 @@ namespace Bu
19 class HttpGet : public Bu::Stream 19 class HttpGet : public Bu::Stream
20 { 20 {
21 public: 21 public:
22 HttpGet( const Bu::Url &uSrc, const Bu::FString &sMethod="GET" ); 22 HttpGet( const Bu::Url &uSrc, const Bu::String &sMethod="GET" );
23 virtual ~HttpGet(); 23 virtual ~HttpGet();
24 24
25 void get(); 25 void get();
26 26
27 // From Bu::Stream 27 // From Bu::Stream
28 virtual void close(); 28 virtual void close();
29 virtual size_t read( void *pBuf, size_t nBytes ); 29 virtual Bu::size read( void *pBuf, Bu::size nBytes );
30 virtual size_t write( const void *pBuf, size_t nBytes ); 30 virtual Bu::size write( const void *pBuf, Bu::size nBytes );
31 using Stream::write; 31 using Stream::write;
32 32
33 virtual long tell(); 33 virtual Bu::size tell();
34 virtual void seek( long offset ); 34 virtual void seek( Bu::size offset );
35 virtual void setPos( long pos ); 35 virtual void setPos( Bu::size pos );
36 virtual void setPosEnd( long pos ); 36 virtual void setPosEnd( Bu::size pos );
37 virtual bool isEos(); 37 virtual bool isEos();
38 virtual bool isOpen(); 38 virtual bool isOpen();
39 39
@@ -49,11 +49,15 @@ namespace Bu
49 virtual bool isBlocking(); 49 virtual bool isBlocking();
50 virtual void setBlocking( bool bBlocking=true ); 50 virtual void setBlocking( bool bBlocking=true );
51 51
52 virtual size getSize() const;
53 virtual size getBlockSize() const;
54 virtual Bu::String getLocation() const;
55
52 private: 56 private:
53 Bu::Url uSrc; 57 Bu::Url uSrc;
54 Bu::FString sMethod; 58 Bu::String sMethod;
55 Bu::TcpSocket sSrv; 59 Bu::TcpSocket sSrv;
56 typedef Bu::Hash<Bu::FString,Bu::FString> MimeHash; 60 typedef Bu::Hash<Bu::String,Bu::String> MimeHash;
57 MimeHash hMimeIn; 61 MimeHash hMimeIn;
58 MimeHash hMimeOut; 62 MimeHash hMimeOut;
59 }; 63 };