1 /* 2 * Copyright (C) 2012 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 package com.android.bluetooth.btservice; 18 19 public final class AbstractionLayer { 20 // Do not modify without updating the HAL files. 21 // Do not modify without migrating data in the config 22 23 // TODO: Some of the constants are repeated from BluetoothAdapter.java. 24 // Get rid of them and maintain just one. 25 static final int BT_STATE_OFF = 0x00; 26 static final int BT_STATE_ON = 0x01; 27 28 static final int BT_SCAN_MODE_NONE = 0x00; 29 static final int BT_SCAN_MODE_CONNECTABLE = 0x01; 30 static final int BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE = 0x02; 31 32 static final int BT_PROPERTY_BDNAME = 0x01; 33 static final int BT_PROPERTY_BDADDR = 0x02; 34 static final int BT_PROPERTY_UUIDS = 0x03; 35 static final int BT_PROPERTY_CLASS_OF_DEVICE = 0x04; 36 static final int BT_PROPERTY_TYPE_OF_DEVICE = 0x05; 37 static final int BT_PROPERTY_SERVICE_RECORD = 0x06; 38 static final int BT_PROPERTY_ADAPTER_BONDED_DEVICES = 0x08; 39 static final int BT_PROPERTY_ADAPTER_DISCOVERABLE_TIMEOUT = 0x09; 40 41 static final int BT_PROPERTY_REMOTE_FRIENDLY_NAME = 0x0A; 42 static final int BT_PROPERTY_REMOTE_RSSI = 0x0B; 43 44 static final int BT_PROPERTY_REMOTE_VERSION_INFO = 0x0C; 45 static final int BT_PROPERTY_LOCAL_LE_FEATURES = 0x0D; 46 47 static final int BT_PROPERTY_DYNAMIC_AUDIO_BUFFER = 0x10; 48 static final int BT_PROPERTY_REMOTE_IS_COORDINATED_SET_MEMBER = 0x11; 49 static final int BT_PROPERTY_REMOTE_ASHA_CAPABILITY = 0X15; 50 static final int BT_PROPERTY_REMOTE_ASHA_TRUNCATED_HISYNCID = 0X16; 51 static final int BT_PROPERTY_REMOTE_MODEL_NUM = 0x17; 52 static final int BT_PROPERTY_LPP_OFFLOAD_FEATURES = 0x1B; 53 static final int BT_PROPERTY_UUIDS_LE = 0x1C; 54 55 public static final int BT_DEVICE_TYPE_BREDR = 0x01; 56 public static final int BT_DEVICE_TYPE_BLE = 0x02; 57 public static final int BT_DEVICE_TYPE_DUAL = 0x03; 58 59 static final int BT_BOND_STATE_NONE = 0x00; 60 static final int BT_BOND_STATE_BONDING = 0x01; 61 static final int BT_BOND_STATE_BONDED = 0x02; 62 63 static final int BT_SSP_VARIANT_PASSKEY_CONFIRMATION = 0x00; 64 static final int BT_SSP_VARIANT_PASSKEY_ENTRY = 0x01; 65 static final int BT_SSP_VARIANT_CONSENT = 0x02; 66 static final int BT_SSP_VARIANT_PASSKEY_NOTIFICATION = 0x03; 67 68 static final int BT_DISCOVERY_STOPPED = 0x00; 69 static final int BT_DISCOVERY_STARTED = 0x01; 70 71 static final int BT_ACL_STATE_CONNECTED = 0x00; 72 static final int BT_ACL_STATE_DISCONNECTED = 0x01; 73 74 static final int BT_UUID_SIZE = 16; // bytes 75 76 public static final int BT_STATUS_SUCCESS = 0; 77 public static final int BT_STATUS_FAIL = 1; 78 public static final int BT_STATUS_NOT_READY = 2; 79 public static final int BT_STATUS_NOMEM = 3; 80 public static final int BT_STATUS_BUSY = 4; 81 public static final int BT_STATUS_DONE = 5; 82 public static final int BT_STATUS_UNSUPPORTED = 6; 83 public static final int BT_STATUS_PARM_INVALID = 7; 84 public static final int BT_STATUS_UNHANDLED = 8; 85 public static final int BT_STATUS_AUTH_FAILURE = 9; 86 public static final int BT_STATUS_RMT_DEV_DOWN = 10; 87 public static final int BT_STATUS_AUTH_REJECTED = 11; 88 public static final int BT_STATUS_AUTH_TIMEOUT = 12; 89 } 90