2013-08-14 14:05:35 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2015-07-29 09:15:00 +03:00
|
|
|
interface nsINetworkInfo;
|
2013-10-15 14:01:16 +04:00
|
|
|
|
2013-08-14 14:05:35 +04:00
|
|
|
[scriptable, function, uuid(5f821529-1d80-4ab5-a933-4e1b3585b6bc)]
|
|
|
|
interface nsINetworkStatsServiceProxyCallback : nsISupports
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* @param aResult callback result with boolean value
|
|
|
|
* @param aMessage message
|
|
|
|
*/
|
|
|
|
void notify(in boolean aResult, in jsval aMessage);
|
|
|
|
};
|
|
|
|
|
2015-07-29 09:15:00 +03:00
|
|
|
[scriptable, uuid(f4f3e901-e102-499d-9d37-dc9951f52df7)]
|
2013-08-14 14:05:35 +04:00
|
|
|
interface nsINetworkStatsServiceProxy : nsISupports
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* An interface used to record per-app traffic data.
|
|
|
|
* @param aAppId app id
|
2016-02-18 05:55:57 +03:00
|
|
|
* @param aIsInIsolatedMozBrowser
|
|
|
|
* true if the frame is an isolated mozbrowser element. <iframe
|
|
|
|
* mozbrowser mozapp> and <xul:browser> are not considered to be
|
|
|
|
* mozbrowser elements. <iframe mozbrowser noisolation> does not count
|
|
|
|
* as isolated since isolation is disabled. Isolation can only be
|
|
|
|
* disabled if the containing document is chrome.
|
2013-10-15 14:01:16 +04:00
|
|
|
* @param aNetworkInterface network
|
2013-08-14 14:05:35 +04:00
|
|
|
* @param aTimeStamp time stamp
|
|
|
|
* @param aRxBytes received data amount
|
|
|
|
* @param aTxBytes transmitted data amount
|
2013-11-22 07:00:16 +04:00
|
|
|
* @param aIsAccumulative is stats accumulative
|
2013-08-14 14:05:35 +04:00
|
|
|
* @param aCallback an optional callback
|
|
|
|
*/
|
|
|
|
void saveAppStats(in unsigned long aAppId,
|
2016-02-18 05:55:57 +03:00
|
|
|
in boolean aIsInIsolatedMozBrowser,
|
2015-07-29 09:15:00 +03:00
|
|
|
in nsINetworkInfo aNetworkInfo,
|
2013-08-14 14:05:35 +04:00
|
|
|
in unsigned long long aTimeStamp,
|
|
|
|
in unsigned long long aRxBytes,
|
|
|
|
in unsigned long long aTxBytes,
|
2013-11-22 07:00:16 +04:00
|
|
|
in boolean aIsAccumulative,
|
2013-08-14 14:05:35 +04:00
|
|
|
[optional] in nsINetworkStatsServiceProxyCallback aCallback);
|
2013-11-22 07:00:16 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* An interface used to record per-system service traffic data.
|
|
|
|
* @param aServiceType system service type
|
|
|
|
* @param aNetworkInterface network
|
|
|
|
* @param aTimeStamp time stamp
|
|
|
|
* @param aRxBytes received data amount
|
|
|
|
* @param aTxBytes transmitted data amount
|
|
|
|
* @param aIsAccumulative is stats accumulative
|
|
|
|
* @param aCallback an optional callback
|
|
|
|
*/
|
|
|
|
void saveServiceStats(in string aServiceType,
|
2015-07-29 09:15:00 +03:00
|
|
|
in nsINetworkInfo aNetworkInfo,
|
2013-11-22 07:00:16 +04:00
|
|
|
in unsigned long long aTimeStamp,
|
|
|
|
in unsigned long long aRxBytes,
|
|
|
|
in unsigned long long aTxBytes,
|
|
|
|
in boolean aIsAccumulative,
|
|
|
|
[optional] in nsINetworkStatsServiceProxyCallback aCallback);
|
2013-08-14 14:05:35 +04:00
|
|
|
};
|