Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
e48b708d
Kaydet (Commit)
e48b708d
authored
Şub 12, 2013
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sdremote - cleanup and annotate bluetooth SDP record.
Change-Id: Ie6c3d12387cececce4e169482659cbcbbcfd0975
üst
39e755dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
9 deletions
+73
-9
BluetoothServer.cxx
sd/source/ui/remotecontrol/BluetoothServer.cxx
+3
-9
BluetoothServiceRecord.hxx
sd/source/ui/remotecontrol/BluetoothServiceRecord.hxx
+70
-0
No files found.
sd/source/ui/remotecontrol/BluetoothServer.cxx
Dosyayı görüntüle @
e48b708d
...
...
@@ -6,7 +6,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "BluetoothServer.hxx"
#include "BluetoothServiceRecord.hxx"
#include <stdio.h>
#include <sal/log.hxx>
...
...
@@ -41,12 +43,6 @@
#define NS_BTH 16
#endif
// FIXME: move this into an external file and look at sharing definitions
// across OS's (i.e. UUID and port ).
// Also look at determining which ports are available.
// Alternatively use the binary sdp record
#define BLUETOOTH_SERVICE_RECORD "<?xml version='1.0' encoding= 'UTF-8' ?><record><attribute id='0x0001'><sequence><uuid value='0x1101' /></sequence></attribute><attribute id='0x0004'><sequence><sequence><uuid value='0x0100' /></sequence><sequence><uuid value='0x0003' /><uint8 value='0x05' /></sequence></sequence></attribute><attribute id='0x0005'><sequence><uuid value='0x1002' /></sequence></attribute><attribute id='0x0006'><sequence><uint16 value='0x656e' /><uint16 value='0x006a' /><uint16 value='0x0100' /></sequence></attribute><attribute id='0x0009'><sequence><sequence><uuid value='0x1101' /><uint16 value='0x0100' /></sequence></sequence></attribute><attribute id='0x0100'><text value='Serial Port' /></attribute><attribute id='0x0101'><text value='COM Port' /></attribute></record>"
#include "Communicator.hxx"
using
namespace
sd
;
...
...
@@ -280,7 +276,7 @@ void SAL_CALL BluetoothServer::run()
// don't bother as the record is automatically released when LO exits.
guint
aHandle
;
gboolean
aResult
=
dbus_g_proxy_call
(
aAdapter
,
"AddRecord"
,
&
aError
,
G_TYPE_STRING
,
BLUETOOTH_SERVICE_RECORD
,
G_TYPE_STRING
,
bluetooth_service_record
,
G_TYPE_INVALID
,
G_TYPE_UINT
,
&
aHandle
,
G_TYPE_INVALID
);
...
...
@@ -440,7 +436,6 @@ void SAL_CALL BluetoothServer::run()
#endif
}
BluetoothServer
*
sd
::
BluetoothServer
::
spServer
=
NULL
;
void
BluetoothServer
::
setup
(
std
::
vector
<
Communicator
*>*
pCommunicators
)
...
...
@@ -452,5 +447,4 @@ void BluetoothServer::setup( std::vector<Communicator*>* pCommunicators )
spServer
->
create
();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sd/source/ui/remotecontrol/BluetoothServiceRecord.hxx
0 → 100644
Dosyayı görüntüle @
e48b708d
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef BLUETOOTH_SERVICE_RECORD_HXX
#define BLUETOOTH_SERVICE_RECORD_HXX
// FIXME: look into sharing definitions across OS's (i.e. UUID and port ).
// Look into dynamically determining which ports are available.
// SDP is a Service Description Protocol cf.
// http://developer.bluetooth.org/TechnologyOverview/Pages/DI.aspx
// This is an XML representation, an alternative would be a
// binary SDP record.
static
const
char
*
bluetooth_service_record
=
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
?>"
"<record>"
"<attribute id=
\"
0x0001
\"
>"
// Service class ID list
"<sequence>"
"<uuid value=
\"
0x1101
\"
/>"
"</sequence>"
"</attribute>"
"<attribute id=
\"
0x0004
\"
>"
// Protocol Descriptor list
"<sequence>"
"<sequence>"
"<uuid value=
\"
0x0100
\"
/>"
"</sequence>"
"<sequence>"
"<uuid value=
\"
0x0003
\"
/>"
// enumeration value of RFCOMM protocol
"<uint8 value=
\"
0x05
\"
/>"
// RFCOMM port number
"</sequence>"
"</sequence>"
"</attribute>"
"<attribute id=
\"
0x0005
\"
>"
// Browse Group List
"<sequence>"
"<uuid value=
\"
0x1002
\"
/>"
"</sequence>"
"</attribute>"
"<attribute id=
\"
0x0006
\"
>"
// Language Base Attribute ID List
"<sequence>"
"<uint16 value=
\"
0x656e
\"
/>"
"<uint16 value=
\"
0x006a
\"
/>"
"<uint16 value=
\"
0x0100
\"
/>"
"</sequence>"
"</attribute>"
"<attribute id=
\"
0x0009
\"
>"
// Bluetooth Profile Descriptor List
"<sequence>"
"<sequence>"
"<uuid value=
\"
0x1101
\"
/>"
"<uint16 value=
\"
0x0100
\"
/>"
"</sequence>"
"</sequence>"
"</attribute>"
"<attribute id=
\"
0x0100
\"
>"
"<text value=
\"
Serial Port
\"
/>"
"</attribute>"
"<attribute id=
\"
0x0101
\"
>"
"<text value=
\"
COM Port
\"
/>"
"</attribute>"
"</record>"
;
#endif // BLUETOOTH_SERVICE_RECORD_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment