/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsISupports.idl" interface nsIInputStreamCallback; interface nsIEventTarget; %{C++ namespace mozilla { class TimeStamp; } %} native TimeStamp(mozilla::TimeStamp); [builtinclass, scriptable, uuid(ccc3e685-8411-48f0-8b3e-ff6d1fae4809)] interface nsIWebTransportSendStreamStats : nsISupports { [noscript] readonly attribute TimeStamp timestamp; readonly attribute unsigned long long bytesSent; readonly attribute unsigned long long bytesAcknowledged; }; [builtinclass, scriptable, uuid(43ce1145-30ef-41a7-b97d-fa797f7f7d18)] interface nsIWebTransportReceiveStreamStats : nsISupports { [noscript] readonly attribute TimeStamp timestamp; readonly attribute unsigned long long bytesReceived; }; [scriptable, uuid(9c1df3f5-bf04-46b6-9977-eb6389076db8)] interface nsIWebTransportStreamStatsCallback : nsISupports { void onSendStatsAvailable(in nsIWebTransportSendStreamStats aStats); void onReceiveStatsAvailable(in nsIWebTransportReceiveStreamStats aStats); }; [builtinclass, scriptable, uuid(d461b235-6291-4817-adcc-a2a3b3dfc10b)] interface nsIWebTransportReceiveStream : nsISupports { // Sends the STOP_SENDING on the stream. void sendStopSending(in uint8_t aError); void getReceiveStreamStats( in nsIWebTransportStreamStatsCallback aCallback); void asyncWaitForRead(in nsIInputStreamCallback aCallback, in unsigned long aFlags, in unsigned long aRequestedCount, in nsIEventTarget aEventTarget); }; [builtinclass, scriptable, uuid(804f245c-52ea-403c-8a78-f751533bdd70)] interface nsIWebTransportSendStream : nsISupports { // Sends the FIN on the stream. void sendFin(); // Reset the stream with the specified error code. void reset(in uint8_t aErrorCode); void getSendStreamStats(in nsIWebTransportStreamStatsCallback aCallback); }; [builtinclass, scriptable, uuid(f9ecb509-36db-4689-97d6-137639a08750)] interface nsIWebTransportBidirectionalStream : nsISupports { // Sends the STOP_SENDING on the stream. void sendStopSending(in uint8_t aError); // Sends the FIN on the stream. void sendFin(); // Reset the stream with the specified error code. void reset(in uint8_t aErrorCode); void asyncWaitForRead(in nsIInputStreamCallback aCallback, in unsigned long aFlags, in unsigned long aRequestedCount, in nsIEventTarget aEventTarget); };