1b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey/* 2b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey * Copyright (C) 2012 The Android Open Source Project 3b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey * 4b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey * Licensed under the Apache License, Version 2.0 (the "License"); 5b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey * you may not use this file except in compliance with the License. 6b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey * You may obtain a copy of the License at 7b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey * 8b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey * http://www.apache.org/licenses/LICENSE-2.0 9b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey * 10b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey * Unless required by applicable law or agreed to in writing, software 11b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey * distributed under the License is distributed on an "AS IS" BASIS, 12b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey * See the License for the specific language governing permissions and 14b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey * limitations under the License. 15b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey */ 16b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey 17b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkeypackage android.net; 18b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey 19b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkeyimport android.net.NetworkStats; 20b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkeyimport android.net.NetworkStatsHistory; 21b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkeyimport android.net.NetworkTemplate; 22b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey 23b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey/** {@hide} */ 24b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkeyinterface INetworkStatsSession { 25b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey 26b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey /** Return network layer usage summary for traffic that matches template. */ 27b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey NetworkStats getSummaryForNetwork(in NetworkTemplate template, long start, long end); 28b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey /** Return historical network layer stats for traffic that matches template. */ 29b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey NetworkStatsHistory getHistoryForNetwork(in NetworkTemplate template, int fields); 30b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey 31b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey /** Return network layer usage summary per UID for traffic that matches template. */ 32b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey NetworkStats getSummaryForAllUid(in NetworkTemplate template, long start, long end, boolean includeTags); 33b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey /** Return historical network layer stats for specific UID traffic that matches template. */ 34b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey NetworkStatsHistory getHistoryForUid(in NetworkTemplate template, int uid, int set, int tag, int fields); 35b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey 36b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey void close(); 37b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey 38b52e3e55098c4a6e3dbfe19885895411cfb38911Jeff Sharkey} 39