2012-12-10 18:13:55 +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"
|
|
|
|
|
|
|
|
/* A JavaScript callback function that takes a JSON as its parameter.
|
|
|
|
* The returned JSON contains arrays with data
|
|
|
|
*/
|
|
|
|
[scriptable, function, uuid(19d7f24f-a95a-4fd9-87e2-d96e9e4b1f6d)]
|
|
|
|
interface NetDashboardCallback : nsISupports
|
|
|
|
{
|
|
|
|
void onDashboardDataAvailable(in jsval data);
|
|
|
|
};
|
|
|
|
|
|
|
|
/* The dashboard service.
|
|
|
|
* The async API returns JSONs, which hold arrays with the required info.
|
|
|
|
* Only one request of each type may be pending at any time.
|
|
|
|
*/
|
|
|
|
[scriptable, uuid(c79eb3c6-091a-45a6-8544-5a8d1ab79537)]
|
|
|
|
interface nsIDashboard : nsISupports
|
|
|
|
{
|
|
|
|
/* Arrays: host, port, tcp, active, socksent, sockreceived
|
|
|
|
* Values: sent, received */
|
|
|
|
void requestSockets(in NetDashboardCallback cb);
|
|
|
|
|
|
|
|
/* Arrays: host, port, spdy, ssl
|
|
|
|
* Array of arrays: active, idle */
|
|
|
|
void requestHttpConnections(in NetDashboardCallback cb);
|
|
|
|
|
|
|
|
/* Arrays: hostport, encrypted, msgsent, msgreceived, sentsize, receivedsize */
|
|
|
|
void requestWebsocketConnections(in NetDashboardCallback cb);
|
|
|
|
|
|
|
|
/* Arrays: hostname, family, hostaddr, expiration */
|
|
|
|
void requestDNSInfo(in NetDashboardCallback cb);
|
|
|
|
|
2013-07-31 17:16:44 +04:00
|
|
|
/* aProtocol: a transport layer protocol:
|
|
|
|
* ex: "ssl", "tcp", default is "tcp".
|
|
|
|
* aHost: the host's name
|
|
|
|
* aPort: the port which the connection will open on
|
|
|
|
* aTimeout: the timespan before the connection will be timed out */
|
|
|
|
void requestConnection(in ACString aHost, in unsigned long aPort,
|
|
|
|
in string aProtocol, in unsigned long aTimeout,
|
|
|
|
in NetDashboardCallback cb);
|
|
|
|
|
2012-12-10 18:13:55 +04:00
|
|
|
/* When true, the service will log websocket events */
|
|
|
|
attribute boolean enableLogging;
|
2013-08-02 20:42:45 +04:00
|
|
|
|
|
|
|
/* DNS resolver for host name
|
|
|
|
* aHost: host name */
|
|
|
|
void requestDNSLookup(in ACString aHost, in NetDashboardCallback cb);
|
2016-09-29 22:03:49 +03:00
|
|
|
|
2017-05-10 20:23:54 +03:00
|
|
|
/**
|
|
|
|
* Asyncly returns stats regarding the "Race Cache With Network" feature.
|
|
|
|
*/
|
|
|
|
void requestRcwnStats(in NetDashboardCallback cb);
|
|
|
|
|
2016-09-29 22:03:49 +03:00
|
|
|
AUTF8String getLogPath();
|
2012-12-10 18:13:55 +04:00
|
|
|
};
|