Граф коммитов

212 Коммитов

Автор SHA1 Сообщение Дата
Thomas Zimmermann 6863b412ce Bug 1056539: Add Bluetooth Handsfree notifications (under bluetooth2/), r=btian
The notification interface consists of virtual methods that are
invoked form the Bluetooth backend on certain events. The Handsfree
manager can implement the methods to handle these events.
2014-09-02 18:02:55 +02:00
Thomas Zimmermann 044199e66a Bug 1054242: Cleanup |BluetoothServiceBluedroid| and related functions (under bluetooth2/), r=btian
This patch removes unsued code from |BluetoothServiceBluedroid|, related
functions, and cleans up the file. It

 * removes callbacks,
 * removes callback helper tasks,
 * removes helper functions, and
 * cleans up global variables.
2014-09-02 12:38:46 +02:00
Thomas Zimmermann dbd4ad5330 Bug 1054242: Integrate helper runnables into notification methods (under bluetooth2/), r=btian
Bluedroid callbacks were usually called on a separate thread that
was specific to this task. So Gecko's Bluetooth Core contained a
number of runnables for executing callback operations on the main
thread.

Since all notifications always run on the main thread, the extra
runnables are not required any longer. This patch integrates them
into the notification methods where possible.
2014-09-02 12:38:46 +02:00
Thomas Zimmermann 0e8745814f Bug 1054242: Use Bluetooth Core notifications (under bluetooth2/), r=btian
This patch connects backend and Gecko side of the notification
code. Gecko will now receive notifications instead of Bluedroid
callbacks.
2014-09-02 12:38:46 +02:00
Thomas Zimmermann 20b8e8fc6d Bug 1054242: Implement Bluetooth Core notifications (under bluetooth2/), r=btian
This patch adds the Gecko-side of the Core notifications. The current
implementation of the notification methods has been copied from the
repsective Bluedroid callback methods, with only minor changes to adapt
them to Gecko data types.
2014-09-02 12:38:45 +02:00
Thomas Zimmermann 3d6383e252 Bug 1054242: Add Bluetooth Core notifications (under bluetooth2/), r=btian
A notification is a callback from the Bluetooth backend to inform
Gecko about a event. Bluedroid uses function pointers for this, but
in Gecko we use method calls instead.

Gecko implements notification handlers for the Bluetooth backend. The
backend converts incomming events to Gecko types and forwards them to
the registered notification handler.
2014-09-02 12:38:45 +02:00
Thomas Zimmermann 063cdc9441 Bug 1054242: Add infrastructure for Bluetooth notifications (under bluetooth2/), r=btian
This patch adds some runnable classes for running class methods on
the main thread. This is the base of the upcomming notification
mechanism for Bluetooth.
2014-09-02 12:38:45 +02:00
Birunthan Mohanathas acfc90e91a Bug 1058101 - Flatten dom/network/src/ into parent directory. r=mccr8
--HG--
rename : dom/network/src/Connection.cpp => dom/network/Connection.cpp
rename : dom/network/src/Connection.h => dom/network/Connection.h
rename : dom/network/src/Constants.h => dom/network/Constants.h
rename : dom/network/src/NetUtils.cpp => dom/network/NetUtils.cpp
rename : dom/network/src/NetUtils.h => dom/network/NetUtils.h
rename : dom/network/src/NetworkStatsDB.jsm => dom/network/NetworkStatsDB.jsm
rename : dom/network/src/NetworkStatsManager.js => dom/network/NetworkStatsManager.js
rename : dom/network/src/NetworkStatsManager.manifest => dom/network/NetworkStatsManager.manifest
rename : dom/network/src/NetworkStatsService.jsm => dom/network/NetworkStatsService.jsm
rename : dom/network/src/NetworkStatsServiceProxy.js => dom/network/NetworkStatsServiceProxy.js
rename : dom/network/src/NetworkStatsServiceProxy.manifest => dom/network/NetworkStatsServiceProxy.manifest
rename : dom/network/src/PTCPServerSocket.ipdl => dom/network/PTCPServerSocket.ipdl
rename : dom/network/src/PTCPSocket.ipdl => dom/network/PTCPSocket.ipdl
rename : dom/network/src/PUDPSocket.ipdl => dom/network/PUDPSocket.ipdl
rename : dom/network/src/TCPServerSocket.js => dom/network/TCPServerSocket.js
rename : dom/network/src/TCPServerSocketChild.cpp => dom/network/TCPServerSocketChild.cpp
rename : dom/network/src/TCPServerSocketChild.h => dom/network/TCPServerSocketChild.h
rename : dom/network/src/TCPServerSocketParent.cpp => dom/network/TCPServerSocketParent.cpp
rename : dom/network/src/TCPServerSocketParent.h => dom/network/TCPServerSocketParent.h
rename : dom/network/src/TCPSocket.js => dom/network/TCPSocket.js
rename : dom/network/src/TCPSocket.manifest => dom/network/TCPSocket.manifest
rename : dom/network/src/TCPSocketChild.cpp => dom/network/TCPSocketChild.cpp
rename : dom/network/src/TCPSocketChild.h => dom/network/TCPSocketChild.h
rename : dom/network/src/TCPSocketParent.cpp => dom/network/TCPSocketParent.cpp
rename : dom/network/src/TCPSocketParent.h => dom/network/TCPSocketParent.h
rename : dom/network/src/TCPSocketParentIntermediary.js => dom/network/TCPSocketParentIntermediary.js
rename : dom/network/src/Types.h => dom/network/Types.h
rename : dom/network/src/UDPSocket.cpp => dom/network/UDPSocket.cpp
rename : dom/network/src/UDPSocket.h => dom/network/UDPSocket.h
rename : dom/network/src/UDPSocketChild.cpp => dom/network/UDPSocketChild.cpp
rename : dom/network/src/UDPSocketChild.h => dom/network/UDPSocketChild.h
rename : dom/network/src/UDPSocketParent.cpp => dom/network/UDPSocketParent.cpp
rename : dom/network/src/UDPSocketParent.h => dom/network/UDPSocketParent.h
2014-08-27 10:13:39 -07:00
Kyle Machulis 03d47a099e Bug 846200 - Update Marionette JS WebAPI Tests to use new settings-api permissions; r=echou r=echen
--HG--
extra : rebase_source : 36a9f3e055a2ff7bcf624e9ef7f8f1e4619de6da
2014-08-27 21:01:29 -07:00
Wes Kocher d544bf248c Backed out 17 changesets (bug 843452)
Backed out changeset e72a0297d488 (bug 843452)
Backed out changeset 73f62ce4190f (bug 843452)
Backed out changeset 6d4a49ebd9fc (bug 843452)
Backed out changeset ac93e396669f (bug 843452)
Backed out changeset cf4fc721821e (bug 843452)
Backed out changeset 9a94ea71d232 (bug 843452)
Backed out changeset b95ff097374d (bug 843452)
Backed out changeset 8d6428a93500 (bug 843452)
Backed out changeset e31b86ef0e80 (bug 843452)
Backed out changeset bd4efde535cd (bug 843452)
Backed out changeset 02bbcd8ac571 (bug 843452)
Backed out changeset f7f41bf82b22 (bug 843452)
Backed out changeset 20f42764cd38 (bug 843452)
Backed out changeset 82f8670f5c17 (bug 843452)
Backed out changeset 52f25f1278e3 (bug 843452)
Backed out changeset 181337820a7c (bug 843452)
Backed out changeset 9bd12641af03 (bug 843452)

--HG--
rename : dom/mobileconnection/interfaces/nsIMobileConnectionService.idl => dom/mobileconnection/interfaces/nsIMobileConnectionProvider.idl
2014-08-28 16:51:41 -07:00
Edgar Chen 9f21aaf25e Bug 843452 - Part 2-2: Bluetooth changes for MobileConnectionService interface. r=echou 2014-07-02 17:14:08 +08:00
Ryan VanderMeulen a408d636f2 Backed out 11 changesets (bug 1059079, bug 1015518, bug 900551, bug 846200) for Gaia UI test failures on a CLOSED TREE.
Backed out changeset d85b4e48b3b4 (bug 1015518)
Backed out changeset 663b73ba69ec (bug 1015518)
Backed out changeset 5cf1cb5fa022 (bug 900551)
Backed out changeset b953dd5bfdaa (bug 900551)
Backed out changeset a2b6d7c84100 (bug 900551)
Backed out changeset ceb79fe83d15 (bug 900551)
Backed out changeset f6acf344fbf0 (bug 900551)
Backed out changeset fa269ea53937 (bug 846200)
Backed out changeset b89c84a850f9 (bug 846200)
Backed out changeset b7a7dfbe4e3f (bug 846200)
Backed out changeset c6f54d821c11 (bug 1059079)
2014-08-28 12:49:49 -04:00
Kyle Machulis 71298b134a Bug 846200 - Update Marionette JS WebAPI Tests to use new settings-api permissions; r=echou r=echen 2014-08-27 21:01:29 -07:00
Jamin Liu 9150681cbf Bug 1032755 - Return a DOMException with error message when BluetoothReplyRunnable rejects the promise. r=btian 2014-08-25 14:51:29 +08:00
Thomas Zimmermann fa45e97710 Bug 1050174: Cleanup interface of |BluetoothSocket| (under bluetoth2/), r=btian
This patch cleans up the interface of Bluedroid's |BluetoothScoket|
to look more similar the interface of |UnixSocketConsumer|, from
which it descends.
2014-08-21 09:30:37 +02:00
Thomas Zimmermann 1c0c5f8df9 Bug 1050174: Use |SocketIOShutdownTask| for Bluetooth sockets (under bluetooth2/), r=btian 2014-08-21 09:30:37 +02:00
Thomas Zimmermann 609a60d406 Bug 1050174: Use |SocketIOSendTask| for Bluetooth sockets (under bluetooth2/), r=btian 2014-08-21 09:30:37 +02:00
Thomas Zimmermann e490b3df7d Bug 1050174: Use |SocketIOTask| for Bluetooth sockets (under bluetooth2/), r=btian 2014-08-21 09:30:36 +02:00
Thomas Zimmermann ce5358d3fb Bug 1050174: Use |SocketIOBase| for Bluetooth sockets (under bluetooth2/), r=btian 2014-08-21 09:30:36 +02:00
Thomas Zimmermann f93da9feb8 Bug 1050174: Use |SocketIODeleteInstanceRunnable| for Bluetooth sockets (under bluetooth2/), r=btian 2014-08-21 09:30:36 +02:00
Thomas Zimmermann 0f813f6b3e Bug 1050174: Use |SocketIORequestClosingRunnable| for Bluetooth sockets (under bluetooth2/), r=btian 2014-08-21 09:30:36 +02:00
Thomas Zimmermann 29bc0c4948 Bug 1050174: Use |SocketIOReceiveRunnable| for Bluetooth sockets (under bluetooth2/), r=btian 2014-08-21 09:30:35 +02:00
Thomas Zimmermann 4d4747f6fa Bug 1050174: Use |SocketIOEventRunnable| for Bluetooth sockets (under bluetooth2/), r=btian 2014-08-21 09:30:35 +02:00
Thomas Zimmermann f2a339c3d2 Bug 1050174: Use |SocketIORunnable| for Bluetooth sockets (under bluetooth2/), r=btian 2014-08-21 09:30:35 +02:00
Thomas Zimmermann 86dfe18dc2 Bug 1050174: Use |SocketConsumerBase| for Bluetooth sockets (under bluetooth2/), r=btian 2014-08-21 09:30:34 +02:00
Thomas Zimmermann b894debe3f Bug 1050174: Cleanup fields in |DroidSocketImpl| (under bluetooth2/), r=btian
|DroidSocketImpl| contains several unused fields that are removed
by this patch.
2014-08-21 09:30:34 +02:00
Ed Morley de4909b31e Merge latest green b2g-inbound changeset and mozilla-central; a=merge 2014-08-15 16:54:17 +01:00
Thomas Zimmermann c56444abee Bug 1050126: Convert Bluedroid status codes and error handlers (under bluetooth2/), r=btian
This patch converts Bluedroid status codes in Gecko to the
backend-neutral data type |BluetoothStatus|. All error handlers
have been adapted. The Bluedroid type |bt_status_t| only remains
in |BluetoothInterface|.
2014-08-15 13:41:19 +02:00
Thomas Zimmermann 9b9c948379 Bug 1050126: Convert Bluetooth AVRCP data types in |BluetoothAvrcpInterface| (under bluetooth2/), r=btian
With this patch |BluetoothAvrcpInterface| is responsible for converting all
Bluetooth data types to Bluedroid types. All callers have been adapted.
2014-08-15 13:41:19 +02:00
Thomas Zimmermann 5f4708b49c Bug 1050126: Convert Bluetooth A2DP data types in |BluetoothA2dpInterface| (under bluetooth2/), r=btian
With this patch |BluetoothA2dpInterface| is responsible for converting all
Bluetooth data types to Bluedroid types. All callers have been adapted.
2014-08-15 13:41:19 +02:00
Thomas Zimmermann f1e6d82238 Bug 1050126: Convert Bluetooth Handsfree data types in |BluetoothHandsfreeInterface| (under bluetooth2/), r=btian
With this patch |BluetoothHandsfreeInterface| is responsible for converting all
Bluetooth data types to Bluedroid types. All callers have been adapted.
2014-08-15 13:41:19 +02:00
Thomas Zimmermann 14cb6b6d80 Bug 1050126: Convert Bluetooth Socket data types in |BluetoothSocketInterface| (under bluetooth2/), r=btian
With this patch |BluetoothSocketInterface| is responsible for converting all
Bluetooth data types to Bluedroid types. All callers have been adapted.
2014-08-15 13:41:18 +02:00
Thomas Zimmermann 5f96d43a86 Bug 1050126: Convert Bluetooth data types in |BluetoothInterface| (under bluetooth2/), r=btian
With this patch, |BluetoothInterface| is responsible for converting
all Bluetooth data types to Bluedroid types. All callers have been
adapted.
2014-08-15 13:41:18 +02:00
Jamin Liu 901c96a3e9 Bug 1043180 - Write a marionette test for Bluetooth pairing based on Bluetooth API v2. r=btian 2014-08-14 11:34:22 +08:00
Jamin Liu 94c4c21f5e Bug 1036234 - Fix the follow-up errors from implementation of pairing event handlers. r=btian 2014-08-14 11:34:10 +08:00
Jamin Liu 55bbcf1752 Bug 1036234 - Implement pairing event handlers of BluetoothAdapter. r=btian, r=mrbkap
- EventHandler ondevicepaired;
- EventHandler ondeviceunpaired;
2014-08-12 16:30:42 +08:00
Jamin Liu 97fec21571 Bug 1036233 - Implement pairing methods of Bluetooth API v2. r=btian, r=mrbkap
- Promise<void> pair(DOMString aAddress)
- Promise<void> unpair(DOMString aAddress)
- sequence<BluetoothDevice> getPairedDevices()
2014-08-12 16:30:36 +08:00
Jamin Liu 259c8a71b4 Bug 1036233 - Initialize the data member of BluetoothDevice. r=btian 2014-08-12 16:30:26 +08:00
Nigel Babu 7f86114f33 Backed out changeset 2d0ebc1bc7d6 (bug 1036233) for build bustage ON A CLOSED TREE 2014-08-12 09:00:30 +05:30
Nigel Babu b241b4cbb6 Backed out changeset c5d50f1bc995 (bug 1036233) for build bustage ON A CLOSED TREE 2014-08-12 09:00:20 +05:30
Nigel Babu 7e1903b51c Backed out changeset a471c7c73409 (bug 1036234) for build bustage on A CLOSED TREE 2014-08-12 09:00:08 +05:30
Jamin Liu c87d6c4079 Bug 1036234 - Implement pairing event handlers of BluetoothAdapter. r=btian, r=mrbkap
- EventHandler ondevicepaired;
- EventHandler ondeviceunpaired;
2014-08-12 10:49:59 +08:00
Jamin Liu c435cb1254 Bug 1036233 - Implement pairing methods of Bluetooth API v2. r=btian, r=mrbkap
- Promise<void> pair(DOMString aAddress)
- Promise<void> unpair(DOMString aAddress)
- sequence<BluetoothDevice> getPairedDevices()
2014-08-12 10:49:53 +08:00
Jamin Liu 6ddcdd1ef6 Bug 1036233 - Initialize the data member of BluetoothDevice. r=btian 2014-08-12 10:49:43 +08:00
Vicamo Yang 7a4d8e7265 Bug 1048098: remove redundant flushPermissions, flushPrefEnv from tearing down procedure. r=btian, r=echen 2014-08-08 18:28:58 +08:00
Jocelyn Liu de0443c58f Bug 1050494: Clear sBluetoothThread in BluetoothDBusService on shutdown to fix memory leak. r=shuang 2014-08-08 16:22:32 +08:00
Thomas Zimmermann 92a362d3ac Bug 1048770: Rename |ConnectResultHandler| to |ConnectSocketResultHandler| (under bluetooth2/), r=btian
The linker mixes up |ConnectResultHandler| from BluetoothSocket.cpp
and BluetoothHfpManager.cpp. Consequently one of them gets removed
when linking libxul.so.

This patch works around the problem by renaming |ConnectResultHandler|
in BluetoothSocket.cpp to |ConnectSocketResultHandler|.
2014-08-08 09:58:18 +02:00
Thomas Zimmermann 5bcadb1e61 Bug 1048770: Fix member types of |BluetoothInterfaceRunnable{1,3}<>| (under bluetooth2/), r=btian
When sending a |BluetoothInterfaceRunnable3<>| to the main thread,
in the case of BluetoothSocketResultHandler, the connect and accept
operations transfer string objects by reference from the I/O thread.
When the reference is accessed, the actual string might be removed
already.

The patch fixes the problem by storing the strings as value in the
runnable object.
2014-08-08 09:58:17 +02:00
Jocelyn Liu 763f8f19a9 Bug 1047757: Call ClearOnShutdown(sBluetoothService) to fix memory leak. r=shuang 2014-08-07 14:01:24 +08:00
Ed Morley 1d0a9269db Backed out changeset 9281f9896ce0 (bug 1048098) for webapi test failures 2014-08-05 12:22:00 +01:00
Jocelyn Liu adac77c1ec Bug 1036228 - Patch3: Handle pairing requests and fire pairing events in BluetoothAdapter. r=btian, r=bz 2014-08-05 18:25:54 +08:00
Jocelyn Liu 109a2d162b Bug 1036228 - Patch2: Handle pairing requests reported by bluedroid in bluetooth services. r=btian 2014-08-05 18:25:47 +08:00
Jocelyn Liu 68c5209cb0 Bug 1036228 - Patch1: Add BluetoothPairingRequestListeningHandle.webidl and implement it. r=btian, r=bz 2014-08-05 18:25:42 +08:00
Vicamo Yang a5bcee91bf Bug 1048098: remove redundant flushPermissions, flushPrefEnv from tearing down procedure. r=btian, r=echen 2014-08-05 16:19:06 +08:00
Nathan Froyd 12c76f15f7 Bug 1042878 - part 2 - move MOZ_CAIRO_CFLAGS et al additions to C*FLAGS into moz.build; r=glandium 2014-07-24 11:55:33 -04:00
Thomas Zimmermann 11e265c36c Bug 1045461: Fix HFP fallback code to work with latest Bluetooth changes (under bluetooth2/), r=btian
Recent patches to Bluetooth introduced asynchronous initialization of
profile manager. The code in hfp-fallback was not adapted then. This
patch updates the broken code.
2014-07-29 10:47:31 +02:00
Jocelyn Liu 68cec10ca7 Bug 1033898 - Patch1: Add BluetoothPairingEvent and BluetoothPairingHandlewebidls and their class implementations. r=btian, r=bz 2014-07-28 22:09:00 +02:00
Thomas Zimmermann a4d154c381 Bug 1042691: Asynchronous |BluetoothAvrcpInterface::SetVolume| (under bluetooth2/), r=btian 2014-07-28 09:52:52 +02:00
Thomas Zimmermann 34f4929103 Bug 1042691: Asynchronous AVRCP response interfaces (under bluetooth2/), r=btian 2014-07-28 09:52:51 +02:00
Thomas Zimmermann 36fc86ade8 Bug 1042691: Asynchronous A2DP connect/disconnect (under bluetooth2/), r=btian 2014-07-28 09:52:51 +02:00
Thomas Zimmermann abbdf7f4d9 Bug 1042691: Asynchronous init and cleanup of A2DP/AVRCP (under bluetooth2/), r=btian 2014-07-28 09:52:51 +02:00
Thomas Zimmermann 6c5cf788bd Bug 1042691: Add A2DP/AVRCP result-handler infrastructure (under bluetooth2/), r=btian 2014-07-28 09:52:50 +02:00
Jocelyn Liu f4db9e28a7 Bug 1036232 - Remove redundant code of entering compartment in BT manager and adapter. r=btian 2014-07-25 03:24:00 +02:00
Jocelyn Liu a6b9d588e3 Bug 1038632 - Patch2: Maintain device objects in BluetoothAdapter. r=btian 2014-07-25 15:21:44 +08:00
Mike Hommey bc5d6801bb Bug 1041860 - Avoid setting FINAL_LIBRARY to libraries that further use a FINAL_LIBRARY. r=mshal 2014-07-23 08:37:51 +09:00
Thomas Zimmermann f90b7b92ba Bug 1038645: Asynchronous |BluetoothHandsfreeInterface::PhoneStateChange| (under bluetooth2/), r=btian 2014-07-22 13:53:29 +02:00
Thomas Zimmermann d83face693 Bug 1038645: Asynchronous Bluetooth Handsfree response methods (under bluetooth2/), r=btian 2014-07-22 13:53:29 +02:00
Thomas Zimmermann 047957b89c Bug 1038645: Asynchronous |BluetoothHandsfreeInterface::DeviceStatusNotification| (under bluetooth2/), r=btian 2014-07-22 13:53:29 +02:00
Thomas Zimmermann d1a03f2f88 Bug 1038645: Asynchronous |BluetoothHandsfreeInterface::VolumeControl| (under bluetooth2/), r=btian 2014-07-22 13:53:28 +02:00
Thomas Zimmermann 051abd7a03 Bug 1038645: Asynchronous Bluetooth Handsfree voice-recognition functions (under bluetooth2/), r=btian 2014-07-22 13:53:28 +02:00
Thomas Zimmermann 8d89f772f2 Bug 1038645: Asynchronous Bluetooth Handsfree connection handling (under bluetooth2/), r=btian 2014-07-22 13:53:28 +02:00
Thomas Zimmermann 4748418d2c Bug 1038645: Asynchronous Bluetooth Handsfree init and cleanup methods (under bluetooth2/), r=btian 2014-07-22 13:53:28 +02:00
Thomas Zimmermann 005720e0e0 Bug 1038645: Add result-handler class for Bluetooth Handsfree profile (under bluetooth2/), r=btian 2014-07-22 13:53:27 +02:00
Thomas Zimmermann 5e7b83c8fb Bug 1038645: Asynchronous starting and stopping of profile managers (under bluetooth2/), r=btian
Profile managers use the new class |BluetoothProfileResultHandler|
to signal the result of initializing of cleaning up operations to
|BluetoothServiceBluedroid|. |BluetoothServiceBluedroid| proceeds
once all profile handlers have finished.

Future patches will build upon this patch to create completely
asynchronous profile managers.
2014-07-22 13:53:27 +02:00
Thomas Zimmermann 8fbff9070d Bug 1041440: Create Promise using |Promise::Create|, r=btian
This patch fixes a call to the private constructor of |Promise|.
2014-07-21 12:41:29 +02:00
Ben Tian 7c78bbc669 Bug 1038026 - Fire onattributechanged event when adapter fails to turn on/off BT and restores state to Disabled/Enabled, r=echou 2014-07-21 10:44:09 +08:00
Boris Zbarsky 92fb7dde3a Bug 1040263. Eagerly create and preserve Promise reflectors so we always have them available during unlink. r=nsm,bholley. 2014-07-18 21:31:11 -04:00
Ben Tian 99cf08ac11 Bug 1038053 - Resolve stopDiscovery when adapter is not discovering, r=echou 2014-07-17 18:02:40 +08:00
Thomas Zimmermann 1fe5425619 Bug 1039216: Fix build break when building JB 4.2 (under bluetooth2/), r=btian 2014-07-02 17:42:21 +08:00
Thomas Zimmermann 51dbdb677a Bug 1037342: Close file descriptor in BluetoothSocket (under bluetooth2/), r=btian
Currently, BluetoothSocket leaks its file descriptor on close
operations. With this patch when Gecko closes an instance of
BluetoothSocket, the file descriptor is now closed as well.
2014-07-17 09:44:19 +02:00
Jamin Liu 2664e7e4bd Bug 1035651 - Write a marionette test for BluetoothDevice based on Bluetooth API v2. r=btian 2014-07-17 11:08:02 +08:00
Thomas Zimmermann b85592772c Bug 1036977: Remove socket setup from BluetoothSocket (under bluetooth2/), r=btian
This patch removes all code related to socket setup from Bluedroid's
BluetoothSocket. The socket setup is handled by BluetoothInterface;
transparantly to its users.

Since most of the socket setup is now hidden, a comment was added to
DroidSocketImpl that explains the connection phases in server and
client.
2014-07-16 10:25:10 +02:00
Thomas Zimmermann 8d81ad06e7 Bug 1036977: Handle socket setup for |Accept| in BluetoothInterface (under bluetooth2/), r=btian
This patch moves the accept phase of Bluedroid's |Listen| to the
implementation of BluetoothInterface. |BluetoothInterface::Accept|
handles Bluedroid's socket-setup messages and executes the result
handler with the received file descriptor and data.
2014-07-16 10:24:41 +02:00
Thomas Zimmermann 14b9c49fb9 Bug 1036977: Handle socket setup for |Connect| in BluetoothInterface (under bluetooth2/), r=btian
Bluedroid's internal socket setup transfers 2 messages and possibly
a file descriptor as the first data of a socket connection.

This patch moves the socket-setup code for the |Connect| call to
the implementation of BluetoothInterface. BluetoothSocket only
handles the socket setup of |Listen|, and general socket state.
2014-07-16 10:24:33 +02:00
Thomas Zimmermann e0c157ebb2 Bug 1036977: Introduce connection status for Bluedroid sockets (under bluetooth2/), r=btian
In preparaton of moving the Bluedroid socket setup to BluetoothInterface,
this patch introduces connection states for Bluetooth sockets. There are
4 states,

  - Disconnected,
  - Listening,
  - Connecting, and
  - Connected.

All sockets start in Disconnected and transition to Connected via one
of the other states. Server socket transition through Listening, Client
sockets transition through Connecting. There is currently a lot of code
duplication in read and write methods. This will be cleaned up when the
connection setup is handled by BluetoothInterface.
2014-07-16 10:24:19 +02:00
Thomas Zimmermann 0a24c61f83 Bug 1036977: Convert Bluedroid Socket's Connect method to asynchronous design (under bluetooth2/), r=btian 2014-07-16 10:24:05 +02:00
Thomas Zimmermann 5f8dcc4959 Bug 1036977: Convert Bluedroid Socket's Listen method to asynchronous design (under bluetooth2/), r=btian 2014-07-16 10:23:52 +02:00
Thomas Zimmermann 693f376d92 Bug 1036977: Add result handler for Bluetooth Socket interface (under bluetooth2/), r=btian 2014-07-16 10:23:35 +02:00
Jamin Liu 081e15f9c1 Bug 1035652 - Write a marionette test for verifying the discovery process based on bluetooth API v2. r=btian 2014-07-16 16:23:16 +08:00
Ben Tian d366a44a93 Bug 1037291 - Make BluetoothDiscoveryHandle expire when discovery is stopped, r=echou 2014-07-14 11:23:58 +08:00
Jocelyn Liu 2acb00d1df Bug 1006315: Revise BluetoothDevice.webidl and implement it for new WebBluetooth API. r=btian, r=bz 2014-07-14 10:47:19 +08:00
Ben Tian f29bc3ee1c Bug 1027504 - Implement BluetoothClassOfDevice, r=bz, r=echou 2014-07-10 14:42:10 +08:00
Thomas Zimmermann 1b51d02736 Bug 1033961: Asynchronous Bluedroid DUT and LE interfaces (under bluetooth2/), r=btian 2014-07-09 09:39:43 +02:00
Thomas Zimmermann ec26f1ab37 Bug 1033961: Asynchronous authentification in Bluedroid (under bluetooth2/), r=btian 2014-07-09 09:39:31 +02:00
Thomas Zimmermann 5e10d6244b Bug 1033961: Asynchronous Bluedroid device bonding (under bluetooth2/), r=btian 2014-07-09 09:39:18 +02:00
Thomas Zimmermann 4f71ca5e0c Bug 1033961: Asynchronous discovery methods in Bluedroid (under bluetooth2/), r=btian 2014-07-09 09:39:04 +02:00
Thomas Zimmermann 83272ecf5c Bug 1033961: Asynchronous remote-service methods in Bluedroid (under bluetooth2/), r=btian 2014-07-09 09:38:49 +02:00
Thomas Zimmermann 110e090d93 Bug 1033961: Asynchronous Bluedroid device-property methods (under bluetooth2/), r=btian 2014-07-09 09:38:35 +02:00
Thomas Zimmermann 1048d1066e Bug 1033961: Asynchronous Bluedroid adapter methods (under bluetooth2/), r=btian 2014-07-09 09:38:20 +02:00
Thomas Zimmermann beb3d46e7b Bug 1033961: Asynchronous Bluedroid starting and stopping (under bluetooth2/), r=btian 2014-07-09 09:38:06 +02:00