1/*
2 * Copyright (C) 2008 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 com.android.phone;
18
19import com.android.phone.INetworkQueryServiceCallback;
20
21/**
22 * Service interface to handle queries for available networks.  The
23 * Phone application lets this service interface handle carrier
24 * availability queries instead of making direct calls to the Phone layer.
25 */
26oneway interface INetworkQueryService {
27
28    /**
29     * Starts a network query if it has not been started yet, and
30     * request a callback through the INetworkQueryServiceCallback
31     * object on query completion.  If there is an existing request,
32     * then just add the callback to the list of notifications
33     * that will be sent upon query completion.
34     */
35    void startNetworkQuery(in INetworkQueryServiceCallback cb, in int phoneId);
36
37    /**
38     * Tells the service that the requested query is to be ignored.
39     * This may not do anything for the Query request in the
40     * underlying RIL, but it ensures that the callback is removed
41     * from the list of notifications.
42     */
43    void stopNetworkQuery(in INetworkQueryServiceCallback cb);
44
45    /**
46     * Tells the service to unregister the network query callback.
47     * Will not attempt to stop an ongoing network query.
48     * Functionally may be the same as stopNetworkQuery since that
49     * function also does not stop a query request in the underlying
50     * RIL.
51     */
52    void unregisterCallback(in INetworkQueryServiceCallback cb);
53}
54