1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/base/public/nsIDashboard.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,52 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#include "nsISupports.idl" 1.9 + 1.10 +/* A JavaScript callback function that takes a JSON as its parameter. 1.11 + * The returned JSON contains arrays with data 1.12 + */ 1.13 +[scriptable, function, uuid(19d7f24f-a95a-4fd9-87e2-d96e9e4b1f6d)] 1.14 +interface NetDashboardCallback : nsISupports 1.15 +{ 1.16 + void onDashboardDataAvailable(in jsval data); 1.17 +}; 1.18 + 1.19 +/* The dashboard service. 1.20 + * The async API returns JSONs, which hold arrays with the required info. 1.21 + * Only one request of each type may be pending at any time. 1.22 + */ 1.23 +[scriptable, uuid(c79eb3c6-091a-45a6-8544-5a8d1ab79537)] 1.24 +interface nsIDashboard : nsISupports 1.25 +{ 1.26 + /* Arrays: host, port, tcp, active, socksent, sockreceived 1.27 + * Values: sent, received */ 1.28 + void requestSockets(in NetDashboardCallback cb); 1.29 + 1.30 + /* Arrays: host, port, spdy, ssl 1.31 + * Array of arrays: active, idle */ 1.32 + void requestHttpConnections(in NetDashboardCallback cb); 1.33 + 1.34 + /* Arrays: hostport, encrypted, msgsent, msgreceived, sentsize, receivedsize */ 1.35 + void requestWebsocketConnections(in NetDashboardCallback cb); 1.36 + 1.37 + /* Arrays: hostname, family, hostaddr, expiration */ 1.38 + void requestDNSInfo(in NetDashboardCallback cb); 1.39 + 1.40 + /* aProtocol: a transport layer protocol: 1.41 + * ex: "ssl", "tcp", default is "tcp". 1.42 + * aHost: the host's name 1.43 + * aPort: the port which the connection will open on 1.44 + * aTimeout: the timespan before the connection will be timed out */ 1.45 + void requestConnection(in ACString aHost, in unsigned long aPort, 1.46 + in string aProtocol, in unsigned long aTimeout, 1.47 + in NetDashboardCallback cb); 1.48 + 1.49 + /* When true, the service will log websocket events */ 1.50 + attribute boolean enableLogging; 1.51 + 1.52 + /* DNS resolver for host name 1.53 + * aHost: host name */ 1.54 + void requestDNSLookup(in ACString aHost, in NetDashboardCallback cb); 1.55 +};