dom/network/interfaces/nsIDOMNetworkStats.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/network/interfaces/nsIDOMNetworkStats.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,48 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nsISupports.idl"
     1.9 +
    1.10 +interface nsIDOMMozNetworkStatsInterface;
    1.11 +
    1.12 +[scriptable, builtinclass, uuid(3b16fe17-5583-483a-b486-b64a3243221c)]
    1.13 +interface nsIDOMMozNetworkStatsData : nsISupports
    1.14 +{
    1.15 +  readonly attribute unsigned long   rxBytes;   // Received bytes.
    1.16 +  readonly attribute unsigned long   txBytes;   // Sent bytes.
    1.17 +  readonly attribute jsval           date;      // Date.
    1.18 +};
    1.19 +
    1.20 +[scriptable, builtinclass, uuid(f1996e44-1057-4d4b-8ff8-919e76c4cfa9)]
    1.21 +interface nsIDOMMozNetworkStats : nsISupports
    1.22 +{
    1.23 +  /**
    1.24 +   * App manifest URL of an application for specifying the per-app stats of the
    1.25 +   * specified app.
    1.26 +   */
    1.27 +  readonly attribute DOMString    appManifestURL;
    1.28 +
    1.29 +  /**
    1.30 +   * Service type is used to retrieve the corresponding "system-only" stats.
    1.31 +   * E.g., "Tethering", "OTA", etc.
    1.32 +   */
    1.33 +  readonly attribute DOMString    serviceType;
    1.34 +
    1.35 +  /**
    1.36 +   * Network the returned data belongs to.
    1.37 +   */
    1.38 +  readonly attribute nsIDOMMozNetworkStatsInterface network;
    1.39 +
    1.40 +  /**
    1.41 +   * Stats for a network.
    1.42 +   */
    1.43 +  readonly attribute jsval        data;      // array of NetworkStatsData.
    1.44 +                                             // one element per day.
    1.45 +
    1.46 +  /**
    1.47 +   * Dates
    1.48 +   */
    1.49 +  readonly attribute jsval        start; // Date.
    1.50 +  readonly attribute jsval        end;   // Date.
    1.51 +};

mercurial