Bug 1472338: part 2) Change `clipboard.readText()` to read from the clipboard asynchr...
[gecko.git] / dom / fs / FileSystemWritableFileStream.h
blobe17226a71c809b70a2eca4e618f8162fa2b14b50
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef DOM_FS_FILESYSTEMWRITABLEFILESTREAM_H_
8 #define DOM_FS_FILESYSTEMWRITABLEFILESTREAM_H_
10 #include "mozilla/dom/WritableStream.h"
12 namespace mozilla::dom {
14 class ArrayBufferViewOrArrayBufferOrBlobOrUSVStringOrWriteParams;
16 class FileSystemWritableFileStream final : public WritableStream {
17 public:
18 NS_DECL_ISUPPORTS_INHERITED
19 NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(FileSystemWritableFileStream,
20 WritableStream)
22 // WebIDL Boilerplate
23 JSObject* WrapObject(JSContext* aCx,
24 JS::Handle<JSObject*> aGivenProto) override;
26 // WebIDL Interface
27 already_AddRefed<Promise> Write(
28 const ArrayBufferViewOrArrayBufferOrBlobOrUSVStringOrWriteParams& aData);
30 already_AddRefed<Promise> Seek(uint64_t aPosition);
32 already_AddRefed<Promise> Truncate(uint64_t aSize);
34 private:
35 ~FileSystemWritableFileStream() = default;
38 } // namespace mozilla::dom
40 #endif // DOM_FS_FILESYSTEMWRITABLEFILESTREAM_H_