blob: 678596445fe35472776ec84651c4cd3a245d08a2 [file] [log] [blame]
Mike Lockwoodd03ff942010-02-09 08:46:14 -05001/*
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
Mike Lockwood00b74272010-03-26 10:41:48 -040017package com.android.server.location;
Mike Lockwoodd03ff942010-02-09 08:46:14 -050018
Soonil Nagarkar94749f72018-11-08 11:46:43 -080019import android.location.LocationProvider;
20import android.os.Bundle;
21import android.os.WorkSource;
Nick Pelly6fa9ad42012-07-16 12:18:23 -070022
23import com.android.internal.location.ProviderProperties;
24import com.android.internal.location.ProviderRequest;
25
Soonil Nagarkar94749f72018-11-08 11:46:43 -080026import java.io.FileDescriptor;
27import java.io.PrintWriter;
Mike Lockwoodd03ff942010-02-09 08:46:14 -050028
29/**
30 * Location Manager's interface for location providers.
Nick Pelly6fa9ad42012-07-16 12:18:23 -070031 * @hide
Mike Lockwoodd03ff942010-02-09 08:46:14 -050032 */
Soonil Nagarkar94749f72018-11-08 11:46:43 -080033public abstract class LocationProviderInterface {
Nick Pelly6fa9ad42012-07-16 12:18:23 -070034
Soonil Nagarkar94749f72018-11-08 11:46:43 -080035 /** Get name. */
36 public abstract String getName();
Nick Pelly6fa9ad42012-07-16 12:18:23 -070037
Soonil Nagarkar94749f72018-11-08 11:46:43 -080038 /** Enable. */
39 public abstract void enable();
Nick Pelly6fa9ad42012-07-16 12:18:23 -070040
Soonil Nagarkar94749f72018-11-08 11:46:43 -080041 /** Disable. */
42 public abstract void disable();
43
44 /** Is enabled. */
45 public abstract boolean isEnabled();
46
47 /** Set request. */
48 public abstract void setRequest(ProviderRequest request, WorkSource source);
49
50 /** dump. */
51 public abstract void dump(FileDescriptor fd, PrintWriter pw, String[] args);
52
53 /** Get properties. */
54 public abstract ProviderProperties getProperties();
55
56 /**
57 * Get status.
58 *
59 * @deprecated Will be removed in a future release.
60 */
61 @Deprecated
62 public int getStatus(Bundle extras) {
63 return LocationProvider.AVAILABLE;
64 }
65
66 /**
67 * Get status update time.
68 *
69 * @deprecated Will be removed in a future release.
70 */
71 @Deprecated
72 public long getStatusUpdateTime() {
73 return 0;
74 }
75
76 /** Send extra command. */
77 public abstract boolean sendExtraCommand(String command, Bundle extras);
Mike Lockwoodd03ff942010-02-09 08:46:14 -050078}