summaryrefslogtreecommitdiff
path: root/include/crawler/RewindInputStream.hpp
blob: 6bbe80c55479d20eaeec3a0f0963f6d48d404772 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef __REWIND_INPUT_STREAM_H
#define __REWIND_INPUT_STREAM_H

#include "CrawlerExportable.hpp"
#include "URL.hpp"

#include <iostream>
#include <string>

class RewindInputStream : public std::istream {
	public:
		const URL getBaseUrl( ) const
		{
			return m_baseUrl;
		}
		
		CRAWLER_DLL_VISIBLE virtual void rewind( ) = 0;

		virtual std::string lastErrMsg( ) const = 0;

	protected:
		
		RewindInputStream( const URL &url )
			: std::istream( 0 ), m_baseUrl( url )
		{
		}
		
	private:
		URL m_baseUrl;
};

#endif