tdebluez
btuuids.h
Go to the documentation of this file.
1/*
2 *
3 * List of BT UUIDs and resolver for libtdebluez
4 *
5 * Copyright (C) 2018 Emanoil Kotsev <deloptes@gmail.com>
6 *
7 *
8 * This file is part of libtdebluez.
9 *
10 * libtdebluez is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * libtdebluez is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with kbluetooth; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 *
24 */
25
26
27/*
28 * This was taken from bluez/lib/uuid.h 2018-07-22
29 *
30 */
31
32
33#include <map>
34#include <string>
35
36#ifndef BTUUIDS_H_
37#define BTUUIDS_H_
38
39static const std::map<std::string, std::string> my_map =
40{
41 { "00001203-0000-1000-8000-00805f9b34fb", "Generic Audio" },
42 { "00001108-0000-1000-8000-00805f9b34fb", "Headset" },
43 { "00001112-0000-1000-8000-00805f9b34fb", "Headset AG" },
44
45 { "0000111e-0000-1000-8000-00805f9b34fb", "Handsfree" },
46 { "0000111f-0000-1000-8000-00805f9b34fb", "Handsfree AG" },
47
48 { "0000110d-0000-1000-8000-00805f9b34fb", "Advanced Audio" },
49
50 { "0000110a-0000-1000-8000-00805f9b34fb", "A2DP Source" }, //Advanced Audio Distribution Profile
51 { "0000110b-0000-1000-8000-00805f9b34fb", "A2DP Sink" },
52
53 { "0000110e-0000-1000-8000-00805f9b34fb", "A/V Remote Ctrl" }, //Audio/Video Remote Control Profile
54 { "0000110c-0000-1000-8000-00805f9b34fb", "A/V Remote Ctrl Tgt" },
55
56 { "00001115-0000-1000-8000-00805f9b34fb", "PANU" },
57 { "00001116-0000-1000-8000-00805f9b34fb", "NAP" },
58 { "00001117-0000-1000-8000-00805f9b34fb", "GN" },
59 { "0000000f-0000-1000-8000-00805f9b34fb", "BNEP Service" }, //Bluetooth Network Encapsulation Protocol
60
61 { "00002a50-0000-1000-8000-00805f9b34fb", "PNPID" },
62 { "0000180a-0000-1000-8000-00805f9b34fb", "Device Information" },
63
64 { "00001801-0000-1000-8000-00805f9b34fb", "GATT" }, //Generic Access Profile (Generic Attributes)
65 { "00001802-0000-1000-8000-00805f9b34fb", "Immediate Alert" },
66 { "00001803-0000-1000-8000-00805f9b34fb", "Link Loss" },
67 { "00001804-0000-1000-8000-00805f9b34fb", "TX Power" },
68
69 { "0000112d-0000-1000-8000-00805f9b34fb", "SAP" },
70
71 { "0000180d-0000-1000-8000-00805f9b34fb", "Heart Rate" },
72 { "00002a37-0000-1000-8000-00805f9b34fb", "Heart Rate Measurement" },
73 { "00002a38-0000-1000-8000-00805f9b34fb", "Body Sensor Location" },
74 { "00002a39-0000-1000-8000-00805f9b34fb", "Heart Rate Control Point" },
75
76 { "00001809-0000-1000-8000-00805f9b34fb", "Health Thermometer" },
77 { "00002a1c-0000-1000-8000-00805f9b34fb", "Temp Measurement" },
78 { "00002a1d-0000-1000-8000-00805f9b34fb", "Temp Type" },
79 { "00002a1e-0000-1000-8000-00805f9b34fb", "Immediate Temp" },
80 { "00002a21-0000-1000-8000-00805f9b34fb", "Measurement Interval" },
81
82 { "00001816-0000-1000-8000-00805f9b34fb", "Cycling SC" },
83 { "00002a5b-0000-1000-8000-00805f9b34fb", "CSC Measurement" },
84 { "00002a5c-0000-1000-8000-00805f9b34fb", "CSC Feature" },
85 { "00002a5d-0000-1000-8000-00805f9b34fb", "Sensor Location" },
86 { "00002a55-0000-1000-8000-00805f9b34fb", "SC Control Point" },
87
88 { "00000003-0000-1000-8000-00805f9b34fb", "RFCOMM" },
89
90 { "00001400-0000-1000-8000-00805f9b34fb", "HDP" },
91 { "00001401-0000-1000-8000-00805f9b34fb", "HDP Source" },
92 { "00001402-0000-1000-8000-00805f9b34fb", "HDP Sink" },
93
94 { "00001124-0000-1000-8000-00805f9b34fb", "HID" },
95
96 { "00001103-0000-1000-8000-00805f9b34fb", "DUN Gateway" }, //Dial-up Networking Profile
97
98 { "00001800-0000-1000-8000-00805f9b34fb", "GAP" }, //Generic Access Profile
99 { "00001200-0000-1000-8000-00805f9b34fb", "PNP" },
100
101 { "00001101-0000-1000-8000-00805f9b34fb", "SPP" }, //Serial Port Profile
102
103 { "00001104-0000-1000-8000-00805f9b34fb", "OBEX Sync" },
104 { "00001105-0000-1000-8000-00805f9b34fb", "OBEX OPP" },
105 { "00001106-0000-1000-8000-00805f9b34fb", "OBEX FTP" },
106 { "f9ec7bc4-953c-11d2-984e-525400dc9e09", "OBEX DIR" },
107 { "0000112e-0000-1000-8000-00805f9b34fb", "OBEX PCE" },
108 { "0000112f-0000-1000-8000-00805f9b34fb", "OBEX PSE" },
109 { "00001130-0000-1000-8000-00805f9b34fb", "OBEX PBAP" },
110 { "00001132-0000-1000-8000-00805f9b34fb", "OBEX Msg Access Srv" },
111 { "00001133-0000-1000-8000-00805f9b34fb", "OBEX Msg Notif. Srv" },
112 { "00001134-0000-1000-8000-00805f9b34fb", "OBEX MAP" },
113 // taken from
114 // https://www.vistax64.com/threads/bluetooth-peripheral-device-cannot-be-found.62944/
115 // https://together.jolla.com/question/64565/accessing-bluetooth-profiles/
116 // http://www.sensi.org/~ak/tmp/n95.txt
117 { "00005005-0000-1000-8000-0002ee000001", "Nokia PC Suite" },
118 { "00005601-0000-1000-8000-0002ee000001", "Nokia SyncML Server" },
119 { "00000001-0000-1000-8000-0002ee000001", "SyncML Server" },
120 { "00000002-0000-1000-8000-0002ee000002", "OBEX Syncevolution" },
121 { "00000004-0000-1000-8000-0002ee000002", "SyncML DM Client" }
122
123};
124
131static const TQString resolveUUID(const TQString &uuid)
132{
133
134 TQString name;
135
136 for (auto i = my_map.begin(); i != my_map.end(); ++i)
137 {
138 if (i->first == uuid.latin1())
139 {
140 name = TQString(i->second.c_str());
141 break;
142 }
143 }
144 // name = i18n("Unknown");
145 return (!name.isEmpty()) ? name : uuid;
146}
147
148#endif // BTUUIDS_H_
static const TQString resolveUUID(const TQString &uuid)
Definition: btuuids.h:131
static const std::map< std::string, std::string > my_map
Definition: btuuids.h:39