Commit Graph

475 Commits

Author SHA1 Message Date
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