/* 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"

[scriptable, uuid(0105f837-4279-4715-9d5b-2dc3f8b65353)]
interface nsIPresentationListener : nsISupports
{
  /*
   * Called when device availability changes.
   */
  void notifyAvailableChange(in bool available);
};

[scriptable, uuid(3b9ae71f-2905-4969-9117-101627c1c2ea)]
interface nsIPresentationSessionListener : nsISupports
{
  const unsigned short STATE_CONNECTED = 0;
  const unsigned short STATE_DISCONNECTED = 1;
  const unsigned short STATE_TERMINATED = 2;

  /*
   * Called when session state changes.
   */
  void notifyStateChange(in DOMString sessionId,
                         in unsigned short state);

  /*
   * Called when receive messages.
   */
  void notifyMessage(in DOMString sessionId,
                     in ACString data);
};
