| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 #ifndef BIN_FILTER_H_ |
| 6 #define BIN_FILTER_H_ |
| 7 |
| 8 #include "bin/builtin.h" |
| 9 #include "bin/utils.h" |
| 10 |
| 11 |
| 12 class Filter { |
| 13 protected: |
| 14 Filter() {} |
| 15 virtual ~Filter() {} |
| 16 |
| 17 public: |
| 18 virtual bool Init() = 0; |
| 19 virtual uint8_t* Process(uint8_t* data, |
| 20 intptr_t length, |
| 21 intptr_t& outputLength) = 0; |
| 22 |
| 23 public: |
| 24 static Dart_Handle SetFilterPointerNativeField(Dart_Handle filter, |
| 25 Filter* filter_pointer); |
| 26 static Dart_Handle GetFilterPointerNativeField(Dart_Handle filter, |
| 27 Filter** filter_pointer); |
| 28 }; |
| 29 |
| 30 class ZLibFilter : public Filter { |
| 31 public: |
| 32 virtual ~ZLibFilter(); |
| 33 |
| 34 public: |
| 35 virtual bool Init(); |
| 36 virtual uint8_t* Process(uint8_t* data, |
| 37 intptr_t length, |
| 38 intptr_t& outputLength); |
| 39 }; |
| 40 |
| 41 #endif // BIN_FILTER_H_ |
| 42 |
| OLD | NEW |