Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "nsISupports.idl"
7 interface nsIDOMMozNetworkStatsInterface;
9 [scriptable, builtinclass, uuid(3b16fe17-5583-483a-b486-b64a3243221c)]
10 interface nsIDOMMozNetworkStatsData : nsISupports
11 {
12 readonly attribute unsigned long rxBytes; // Received bytes.
13 readonly attribute unsigned long txBytes; // Sent bytes.
14 readonly attribute jsval date; // Date.
15 };
17 [scriptable, builtinclass, uuid(f1996e44-1057-4d4b-8ff8-919e76c4cfa9)]
18 interface nsIDOMMozNetworkStats : nsISupports
19 {
20 /**
21 * App manifest URL of an application for specifying the per-app stats of the
22 * specified app.
23 */
24 readonly attribute DOMString appManifestURL;
26 /**
27 * Service type is used to retrieve the corresponding "system-only" stats.
28 * E.g., "Tethering", "OTA", etc.
29 */
30 readonly attribute DOMString serviceType;
32 /**
33 * Network the returned data belongs to.
34 */
35 readonly attribute nsIDOMMozNetworkStatsInterface network;
37 /**
38 * Stats for a network.
39 */
40 readonly attribute jsval data; // array of NetworkStatsData.
41 // one element per day.
43 /**
44 * Dates
45 */
46 readonly attribute jsval start; // Date.
47 readonly attribute jsval end; // Date.
48 };