diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /dom/presentation/interfaces/nsIPresentationSessionTransport.idl | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/presentation/interfaces/nsIPresentationSessionTransport.idl')
-rw-r--r-- | dom/presentation/interfaces/nsIPresentationSessionTransport.idl | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/dom/presentation/interfaces/nsIPresentationSessionTransport.idl b/dom/presentation/interfaces/nsIPresentationSessionTransport.idl new file mode 100644 index 0000000000..f5b7187b21 --- /dev/null +++ b/dom/presentation/interfaces/nsIPresentationSessionTransport.idl @@ -0,0 +1,70 @@ +/* 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 nsIInputStream; +interface nsINetAddr; + +webidl Blob; + +%{C++ +#define PRESENTATION_TCP_SESSION_TRANSPORT_CONTRACTID \ + "@mozilla.org/presentation/presentationtcpsessiontransport;1" +%} + +/* + * The callback for session transport events. + */ +[scriptable, uuid(9f158786-41a6-4a10-b29b-9497f25d4b67)] +interface nsIPresentationSessionTransportCallback : nsISupports +{ + void notifyTransportReady(); + void notifyTransportClosed(in nsresult reason); + void notifyData(in ACString data, in boolean isBinary); +}; + +/* + * App-to-App transport channel for the presentation session. + */ +[scriptable, uuid(670b7e1b-65be-42b6-a596-be571907fa18)] +interface nsIPresentationSessionTransport : nsISupports +{ + // Should be set once the underlying session transport is built + attribute nsIPresentationSessionTransportCallback callback; + + // valid for TCP session transport + readonly attribute nsINetAddr selfAddress; + + /* + * Enable the notification for incoming data. |notifyData| of + * |nsIPresentationSessionTransportCallback| can start getting invoked. + * Should set callback before |enableDataNotification| is called. + */ + void enableDataNotification(); + + /* + * Send message to the remote endpoint. + * @param data The message to send. + */ + void send(in AString data); + + /* + * Send the binary message to the remote endpoint. + * @param data: the message being sent out. + */ + void sendBinaryMsg(in ACString data); + + /* + * Send the blob to the remote endpoint. + * @param blob: The input blob to be sent. + */ + void sendBlob(in Blob blob); + + /* + * Close this session transport. + * @param reason The reason for closing this session transport. + */ + void close(in nsresult reason); +}; |