mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibWeb/Streams: Put algorithm definitions in a separate header file
To solve a future cyclic dependency problem.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
f110edebd1
commit
c6d0f87bb7
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <LibGC/Ptr.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/Streams/Algorithms.h>
|
||||
#include <LibWeb/Streams/ReadableStream.h>
|
||||
#include <LibWeb/WebIDL/CallbackType.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
@@ -19,16 +20,6 @@
|
||||
|
||||
namespace Web::Streams {
|
||||
|
||||
using SizeAlgorithm = GC::Function<JS::Completion(JS::Value)>;
|
||||
using PullAlgorithm = GC::Function<GC::Ref<WebIDL::Promise>()>;
|
||||
using CancelAlgorithm = GC::Function<GC::Ref<WebIDL::Promise>(JS::Value)>;
|
||||
using StartAlgorithm = GC::Function<WebIDL::ExceptionOr<JS::Value>()>;
|
||||
using AbortAlgorithm = GC::Function<GC::Ref<WebIDL::Promise>(JS::Value)>;
|
||||
using CloseAlgorithm = GC::Function<GC::Ref<WebIDL::Promise>()>;
|
||||
using WriteAlgorithm = GC::Function<GC::Ref<WebIDL::Promise>(JS::Value)>;
|
||||
using FlushAlgorithm = GC::Function<GC::Ref<WebIDL::Promise>()>;
|
||||
using TransformAlgorithm = GC::Function<GC::Ref<WebIDL::Promise>(JS::Value)>;
|
||||
|
||||
WebIDL::ExceptionOr<GC::Ref<ReadableStreamDefaultReader>> acquire_readable_stream_default_reader(ReadableStream&);
|
||||
WebIDL::ExceptionOr<GC::Ref<ReadableStreamBYOBReader>> acquire_readable_stream_byob_reader(ReadableStream&);
|
||||
bool is_readable_stream_locked(ReadableStream const&);
|
||||
|
||||
26
Libraries/LibWeb/Streams/Algorithms.h
Normal file
26
Libraries/LibWeb/Streams/Algorithms.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibGC/Function.h>
|
||||
#include <LibGC/Ptr.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
#include <LibWeb/WebIDL/Promise.h>
|
||||
|
||||
namespace Web::Streams {
|
||||
|
||||
using SizeAlgorithm = GC::Function<JS::Completion(JS::Value)>;
|
||||
using PullAlgorithm = GC::Function<GC::Ref<WebIDL::Promise>()>;
|
||||
using CancelAlgorithm = GC::Function<GC::Ref<WebIDL::Promise>(JS::Value)>;
|
||||
using StartAlgorithm = GC::Function<WebIDL::ExceptionOr<JS::Value>()>;
|
||||
using AbortAlgorithm = GC::Function<GC::Ref<WebIDL::Promise>(JS::Value)>;
|
||||
using CloseAlgorithm = GC::Function<GC::Ref<WebIDL::Promise>()>;
|
||||
using WriteAlgorithm = GC::Function<GC::Ref<WebIDL::Promise>(JS::Value)>;
|
||||
using FlushAlgorithm = GC::Function<GC::Ref<WebIDL::Promise>()>;
|
||||
using TransformAlgorithm = GC::Function<GC::Ref<WebIDL::Promise>(JS::Value)>;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user