DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (dcc6d7a0dc00)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
/* 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;
interface nsIPresentationChannelDescription;
interface nsISocketTransport;

%{C++
#define PRESENTATION_SESSION_TRANSPORT_CONTRACTID \
  "@mozilla.org/presentation/presentationsessiontransport;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);
};

/*
 * App-to-App transport channel for the presentation session.
 */
[scriptable, uuid(5d23ea5f-a7e5-4cf0-8fa5-6b0abd106bf2)]
interface nsIPresentationSessionTransport : nsISupports
{
  attribute nsIPresentationSessionTransportCallback callback;
  readonly attribute nsINetAddr selfAddress;

  /*
   * Initialize the transport channel with an existent socket transport. (This
   * is primarily used at the sender side.)
   * @param transport The socket transport.
   * @param callback The callback for followup notifications.
   */
  void initWithSocketTransport(in nsISocketTransport transport,
                               in nsIPresentationSessionTransportCallback callback);

  /*
   * Initialize the transport channel with the channel description. (This is
   * primarily used at the receiver side.)
   * @param description The channel description.
   * @param callback The callback for followup notifications.
   */
  void initWithChannelDescription(in nsIPresentationChannelDescription description,
                                  in nsIPresentationSessionTransportCallback callback);

  /*
   * Enable the notification for incoming data. |notifyData| of
   * |nsIPresentationSessionTransportCallback| can start getting invoked.
   */
  void enableDataNotification();

  /*
   * Send message to the remote endpoint.
   * @param data The message to send.
   */
  void send(in nsIInputStream data);

  /*
   * Close this session transport.
   * @param reason The reason for closing this session transport.
   */
  void close(in nsresult reason);
};