ILocationManager.aidl revision f6f9792d44ae9242981dab5ecc1ebf40190aada6
1/*
2 * Copyright (C) 2007, 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.location;
18
19import android.app.PendingIntent;
20import android.location.Address;
21import android.location.IGpsStatusListener;
22import android.location.ILocationListener;
23import android.location.Location;
24import android.os.Bundle;
25
26/**
27 * System private API for talking with the location service.
28 *
29 * {@hide}
30 */
31interface ILocationManager
32{
33    List getAllProviders();
34    List getProviders(boolean enabledOnly);
35
36    void requestLocationUpdates(String provider, long minTime, float minDistance,
37        in ILocationListener listener);
38    void requestLocationUpdatesPI(String provider, long minTime, float minDistance,
39        in PendingIntent intent);
40    void removeUpdates(in ILocationListener listener);
41    void removeUpdatesPI(in PendingIntent intent);
42
43    boolean addGpsStatusListener(IGpsStatusListener listener);
44    void removeGpsStatusListener(IGpsStatusListener listener);
45
46    boolean sendExtraCommand(String provider, String command, inout Bundle extras);
47
48    void addProximityAlert(double latitude, double longitude, float distance,
49        long expiration, in PendingIntent intent);
50    void removeProximityAlert(in PendingIntent intent);
51
52    Bundle getProviderInfo(String provider);
53    boolean isProviderEnabled(String provider);
54
55    Location getLastKnownLocation(String provider);
56
57    /* used by location providers to tell the location manager when it has a new location */
58    void setLocation(in Location location);
59
60    String getFromLocation(double latitude, double longitude, int maxResults,
61        String language, String country, String variant, String appName, out List<Address> addrs);
62    String getFromLocationName(String locationName,
63        double lowerLeftLatitude, double lowerLeftLongitude,
64        double upperRightLatitude, double upperRightLongitude, int maxResults,
65        String language, String country, String variant, String appName, out List<Address> addrs);
66
67    void addTestProvider(String name, boolean requiresNetwork, boolean requiresSatellite,
68        boolean requiresCell, boolean hasMonetaryCost, boolean supportsAltitude,
69        boolean supportsSpeed, boolean supportsBearing, int powerRequirement, int accuracy);
70    void removeTestProvider(String provider);
71    void setTestProviderLocation(String provider, in Location loc);
72    void clearTestProviderLocation(String provider);
73    void setTestProviderEnabled(String provider, boolean enabled);
74    void clearTestProviderEnabled(String provider);
75    void setTestProviderStatus(String provider, int status, in Bundle extras, long updateTime);
76    void clearTestProviderStatus(String provider);
77}
78