diff options
Diffstat (limited to 'include/crawler/RewindInputStream.hpp')
-rwxr-xr-x | include/crawler/RewindInputStream.hpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/crawler/RewindInputStream.hpp b/include/crawler/RewindInputStream.hpp new file mode 100755 index 0000000..6bbe80c --- /dev/null +++ b/include/crawler/RewindInputStream.hpp @@ -0,0 +1,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 |