LibreOffice Module sd (master) 1
BluetoothServiceRecord.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10#pragma once
11
12// FIXME: look into sharing definitions across OS's (i.e. UUID and port ).
13// Look into dynamically determining which ports are available.
14
15// SDP is a Service Description Protocol cf.
16// http://developer.bluetooth.org/TechnologyOverview/Pages/DI.aspx
17// This is an XML representation, an alternative would be a
18// binary SDP record.
19
20// for numbers see:
21// https://www.bluetooth.org/Technical/AssignedNumbers/service_discovery.htm
22
23const char * const bluetooth_service_record =
24 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
25 "<record>"
26 "<attribute id=\"0x0001\">" // Service class ID list
27 "<sequence>"
28 "<uuid value=\"0x1101\"/>" // an assigned service class meaning: 'serial port'
29 // we could add our own 'LibreOffice remote' service
30 // class here too in future ...
31 "</sequence>"
32 "</attribute>"
33 "<attribute id=\"0x0004\">" // Protocol Descriptor list
34 "<sequence>"
35 "<sequence>"
36 "<uuid value=\"0x0100\"/>" // L2CAP Protocol descriptor
37 "</sequence>"
38 "<sequence>"
39 "<uuid value=\"0x0003\"/>" // enumeration value of RFCOMM protocol
40 "<uint8 value=\"0x05\"/>" // RFCOMM port number
41 "</sequence>"
42 "</sequence>"
43 "</attribute>"
44 "<attribute id=\"0x0005\">" // Browse Group List
45 "<sequence>"
46 "<uuid value=\"0x1002\"/>" // public browse class
47 "</sequence>"
48 "</attribute>"
49 "<attribute id=\"0x0006\">" // Language Base Attribute ID List
50 "<sequence>"
51 "<uint16 value=\"0x656e\"/>" // code_ISO639
52 "<uint16 value=\"0x006a\"/>" // encoding 0x6a
53 "<uint16 value=\"0x0100\"/>" // base_offset ie. points to below =>
54 "</sequence>"
55 "</attribute>"
56 "<attribute id=\"0x0009\">" // Bluetooth Profile Descriptor List
57 "<sequence>"
58 "<sequence>"
59 "<uuid value=\"0x1101\"/>" // 'serial port' UUID as above
60 "<uint16 value=\"0x0100\"/>"// version number 1.0 ?
61 "</sequence>"
62 "</sequence>"
63 "</attribute>"
64 // Attribute identifiers are pointed to by the Language Base Attribute ID List
65 // id+0 = ServiceName, id+1 = ServiceDescription, id+2=ProviderName
66 "<attribute id=\"0x0100\">"
67 "<text value=\"LibreOffice Impress Remote Control\"/>"
68 "</attribute>"
69 "<attribute id=\"0x0102\">"
70 "<text value=\"The Document Foundation\"/>"
71 "</attribute>"
72 "</record>"
73 ;
74
75/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const char *const bluetooth_service_record