Index: webrtc/base/transformadapter.h |
diff --git a/webrtc/base/transformadapter.h b/webrtc/base/transformadapter.h |
index 290d5605ffb8b794c1b30fd0575817b5d456e04c..3d9c86bb268a83bd636f00c8c6b1366056bcbba6 100644 |
--- a/webrtc/base/transformadapter.h |
+++ b/webrtc/base/transformadapter.h |
@@ -8,77 +8,12 @@ |
* be found in the AUTHORS file in the root of the source tree. |
*/ |
-#ifndef WEBRTC_BASE_TRANSFORMADAPTER_H__ |
-#define WEBRTC_BASE_TRANSFORMADAPTER_H__ |
+#ifndef WEBRTC_BASE_TRANSFORMADAPTER_H_ |
+#define WEBRTC_BASE_TRANSFORMADAPTER_H_ |
-#include "webrtc/base/stream.h" |
-namespace rtc { |
-/////////////////////////////////////////////////////////////////////////////// |
+// This header is deprecated and is just left here temporarily during |
+// refactoring. See https://bugs.webrtc.org/7634 for more details. |
+#include "webrtc/rtc_base/transformadapter.h" |
-class TransformInterface { |
-public: |
- virtual ~TransformInterface() { } |
- |
- // Transform should convert the in_len bytes of input into the out_len-sized |
- // output buffer. If flush is true, there will be no more data following |
- // input. |
- // After the transformation, in_len contains the number of bytes consumed, and |
- // out_len contains the number of bytes ready in output. |
- // Note: Transform should not return SR_BLOCK, as there is no asynchronous |
- // notification available. |
- virtual StreamResult Transform(const void * input, size_t * in_len, |
- void * output, size_t * out_len, |
- bool flush) = 0; |
-}; |
- |
-/////////////////////////////////////////////////////////////////////////////// |
- |
-// TransformAdapter causes all data passed through to be transformed by the |
-// supplied TransformInterface object, which may apply compression, encryption, |
-// etc. |
- |
-class TransformAdapter : public StreamAdapterInterface { |
-public: |
- // Note that the transformation is unidirectional, in the direction specified |
- // by the constructor. Operations in the opposite direction result in SR_EOS. |
- TransformAdapter(StreamInterface * stream, |
- TransformInterface * transform, |
- bool direction_read); |
- ~TransformAdapter() override; |
- |
- StreamResult Read(void* buffer, |
- size_t buffer_len, |
- size_t* read, |
- int* error) override; |
- StreamResult Write(const void* data, |
- size_t data_len, |
- size_t* written, |
- int* error) override; |
- void Close() override; |
- |
- // Apriori, we can't tell what the transformation does to the stream length. |
- bool GetAvailable(size_t* size) const override; |
- bool ReserveSize(size_t size) override; |
- |
- // Transformations might not be restartable |
- virtual bool Rewind(); |
- |
-private: |
- enum State { ST_PROCESSING, ST_FLUSHING, ST_COMPLETE, ST_ERROR }; |
- enum { BUFFER_SIZE = 1024 }; |
- |
- TransformInterface * transform_; |
- bool direction_read_; |
- State state_; |
- int error_; |
- |
- char buffer_[BUFFER_SIZE]; |
- size_t len_; |
-}; |
- |
-/////////////////////////////////////////////////////////////////////////////// |
- |
-} // namespace rtc |
- |
-#endif // WEBRTC_BASE_TRANSFORMADAPTER_H__ |
+#endif // WEBRTC_BASE_TRANSFORMADAPTER_H_ |