2014-08-27 06:28:03 +04:00
|
|
|
/* 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 nsIPresentationDevice;
|
2015-10-19 05:44:59 +03:00
|
|
|
interface nsIPresentationControlChannel;
|
2014-08-27 06:28:03 +04:00
|
|
|
|
|
|
|
%{C++
|
|
|
|
#define PRESENTATION_DEVICE_PROVIDER_CATEGORY "presentation-device-provider"
|
|
|
|
%}
|
|
|
|
|
|
|
|
/*
|
2015-10-19 05:44:59 +03:00
|
|
|
* The callbacks for any device updates and session request.
|
2014-08-27 06:28:03 +04:00
|
|
|
*/
|
2015-10-19 05:44:59 +03:00
|
|
|
[scriptable, uuid(46fd372b-2e40-4179-9b36-0478d141e440)]
|
2014-08-27 06:28:03 +04:00
|
|
|
interface nsIPresentationDeviceListener: nsISupports
|
|
|
|
{
|
|
|
|
void addDevice(in nsIPresentationDevice device);
|
|
|
|
void removeDevice(in nsIPresentationDevice device);
|
|
|
|
void updateDevice(in nsIPresentationDevice device);
|
2015-10-19 05:44:59 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Callback while the remote device is requesting to start a presentation session.
|
|
|
|
* @param device The remote device that sent session request.
|
|
|
|
* @param url The URL requested to open by remote device.
|
|
|
|
* @param presentationId The Id for representing this session.
|
|
|
|
* @param controlChannel The control channel for this session.
|
|
|
|
*/
|
|
|
|
void onSessionRequest(in nsIPresentationDevice device,
|
|
|
|
in DOMString url,
|
|
|
|
in DOMString presentationId,
|
|
|
|
in nsIPresentationControlChannel controlChannel);
|
2016-05-27 02:22:27 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Callback while the remote device is requesting to terminate a presentation session.
|
|
|
|
* @param device The remote device that sent session request.
|
|
|
|
* @param presentationId The Id for representing this session.
|
|
|
|
* @param controlChannel The control channel for this session.
|
|
|
|
* @param aIsFromReceiver true if termination is initiated by receiver.
|
|
|
|
*/
|
|
|
|
void onTerminateRequest(in nsIPresentationDevice device,
|
|
|
|
in DOMString presentationId,
|
|
|
|
in nsIPresentationControlChannel controlChannel,
|
|
|
|
in boolean aIsFromReceiver);
|
2016-08-02 20:10:00 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Callback while the remote device is requesting to reconnect a presentation session.
|
|
|
|
* @param device The remote device that sent session request.
|
|
|
|
* @param aUrl The URL requested to open by remote device.
|
|
|
|
* @param presentationId The Id for representing this session.
|
|
|
|
* @param controlChannel The control channel for this session.
|
|
|
|
*/
|
|
|
|
void onReconnectRequest(in nsIPresentationDevice device,
|
|
|
|
in DOMString url,
|
|
|
|
in DOMString presentationId,
|
|
|
|
in nsIPresentationControlChannel controlChannel);
|
2014-08-27 06:28:03 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Device provider for any device protocol, can be registered as default
|
|
|
|
* providers by adding its contractID to category "presentation-device-provider".
|
|
|
|
*/
|
|
|
|
[scriptable, uuid(3db2578a-0f50-44ad-b01b-28427b71b7bf)]
|
|
|
|
interface nsIPresentationDeviceProvider: nsISupports
|
|
|
|
{
|
|
|
|
// The listener for handling any device update.
|
|
|
|
attribute nsIPresentationDeviceListener listener;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Force to update device information.
|
|
|
|
*/
|
|
|
|
void forceDiscovery();
|
|
|
|
};
|