Home | History | Annotate | Download | only in phone
      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 android.telephony.CellInfo;
     20 import com.android.internal.telephony.OperatorInfo;
     21 
     22 /**
     23  * Service interface to handle callbacks into the activity from the
     24  * NetworkQueryService.  These objects are used to notify that a
     25  * query is complete and that the results are ready to process.
     26  */
     27 oneway interface INetworkQueryServiceCallback {
     28 
     29     /**
     30      * Returns the scan results to the user, this callback will be
     31      * called at least one time.
     32      */
     33     void onResults(in List<CellInfo> results);
     34 
     35     /**
     36      * Informs the user that the scan has stopped.
     37      *
     38      * This callback will be called when the scan is finished or cancelled by the user.
     39      * The related NetworkScanRequest will be deleted after this callback.
     40      */
     41     void onComplete();
     42 
     43     /**
     44      * Informs the user that there is some error about the scan.
     45      *
     46      * This callback will be called whenever there is any error about the scan,
     47      * and the scan will be terminated. onComplete() will NOT be called.
     48      */
     49     void onError(int error);
     50 
     51 }
     52