blob: a84ecd9b6b55614adf91d54bd146cf4ea1afe05e [file] [log] [blame]
Jaikumar Ganeshbf981ca2011-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
William Escande77e6c2d2022-09-03 16:28:12 -070020import android.annotation.NonNull;
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070021import android.os.Parcel;
22import android.os.Parcelable;
23
24/**
25 * The Bluetooth Health Application Configuration that is used in conjunction with
26 * the {@link BluetoothHealth} class. This class represents an application configuration
27 * that the Bluetooth Health third party application will register to communicate with the
28 * remote Bluetooth health device.
Jack He07ffaa42019-01-03 16:23:41 -080029 *
30 * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New
31 * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt},
32 * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or
33 * {@link BluetoothDevice#createL2capChannel(int)}
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070034 */
Jack He07ffaa42019-01-03 16:23:41 -080035@Deprecated
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070036public final class BluetoothHealthAppConfiguration implements Parcelable {
Jack Hef2d49bd2019-03-28 17:42:26 -070037
38 /**
39 * Hide auto-created default constructor
40 * @hide
41 */
42 BluetoothHealthAppConfiguration() {}
43
Jack He9e045d22017-08-22 21:21:23 -070044 @Override
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070045 public int describeContents() {
46 return 0;
47 }
48
49 /**
50 * Return the data type associated with this application configuration.
51 *
52 * @return dataType
Jack He07ffaa42019-01-03 16:23:41 -080053 *
54 * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New
55 * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt},
56 * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or
57 * {@link BluetoothDevice#createL2capChannel(int)}
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070058 */
Jack He07ffaa42019-01-03 16:23:41 -080059 @Deprecated
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070060 public int getDataType() {
Jack He07ffaa42019-01-03 16:23:41 -080061 return 0;
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070062 }
63
64 /**
65 * Return the name of the application configuration.
66 *
67 * @return String name
Jack He07ffaa42019-01-03 16:23:41 -080068 *
69 * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New
70 * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt},
71 * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or
72 * {@link BluetoothDevice#createL2capChannel(int)}
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070073 */
Jack He07ffaa42019-01-03 16:23:41 -080074 @Deprecated
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070075 public String getName() {
Jack He07ffaa42019-01-03 16:23:41 -080076 return null;
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070077 }
78
79 /**
80 * Return the role associated with this application configuration.
81 *
Jack He910201b2017-08-22 16:06:54 -070082 * @return One of {@link BluetoothHealth#SOURCE_ROLE} or {@link BluetoothHealth#SINK_ROLE}
Jack He07ffaa42019-01-03 16:23:41 -080083 *
84 * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New
85 * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt},
86 * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or
87 * {@link BluetoothDevice#createL2capChannel(int)}
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070088 */
Jack He07ffaa42019-01-03 16:23:41 -080089 @Deprecated
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070090 public int getRole() {
Jack He07ffaa42019-01-03 16:23:41 -080091 return 0;
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070092 }
93
94 /**
Jack He07ffaa42019-01-03 16:23:41 -080095 * @deprecated Health Device Profile (HDP) and MCAP protocol are no longer used. New
96 * apps should use Bluetooth Low Energy based solutions such as {@link BluetoothGatt},
97 * {@link BluetoothAdapter#listenUsingL2capChannel()(int)}, or
98 * {@link BluetoothDevice#createL2capChannel(int)}
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -070099 */
Jack He07ffaa42019-01-03 16:23:41 -0800100 @Deprecated
William Escande77e6c2d2022-09-03 16:28:12 -0700101 @NonNull
102 public static final Creator<BluetoothHealthAppConfiguration> CREATOR = new Creator<>() {
103 @Override
104 public BluetoothHealthAppConfiguration createFromParcel(Parcel in) {
105 return new BluetoothHealthAppConfiguration();
106 }
Jaikumar Ganeshd3b7d1d2011-07-06 17:37:02 -0700107
William Escande77e6c2d2022-09-03 16:28:12 -0700108 @Override
109 public BluetoothHealthAppConfiguration[] newArray(int size) {
110 return new BluetoothHealthAppConfiguration[size];
111 }
112 };
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -0700113
Jack He9e045d22017-08-22 21:21:23 -0700114 @Override
Jack He07ffaa42019-01-03 16:23:41 -0800115 public void writeToParcel(Parcel out, int flags) {}
Jaikumar Ganeshbf981ca2011-04-01 16:33:09 -0700116}