linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott James Remnant <scott@netsplit.com>
To: linux-bluetooth@vger.kernel.org
Cc: keybuk@chromium.org, Scott James Remnant <scott@netsplit.com>
Subject: [PATCHv2 1/8] bt_ids: add header of device class constants
Date: Mon, 23 Jan 2012 16:27:45 -0800	[thread overview]
Message-ID: <1327364872-32313-2-git-send-email-scott@netsplit.com> (raw)
In-Reply-To: <1327364872-32313-1-git-send-email-scott@netsplit.com>

---
 src/bt_ids.h |  125 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 125 insertions(+), 0 deletions(-)
 create mode 100644 src/bt_ids.h

diff --git a/src/bt_ids.h b/src/bt_ids.h
new file mode 100644
index 0000000..da89cf6
--- /dev/null
+++ b/src/bt_ids.h
@@ -0,0 +1,125 @@
+/*
+ *
+ *  BlueZ - Bluetooth protocol stack for Linux
+ *
+ *  Copyright (C) 2012  Google Inc.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+/* Service classes */
+#define BT_SVC_BITMASK                 0xFFE000
+#define BT_SVC_LIMITED_DISCOVERABILITY 0x002000
+#define BT_SVC_POSITIONING             0x010000
+#define BT_SVC_NETWORKING              0x020000
+#define BT_SVC_RENDER                  0x040000
+#define BT_SVC_CAPTURE                 0x080000
+#define BT_SVC_OBJECT_TRANSFER         0x100000
+#define BT_SVC_AUDIO                   0x200000
+#define BT_SVC_TELEPHONE               0x400000
+#define BT_SVC_INFORMATION             0x800000
+
+#define BT_SVC(_class) ((_class) & BT_SVC_BITMASK)
+
+/* Major device classes */
+#define BT_MAJOR_CLASS_BITMASK       0x1F00
+#define BT_MAJOR_CLASS_MISC          0x0000
+#define BT_MAJOR_CLASS_COMPUTER      0x0100
+#define BT_MAJOR_CLASS_PHONE         0x0200
+#define BT_MAJOR_CLASS_NETWORKING    0x0300
+#define BT_MAJOR_CLASS_AUDIO_VIDEO   0x0400
+#define BT_MAJOR_CLASS_PERIPHERAL    0x0500
+#define BT_MAJOR_CLASS_IMAGING       0x0600
+#define BT_MAJOR_CLASS_WEARABLE      0x0700
+#define BT_MAJOR_CLASS_TOY           0x0800
+#define BT_MAJOR_CLASS_HEATLH        0x0900
+#define BT_MAJOR_CLASS_UNCATEGORIZED 0x1F00
+
+#define BT_MAJOR_CLASS(_class) ((_class) & BT_MAJOR_CLASS_BITMASK)
+
+/* Minor device classes (includes major class) */
+#define BT_CLASS_BITMASK 0x1FFC
+
+#define BT_CLASS(_class) ((_class) & BT_CLASS_BITMASK)
+
+/* Devices in the COMPUTER major class */
+#define BT_CLASS_COMPUTER_UNCATEGORIZED    0x0100
+#define BT_CLASS_COMPUTER_DESKTOP          0x0104
+#define BT_CLASS_COMPUTER_SERVER           0x0108
+#define BT_CLASS_COMPUTER_LAPTOP           0x010C
+#define BT_CLASS_COMPUTER_HANDHELD_PC_PDA  0x0110
+#define BT_CLASS_COMPUTER_PALM_SIZE_PC_PDA 0x0114
+#define BT_CLASS_COMPUTER_WEARABLE         0x0118
+
+/* Devices in the PHONE major class */
+#define BT_CLASS_PHONE_UNCATEGORIZED    0x0200
+#define BT_CLASS_PHONE_CELLULAR         0x0204
+#define BT_CLASS_PHONE_CORDLESS         0x0208
+#define BT_CLASS_PHONE_SMART            0x020C
+#define BT_CLASS_PHONE_MODEM_OR_GATEWAY 0x0210
+#define BT_CLASS_PHONE_ISDN             0x0214
+
+/* Devices in the AUDIO_VIDEO major class */
+#define BT_CLASS_AUDIO_VIDEO_UNCATEGORIZED                 0x0400
+#define BT_CLASS_AUDIO_VIDEO_WEARABLE_HEADSET              0x0404
+#define BT_CLASS_AUDIO_VIDEO_HANDSFREE                     0x0408
+#define BT_CLASS_AUDIO_VIDEO_MICROPHONE                    0x0410
+#define BT_CLASS_AUDIO_VIDEO_LOUDSPEAKER                   0x0414
+#define BT_CLASS_AUDIO_VIDEO_HEADPHONES                    0x0418
+#define BT_CLASS_AUDIO_VIDEO_PORTABLE_AUDIO                0x041C
+#define BT_CLASS_AUDIO_VIDEO_CAR_AUDIO                     0x0420
+#define BT_CLASS_AUDIO_VIDEO_SET_TOP_BOX                   0x0424
+#define BT_CLASS_AUDIO_VIDEO_HIFI_AUDIO                    0x0428
+#define BT_CLASS_AUDIO_VIDEO_VCR                           0x042C
+#define BT_CLASS_AUDIO_VIDEO_VIDEO_CAMERA                  0x0430
+#define BT_CLASS_AUDIO_VIDEO_CAMCORDER                     0x0434
+#define BT_CLASS_AUDIO_VIDEO_VIDEO_MONITOR                 0x0438
+#define BT_CLASS_AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER 0x043C
+#define BT_CLASS_AUDIO_VIDEO_VIDEO_CONFERENCING            0x0440
+#define BT_CLASS_AUDIO_VIDEO_VIDEO_GAMING_TOY              0x0448
+
+/* Devices in the WEARABLE major class */
+#define BT_CLASS_WEARABLE_UNCATEGORIZED 0x0700
+#define BT_CLASS_WEARABLE_WRIST_WATCH   0x0704
+#define BT_CLASS_WEARABLE_PAGER         0x0708
+#define BT_CLASS_WEARABLE_JACKET        0x070C
+#define BT_CLASS_WEARABLE_HELMET        0x0710
+#define BT_CLASS_WEARABLE_GLASSES       0x0714
+
+/* Devices in the TOY major class */
+#define BT_CLASS_TOY_UNCATEGORIZED      0x0800
+#define BT_CLASS_TOY_ROBOT              0x0804
+#define BT_CLASS_TOY_VEHICLE            0x0808
+#define BT_CLASS_TOY_DOLL_ACTION_FIGURE 0x080C
+#define BT_CLASS_TOY_CONTROLLER         0x0810
+#define BT_CLASS_TOY_GAME               0x0814
+
+/* Devices in the HEALTH major class */
+#define BT_CLASS_HEALTH_UNCATEGORIZED  0x0900
+#define BT_CLASS_HEALTH_BLOOD_PRESSURE 0x0904
+#define BT_CLASS_HEALTH_THERMOMETER    0x0908
+#define BT_CLASS_HEALTH_WEIGHING       0x090C
+#define BT_CLASS_HEALTH_GLUCOSE        0x0910
+#define BT_CLASS_HEALTH_PULSE_OXIMETER 0x0914
+#define BT_CLASS_HEALTH_PULSE_RATE     0x0918
+#define BT_CLASS_HEALTH_DATA_DISPLAY   0x091C
+
+/* Devices in the PERIPHERAL major class */
+#define BT_CLASS_PERIPHERAL_NON_KEYBOARD_NON_POINTING 0x0500
+#define BT_CLASS_PERIPHERAL_KEYBOARD                  0x0540
+#define BT_CLASS_PERIPHERAL_POINTING                  0x0580
+#define BT_CLASS_PERIPHERAL_KEYBOARD_POINTING         0x05C0
-- 
1.7.7.3


  reply	other threads:[~2012-01-24  0:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-24  0:27 [PATCHv2 0/8] Generate PIN for keyboards inside bluetoothd Scott James Remnant
2012-01-24  0:27 ` Scott James Remnant [this message]
2012-01-24  0:27 ` [PATCHv2 2/8] Rename AUTH_TYPE_NOTIFY to AUTH_TYPE_NOTIFY_PASSKEY Scott James Remnant
2012-01-24  0:27 ` [PATCHv2 3/8] Pass passkey by pointer rather than by value Scott James Remnant
2012-01-24  0:27 ` [PATCHv2 4/8] agent: add DisplayPinCode method Scott James Remnant
2012-01-24  0:27 ` [PATCHv2 5/8] Add AUTH_TYPE_NOTIFY_PASSKEY to device_request_authentication Scott James Remnant
2012-01-24  0:27 ` [PATCHv2 6/8] Generate PIN for keyboard devices Scott James Remnant
2012-01-24  0:27 ` [PATCHv2 7/8] doc: document DisplayPinCode Scott James Remnant
2012-01-24  0:27 ` [PATCHv2 8/8] simple-agent: add DisplayPinCode Scott James Remnant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1327364872-32313-2-git-send-email-scott@netsplit.com \
    --to=scott@netsplit.com \
    --cc=keybuk@chromium.org \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).