2023-04-10 18:37:27 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								/*
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Copyright  ( c )  2023 ,  Matthew  Olsson  < mattco @ serenityos . org > 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-25 22:18:43 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								 *  Copyright  ( c )  2023 ,  Shannon  Booth  < shannon @ serenityos . org > 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-10 18:37:27 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  SPDX - License - Identifier :  BSD - 2 - Clause 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# pragma once 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  <LibWeb/Bindings/PlatformObject.h> 
  
						 
					
						
							
								
									
										
										
										
											2023-04-08 06:31:36 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  <LibWeb/Forward.h> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  <LibWeb/Streams/ReadableByteStreamController.h> 
  
						 
					
						
							
								
									
										
										
										
											2023-12-27 21:13:46 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  <LibWeb/WebIDL/Types.h> 
  
						 
					
						
							
								
									
										
										
										
											2023-04-10 18:37:27 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								namespace  Web : : Streams  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								// https://streams.spec.whatwg.org/#readablestreambyobrequest
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								class  ReadableStreamBYOBRequest  :  public  Bindings : : PlatformObject  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    WEB_PLATFORM_OBJECT ( ReadableStreamBYOBRequest ,  Bindings : : PlatformObject ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    GC_DECLARE_ALLOCATOR ( ReadableStreamBYOBRequest ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-10 18:37:27 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								public :  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    virtual  ~ ReadableStreamBYOBRequest ( )  override  =  default ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    GC : : Ptr < WebIDL : : ArrayBufferView >  view ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-10 18:37:27 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    void  set_controller ( GC : : Ptr < ReadableByteStreamController >  value )  {  m_controller  =  value ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-08 06:31:36 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    void  set_view ( GC : : Ptr < WebIDL : : ArrayBufferView >  value )  {  m_view  =  value ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-08 06:31:36 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-12-27 21:13:46 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    WebIDL : : ExceptionOr < void >  respond ( WebIDL : : UnsignedLongLong  bytes_written ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    WebIDL : : ExceptionOr < void >  respond_with_new_view ( GC : : Root < WebIDL : : ArrayBufferView >  const &  view ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-02 21:30:36 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-10 18:37:27 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								private :  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    explicit  ReadableStreamBYOBRequest ( JS : : Realm & ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-12-02 20:04:31 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    virtual  void  initialize ( JS : : Realm & )  override ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-04-10 18:37:27 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    virtual  void  visit_edges ( Cell : : Visitor & )  override ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // https://streams.spec.whatwg.org/#readablestreambyobrequest-controller
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // The parent ReadableByteStreamController instance
 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    GC : : Ptr < ReadableByteStreamController >  m_controller ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-10 18:37:27 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // https://streams.spec.whatwg.org/#readablestreambyobrequest-view
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // A typed array representing the destination region to which the controller can write generated data, or null after the BYOB request has been invalidated.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    GC : : Ptr < WebIDL : : ArrayBufferView >  m_view ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-10 18:37:27 -07:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								} ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}