Commit Graph

683 Commits

Author SHA1 Message Date
Thomas Zimmermann
72056dd1ea Bug 1197815: Add missing |BluetoothHfpManager::IsNrecEnabled|, r=shuang 2015-08-25 13:18:00 +02:00
Thomas Zimmermann
10a11a892a Bug 1197877: Remove |INIT_AT| macro from Bluetooth, r=btian
|INIT_AT| works around missing compiler features for gcc before
version 4.7. All B2G targets have been lifted to gcc 4.8, so the
workaround is not required any longer.
2015-08-25 10:00:56 +02:00
Thomas Zimmermann
4d09b89836 Bug 1197877: Remove |CONVERT| macro from Bluetooth, r=btian
The macro |CONVERT| implements a workaround for GCC compilers
before version 4.7. All targets of B2G have been lifted to GCC
4.8, so |CONVERT| is not required any longer.
2015-08-25 10:00:56 +02:00
Thomas Zimmermann
0a134355e7 Bug 1195729: Fix ref-counting of Bluetooth result handlers for failed send operations, r=brsun
Usually references to Bluetooth result handlers are kept until the
command's response has been received and the result handler ran. If
sending the command fails, the extra reference has to be dropped.
With this patch, Gecko will correctly dereference Bluetooth result
handlers when send operations fail.

Thanks to Bruce Sun for finding this bug.
2015-08-24 15:21:38 +02:00
Jamin Liu
400ba4913c CLOSED TREE Bug 1180556 - Pack PBAP replies to OBEX response message and reply to remote device. r=btian
Conflicts:

	dom/bluetooth/bluedroid/BluetoothPbapManager.cpp
2015-08-24 10:30:07 +08:00
Jamin Liu
abf6b30110 CLOSED TREE Bug 1180555 - Handle PBAP replies and pass the results through IPC to PbapManager. r=btian 2015-08-24 10:30:03 +08:00
Jamin Liu
c20b04c87a CLOSED TREE Bug 1180554 - Dispatch events to PBAP event handlers when the PBAP requests comes. r=btian, r=mrbkap 2015-08-24 10:29:56 +08:00
Sebastian Hengst
d696b604ec Backed out 3 changesets (131251625ee8 for bug 1180556, 5bdcc058e6d6 for bug 1180555, f7e0cd74c082 for bug 1180554) for B"G ICS Emulator opt M8 and debug M19 failures. r=backout
Backed out changeset 131251625ee8 (bug 1180556)
Backed out changeset 5bdcc058e6d6 (bug 1180555)
Backed out changeset f7e0cd74c082 (bug 1180554)
2015-08-21 11:19:41 +02:00
Jocelyn Liu
a81cf1b3e6 Bug 1181480 - Add and implement GATT server connection related Web APIs. r=btian, r=mrbkap 2015-08-21 17:11:14 +08:00
Jamin Liu
2682f19ec9 Bug 1180556 - Pack PBAP replies to OBEX response message and reply to remote device. r=btian 2015-08-21 09:52:04 +08:00
Jamin Liu
2c7a6e9d19 Bug 1180555 - Handle PBAP replies and pass the results through IPC to PbapManager. r=btian 2015-08-21 09:51:50 +08:00
Jamin Liu
704ef5eefd Bug 1180554 - Dispatch events to PBAP event handlers when the PBAP requests comes. r=btian, r=mrbkap 2015-08-21 09:51:41 +08:00
Jocelyn Liu
ed3e351a68 Bug 1181512 - Use a single GATT interface, result handler, and notification handler for both GATT client and server operations in bluetooth daemon backend as bluez ipc protocol. r=tzimmermann 2015-08-19 14:28:06 -07:00
Ryan VanderMeulen
a10daa3bd6 Backed out 3 changesets (bug 1180556, bug 1180555, bug 1180554) for test_interfaces.html failures.
Backed out changeset 3210b4a21f50 (bug 1180556)
Backed out changeset d08f41259fb9 (bug 1180555)
Backed out changeset ad74716bf6e7 (bug 1180554)
2015-08-19 07:26:50 -04:00
Jamin Liu
93c02de5fb Bug 1180556 - Pack PBAP replies to OBEX response message and reply to remote device. r=btian 2015-08-19 11:41:24 +08:00
Jamin Liu
8e7f9405fb Bug 1180555 - Handle PBAP replies and pass the results through IPC to PbapManager. r=btian 2015-08-19 11:41:01 +08:00
Jamin Liu
fc7f5eef9a Bug 1180554 - Dispatch events to PBAP event handlers when the PBAP requests comes. r=btian, r=mrbkap 2015-08-19 11:40:36 +08:00
Ben Tian
d4e5970e84 Bug 1195608 - [cleanup] Fix too long lines and revise some comments under dom/bluetooth, r=joliu 2015-08-18 11:29:45 +08:00
Ben Tian
758a5e9af8 Bug 1195604 - [cleanup] Integrate similar BluetoothResultHandlers into basic one, r=tzimmermann 2015-08-18 15:53:41 +08:00
Ben Tian
9c177c52d4 Bug 1055434 - Do not inform gaia of current blob's sending failure before assigning it, r=shuang 2015-08-18 17:31:41 +08:00
Ben Tian
9636b618b1 Bug 1192693 - [03] Remove bluetooth1 code from backend, r=tzimmermann 2015-08-17 15:30:37 +08:00
Will Wang
9fd88cded3 Bug 825149 - Support HFP NREC feature. r=shuang 2015-08-10 04:51:00 -04:00
Will Wang
80bbaca7f1 Bug 825149 - Add NREC feature bit in bluetooth stack. r=shuang 2015-08-07 03:15:00 -04:00
Ben Tian
ba68749da3 Bug 1190730 - Patch 5/5: Wrap get device related variables into get device request, r=joliu 2015-08-07 14:43:44 +08:00
Ben Tian
f465f5fca3 Bug 1190730 - Patch 4/5: Make runnable arrays member variables, r=joliu 2015-08-07 10:38:21 +08:00
Ben Tian
0764f341f9 Bug 1190730 - Patch 3/5: Make address-name mapping table member variable, r=joliu 2015-08-07 10:31:42 +08:00
Ben Tian
195a54c7fa Bug 1190730 - Patch 2/5: Make backend recovery variables member ones, r=joliu 2015-08-07 10:29:16 +08:00
Ben Tian
5662156042 Bug 1190730 - Patch 1/5: Make adapter properties member variables, r=joliu 2015-08-07 10:31:27 +08:00
Ben Tian
e5a7ce7584 Bug 1173266 - [cleanup] Remove unused |isConnected| from bluetooth2, r=tzimmermann 2015-08-05 15:19:43 +08:00
Ben Tian
a67db0a86c Bug 1106007 - Cleanup include guards. r=tzimmermann 2015-08-04 17:39:30 +08:00
Thomas Zimmermann
0358354bf5 Bug 1187904: Remove |BluetoothDaemonConnector| and random-address creator, r=shuang 2015-08-03 13:17:02 +02:00
Thomas Zimmermann
55f1cb92b7 Bug 1187904: Convert |BluetoothDaemonInterface| to use |DaemonSocketConnector|, r=shuang 2015-08-03 13:17:02 +02:00
Thomas Zimmermann
66fa98429a Bug 1187249: Cleanup BluetoothInterfaceHelpers.{cpp,h}, r=shuang
This patch moves the last conversion function to Bluetooth's daemon
backend and removes the files BluetoothInterfaceHelpers.{cpp,h}.
2015-07-30 10:34:51 +02:00
Thomas Zimmermann
518504fa87 Bug 1187249: Move Bluetooth init operators to ipc/hal, r=shuang 2015-07-30 10:34:51 +02:00
Thomas Zimmermann
59844436d8 Bug 1183249: Move PDU helper functions to ipc/hal, r=shuang 2015-07-30 10:34:51 +02:00
Thomas Zimmermann
2a71f700c8 Bug 1187249: Move |DaemonSocketPDUHeader| to hal/ipc, r=shuang 2015-07-30 10:34:51 +02:00
Thomas Zimmermann
2f7aeaeba9 Bug 1187872: Remove HAL backend from Bluetooth, r=shuang
Bluedroid's HAL backend has been superseded by the Bluetooth daemon, and
already been unused in current releases. This patch removes the code from
Gecko.
2015-07-30 09:09:26 +02:00
Ben Tian
bf72269e00 Bug 1127701 - Fix warning: NS_ENSURE_TRUE(value.isNumber()) failed, r=joliu 2015-07-29 16:40:39 +08:00
Thomas Zimmermann
d360346df2 Bug 1187230: Convert Bluetooth to use daemon runnables, r=shuang
With this patch, Bluetooth uses the generic daemon runnables.
2015-07-27 13:33:17 +02:00
Ben Tian
ec7a3fd8bc Bug 1181827 - [Aries-L] Store remote device address and name mapping for pairing, r=shuang 2015-07-22 10:23:45 +08:00
Carsten "Tomcat" Book
bfa6c9a51b Backed out changeset 83cd70d2b0bb (bug 1187230) 2015-07-24 15:42:08 +02:00
Thomas Zimmermann
1c60aeafa6 Bug 1187230: Convert Bluetooth to use daemon runnables, r=shuang
With this patch, Bluetooth uses the generic daemon runnables.
2015-07-24 14:50:06 +02:00
Thomas Zimmermann
664b02a26f Bug 1186331: Check for \0 when parsing Bluetooth device names, r=btian
This patch adds an explicit check for the terminal \0 character to
the parser that reads Bluetooth device names from bluetoothd. There's
a maximum length of 249 characters per name. If we don't find \0 we
interpret the whole range to contain the device name.
2015-07-24 11:24:47 +02:00
Thomas Zimmermann
2eb3afa0bc Bug 1185478: Remove strong references from socket I/O class to socket classes
The shutdown procedure for socket classes ensures that the I/O class is
deleted independently from its socket class. If the socket class has been
deleted, no I/O is performed and no socket events are forwarded. The I/O
class therefore doesn't require a strong reference to its socket class.

This patch removes the remaining ref-counted pointers from the socket I/O
classes. The socket class clears the weak reference in its socket I/O class
when closing the socket.
2015-07-21 08:06:29 +02:00
Thomas Zimmermann
7a8e54aa54 Bug 1185478: Add leak checks to socket I/O classes 2015-07-21 08:06:29 +02:00
Thomas Zimmermann
8270c9b2f7 Bug 1180965: Don't disable BT before daemon has been shut down, r=btian
The current shutdown code for Bluetooth contains a race condition
between closing the daemon sockets and re-opening them for the next
instance of the daemon.

This patch fixes the problem by not disabling the Bluetooth adapter
before the sockets have been closed. During the shutdown, no new
instances of the daemon can be started.
2015-07-14 13:28:18 +02:00
Ben Tian
355b56d87b Bug 1203819 - Fix loop condition in BluetoothPbapManager::PackPropertiesMask, r=shuang 2015-09-11 11:14:26 +08:00
Shawn Huang
42dbe610fe Bug 1166675 - Implement GetMessagesListing function, r=btian 2015-09-11 02:08:41 +08:00
Birunthan Mohanathas
a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Jocelyn Liu
539e9fd925 Bug 1170071 - Part 4: Add Gatt server interfaces for Bluetooth daemon. r=shuang
CLOSED TREE
2015-07-08 04:34:00 -04:00
Jocelyn Liu
9fc0663fab Bug 1170071 - Part 3: Add gatt server support to GATT module for Bluetooth daemon. r=shuang 2015-07-08 04:33:00 -04:00
Jocelyn Liu
a1b39d5a02 Bug 1170071 - Part 2: Add helpers for Bluetooth daemon GATT server support. r=shuang 2015-07-08 04:31:00 -04:00
Jocelyn Liu
ba11710dae Bug 1170071 - Part 1: Revise BluetoothGattInterface, result handler, and interface helper for daemon support of gatt server. r=shuang 2015-07-08 04:30:00 -04:00
Bruce Sun
e3ecdbc77a Bug 1161991: Gatt server neutral-backend interface; r=jocelyn 2015-07-06 13:43:54 +08:00
Shawn Huang
758af86f5a Bug 1160126 - Restart bluetoothd daemon automatically for API V2, r=jocelyn 2015-07-07 15:16:57 +08:00
Juan Gomez
258ad59e3f Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Bruce Sun
d4a4b4f0a1 Bug 1164387 - Use |btgatt_client_interface_t.get_device_type| to get the device type. r=jocelyn 2015-07-02 12:07:43 +08:00
Ben Tian
da8ddddc60 Bug 1179141 - Remove macro |BT_API2_LOGR|, r=joliu 2015-07-02 15:13:41 +08:00
Thomas Zimmermann
8fc78fed3e Bug 1172914: Merge duplicated code in |BluetoothServiceBluedroid| for simple cases, r=btian 2015-06-16 17:28:07 +02:00
Thomas Zimmermann
584df01b4a Bug 1172914: Minimize Bluetooth v1/v2 duplication in BluetoothServiceBluedroid.cpp, r=btian 2015-06-16 17:28:07 +02:00
Thomas Zimmermann
91bea80ee8 Bug 1172914: Minimize Bluetooth v1/v2 duplication in BluetoothServiceBluedroid.h, r=btian 2015-06-16 17:28:07 +02:00
Jocelyn Liu
0d4e05f63a Bug 1167064 - Patch1: Switch to bluetooth APIv2. r=shuang 2015-06-16 09:38:50 +08:00
Thomas Zimmermann
3126a07df4 Bug 1171017: Move classes from ipc/bluetooth to ipc/hal, r=shuang
The class |DaemonSocket| and its helpers implement a service-
neutral connection to a HAL daemon. This patch moves the code
to an appropriate directory and breaks up the code into smaller
pieces.

--HG--
rename : ipc/bluetooth/BluetoothDaemonConnection.cpp => ipc/hal/DaemonSocket.cpp
rename : ipc/bluetooth/BluetoothDaemonConnection.h => ipc/hal/DaemonSocket.h
rename : ipc/bluetooth/BluetoothDaemonConnectionConsumer.cpp => ipc/hal/DaemonSocketConsumer.cpp
rename : ipc/bluetooth/BluetoothDaemonConnectionConsumer.h => ipc/hal/DaemonSocketConsumer.h
rename : ipc/bluetooth/moz.build => ipc/hal/moz.build
2015-06-15 14:44:03 +02:00
Thomas Zimmermann
41d8f3ac72 Bug 1171017: Rename |BluetoothDaemonConnection| to |DaemonSocket|, r=shuang 2015-06-15 14:44:03 +02:00
Thomas Zimmermann
160760d61d Bug 1171017: Rename |BluetoothSocketPDU| to |DaemonSocketPDU|, r=shuang 2015-06-15 14:44:03 +02:00
Thomas Zimmermann
4a2cc0e217 Bug 1171017: Rename |BluetoothDaemonPDUConsumer| to |DaemonSocketIOConsumer|, r=shuang 2015-06-15 14:44:03 +02:00
Thomas Zimmermann
de38317b09 Bug 1171017: Rename |BluetoothDaemonConnectionConsumer| to |DaemonSocketConsumer|, r=shuang 2015-06-15 14:44:03 +02:00
Shawn Huang
434fcb6904 Backed out changesets 0832ffdd8144 for Bug 1167064 2015-06-15 19:05:03 +08:00
Jocelyn Liu
3ded2db982 Bug 1167064 - Patch1: Switch to bluetooth APIv2. r=shuang 2015-06-15 17:11:35 +08:00
Bruce Sun
b47876dbca Bug 1161945 - Fix empty characteristics and descriptors after searching services. f=elin, r=jocelyn 2015-06-12 10:44:57 +08:00
Bruce Sun
7eb3205b86 Bug 1171866 - Remove ReversedUuidToString; f=tzimmermann, r=jocelyn 2015-06-11 18:01:00 +08:00
Thomas Zimmermann
da8f73f148 Bug 1172479: Replace |nsIThread| by |MessageLoop| in socket I/O code, r=kmachulis
Dispatching events via |nsIThread| doesn't work with worker threads. This
patch replaces all uses of |nsIThread| in the socket code by equivalent
uses of |MessageLoop|.
2015-06-09 09:50:10 +02:00
Ryan VanderMeulen
c0c862683b Backed out changeset 150544a28405 (bug 1167064) for B2G mochitest failures. 2015-06-08 15:41:26 -04:00
Jocelyn Liu
cbe97e5b2b Bug 1167064 - Switch to bluetooth APIv2. r=shuang 2015-06-04 02:59:00 -04:00
Jocelyn Liu
d4ad97113a Bug 1171100 - Fix incorrect logic of handling Bluetooth Gatt Responses in daemon backend. r=tzimmermann 2015-06-04 02:53:00 -04:00
Jocelyn Liu
51e5ac94e1 Bug 1170971 - Part 2: Fix BluetoothGattAdvData unpacking in daemon backend. r=tzimmermann 2015-06-04 02:56:00 -04:00
Jocelyn Liu
9445ea0e91 Bug 1170971 - Part 1: Fix BluetoothGattReadParam unpacking in daemon backend. r=tzimmermann 2015-06-04 02:55:00 -04:00
Bruce Sun
75cb2ea259 Bug 1161956 - Fix crashes while using GATT client functions. r=jocelyn 2015-06-03 18:19:43 +08:00
Thomas Zimmermann
974a0b5beb Bug 1168806: Use 'consumer thread' in socket interface, r=kmachulis
The socket IPC interfaces still use 'main thread' in a number of
places. This patch changes all such interfaces and documentation
to speak of 'consumer thread' instead.
2015-06-02 10:01:58 +02:00
Thomas Zimmermann
7c1faa403c Bug 1168806: Configurable consumer thread for socket IPC classes, r=kmachulis
The consumer thread handles socket creation, destruction, and
data processing for socket IPC. Traditionally this has been
done on the main thread.

This patch extends the socket IPC classes to support arbitrary
consumer threads. The thread is configured when establishing a
connection, and performs all of the above operations until the
socket is closed.
2015-06-02 10:01:57 +02:00
Thomas Zimmermann
100bf3cb9c Bug 1168806: Configurable I/O thread for socket IPC classes, r=kmachulis
The I/O thread sends and receives data on a file descriptor. This
has traditionally been performed on a single I/O thread.

This patch extends the socket IPC classes to support arbitrary I/O
threads. The thread is configured when a connection is established
and used until the socket gets closed.
2015-06-02 10:01:57 +02:00
Jamin Liu
1fc46c5d1a Bug 1170086 - Fix the parameter type of DispatchReplyError() in StartLeScan result handler. r=joliu 2015-06-02 13:55:12 +08:00
Thomas Zimmermann
be105911a1 Bug 1168446: Don't store connection parameters in |BluetoothSocket|, r=shuang 2015-06-01 10:42:29 +02:00
Jocelyn Liu
3ed8787538 Bug 1163499 - Part 5: Support GATT profile when using Bluetooth daemon. r=tzimmermann 2015-05-27 00:05:00 -04:00
Jocelyn Liu
73919eb14b Bug 1163499 - Part 4: Add GATT and GATT client interfaces for Bluetooth daemon. r=tzimmermann 2015-05-27 04:53:00 -04:00
Jocelyn Liu
61acad2278 Bug 1163499 - Part 3: Add GATT module for Bluetooth daemon. r=tzimmermann 2015-05-27 04:52:00 -04:00
Jocelyn Liu
d524ff2ee1 Bug 1163499 - Part 2: Add helpers for Bluetooth daemon GATT client support. r=tzimmermann 2015-05-27 00:03:00 -04:00
Jocelyn Liu
18919dda88 Bug 1163499 - Part 1: Revise BluetoothGattInterface and result handler for daemon support. r=tzimmermann 2015-05-27 04:50:00 -04:00
Thomas Zimmermann
621428ac80 Bug 1167210: Replace |union sockaddr_any| with |struct sockaddr_storage|, r=kmachulis
Both types, |union sockaddr_any| and |struct sockaddr_storage|, provide
a sockaddr type that can hold any address. The latter is standardized by
POSIX, so we prefer it.
2015-05-27 13:49:07 +02:00
Jamin Liu
18cfa5abf8 Bug 1168343 - Remove the improper MOZ_ASSERT in |BluetoothServiceBluedroid::BondStateChangedNotification|. r=shuang 2015-05-27 13:38:21 +08:00
Jamin Liu
8471b57f5f Bug 1168266 - Add few member functions of ObexHeaderSet for PBAP. r=shuang 2015-05-27 09:48:02 +08:00
Thomas Zimmermann
f6aa576d06 Bug 1167207: Remove |BluetoothDaemonChannel|, r=shuang
This patch integrates the functionality of |BluetoothDaemonChannel|
into |BluetoothDaemonConnection|. All users are adapted, the former
class is removed.
2015-05-26 18:29:02 +02:00
Thomas Zimmermann
f9ce4741fd Bug 1166638: Use |ListenSocketConsumer| in |ListenSocket|, r=kmachulis, dlee, chucklee, shuang
This patch converts |ListenSocket| to forward events to an instance
of |ListenSocketConsumer|. All users are converted and the related
listener and consumer classes are removed.
2015-05-26 13:24:20 +02:00
Jocelyn Liu
b6e89a6aac Bug 1167070 - Overwrite BLE related flags to enable BLE functionalities in bluedroid for both bluetooth1 and bluetooth2. r=shuang 2015-05-22 20:07:00 -04:00
Shawn Huang
90b0cf89c5 Bug 1166469 - Add HandleBackendError for hfp-fallback product, r=btian 2015-05-22 11:45:54 +08:00
Carsten "Tomcat" Book
92162b368c Merge mozilla-central to b2g-inbound 2015-05-21 15:19:27 +02:00
Carsten "Tomcat" Book
b4dc8a79b7 merge mozilla-inbound to mozilla-central a=merge 2015-05-21 14:56:34 +02:00
Thomas Zimmermann
70a7cf2bf2 Bug 1164417: Add |ConnectionOrientedSocket::PrepareAccept| for accepting socket connections, r=kmachulis
With this patch, stream and listening sockets handle the setup of
accepted sockets internally. Sub-classes of |StreamSocket| don't
have to overload StreamSocket's |GetIO| any longer.
2015-05-21 13:34:37 +02:00
Thomas Zimmermann
38232bed0f Bug 1164417: Store PDU consumer in |BluetoothDaemonConnection|, r=kmachulis 2015-05-21 13:34:37 +02:00
Thomas Zimmermann
5689bc8e15 Bug 1164417: Add |UnixSocketConnector::Duplicate|, r=kmachulis
The new method |UnixSocketConnector::Duplicate| allows a socket
connector to duplicate itself. Listening sockets will used this
feature to create socket connectors for accepted connections.
2015-05-21 13:34:37 +02:00
Ben Tian
ea0745da15 Bug 1166587 - Check OBEX packet length before accessing it, r=shuang 2015-05-21 14:11:20 +08:00
Cameron McCormack
c7b07bee01 Bug 1166575 - Silence uninitialized variable error in BluetoothHALInterface.cpp when building a debug B2G build. r=tzimmermann 2015-05-21 10:01:59 +10:00
Carsten "Tomcat" Book
12f69af823 merge mozilla-inbound to mozilla-central a=merge 2015-05-20 15:52:31 +02:00
Thomas Zimmermann
840f154d6b Bug 1164425: Cleanup interfaces of |ListenSocket|, r=kmachulis
This patch removes |ListenSocket::GetSocketAddr|, which is unused
and not thread-safe. The |Listen| methods now return error codes.
2015-05-20 10:50:43 +02:00
Thomas Zimmermann
1237cad18c Bug 1164425: Rename |SocketBase::CloseSocket| to |SocketBase::Close|, r=kmachulis 2015-05-20 10:50:43 +02:00
Carsten "Tomcat" Book
1aa07d706a Backed out changeset 1e93024c9fec (bug 1164425) for bustage 2015-05-20 10:31:55 +02:00
Carsten "Tomcat" Book
1a15bd1430 Backed out changeset 17bd0777339a (bug 1164425) 2015-05-20 10:30:55 +02:00
Thomas Zimmermann
6a46c5c7cf Bug 1164425: Cleanup interfaces of |ListenSocket|, r=kmachulis
This patch removes |ListenSocket::GetSocketAddr|, which is unused
and not thread-safe. The |Listen| methods now return error codes.
2015-05-20 09:54:27 +02:00
Thomas Zimmermann
533d048a4b Bug 1164425: Rename |SocketBase::CloseSocket| to |SocketBase::Close|, r=kmachulis 2015-05-20 09:54:27 +02:00
Ben Tian
478901b821 Bug 1162902 - Implement PBAP SetPhoneBook function, r=shuang 2015-05-20 14:40:01 +08:00
Jamin Liu
cf0fd0d19c Bug 1166215 - Cast 'BluetoothTypeOfDevice' to uint32_t before the BT signal is distributed to BluetoothAdapter. r=joliu 2015-05-20 14:29:25 +08:00
Ben Tian
8aa4af6efd Bug 1166176 - [cleanup] Simplify volume related code in OPP manager, r=shuang 2015-05-19 17:09:56 +08:00
Ben Tian
2248c8f63a Bug 1166180 - [cleanup] Remove function |EnsureBluetoothHalLoad| in BluetoothServiceBluedroid, r=shuang 2015-05-19 17:02:01 +08:00
Thomas Zimmermann
a4face3b55 Bug 1161020: Remove old interface and implementation from socket-connector classes, r=kmachulis 2015-05-19 13:28:46 +02:00
Thomas Zimmermann
34117f6140 Bug 1161020: Implement new socket-connector interface for Bluetooth daemon socket, r=shuang
This patch moves |BluetoothDaemonSocketConnector| into its own file,
renames it to |BluetoothDaemonConnector| and implements the new socket-
connector interface.
2015-05-19 13:28:46 +02:00
Thomas Zimmermann
c9ea3365c5 Bug 1164498: Remove |DispatchBluetoothReply| from |BluetoothServiceBluedroid|, r=btian
This patch replaces |DispatchBluetoothReply| in |BluetoothServiceBluedroid|
by corresponding calls to |DispatchReplySuccess| or |DispatchReplyError|.
2015-05-19 12:28:38 +02:00
Andrea Marchesini
3aa189b5ff Bug 1163388 - patch 2 - get rid of nsIDOMFile, r=ehsan
--HG--
rename : dom/base/nsIDOMFile.idl => dom/base/nsIDOMBlob.idl
2015-05-18 14:52:26 +01:00
Andrea Marchesini
338c67e420 Bug 1163388 - patch 1 - make nsIDOMFile an empty interface, r=ehsan 2015-05-18 14:51:54 +01:00
Jamin Liu
3242c56050 Bug 1098228 - Set Bluetooth discoverable to default value when BT state is BT_STATE_OFF. r=shuang 2015-05-18 09:27:23 +08:00
Neil Rashbrook
cf42e317ab Bug 1155963 Only allow NS_LITERAL_CSTRING to be used on compile-time literals r=froydnj,ehsan 2015-05-16 09:07:10 +01:00
Ben Tian
1d0552ae6a Bug 1164314 - Fire devicefound in RemoteDevicePropertiesNotification only during discovery, r=shuang 2015-05-15 14:14:02 +08:00
Will Wang
e761135e3c Bug 1161888 - remove first CKPD flag and do not set |mDialingRequestProcessed| flag to avoid the redundant HFP_AT_RESPONSE_OK. r=shuang 2015-05-15 14:35:46 +08:00
Ben Tian
23b0ee66cf Bug 1159179 - Patch 3/3: [PBAP] Implement PBAP manger, r=shuang 2015-05-13 10:52:58 +08:00
Ben Tian
d61dda2930 Bug 1159179 - Patch 2/3: [PBAP] Revise profile disconnection when BT stops, r=shuang 2015-05-13 16:29:50 +08:00
Ben Tian
a482aeaa6d Bug 1159179 - Patch 1/3: [PBAP] Add OBEX related functions, r=shuang 2015-05-07 17:07:58 +08:00
Bruce Sun
3c8da08a08 Bug 1163912: Set |Type| property of BluetoothDevice a initial value during LeScan; f=elin, r=jocelyn 2015-05-13 15:50:21 +08:00
Carsten "Tomcat" Book
90096e4744 merge mozilla-central to mozilla-inbound
--HG--
rename : dom/base/MultipartFileImpl.cpp => dom/base/MultipartBlobImpl.cpp
rename : dom/base/MultipartFileImpl.h => dom/base/MultipartBlobImpl.h
2015-05-12 17:07:10 +02:00
Andrea Marchesini
f4538bb921 Bug 1163387 - Rename FileImpl to BlobImpl, r=ehsan
--HG--
rename : dom/base/MultipartFileImpl.cpp => dom/base/MultipartBlobImpl.cpp
rename : dom/base/MultipartFileImpl.h => dom/base/MultipartBlobImpl.h
2015-05-12 13:11:03 +01:00
Andrea Marchesini
368a198972 Bug 1159401 - Split Blob and File classes, r=bz 2015-05-12 13:09:51 +01:00
Shawn Huang
76d664e594 Bug 1160127 - Send HFP/A2DP profile disconnection notification, r=btian 2015-05-11 11:47:31 +08:00
Ben Tian
e11afd073e Bug 1156503 - Update device name from |RemoteDevicePropertiesNotification| during discovery, r=shuang 2015-04-30 16:48:39 +08:00
Thomas Zimmermann
362da7534b Bug 1161003: Don't send PDU when connection to Bluetooth daemon is closed, r=shuang
During restarts of the Bluetooth daemon, it can occur that Gecko tries
to send without having a connection to bluetoothd opened. This patch adds
a check to prevent this.
2015-05-06 10:00:02 +02:00
Thomas Zimmermann
a9b8c25faa Bug 1159267: Share Bluedroid's A2DP manager between Bluetooth v1 and v2, r=btian
Bluedroid's A2DP manager is the same for Bluetooth v1 and v2, except
fixes for bug 1062697 and bug 1148311 in v1. This patch merges both
variants. The last remaining difference is a call to |DistributeSignal|,
which differs between both implementations.
2015-05-06 09:58:04 +02:00
Thomas Zimmermann
80366e6970 Bug 1159267: Share Bluedroid's HFP manager between Bluetooth v1 and v2, r=btian
The implementation of the Bluedroid HFP manager in Bluetoth v1 and v2
differs by a number of interface changes. This patch merges both variants
into a single one, were possible.
2015-05-06 09:58:04 +02:00
Thomas Zimmermann
e608040aea Bug 1159267: Share Bluedroid's OPP manager between Bluetooth v1 and v2, r=btian
Bluedroid's OPP manager is the same for Bluetooth v1 and v2; except
for bug 1118177, which is fixed in v1. So with this patch, the v1
implementation is used for both variants.
2015-05-06 09:58:04 +02:00
Wes Kocher
71ab142db5 Backed out changeset ffad198d409b (bug 1161003) for b2g windows build bustage 2015-05-05 13:15:42 -07:00
Thomas Zimmermann
4f5dc0f157 Bug 1161003: Don't send PDU when connection to Bluetooth daemon is closed, r=shuang
During restarts of the Bluetooth daemon, it can occur that Gecko tries
to send without having a connection to bluetoothd opened. This patch adds
a check to prevent this.
2015-05-05 17:02:43 +02:00
Carsten "Tomcat" Book
ba5c4e1c0c Merge mozilla-central to b2g-inbound 2015-05-04 15:26:45 +02:00
Jamin Liu
da0f8172bb Bug 1063444 - Implement LE scan related methods and LE device event. r=joliu, r=mrbkap 2015-05-04 18:59:02 +08:00
Andrew McCreight
9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Jocelyn Liu
79a1ee1c61 Bug 1159685 - Fix BluetoothSspVariant argument passing for SspRequestNotification. r=shuang 2015-04-30 01:04:00 -04:00
Shawn Huang
c982fdb5b1 Bug 1143925 - Restart bluetoothd daemon automatically for API V2. r=tzimmermann 2015-04-30 05:46:00 -04:00
Shawn Huang
548f72bad6 Bug 1143925 - Avoid crash for HFP/A2DP manager during restart daemon. r=tzimmermann 2015-04-30 05:14:00 -04:00
Shawn Huang
2f5a4a338c Bug 1143925 - Restart bluetoothd daemon automatically for V1 API. r=tzimmermann 2015-04-30 05:13:00 -04:00
Thomas Zimmermann
36282f45ee Bug 1159709: Cleanup inherited methods of Bluedroid's |BluetoothSocket|, r=kmachulis
This patch cleans up the inherited methods of Bluedroid's
|BluetooothSocket|. Methods of the same base class are grouped
within the file, and each method is labeled with 'override'.
2015-04-30 12:55:37 +02:00
Thomas Zimmermann
92706b5790 Bug 1159709: Inherit |BluetoothDaemonConnection| from |DataSocket|, r=kmachulis
|BluetoothDaemonConnection| sends and receives data. With this patch
it inherits from |DataSocket|, which provides the respective abstract
interfaces.
2015-04-30 12:55:37 +02:00
Thomas Zimmermann
79b0cc601a Bug 1158818: Only store Bluetooth result runnable after command has been sent successfully, r=shuang
With the current code, the Bluetooth result runnable is saved for
receiving before a command has been sent successfully. If sending
fails afterwards, the saved result runnable will still sit in the
result queue, and interfere with later, successful commands.

With this patch, the result runnable is saved only if the sending
was successful.
2015-04-30 11:29:25 +02:00
Thomas Zimmermann
625ab90911 Bug 1159209: Remove template parameters from |DataSocketIO|, r=kmachulis
This patch removes the template parameters from |DataSocketIO| and
moves its methods into the C++ source file. All users have been
adapted.
2015-04-29 11:19:28 +02:00
Thomas Zimmermann
9cdb8ad654 Bug 1159209: Remove template parameters from |SocketIOShutdownTask|, r=kmachulis
This patch removes the template parameters from |SocketIOShutdownTask|
and moves its methods into the C++ source file. All users have been
adapted.
2015-04-29 11:19:28 +02:00
Thomas Zimmermann
f1e1ede770 Bug 1159209: Remove template parameters from |SocketIORequestClosingRunnable|, r=kmachulis
This patch removes the template parameters from
|SocketIORequestClosingRunnable| and moves its methods into
the C++ source file. All users have been adapted.
2015-04-29 11:19:28 +02:00
Thomas Zimmermann
6999dd655b Bug 1159209: Remove template parameters from |SocketIOEventRunnable|, r=kmachulis
This patch removes the template parameters from |SocketIOEventRunnable|
and moves its methods into the C++ source file. All users have been
adapted.
2015-04-29 11:19:28 +02:00
Ben Tian
5c10976f50 Bug 1158081 - Patch (2/2): Simplify |BluetoothOppManager::SendObexData| function, r=tzimmermann 2015-04-28 11:12:35 +08:00
Ben Tian
246bf336ec Bug 1158081 - Patch (1/2): Define macro to declare SocketObserver functions, r=tzimmermann 2015-04-28 11:12:13 +08:00
Thomas Zimmermann
a8a6ff751e Bug 1158876: Move |DataSocket::ReceiveSocketData| into sub classes, r=kmachulis
|ReceiveSocketData| receives socket data on the main thread. This
is a specific detail of the current socket classes, which should not
be required by future implementations.

This patch moves the receive method and the corresponding runnable
into socket classes.
2015-04-28 10:18:13 +02:00
Thomas Zimmermann
10488d5115 Bug 1158876: Move management of socket I/O buffers into socket I/O classes, r=kmachulis
This patch moves management of received socket I/O buffers from
|DataSocketIO| into the I/O classes. Each I/O class is responsible
for (de-)allocating buffers, and consuming them once data has been
received.

All current I/O classes forward their buffers to the main thread,
but other operations are possible. For example, received data can
be parsed and processed directly in the I/O thread.
2015-04-28 10:18:13 +02:00
Thomas Zimmermann
ed4b4e63be Bug 1158876: Rename |SocketConsumerBase| to |DataSocket|, r=kmachulis
This patch renames |SocketConsumerBase| to |DataSocket|, and for the
I/O classes |SocketConsumerIO| to |DataSocketIO|. |DataSocketIO| also
contains send and receive functionality from |SocketBaseIO|.

|DataSocket| is a virtual base class that represents a socket that
transfers data, without a particular constraints to what the data
represents. |DataSocketIO| is the corresponding helper class on the
I/O thread.
2015-04-28 10:18:12 +02:00
Wes Kocher
22483cbf35 Merge m-c to inbound, a=merge 2015-05-19 16:44:10 -07:00
Andrea Marchesini
61b9bd0496 Bug 1166231 - Make nsIDOMBlob an empty interface, r=ehsan 2015-05-19 15:36:37 +01:00
Thomas Zimmermann
417a91f162 Bug 1156352: Remove |UnixSocketRawData| from socket I/O interfaces, r=kmachulis 2015-04-23 13:48:48 +02:00
Thomas Zimmermann
bbd18cd078 Bug 1156352: Remove |UnixSocketRawData| from Bluetooth interfaces, r=btian 2015-04-23 13:48:47 +02:00
Thomas Zimmermann
cacc3d7f0c Bug 1156716: Build GATT backend as part of Bluetooth v1, r=joliu
This patch enables building the GATT backend code in Bluetooth v1. V1 still
doesn't support GATT, only some of the code gets build.
2015-04-23 10:43:51 +02:00
Thomas Zimmermann
d611c792d6 Bug 1156716: Build GATT HAL helpers in Bluetooth v1, r=joliu 2015-04-23 10:43:51 +02:00
Wes Kocher
a79764cf6b Merge inbound to m-c a=merge CLOSED TREE 2015-04-22 17:15:53 -07:00
Thomas Zimmermann
99e571dff8 Bug 1156229: Update GATT support to include Android L, r=joliu
This patch adds L support to the GATT implementation. Only the HAL
backend is currently supported.
2015-04-22 09:35:36 +02:00
Thomas Zimmermann
6a2c5933a5 Bug 1156229: Make ref-counted class destructors non-public, r=joliu
To build Bluetooth v2 with gcc 4.8 and later, all ref-counted classes
must have non-public destructors.
2015-04-22 09:35:36 +02:00
Thomas Zimmermann
19481051d7 Bug 1154281: Remove references to UnixSocket.h from Bluetooth, r=btian
The code needs |UnixSocketRawData| from SocketBase.h and the data
structures in UnixSocketWatcher.h
2015-04-21 10:33:06 +02:00
Bruce Sun
c1123fbf68 Bug 1152653 - Implement BluetoothGatt.oncharacteristicchanged. r=jocelyn, r=mrbkap 2015-04-16 16:47:01 +08:00
Bruce Sun
056f82d8c9 Bug 1140952 - Implement read/write value of a descriptor for GATT client API (ipc part). f=jocelyn, r=btian 2015-04-16 16:45:20 +08:00
Bruce Sun
c20fe1eef4 Bug 1140952 - Implement read/write value of a characteristic for GATT client API (ipc part). f=jocelyn, r=btian 2015-04-16 16:44:37 +08:00
Thomas Zimmermann
8b16914471 Bug 1153796: Share BluetoothInterfaceHelpers.{cpp,h} between Bluetooth v1 and v2, r=btian
The v1 implementation of BluetoothInterfaceHelpers.{cpp,h} is more
up-to-date than the v2 variant. So we can just use the v1 version and
remove the v2 version entirely. Bluetooth v2 contains its own version
of |Convert(nsresult, BluetoothStatus)|, which has been removed in
favor of the shared implementation.

--HG--
rename : dom/bluetooth/bluetooth1/BluetoothInterfaceHelpers.cpp => dom/bluetooth/BluetoothInterfaceHelpers.cpp
rename : dom/bluetooth/bluetooth1/BluetoothInterfaceHelpers.h => dom/bluetooth/BluetoothInterfaceHelpers.h
2015-04-15 11:46:33 +02:00
Thomas Zimmermann
25c352176c Bug 1153796: Share BluetoothInterface.{cpp,h} between Bluetooth v1 and v2, r=btian
With this patch, Bluetooth v1 and v2 share the same interfaces classes
for their backend code. Bluetooth v1 doesn't yet support GATT, so the
GATT interfaces are still not implemented.

The patch also fixes the GATT-specific classes to compile under recent GCC
versions 4.8 and later, which are used with Android L.

The patch also preserves the prefered backend for each version. Bluetooth
v1 defaults to 'bluetoothd,' v2 defaults to 'bluedroid.'
2015-04-15 11:46:33 +02:00
Thomas Zimmermann
af21064b9c Bug 1153796: Unify variants of |BluetoothInterface::SspReply|, r=btian
Bluetooth use different types for the second argument of their variant
of |BluetoothInterface::SspReply|. This patch standardizes them on the
v2 version.
2015-04-15 11:46:33 +02:00
Carsten "Tomcat" Book
660521f516 Backed out changeset 3a16edeb9ed2 (bug 1153796) for bustage on a CLOSED TREE 2015-04-15 11:33:02 +02:00
Carsten "Tomcat" Book
90d9543ab6 Backed out changeset a74d1c644c84 (bug 1153796) 2015-04-15 11:32:16 +02:00
Carsten "Tomcat" Book
dc4923c9f7 Backed out changeset 868ace3fafba (bug 1153796)
--HG--
rename : dom/bluetooth/BluetoothInterfaceHelpers.cpp => dom/bluetooth/bluetooth1/BluetoothInterfaceHelpers.cpp
rename : dom/bluetooth/BluetoothInterfaceHelpers.h => dom/bluetooth/bluetooth1/BluetoothInterfaceHelpers.h
2015-04-15 11:32:10 +02:00
Thomas Zimmermann
5cb077cd58 Bug 1153796: Share BluetoothInterfaceHelpers.{cpp,h} between Bluetooth v1 and v2, r=btian
The v1 implementation of BluetoothInterfaceHelpers.{cpp,h} is more
up-to-date than the v2 variant. So we can just use the v1 version and
remove the v2 version entirely. Bluetooth v2 contains its own version
of |Convert(nsresult, BluetoothStatus)|, which has been removed in
favor of the shared implementation.

--HG--
rename : dom/bluetooth/bluetooth1/BluetoothInterfaceHelpers.cpp => dom/bluetooth/BluetoothInterfaceHelpers.cpp
rename : dom/bluetooth/bluetooth1/BluetoothInterfaceHelpers.h => dom/bluetooth/BluetoothInterfaceHelpers.h
2015-04-15 11:04:43 +02:00
Thomas Zimmermann
81e83b639b Bug 1153796: Share BluetoothInterface.{cpp,h} between Bluetooth v1 and v2, r=btian
With this patch, Bluetooth v1 and v2 share the same interfaces classes
for their backend code. Bluetooth v1 doesn't yet support GATT, so the
GATT interfaces are still not implemented.

The patch also fixes the GATT-specific classes to compile under recent GCC
versions 4.8 and later, which are used with Android L.

The patch also preserves the prefered backend for each version. Bluetooth
v1 defaults to 'bluetoothd,' v2 defaults to 'bluedroid.'
2015-04-15 11:04:43 +02:00
Thomas Zimmermann
c32d85b108 Bug 1153796: Unify variants of |BluetoothInterface::SspReply|, r=btian
Bluetooth use different types for the second argument of their variant
of |BluetoothInterface::SspReply|. This patch standardizes them on the
v2 version.
2015-04-15 11:04:43 +02:00
Jamin Liu
86a4f50475 Bug 1154136 - Update Bluetooth connection state when BT stack updates device properties. r=shuang 2015-04-14 18:46:23 +08:00
Ben Tian
7895eb1e99 Bug 1152694 - Make UUID and service name as input arguments for BluetoothSocket, r=tzimmermann 2015-04-13 17:30:47 +08:00
Shawn Huang
e2cbd26599 Bug 1152095 - Check mResultHandlerQ is empty before dispatching DispatchError. r=tzimmermann 2015-04-09 04:20:00 -04:00
Thomas Zimmermann
bb712a3705 Bug 1146355: Prepare Bluetooth HFP manager, r=brsun 2015-04-09 15:57:41 +02:00
Thomas Zimmermann
dde2e9fbf1 Bug 1146355: Prepare Bluetooth OPP manager, r=joliu 2015-04-09 15:57:41 +02:00
Thomas Zimmermann
7abceb7651 Bug 1146355: Prepare Bluetooth A2DP manager, r=joliu 2015-04-09 15:57:41 +02:00
Thomas Zimmermann
c4f2f451a8 Bug 1146335: Prepare |BluetoothServiceBluedroid|, r=joliu
The only classes with significant differences between Bluetooth v1 and
v2 is |BluetoothServicebluedroid| and its helpers. The patch copies the
code from v2 into the shared backend's implementation and integrates
them by the use of ifdef. More fine-grained integration can be done later
on.
2015-04-09 15:57:41 +02:00
Thomas Zimmermann
cf0ac9efa2 Bug 1146355: Support Bluetooth v1 and v2 in backend interfaces, r=joliu
There are some minor differences between backends in Bluetooth v1 and
v2. Some of the types have been added, removed or renamed. This patch
prepares the HAL and daemon backend interfaces to support both variants.
2015-04-09 15:57:41 +02:00
Thomas Zimmermann
3a30ef8287 Bug 1146355: Added GATT support to Bluedroid backend, r=joliu
This patch moves GATT support for Bluetooth v2 into the shared
backend code. No functional modifications are made.

--HG--
rename : dom/bluetooth2/bluedroid/BluetoothGattHALInterface.cpp => dom/bluetooth/bluedroid/BluetoothGattHALInterface.cpp
rename : dom/bluetooth2/bluedroid/BluetoothGattHALInterface.h => dom/bluetooth/bluedroid/BluetoothGattHALInterface.h
rename : dom/bluetooth2/bluedroid/BluetoothGattManager.cpp => dom/bluetooth/bluedroid/BluetoothGattManager.cpp
rename : dom/bluetooth2/bluedroid/BluetoothGattManager.h => dom/bluetooth/bluedroid/BluetoothGattManager.h
2015-04-09 15:57:40 +02:00
Thomas Zimmermann
e271bb7029 Bug 1146355: Prepare Bluetooth backend helpers to handle v1 and v2 implementations, r=brsun
This patch updates the helpers of Bluetooth backends to support all data
structures required by Bluetooth v2.
2015-04-09 15:57:40 +02:00
Shawn Huang
64649e4ccf Bug 1148311 - Handle AVRCP app settings notification response. r=tzimmermann 2015-03-30 05:46:00 -04:00
Shawn Huang
98c2945d66 Bug 1142417 - Truncate AVRCP meta data strings followed by BTRC_MAX_ATTR_STR_LEN. r=tzimmermann
--HG--
extra : histedit_source : 8e78f1f680b6c08c4f65f2049ab51dce32d7df0f
2015-03-27 07:08:00 -04:00
Bevis Tseng
b36101cd61 Bug 1114935 - Part 6.3: Migration in Bluetooth. r=btian
--HG--
extra : histedit_source : b7f3f1d46e62b84ccae5d080193e549af6373b0c
2015-01-15 18:22:08 +08:00
Jamin Liu
0c87f42eb4 Bug 1142390 - Add a flag to identify if the CKPD is the very first AT+CKPD=200 for Bluetooth HSP handling. r=shuang 2015-03-27 19:00:41 +08:00
Thomas Zimmermann
2910208ad2 Bug 1146923: Pass SSP variant as enum instead of string, r=btian 2015-03-26 10:29:58 +01:00
Thomas Zimmermann
7d77418313 Bug 1146923: Rename |BluetoothSspPairingVariant| to |BluetoothSspVariant|, r=btian 2015-03-26 10:29:58 +01:00
Thomas Zimmermann
86a7a8861d Bug 1146923: Rename |BluetoothDeviceType| to |BluetoothTypeOfDevice|, r=btian 2015-03-26 10:29:58 +01:00
Thomas Zimmermann
f92b2b9795 Bug 1146923: Merge |CONVERT| macros of Bluetooth backends, r=btian 2015-03-26 10:29:58 +01:00
Ryan VanderMeulen
cfd5fd4b5f Backed out 4 changesets (bug 1146923) for bustage.
Backed out changeset 926351238914 (bug 1146923)
Backed out changeset 7d8eb56f1e24 (bug 1146923)
Backed out changeset c5d4efed15e9 (bug 1146923)
Backed out changeset 045020b31842 (bug 1146923)

CLOSED TREE
2015-03-25 10:05:42 -04:00
Thomas Zimmermann
46a49eb332 Bug 1146923: Pass SSP variant as enum instead of string, r=btian 2015-03-25 10:38:00 +01:00
Thomas Zimmermann
eb68133d18 Bug 1146923: Rename |BluetoothSspPairingVariant| to |BluetoothSspVariant|, r=btian 2015-03-25 10:38:00 +01:00
Thomas Zimmermann
16c8547911 Bug 1146923: Rename |BluetoothDeviceType| to |BluetoothTypeOfDevice|, r=btian 2015-03-25 10:38:00 +01:00