blob: 052c92c0309f82eac3cbda4aca678ae717e262dd [file] [log] [blame]
Jeremy Joslind1daf6d2016-11-28 17:47:35 -08001/**
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
17package android.net;
18
Jeremy Josline7f273d2016-12-13 16:11:51 -080019import android.net.NetworkKey;
Jeremy Joslind1daf6d2016-11-28 17:47:35 -080020import android.net.RecommendationRequest;
21import android.os.IRemoteCallback;
22
23/**
24 * The service responsible for answering network recommendation requests.
25 * @hide
26 */
27oneway 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 Josline7f273d2016-12-13 16:11:51 -080042
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 Joslind1daf6d2016-11-28 17:47:35 -080053}