| Index: runtime/bin/filter.h
|
| diff --git a/runtime/bin/filter.h b/runtime/bin/filter.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ac58a683865a658069f741bb3a2a701e64a4b3d3
|
| --- /dev/null
|
| +++ b/runtime/bin/filter.h
|
| @@ -0,0 +1,42 @@
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +
|
| +#ifndef BIN_FILTER_H_
|
| +#define BIN_FILTER_H_
|
| +
|
| +#include "bin/builtin.h"
|
| +#include "bin/utils.h"
|
| +
|
| +
|
| +class Filter {
|
| + protected:
|
| + Filter() {}
|
| + virtual ~Filter() {}
|
| +
|
| + public:
|
| + virtual bool Init() = 0;
|
| + virtual uint8_t* Process(uint8_t* data,
|
| + intptr_t length,
|
| + intptr_t& outputLength) = 0;
|
| +
|
| + public:
|
| + static Dart_Handle SetFilterPointerNativeField(Dart_Handle filter,
|
| + Filter* filter_pointer);
|
| + static Dart_Handle GetFilterPointerNativeField(Dart_Handle filter,
|
| + Filter** filter_pointer);
|
| +};
|
| +
|
| +class ZLibFilter : public Filter {
|
| + public:
|
| + virtual ~ZLibFilter();
|
| +
|
| + public:
|
| + virtual bool Init();
|
| + virtual uint8_t* Process(uint8_t* data,
|
| + intptr_t length,
|
| + intptr_t& outputLength);
|
| +};
|
| +
|
| +#endif // BIN_FILTER_H_
|
| +
|
|
|