Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 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 | |
| 18 | package android.bluetooth; |
| 19 | |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 20 | import android.os.Parcel; |
| 21 | import android.os.Parcelable; |
| 22 | |
| 23 | /** |
| 24 | * The Bluetooth Health Application Configuration that is used in conjunction with |
| 25 | * the {@link BluetoothHealth} class. This class represents an application configuration |
| 26 | * that the Bluetooth Health third party application will register to communicate with the |
| 27 | * remote Bluetooth health device. |
Jack He | 2be70a1 | 2019-01-03 16:23:41 -0800 | [diff] [blame] | 28 | * |
| 29 | * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New |
| 30 | * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt}, |
| 31 | * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or |
| 32 | * {@link BluetoothDevice#createL2capChannel(int)} |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 33 | */ |
Jack He | 2be70a1 | 2019-01-03 16:23:41 -0800 | [diff] [blame] | 34 | @Deprecated |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 35 | public final class BluetoothHealthAppConfiguration implements Parcelable { |
Jack He | 2992cd0 | 2017-08-22 21:21:23 -0700 | [diff] [blame] | 36 | @Override |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 37 | public int describeContents() { |
| 38 | return 0; |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * Return the data type associated with this application configuration. |
| 43 | * |
| 44 | * @return dataType |
Jack He | 2be70a1 | 2019-01-03 16:23:41 -0800 | [diff] [blame] | 45 | * |
| 46 | * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New |
| 47 | * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt}, |
| 48 | * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or |
| 49 | * {@link BluetoothDevice#createL2capChannel(int)} |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 50 | */ |
Jack He | 2be70a1 | 2019-01-03 16:23:41 -0800 | [diff] [blame] | 51 | @Deprecated |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 52 | public int getDataType() { |
Jack He | 2be70a1 | 2019-01-03 16:23:41 -0800 | [diff] [blame] | 53 | return 0; |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Return the name of the application configuration. |
| 58 | * |
| 59 | * @return String name |
Jack He | 2be70a1 | 2019-01-03 16:23:41 -0800 | [diff] [blame] | 60 | * |
| 61 | * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New |
| 62 | * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt}, |
| 63 | * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or |
| 64 | * {@link BluetoothDevice#createL2capChannel(int)} |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 65 | */ |
Jack He | 2be70a1 | 2019-01-03 16:23:41 -0800 | [diff] [blame] | 66 | @Deprecated |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 67 | public String getName() { |
Jack He | 2be70a1 | 2019-01-03 16:23:41 -0800 | [diff] [blame] | 68 | return null; |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | /** |
| 72 | * Return the role associated with this application configuration. |
| 73 | * |
Jack He | a355e5e | 2017-08-22 16:06:54 -0700 | [diff] [blame] | 74 | * @return One of {@link BluetoothHealth#SOURCE_ROLE} or {@link BluetoothHealth#SINK_ROLE} |
Jack He | 2be70a1 | 2019-01-03 16:23:41 -0800 | [diff] [blame] | 75 | * |
| 76 | * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New |
| 77 | * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt}, |
| 78 | * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or |
| 79 | * {@link BluetoothDevice#createL2capChannel(int)} |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 80 | */ |
Jack He | 2be70a1 | 2019-01-03 16:23:41 -0800 | [diff] [blame] | 81 | @Deprecated |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 82 | public int getRole() { |
Jack He | 2be70a1 | 2019-01-03 16:23:41 -0800 | [diff] [blame] | 83 | return 0; |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 84 | } |
| 85 | |
| 86 | /** |
Jack He | 2be70a1 | 2019-01-03 16:23:41 -0800 | [diff] [blame] | 87 | * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New |
| 88 | * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt}, |
| 89 | * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or |
| 90 | * {@link BluetoothDevice#createL2capChannel(int)} |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 91 | */ |
Jack He | 2be70a1 | 2019-01-03 16:23:41 -0800 | [diff] [blame] | 92 | @Deprecated |
Jeff Sharkey | 9e8f83d | 2019-02-28 12:06:45 -0700 | [diff] [blame^] | 93 | public static final @android.annotation.NonNull Parcelable.Creator<BluetoothHealthAppConfiguration> CREATOR = |
Jack He | a355e5e | 2017-08-22 16:06:54 -0700 | [diff] [blame] | 94 | new Parcelable.Creator<BluetoothHealthAppConfiguration>() { |
| 95 | @Override |
| 96 | public BluetoothHealthAppConfiguration createFromParcel(Parcel in) { |
Jack He | 2be70a1 | 2019-01-03 16:23:41 -0800 | [diff] [blame] | 97 | return new BluetoothHealthAppConfiguration(); |
Jack He | a355e5e | 2017-08-22 16:06:54 -0700 | [diff] [blame] | 98 | } |
Jaikumar Ganesh | fb658c7 | 2011-07-06 17:37:02 -0700 | [diff] [blame] | 99 | |
Jack He | a355e5e | 2017-08-22 16:06:54 -0700 | [diff] [blame] | 100 | @Override |
| 101 | public BluetoothHealthAppConfiguration[] newArray(int size) { |
| 102 | return new BluetoothHealthAppConfiguration[size]; |
| 103 | } |
| 104 | }; |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 105 | |
Jack He | 2992cd0 | 2017-08-22 21:21:23 -0700 | [diff] [blame] | 106 | @Override |
Jack He | 2be70a1 | 2019-01-03 16:23:41 -0800 | [diff] [blame] | 107 | public void writeToParcel(Parcel out, int flags) {} |
Jaikumar Ganesh | 2ea1e85 | 2011-04-01 16:33:09 -0700 | [diff] [blame] | 108 | } |