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 nsINetworkInterface; michael@0: michael@0: [scriptable, function, uuid(5f821529-1d80-4ab5-a933-4e1b3585b6bc)] michael@0: interface nsINetworkStatsServiceProxyCallback : nsISupports michael@0: { michael@0: /* michael@0: * @param aResult callback result with boolean value michael@0: * @param aMessage message michael@0: */ michael@0: void notify(in boolean aResult, in jsval aMessage); michael@0: }; michael@0: michael@0: [scriptable, uuid(705c01d6-8574-464c-8ec9-ac1522a45546)] michael@0: interface nsINetworkStatsServiceProxy : nsISupports michael@0: { michael@0: /* michael@0: * An interface used to record per-app traffic data. michael@0: * @param aAppId app id michael@0: * @param aNetworkInterface network michael@0: * @param aTimeStamp time stamp michael@0: * @param aRxBytes received data amount michael@0: * @param aTxBytes transmitted data amount michael@0: * @param aIsAccumulative is stats accumulative michael@0: * @param aCallback an optional callback michael@0: */ michael@0: void saveAppStats(in unsigned long aAppId, michael@0: in nsINetworkInterface aNetwork, michael@0: in unsigned long long aTimeStamp, michael@0: in unsigned long long aRxBytes, michael@0: in unsigned long long aTxBytes, michael@0: in boolean aIsAccumulative, michael@0: [optional] in nsINetworkStatsServiceProxyCallback aCallback); michael@0: michael@0: /* michael@0: * An interface used to record per-system service traffic data. michael@0: * @param aServiceType system service type michael@0: * @param aNetworkInterface network michael@0: * @param aTimeStamp time stamp michael@0: * @param aRxBytes received data amount michael@0: * @param aTxBytes transmitted data amount michael@0: * @param aIsAccumulative is stats accumulative michael@0: * @param aCallback an optional callback michael@0: */ michael@0: void saveServiceStats(in string aServiceType, michael@0: in nsINetworkInterface aNetwork, michael@0: in unsigned long long aTimeStamp, michael@0: in unsigned long long aRxBytes, michael@0: in unsigned long long aTxBytes, michael@0: in boolean aIsAccumulative, michael@0: [optional] in nsINetworkStatsServiceProxyCallback aCallback); michael@0: };