dom/network/interfaces/nsINetworkStatsServiceProxy.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/network/interfaces/nsINetworkStatsServiceProxy.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,57 @@
     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 nsINetworkInterface;
    1.11 +
    1.12 +[scriptable, function, uuid(5f821529-1d80-4ab5-a933-4e1b3585b6bc)]
    1.13 +interface nsINetworkStatsServiceProxyCallback : nsISupports
    1.14 +{
    1.15 +  /*
    1.16 +   * @param aResult callback result with boolean value
    1.17 +   * @param aMessage message
    1.18 +   */
    1.19 +  void notify(in boolean aResult, in jsval aMessage);
    1.20 +};
    1.21 +
    1.22 +[scriptable, uuid(705c01d6-8574-464c-8ec9-ac1522a45546)]
    1.23 +interface nsINetworkStatsServiceProxy : nsISupports
    1.24 +{
    1.25 +  /*
    1.26 +   * An interface used to record per-app traffic data.
    1.27 +   * @param aAppId app id
    1.28 +   * @param aNetworkInterface network
    1.29 +   * @param aTimeStamp time stamp
    1.30 +   * @param aRxBytes received data amount
    1.31 +   * @param aTxBytes transmitted data amount
    1.32 +   * @param aIsAccumulative is stats accumulative
    1.33 +   * @param aCallback an optional callback
    1.34 +   */
    1.35 +  void saveAppStats(in unsigned long aAppId,
    1.36 +                    in nsINetworkInterface aNetwork,
    1.37 +                    in unsigned long long aTimeStamp,
    1.38 +                    in unsigned long long aRxBytes,
    1.39 +                    in unsigned long long aTxBytes,
    1.40 +                    in boolean aIsAccumulative,
    1.41 +         [optional] in nsINetworkStatsServiceProxyCallback aCallback);
    1.42 +
    1.43 +  /*
    1.44 +   * An interface used to record per-system service traffic data.
    1.45 +   * @param aServiceType system service type
    1.46 +   * @param aNetworkInterface network
    1.47 +   * @param aTimeStamp time stamp
    1.48 +   * @param aRxBytes received data amount
    1.49 +   * @param aTxBytes transmitted data amount
    1.50 +   * @param aIsAccumulative is stats accumulative
    1.51 +   * @param aCallback an optional callback
    1.52 +   */
    1.53 +  void saveServiceStats(in string aServiceType,
    1.54 +                        in nsINetworkInterface aNetwork,
    1.55 +                        in unsigned long long aTimeStamp,
    1.56 +                        in unsigned long long aRxBytes,
    1.57 +                        in unsigned long long aTxBytes,
    1.58 +                        in boolean aIsAccumulative,
    1.59 +             [optional] in nsINetworkStatsServiceProxyCallback aCallback);
    1.60 +};

mercurial