• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
17 package com.android.phone;
18 
19 import 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  */
26 oneway 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      * It will send the network query with the use of
36      * <code>TelephonyManager.requestNetworkScan()</code> if the
37      * isIncrementalResult is true. And if the isIncrementalResult
38      * is set as false, it will try to send network query through
39      * <code>Phone.getAvailableNetworks()</code>.
40      */
startNetworkQuery(in INetworkQueryServiceCallback cb, in int phoneId, boolean isIncrementalResult)41     void startNetworkQuery(in INetworkQueryServiceCallback cb, in int phoneId, boolean isIncrementalResult);
42 
43     /**
44      * Tells the service that the requested query is to be ignored.
45      * This may not do anything for the Query request in the
46      * underlying RIL, but it ensures that the callback is removed
47      * from the list of notifications.
48      */
stopNetworkQuery()49     void stopNetworkQuery();
50 
51     /**
52      * Tells the service to unregister the network query callback.
53      * Will not attempt to stop an ongoing network query.
54      * Functionally may be the same as stopNetworkQuery since that
55      * function also does not stop a query request in the underlying
56      * RIL.
57      */
unregisterCallback(in INetworkQueryServiceCallback cb)58     void unregisterCallback(in INetworkQueryServiceCallback cb);
59 }
60