INetworkRecommendationProvider.aidl revision b2087a159bad795b7d6575788800fcad3319700a
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
17package android.net;
18
19import android.net.NetworkKey;
20import 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);
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);
53}