195489c19Sopenharmony_ci/* 295489c19Sopenharmony_ci * Copyright (C) 2021 Huawei Device Co., Ltd. 395489c19Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 495489c19Sopenharmony_ci * you may not use this file except in compliance with the License. 595489c19Sopenharmony_ci * You may obtain a copy of the License at 695489c19Sopenharmony_ci * 795489c19Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 895489c19Sopenharmony_ci * 995489c19Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1095489c19Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1195489c19Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1295489c19Sopenharmony_ci * See the License for the specific language governing permissions and 1395489c19Sopenharmony_ci * limitations under the License. 1495489c19Sopenharmony_ci */ 1595489c19Sopenharmony_ci 1695489c19Sopenharmony_ci/** 1795489c19Sopenharmony_ci * @addtogroup Bluetooth 1895489c19Sopenharmony_ci * @{ 1995489c19Sopenharmony_ci * 2095489c19Sopenharmony_ci * @brief Defines device some major class. 2195489c19Sopenharmony_ci * 2295489c19Sopenharmony_ci * @since 1.0 2395489c19Sopenharmony_ci * @version 1.0 2495489c19Sopenharmony_ci */ 2595489c19Sopenharmony_ci 2695489c19Sopenharmony_ci/** 2795489c19Sopenharmony_ci * @file bluetooth_device.h 2895489c19Sopenharmony_ci * 2995489c19Sopenharmony_ci * @brief Bluetooth device major class. 3095489c19Sopenharmony_ci * 3195489c19Sopenharmony_ci * @since 1.0 3295489c19Sopenharmony_ci * @version 1.0 3395489c19Sopenharmony_ci */ 3495489c19Sopenharmony_ci 3595489c19Sopenharmony_ci#ifndef BLUETOOTH_DEVICE_H_ 3695489c19Sopenharmony_ci#define BLUETOOTH_DEVICE_H_ 3795489c19Sopenharmony_ci 3895489c19Sopenharmony_cinamespace OHOS { 3995489c19Sopenharmony_cinamespace Bluetooth { 4095489c19Sopenharmony_ci/** 4195489c19Sopenharmony_ci * @brief Represents device major class. 4295489c19Sopenharmony_ci * 4395489c19Sopenharmony_ci * @since 1.0 4495489c19Sopenharmony_ci * @version 1.0 4595489c19Sopenharmony_ci */ 4695489c19Sopenharmony_ciclass BluetoothDevice { 4795489c19Sopenharmony_cipublic: 4895489c19Sopenharmony_ci // Major Service Classes 4995489c19Sopenharmony_ci static const int SERVICE_LIMITED_DISCOVERABILITY = 0x002000; 5095489c19Sopenharmony_ci static const int SERVICE_POSITIONING = 0x010000; 5195489c19Sopenharmony_ci static const int SERVICE_NETWORKING = 0x020000; 5295489c19Sopenharmony_ci static const int SERVICE_RENDER = 0x040000; 5395489c19Sopenharmony_ci static const int SERVICE_CAPTURE = 0x080000; 5495489c19Sopenharmony_ci static const int SERVICE_OBJECT_TRANSFER = 0x100000; 5595489c19Sopenharmony_ci static const int SERVICE_AUDIO = 0x200000; 5695489c19Sopenharmony_ci static const int SERVICE_TELEPHONY = 0x400000; 5795489c19Sopenharmony_ci static const int SERVICE_INFORMATION = 0x800000; 5895489c19Sopenharmony_ci 5995489c19Sopenharmony_ci // Major Device Classes 6095489c19Sopenharmony_ci static const int MAJOR_MISC = 0x0000; 6195489c19Sopenharmony_ci static const int MAJOR_COMPUTER = 0x0100; 6295489c19Sopenharmony_ci static const int MAJOR_PHONE = 0x0200; 6395489c19Sopenharmony_ci static const int MAJOR_NETWORKING = 0x0300; 6495489c19Sopenharmony_ci static const int MAJOR_AUDIO_VIDEO = 0x0400; 6595489c19Sopenharmony_ci static const int MAJOR_PERIPHERAL = 0x0500; 6695489c19Sopenharmony_ci static const int MAJOR_IMAGING = 0x0600; 6795489c19Sopenharmony_ci static const int MAJOR_WEARABLE = 0x0700; 6895489c19Sopenharmony_ci static const int MAJOR_TOY = 0x0800; 6995489c19Sopenharmony_ci static const int MAJOR_HEALTH = 0x0900; 7095489c19Sopenharmony_ci static const int MAJOR_UNCATEGORIZED = 0x1F00; 7195489c19Sopenharmony_ci 7295489c19Sopenharmony_ci // The Minor Device Class field 7395489c19Sopenharmony_ci // Computer Major Class 7495489c19Sopenharmony_ci static const int COMPUTER_UNCATEGORIZED = 0x0100; 7595489c19Sopenharmony_ci static const int COMPUTER_DESKTOP = 0x0104; 7695489c19Sopenharmony_ci static const int COMPUTER_SERVER = 0x0108; 7795489c19Sopenharmony_ci static const int COMPUTER_LAPTOP = 0x010C; 7895489c19Sopenharmony_ci static const int COMPUTER_HANDHELD_PC_PDA = 0x0110; 7995489c19Sopenharmony_ci static const int COMPUTER_PALM_SIZE_PC_PDA = 0x0114; 8095489c19Sopenharmony_ci static const int COMPUTER_WEARABLE = 0x0118; 8195489c19Sopenharmony_ci static const int COMPUTER_TABLET = 0x011C; 8295489c19Sopenharmony_ci 8395489c19Sopenharmony_ci // Phone Major Class 8495489c19Sopenharmony_ci static const int PHONE_UNCATEGORIZED = 0x0200; 8595489c19Sopenharmony_ci static const int PHONE_CELLULAR = 0x0204; 8695489c19Sopenharmony_ci static const int PHONE_CORDLESS = 0x0208; 8795489c19Sopenharmony_ci static const int PHONE_SMART = 0x020C; 8895489c19Sopenharmony_ci static const int PHONE_MODEM_OR_GATEWAY = 0x0210; 8995489c19Sopenharmony_ci static const int PHONE_ISDN = 0x0214; 9095489c19Sopenharmony_ci 9195489c19Sopenharmony_ci // LAN/Network Access Point Major Class 9295489c19Sopenharmony_ci static const int NETWORK_FULLY_AVAILABLE = 0x0300; 9395489c19Sopenharmony_ci static const int NETWORK_1_TO_17_UTILIZED = 0x0320; 9495489c19Sopenharmony_ci static const int NETWORK_17_TO_33_UTILIZED = 0x0340; 9595489c19Sopenharmony_ci static const int NETWORK_33_TO_50_UTILIZED = 0x0360; 9695489c19Sopenharmony_ci static const int NETWORK_60_TO_67_UTILIZED = 0x0380; 9795489c19Sopenharmony_ci static const int NETWORK_67_TO_83_UTILIZED = 0x03A0; 9895489c19Sopenharmony_ci static const int NETWORK_83_TO_99_UTILIZED = 0x03C0; 9995489c19Sopenharmony_ci static const int NETWORK_NO_SERVICE = 0x03E0; 10095489c19Sopenharmony_ci 10195489c19Sopenharmony_ci // Audio/Video Major Class 10295489c19Sopenharmony_ci static const int AUDIO_VIDEO_UNCATEGORIZED = 0x0400; 10395489c19Sopenharmony_ci static const int AUDIO_VIDEO_WEARABLE_HEADSET = 0x0404; 10495489c19Sopenharmony_ci static const int AUDIO_VIDEO_HANDSFREE = 0x0408; 10595489c19Sopenharmony_ci // static const int AUDIO_VIDEO_RESERVED = 0x040C; 10695489c19Sopenharmony_ci static const int AUDIO_VIDEO_MICROPHONE = 0x0410; 10795489c19Sopenharmony_ci static const int AUDIO_VIDEO_LOUDSPEAKER = 0x0414; 10895489c19Sopenharmony_ci static const int AUDIO_VIDEO_HEADPHONES = 0x0418; 10995489c19Sopenharmony_ci static const int AUDIO_VIDEO_PORTABLE_AUDIO = 0x041C; 11095489c19Sopenharmony_ci static const int AUDIO_VIDEO_CAR_AUDIO = 0x0420; 11195489c19Sopenharmony_ci static const int AUDIO_VIDEO_SET_TOP_BOX = 0x0424; 11295489c19Sopenharmony_ci static const int AUDIO_VIDEO_HIFI_AUDIO = 0x0428; 11395489c19Sopenharmony_ci static const int AUDIO_VIDEO_VCR = 0x042C; 11495489c19Sopenharmony_ci static const int AUDIO_VIDEO_VIDEO_CAMERA = 0x0430; 11595489c19Sopenharmony_ci static const int AUDIO_VIDEO_CAMCORDER = 0x0434; 11695489c19Sopenharmony_ci static const int AUDIO_VIDEO_VIDEO_MONITOR = 0x0438; 11795489c19Sopenharmony_ci static const int AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER = 0x043C; 11895489c19Sopenharmony_ci static const int AUDIO_VIDEO_VIDEO_CONFERENCING = 0x0440; 11995489c19Sopenharmony_ci // static const int AUDIO_VIDEO_RESERVED = 0x0444; 12095489c19Sopenharmony_ci static const int AUDIO_VIDEO_VIDEO_GAMING_TOY = 0x0448; 12195489c19Sopenharmony_ci 12295489c19Sopenharmony_ci // Peripheral Major Class 12395489c19Sopenharmony_ci static const int PERIPHERAL_NON_KEYBOARD_NON_POINTING = 0x0500; 12495489c19Sopenharmony_ci static const int PERIPHERAL_KEYBOARD = 0x0540; 12595489c19Sopenharmony_ci static const int PERIPHERAL_POINTING_DEVICE = 0x0580; 12695489c19Sopenharmony_ci static const int PERIPHERAL_KEYBOARD_POINTING = 0x05C0; 12795489c19Sopenharmony_ci static const int PERIPHERAL_UNCATEGORIZED = 0x0500; 12895489c19Sopenharmony_ci static const int PERIPHERAL_JOYSTICK = 0x0504; 12995489c19Sopenharmony_ci static const int PERIPHERAL_GAMEPAD = 0x0508; 13095489c19Sopenharmony_ci static const int PERIPHERAL_REMOTE_CONTROL = 0x05C0; 13195489c19Sopenharmony_ci static const int PERIPHERAL_SENSING_DEVICE = 0x0510; 13295489c19Sopenharmony_ci static const int PERIPHERAL_DIGITIZER_TABLET = 0x0514; 13395489c19Sopenharmony_ci static const int PERIPHERAL_CARD_READER = 0x0518; 13495489c19Sopenharmony_ci static const int PERIPHERAL_DIGITAL_PEN = 0x051C; 13595489c19Sopenharmony_ci static const int PERIPHERAL_SCANNER_RFID = 0x0520; 13695489c19Sopenharmony_ci static const int PERIPHERAL_GESTURAL_INPUT = 0x0522; 13795489c19Sopenharmony_ci 13895489c19Sopenharmony_ci // Imaging Major Class 13995489c19Sopenharmony_ci static const int IMAGING_UNCATEGORIZED = 0x0600; 14095489c19Sopenharmony_ci static const int IMAGING_DISPLAY = 0x0610; 14195489c19Sopenharmony_ci static const int IMAGING_CAMERA = 0x0620; 14295489c19Sopenharmony_ci static const int IMAGING_SCANNER = 0x0640; 14395489c19Sopenharmony_ci static const int IMAGING_PRINTER = 0x0680; 14495489c19Sopenharmony_ci 14595489c19Sopenharmony_ci // Wearable Major Class 14695489c19Sopenharmony_ci static const int WEARABLE_UNCATEGORIZED = 0x0700; 14795489c19Sopenharmony_ci static const int WEARABLE_WRIST_WATCH = 0x0704; 14895489c19Sopenharmony_ci static const int WEARABLE_PAGER = 0x0708; 14995489c19Sopenharmony_ci static const int WEARABLE_JACKET = 0x070C; 15095489c19Sopenharmony_ci static const int WEARABLE_HELMET = 0x0710; 15195489c19Sopenharmony_ci static const int WEARABLE_GLASSES = 0x0714; 15295489c19Sopenharmony_ci 15395489c19Sopenharmony_ci // Minor Device Class field - Toy Major Class 15495489c19Sopenharmony_ci static const int TOY_UNCATEGORIZED = 0x0800; 15595489c19Sopenharmony_ci static const int TOY_ROBOT = 0x0804; 15695489c19Sopenharmony_ci static const int TOY_VEHICLE = 0x0808; 15795489c19Sopenharmony_ci static const int TOY_DOLL_ACTION_FIGURE = 0x080C; 15895489c19Sopenharmony_ci static const int TOY_CONTROLLER = 0x0810; 15995489c19Sopenharmony_ci static const int TOY_GAME = 0x0814; 16095489c19Sopenharmony_ci 16195489c19Sopenharmony_ci // Minor Device Class field - Health 16295489c19Sopenharmony_ci static const int HEALTH_UNCATEGORIZED = 0x0900; 16395489c19Sopenharmony_ci static const int HEALTH_BLOOD_PRESSURE = 0x0904; 16495489c19Sopenharmony_ci static const int HEALTH_THERMOMETER = 0x0908; 16595489c19Sopenharmony_ci static const int HEALTH_WEIGHING = 0x090C; 16695489c19Sopenharmony_ci static const int HEALTH_GLUCOSE = 0x0910; 16795489c19Sopenharmony_ci static const int HEALTH_PULSE_OXIMETER = 0x0914; 16895489c19Sopenharmony_ci static const int HEALTH_PULSE_RATE = 0x0918; 16995489c19Sopenharmony_ci static const int HEALTH_DATA_DISPLAY = 0x091C; 17095489c19Sopenharmony_ci static const int HEALTH_STEP_COUNTER = 0x0920; 17195489c19Sopenharmony_ci static const int HEALTH_BODY_COMPOSITION_ANALYZER = 0x0924; 17295489c19Sopenharmony_ci static const int HEALTH_PEAK_FLOW_MOITOR = 0x0928; // HEALTH_PEAK_FLOW_MOITOR is compatible with api8. 17395489c19Sopenharmony_ci static const int HEALTH_PEAK_FLOW_MONITOR = 0x0928; 17495489c19Sopenharmony_ci static const int HEALTH_MEDICATION_MONITOR = 0x092C; 17595489c19Sopenharmony_ci static const int HEALTH_KNEE_PROSTHESIS = 0x0930; 17695489c19Sopenharmony_ci static const int HEALTH_ANKLE_PROSTHESIS = 0x0934; 17795489c19Sopenharmony_ci static const int HEALTH_GENERIC_HEALTH_MANAGER = 0x0938; 17895489c19Sopenharmony_ci static const int HEALTH_PERSONAL_MOBILITY_DEVICE = 0x093C; 17995489c19Sopenharmony_ci 18095489c19Sopenharmony_ci // Error 18195489c19Sopenharmony_ci static const int DEVICE_ERROR = 0xFF000000; 18295489c19Sopenharmony_ci 18395489c19Sopenharmony_ci static const int SERVICE_BITMASK = 0xFFE000; 18495489c19Sopenharmony_ci static const int MAJOR_BITMASK = 0x1F00; 18595489c19Sopenharmony_ci static const int DEVICE_BITMASK = 0x1FFC; 18695489c19Sopenharmony_ci 18795489c19Sopenharmony_ci static const int PROFILE_HEADSET = 0; 18895489c19Sopenharmony_ci static const int PROFILE_A2DP = 1; 18995489c19Sopenharmony_ci static const int PROFILE_OPP = 2; 19095489c19Sopenharmony_ci static const int PROFILE_HID = 3; 19195489c19Sopenharmony_ci static const int PROFILE_PANU = 4; 19295489c19Sopenharmony_ci static const int PROFILE_NAP = 5; 19395489c19Sopenharmony_ci static const int PROFILE_A2DP_SINK = 6; 19495489c19Sopenharmony_ci}; 19595489c19Sopenharmony_ci} // namespace Bluetooth 19695489c19Sopenharmony_ci} // namespace OHOS 19795489c19Sopenharmony_ci 19895489c19Sopenharmony_ci#endif // BLUETOOTH_DEVICE_H_ 199