Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | // Common/StdInStream.h |
michael@0 | 2 | |
michael@0 | 3 | #ifndef __COMMON_STDINSTREAM_H |
michael@0 | 4 | #define __COMMON_STDINSTREAM_H |
michael@0 | 5 | |
michael@0 | 6 | #include <stdio.h> |
michael@0 | 7 | |
michael@0 | 8 | #include "Common/String.h" |
michael@0 | 9 | #include "Types.h" |
michael@0 | 10 | |
michael@0 | 11 | class CStdInStream |
michael@0 | 12 | { |
michael@0 | 13 | bool _streamIsOpen; |
michael@0 | 14 | FILE *_stream; |
michael@0 | 15 | public: |
michael@0 | 16 | CStdInStream(): _streamIsOpen(false) {}; |
michael@0 | 17 | CStdInStream(FILE *stream): _streamIsOpen(false), _stream(stream) {}; |
michael@0 | 18 | ~CStdInStream(); |
michael@0 | 19 | bool Open(LPCTSTR fileName); |
michael@0 | 20 | bool Close(); |
michael@0 | 21 | |
michael@0 | 22 | AString ScanStringUntilNewLine(); |
michael@0 | 23 | void ReadToString(AString &resultString); |
michael@0 | 24 | |
michael@0 | 25 | bool Eof(); |
michael@0 | 26 | int GetChar(); |
michael@0 | 27 | }; |
michael@0 | 28 | |
michael@0 | 29 | extern CStdInStream g_StdIn; |
michael@0 | 30 | |
michael@0 | 31 | #endif |