Bug 1814798 - pt 2. Add a PHCManager component to control PHC r=glandium,emilio
[gecko.git] / netwerk / protocol / webtransport / nsIWebTransportStream.idl
blob42b7fb5c4483a6bdb03ba5508d37d528cbc41d83
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 interface nsIAsyncInputStream;
9 interface nsIAsyncOutputStream;
10 interface nsIInputStreamCallback;
11 interface nsIEventTarget;
13 %{C++
14 namespace mozilla {
15 class TimeStamp;
19 native TimeStamp(mozilla::TimeStamp);
21 [builtinclass, scriptable, uuid(ccc3e685-8411-48f0-8b3e-ff6d1fae4809)]
22 interface nsIWebTransportSendStreamStats : nsISupports {
23 [noscript] readonly attribute TimeStamp timestamp;
24 readonly attribute unsigned long long bytesSent;
25 readonly attribute unsigned long long bytesAcknowledged;
28 [builtinclass, scriptable, uuid(43ce1145-30ef-41a7-b97d-fa797f7f7d18)]
29 interface nsIWebTransportReceiveStreamStats : nsISupports {
30 [noscript] readonly attribute TimeStamp timestamp;
31 readonly attribute unsigned long long bytesReceived;
34 [scriptable, uuid(9c1df3f5-bf04-46b6-9977-eb6389076db8)]
35 interface nsIWebTransportStreamStatsCallback : nsISupports {
36 void onSendStatsAvailable(in nsIWebTransportSendStreamStats aStats);
37 void onReceiveStatsAvailable(in nsIWebTransportReceiveStreamStats aStats);
40 [builtinclass, scriptable, uuid(d461b235-6291-4817-adcc-a2a3b3dfc10b)]
41 interface nsIWebTransportReceiveStream : nsISupports {
42 // Sends the STOP_SENDING on the stream.
43 void sendStopSending(in uint8_t aError);
45 void getReceiveStreamStats(
46 in nsIWebTransportStreamStatsCallback aCallback);
48 // When true, this indicates that FIN had been received.
49 readonly attribute boolean hasReceivedFIN;
50 readonly attribute nsIAsyncInputStream inputStream;
51 readonly attribute uint64_t streamId;
54 [builtinclass, scriptable, uuid(804f245c-52ea-403c-8a78-f751533bdd70)]
55 interface nsIWebTransportSendStream : nsISupports {
56 // Sends the FIN on the stream.
57 void sendFin();
59 // Reset the stream with the specified error code.
60 void reset(in uint8_t aErrorCode);
62 void getSendStreamStats(in nsIWebTransportStreamStatsCallback aCallback);
63 readonly attribute nsIAsyncOutputStream outputStream;
64 readonly attribute uint64_t streamId;
65 void setSendOrder(in int64_t aSendOrder);
68 [builtinclass, scriptable, uuid(f9ecb509-36db-4689-97d6-137639a08750)]
69 interface nsIWebTransportBidirectionalStream : nsISupports {
70 // Sends the STOP_SENDING on the stream.
71 void sendStopSending(in uint8_t aError);
73 // Sends the FIN on the stream.
74 void sendFin();
76 // Reset the stream with the specified error code.
77 void reset(in uint8_t aErrorCode);
79 // When true, this indicates that FIN had been received.
80 readonly attribute boolean hasReceivedFIN;
82 readonly attribute nsIAsyncInputStream inputStream;
83 readonly attribute nsIAsyncOutputStream outputStream;
84 readonly attribute uint64_t streamId;
85 void setSendOrder(in int64_t aSendOrder);