1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_bluetooth_bluetoothuuid_h__
8 #define mozilla_dom_bluetooth_bluetoothuuid_h__
10 #include "BluetoothCommon.h"
12 BEGIN_BLUETOOTH_NAMESPACE
14 class BluetoothProfileManagerBase
;
17 * Service classes and Profile Identifiers
19 * Supported Bluetooth services for v1 are listed as below.
21 * The value of each service class is defined in "AssignedNumbers/Service
22 * Discovery Protocol (SDP)/Service classes and Profile Identifiers" in the
23 * Bluetooth Core Specification.
25 enum BluetoothServiceClass
29 HANDSFREE_AG
= 0x111F,
37 class BluetoothUuidHelper
41 * Get a 128-bit uuid string calculated from a 16-bit service class UUID and
44 * @param aServiceClassUuid 16-bit service class UUID
45 * @param aRetUuidStr out parameter, 128-bit uuid string
48 GetString(BluetoothServiceClass aServiceClassUuid
, nsAString
& aRetUuidStr
);
51 * Convert a 128-bit uuid string to a value of BluetoothServiceClass
53 * @param aUuidStr 128-bit uuid string
54 * @return a value of BluetoothServiceClass
56 static BluetoothServiceClass
57 GetBluetoothServiceClass(const nsAString
& aUuidStr
);
59 static BluetoothServiceClass
60 GetBluetoothServiceClass(uint16_t aServiceUuid
);
62 static BluetoothProfileManagerBase
*
63 GetBluetoothProfileManager(uint16_t aServiceUuid
);
66 // TODO/qdot: Move these back into gonk and make the service handler deal with
69 // Gotten from reading the "u8" values in B2G/external/bluez/src/adapter.c
70 // These were hardcoded into android
71 enum BluetoothReservedChannels
{
72 CHANNEL_DIALUP_NETWORK
= 1,
73 CHANNEL_HANDSFREE_AG
= 10,
74 CHANNEL_HEADSET_AG
= 11,
76 CHANNEL_SIM_ACCESS
= 15,
77 CHANNEL_PBAP_PSE
= 19,
79 CHANNEL_OPUSH_L2CAP
= 5255
82 END_BLUETOOTH_NAMESPACE