Bumping manifests a=b2g-bump
[gecko.git] / dom / webidl / ResourceStats.webidl
blobb356a3eec7ed9b87a72e9ecb33109b5a31618df2
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  */
7 [CheckPermissions="resourcestats-manage",
8  Pref="dom.resource_stats.enabled",
9  AvailableIn="CertifiedApps",
10  JSImplementation="@mozilla.org/networkStatsData;1"]
11 interface NetworkStatsData
13   readonly attribute unsigned long long   receivedBytes;
14   readonly attribute unsigned long long   sentBytes;
15   readonly attribute DOMTimeStamp         timestamp;      // timestamp of the record
18 [CheckPermissions="resourcestats-manage",
19  Pref="dom.resource_stats.enabled",
20  AvailableIn="CertifiedApps",
21  JSImplementation="@mozilla.org/powerStatsData;1"]
22 interface PowerStatsData
24   readonly attribute unsigned long long   consumedPower;  // unit: mW
25   readonly attribute DOMTimeStamp         timestamp;      // timestamp of the record
28 [CheckPermissions="resourcestats-manage",
29  Pref="dom.resource_stats.enabled",
30  AvailableIn="CertifiedApps",
31  JSImplementation="@mozilla.org/resourceStats;1"]
32 interface ResourceStats
34   /**
35    * Type of statistics/
36    */
37   readonly attribute ResourceType   type;
39   /**
40    * The |component| specifies statistics belongs to. This will be null if
41    * the ResourceStatsOptions.component argument passed to getStats() is null.
42    */
43   readonly attribute DOMString?     component;
45   /**
46    * |serviceType| specifies the system service. This will be null if the
47    * ResourceStatsOptions.serviceType argument passed to getStats() is null.
48    */
49   readonly attribute SystemService? serviceType;
51   /**
52    * |manifestURL| specifies the manifestURL of an application. This will be
53    * null if the ResourceStatsOptions.manifestURL argument passed to getStats()
54    * is null.
55    */
56   readonly attribute DOMString?     manifestURL;
58   /**
59    * Statistics, one element per day
60    */
61   sequence<(NetworkStatsData or PowerStatsData)> getData();
63   /**
64    * Date range
65    */
66   readonly attribute DOMTimeStamp   start;  // start timestamp
67   readonly attribute DOMTimeStamp   end;    // end timestamp