michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIDOMMozNetworkStatsInterface; michael@0: michael@0: [scriptable, builtinclass, uuid(3b16fe17-5583-483a-b486-b64a3243221c)] michael@0: interface nsIDOMMozNetworkStatsData : nsISupports michael@0: { michael@0: readonly attribute unsigned long rxBytes; // Received bytes. michael@0: readonly attribute unsigned long txBytes; // Sent bytes. michael@0: readonly attribute jsval date; // Date. michael@0: }; michael@0: michael@0: [scriptable, builtinclass, uuid(f1996e44-1057-4d4b-8ff8-919e76c4cfa9)] michael@0: interface nsIDOMMozNetworkStats : nsISupports michael@0: { michael@0: /** michael@0: * App manifest URL of an application for specifying the per-app stats of the michael@0: * specified app. michael@0: */ michael@0: readonly attribute DOMString appManifestURL; michael@0: michael@0: /** michael@0: * Service type is used to retrieve the corresponding "system-only" stats. michael@0: * E.g., "Tethering", "OTA", etc. michael@0: */ michael@0: readonly attribute DOMString serviceType; michael@0: michael@0: /** michael@0: * Network the returned data belongs to. michael@0: */ michael@0: readonly attribute nsIDOMMozNetworkStatsInterface network; michael@0: michael@0: /** michael@0: * Stats for a network. michael@0: */ michael@0: readonly attribute jsval data; // array of NetworkStatsData. michael@0: // one element per day. michael@0: michael@0: /** michael@0: * Dates michael@0: */ michael@0: readonly attribute jsval start; // Date. michael@0: readonly attribute jsval end; // Date. michael@0: };