|
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/. */ |
|
4 |
|
5 #include "nsISupports.idl" |
|
6 |
|
7 interface nsIDOMMozNetworkStatsInterface; |
|
8 |
|
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 }; |
|
16 |
|
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; |
|
25 |
|
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; |
|
31 |
|
32 /** |
|
33 * Network the returned data belongs to. |
|
34 */ |
|
35 readonly attribute nsIDOMMozNetworkStatsInterface network; |
|
36 |
|
37 /** |
|
38 * Stats for a network. |
|
39 */ |
|
40 readonly attribute jsval data; // array of NetworkStatsData. |
|
41 // one element per day. |
|
42 |
|
43 /** |
|
44 * Dates |
|
45 */ |
|
46 readonly attribute jsval start; // Date. |
|
47 readonly attribute jsval end; // Date. |
|
48 }; |