Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #include "nsISupports.idl" |
michael@0 | 6 | |
michael@0 | 7 | /* A JavaScript callback function that takes a JSON as its parameter. |
michael@0 | 8 | * The returned JSON contains arrays with data |
michael@0 | 9 | */ |
michael@0 | 10 | [scriptable, function, uuid(19d7f24f-a95a-4fd9-87e2-d96e9e4b1f6d)] |
michael@0 | 11 | interface NetDashboardCallback : nsISupports |
michael@0 | 12 | { |
michael@0 | 13 | void onDashboardDataAvailable(in jsval data); |
michael@0 | 14 | }; |
michael@0 | 15 | |
michael@0 | 16 | /* The dashboard service. |
michael@0 | 17 | * The async API returns JSONs, which hold arrays with the required info. |
michael@0 | 18 | * Only one request of each type may be pending at any time. |
michael@0 | 19 | */ |
michael@0 | 20 | [scriptable, uuid(c79eb3c6-091a-45a6-8544-5a8d1ab79537)] |
michael@0 | 21 | interface nsIDashboard : nsISupports |
michael@0 | 22 | { |
michael@0 | 23 | /* Arrays: host, port, tcp, active, socksent, sockreceived |
michael@0 | 24 | * Values: sent, received */ |
michael@0 | 25 | void requestSockets(in NetDashboardCallback cb); |
michael@0 | 26 | |
michael@0 | 27 | /* Arrays: host, port, spdy, ssl |
michael@0 | 28 | * Array of arrays: active, idle */ |
michael@0 | 29 | void requestHttpConnections(in NetDashboardCallback cb); |
michael@0 | 30 | |
michael@0 | 31 | /* Arrays: hostport, encrypted, msgsent, msgreceived, sentsize, receivedsize */ |
michael@0 | 32 | void requestWebsocketConnections(in NetDashboardCallback cb); |
michael@0 | 33 | |
michael@0 | 34 | /* Arrays: hostname, family, hostaddr, expiration */ |
michael@0 | 35 | void requestDNSInfo(in NetDashboardCallback cb); |
michael@0 | 36 | |
michael@0 | 37 | /* aProtocol: a transport layer protocol: |
michael@0 | 38 | * ex: "ssl", "tcp", default is "tcp". |
michael@0 | 39 | * aHost: the host's name |
michael@0 | 40 | * aPort: the port which the connection will open on |
michael@0 | 41 | * aTimeout: the timespan before the connection will be timed out */ |
michael@0 | 42 | void requestConnection(in ACString aHost, in unsigned long aPort, |
michael@0 | 43 | in string aProtocol, in unsigned long aTimeout, |
michael@0 | 44 | in NetDashboardCallback cb); |
michael@0 | 45 | |
michael@0 | 46 | /* When true, the service will log websocket events */ |
michael@0 | 47 | attribute boolean enableLogging; |
michael@0 | 48 | |
michael@0 | 49 | /* DNS resolver for host name |
michael@0 | 50 | * aHost: host name */ |
michael@0 | 51 | void requestDNSLookup(in ACString aHost, in NetDashboardCallback cb); |
michael@0 | 52 | }; |