Home | History | Annotate | Download | only in location
      1 /*
      2  * Copyright (C) 2010 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.server.location;
     18 
     19 import android.location.Criteria;
     20 import android.location.Location;
     21 import android.net.NetworkInfo;
     22 import android.os.Bundle;
     23 import android.os.WorkSource;
     24 
     25 /**
     26  * Location Manager's interface for location providers.
     27  *
     28  * {@hide}
     29  */
     30 public interface LocationProviderInterface {
     31     String getName();
     32     boolean requiresNetwork();
     33     boolean requiresSatellite();
     34     boolean requiresCell();
     35     boolean hasMonetaryCost();
     36     boolean supportsAltitude();
     37     boolean supportsSpeed();
     38     boolean supportsBearing();
     39     int getPowerRequirement();
     40     boolean meetsCriteria(Criteria criteria);
     41     int getAccuracy();
     42     boolean isEnabled();
     43     void enable();
     44     void disable();
     45     int getStatus(Bundle extras);
     46     long getStatusUpdateTime();
     47     void enableLocationTracking(boolean enable);
     48     /* returns false if single shot is not supported */
     49     boolean requestSingleShotFix();
     50     String getInternalState();
     51     void setMinTime(long minTime, WorkSource ws);
     52     void updateNetworkState(int state, NetworkInfo info);
     53     void updateLocation(Location location);
     54     boolean sendExtraCommand(String command, Bundle extras);
     55     void addListener(int uid);
     56     void removeListener(int uid);
     57 }
     58