Index: webrtc/common_types.h |
diff --git a/webrtc/common_types.h b/webrtc/common_types.h |
index 02633ba87a481370e3fcb4dcfa8204b63fe35f8c..748bb931b0616067de063cb0d281371f109f8cb3 100644 |
--- a/webrtc/common_types.h |
+++ b/webrtc/common_types.h |
@@ -54,28 +54,24 @@ namespace webrtc { |
class Config; |
-class InStream |
-{ |
-public: |
- // Reads |length| bytes from file to |buf|. Returns the number of bytes read |
- // or -1 on error. |
- virtual int Read(void *buf, size_t len) = 0; |
- virtual int Rewind(); |
- virtual ~InStream() {} |
-protected: |
- InStream() {} |
+class RewindableStream { |
+ public: |
+ virtual ~RewindableStream() {} |
+ virtual int Rewind() = 0; |
}; |
-class OutStream |
-{ |
-public: |
- // Writes |length| bytes from |buf| to file. The actual writing may happen |
- // some time later. Call Flush() to force a write. |
- virtual bool Write(const void *buf, size_t len) = 0; |
- virtual int Rewind(); |
- virtual ~OutStream() {} |
-protected: |
- OutStream() {} |
+class InStream : public RewindableStream { |
+ public: |
+ // Reads |length| bytes from file to |buf|. Returns the number of bytes read |
åsapersson
2016/06/14 15:22:11
|len|
tommi
2016/06/14 20:45:34
Done.
|
+ // or -1 on error. |
+ virtual int Read(void* buf, size_t len) = 0; |
+}; |
+ |
+class OutStream : public RewindableStream { |
+ public: |
+ // Writes |length| bytes from |buf| to file. The actual writing may happen |
+ // some time later. Call Flush() to force a write. |
+ virtual bool Write(const void* buf, size_t len) = 0; |
}; |
enum TraceModule |