tenfourfox/dom/presentation/interfaces/nsIPresentationListener.idl
Cameron Kaiser c9b2922b70 hello FPR
2017-04-19 00:56:45 -07:00

45 lines
1.2 KiB
Plaintext

/* 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 nsIPresentationAvailabilityListener : nsISupports
{
/*
* Called when device availability changes.
*/
void notifyAvailableChange(in bool available);
};
[scriptable, uuid(7dd48df8-8f8c-48c7-ac37-7b9fd1acf2f8)]
interface nsIPresentationSessionListener : nsISupports
{
const unsigned short STATE_CONNECTED = 0;
const unsigned short STATE_CLOSED = 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);
};
[scriptable, uuid(27f101d7-9ed1-429e-b4f8-43b00e8e111c)]
interface nsIPresentationRespondingListener : nsISupports
{
/*
* Called when an incoming session connects.
*/
void notifySessionConnect(in uint64_t windowId,
in DOMString sessionId);
};