blob: 9788bbf74e3e3a467f80adda7ff0cf8b9646a735 [file] [log] [blame]
Jaikumar Ganesh2ea1e852011-04-01 16:33:09 -07001/*
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
18package android.bluetooth;
19
Jaikumar Ganesh2ea1e852011-04-01 16:33:09 -070020import android.os.Parcel;
21import 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 He6b73b322019-01-03 16:23:41 -080028 *
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 Ganesh2ea1e852011-04-01 16:33:09 -070033 */
Jack He6b73b322019-01-03 16:23:41 -080034@Deprecated
Jaikumar Ganesh2ea1e852011-04-01 16:33:09 -070035public final class BluetoothHealthAppConfiguration implements Parcelable {
Jack He2992cd02017-08-22 21:21:23 -070036 @Override
Jaikumar Ganesh2ea1e852011-04-01 16:33:09 -070037 public int describeContents() {
38 return 0;
39 }
40
41 /**
42 * Return the data type associated with this application configuration.
43 *
44 * @return dataType
Jack He6b73b322019-01-03 16:23:41 -080045 *
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 Ganesh2ea1e852011-04-01 16:33:09 -070050 */
Jack He6b73b322019-01-03 16:23:41 -080051 @Deprecated
Jaikumar Ganesh2ea1e852011-04-01 16:33:09 -070052 public int getDataType() {
Jack He6b73b322019-01-03 16:23:41 -080053 return 0;
Jaikumar Ganesh2ea1e852011-04-01 16:33:09 -070054 }
55
56 /**
57 * Return the name of the application configuration.
58 *
59 * @return String name
Jack He6b73b322019-01-03 16:23:41 -080060 *
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 Ganesh2ea1e852011-04-01 16:33:09 -070065 */
Jack He6b73b322019-01-03 16:23:41 -080066 @Deprecated
Jaikumar Ganesh2ea1e852011-04-01 16:33:09 -070067 public String getName() {
Jack He6b73b322019-01-03 16:23:41 -080068 return null;
Jaikumar Ganesh2ea1e852011-04-01 16:33:09 -070069 }
70
71 /**
72 * Return the role associated with this application configuration.
73 *
Jack Hea355e5e2017-08-22 16:06:54 -070074 * @return One of {@link BluetoothHealth#SOURCE_ROLE} or {@link BluetoothHealth#SINK_ROLE}
Jack He6b73b322019-01-03 16:23:41 -080075 *
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 Ganesh2ea1e852011-04-01 16:33:09 -070080 */
Jack He6b73b322019-01-03 16:23:41 -080081 @Deprecated
Jaikumar Ganesh2ea1e852011-04-01 16:33:09 -070082 public int getRole() {
Jack He6b73b322019-01-03 16:23:41 -080083 return 0;
Jaikumar Ganesh2ea1e852011-04-01 16:33:09 -070084 }
85
86 /**
Jack He6b73b322019-01-03 16:23:41 -080087 * @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 Ganesh2ea1e852011-04-01 16:33:09 -070091 */
Jack He6b73b322019-01-03 16:23:41 -080092 @Deprecated
Jaikumar Ganesh2ea1e852011-04-01 16:33:09 -070093 public static final Parcelable.Creator<BluetoothHealthAppConfiguration> CREATOR =
Jack Hea355e5e2017-08-22 16:06:54 -070094 new Parcelable.Creator<BluetoothHealthAppConfiguration>() {
95 @Override
96 public BluetoothHealthAppConfiguration createFromParcel(Parcel in) {
Jack He6b73b322019-01-03 16:23:41 -080097 return new BluetoothHealthAppConfiguration();
Jack Hea355e5e2017-08-22 16:06:54 -070098 }
Jaikumar Ganeshfb658c72011-07-06 17:37:02 -070099
Jack Hea355e5e2017-08-22 16:06:54 -0700100 @Override
101 public BluetoothHealthAppConfiguration[] newArray(int size) {
102 return new BluetoothHealthAppConfiguration[size];
103 }
104 };
Jaikumar Ganesh2ea1e852011-04-01 16:33:09 -0700105
Jack He2992cd02017-08-22 21:21:23 -0700106 @Override
Jack He6b73b322019-01-03 16:23:41 -0800107 public void writeToParcel(Parcel out, int flags) {}
Jaikumar Ganesh2ea1e852011-04-01 16:33:09 -0700108}