Jeremy Joslin | d1daf6d | 2016-11-28 17:47:35 -0800 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (c) 2016, The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.net; |
| 18 | |
Jeremy Joslin | e7f273d | 2016-12-13 16:11:51 -0800 | [diff] [blame] | 19 | import android.net.NetworkKey; |
Jeremy Joslin | d1daf6d | 2016-11-28 17:47:35 -0800 | [diff] [blame] | 20 | import android.net.RecommendationRequest; |
| 21 | import android.os.IRemoteCallback; |
| 22 | |
| 23 | /** |
| 24 | * The service responsible for answering network recommendation requests. |
| 25 | * @hide |
| 26 | */ |
| 27 | oneway interface INetworkRecommendationProvider { |
| 28 | |
| 29 | /** |
| 30 | * Request a recommendation for the best network to connect to |
| 31 | * taking into account the inputs from the {@link RecommendationRequest}. |
| 32 | * |
| 33 | * @param request a {@link RecommendationRequest} instance containing the details of the request |
| 34 | * @param callback a {@link IRemoteCallback} instance to invoke when the recommendation |
| 35 | * is available |
| 36 | * @param sequence an internal number used for tracking the request |
| 37 | * @hide |
| 38 | */ |
| 39 | void requestRecommendation(in RecommendationRequest request, |
| 40 | in IRemoteCallback callback, |
| 41 | int sequence); |
Jeremy Joslin | e7f273d | 2016-12-13 16:11:51 -0800 | [diff] [blame] | 42 | |
| 43 | /** |
| 44 | * Request scoring for networks. |
| 45 | * |
| 46 | * Implementations should use {@link NetworkScoreManager#updateScores(ScoredNetwork[])} to |
| 47 | * respond to score requests. |
| 48 | * |
| 49 | * @param networks an array of {@link NetworkKey}s to score |
| 50 | * @hide |
| 51 | */ |
| 52 | void requestScores(in NetworkKey[] networks); |
Jeremy Joslin | d1daf6d | 2016-11-28 17:47:35 -0800 | [diff] [blame] | 53 | } |