mirror of
https://github.com/openharmony/ark_js_runtime.git
synced 2026-08-27 10:41:15 -04:00
cf9ab9530c
1. add FileStream::Good 2. dump default file when input file is invalid issue:https://gitee.com/wwx1083752/ark_js_runtime/issues/I55E7O Signed-off-by: wwx1083752 <wubinbin33@huawei.com>
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) 2021-2022 Huawei Device Co., Ltd.
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
#ifndef ECMASCRIPT_TOOLING_INTERFACE_STREAM_H
|
|
#define ECMASCRIPT_TOOLING_INTERFACE_STREAM_H
|
|
|
|
namespace panda::ecmascript {
|
|
class Stream {
|
|
public:
|
|
virtual ~Stream() = default;
|
|
|
|
virtual void EndOfStream() = 0;
|
|
|
|
// Get chunk's size
|
|
virtual int GetSize() = 0;
|
|
|
|
// Writes the chunk of data into the stream
|
|
virtual bool WriteChunk(char* data, int size) = 0;
|
|
virtual bool Good() = 0;
|
|
};
|
|
} // namespace panda::ecmascript
|
|
|
|
#endif // ECMASCRIPT_TOOLING_INTERFACE_STREAM_H
|