Commit Graph

318 Commits

Author SHA1 Message Date
Wes Kocher
18a6da0131 Merge m-c to inbound a=merge
--HG--
extra : rebase_source : 31afc1b4de1d4c9d48057dbbe0d96e7c385bf2dc
2015-03-27 17:31:19 -07: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
Jocelyn Liu
01f5840db1 Bug 1146293 - Fix coding style break (intent and line length) caused by Bug 1117172 and Bug 1145631. r=shuang 2015-03-23 19:37:00 -04:00
Jocelyn Liu
b83b288476 Bug 1114515 - Par h4: Implement Service, Characteristic, Descriptor interfaces for GATT client DiscoverServices API. r=btian, r=mrbkap
This patch covers
1) Add BluetoothGattService, BluetoothGattCharacteristic, BluetoothGattDescriptor interfaces
2) Create services, characteristics, descriptors from handling signals distributed by BluetoothGattManager

--HG--
extra : histedit_source : d5d881f0da1ac57c1ad8a0a59100ff6ba86bfde4
2015-03-23 03:27:00 -04:00
Jocelyn Liu
736736c246 Bug 1114515 - Part 3: Implement GATT client DiscoverServices API. r=btian, r=mrbkap
This patch covers
1) Add DiscoverServices() method into BluetoothGatt interface.
2) Implement discover procedure in BluetoothGattManager

--HG--
extra : histedit_source : 9cc8c68706c6147a801bd9f43b91f1b87e329a07
2015-03-23 03:25:00 -04:00
Jocelyn Liu
f51cc5b87b Bug 1114515 - Part 2: Add BluetoothUuid, BluetoothGattId[], BluetoothGattServiceId[] into bluetooth ipc protocol. r=btian
--HG--
extra : histedit_source : e98b042599a59ee4263569d6a92e5d26477c3f94
2015-03-21 06:45:00 -04:00
Jocelyn Liu
a40c02bb97 Bug 1114515 - Part 1: Revise BluetoothGattHALInterface for discovering all services and first characteristic/descriptor. r=btian
--HG--
extra : histedit_source : fd1ac6c47e72b59b47e85201137ca5f77620a054
2015-03-21 06:44:00 -04:00
Ehsan Akhgari
883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Boris Zbarsky
dc24477d79 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Gregor Wagner
fa698fe8a9 Backout Bug 1114935 for causing bug 1144567. 2015-03-18 11:48:52 -07:00
Bevis Tseng
b75f39a906 Bug 1114935 - Part 6.3: Migration in Bluetooth. r=btian
--HG--
extra : rebase_source : f3b03a7464ffe975248a25c64ca33cf3abe5e6f4
extra : histedit_source : b7252008b2a2e2a45db026ad873b4c065617be31
2015-01-15 18:22:08 +08:00
Carsten "Tomcat" Book
dff8d11a1e Merge mozilla-central to b2g-inbound 2015-03-17 11:59:24 +01:00
Carsten "Tomcat" Book
0503c0d6df merge mozilla-inbound to mozilla-central a=merge 2015-03-17 11:36:52 +01:00
Ben Tian
4360afff5e Bug 1137330 - Set opcode as 'PutFinal' instead of 'Put' for file header packet if file size is 0, r=shuang 2015-03-17 09:44:10 +08:00
Bruce Sun
95d9f5aead Bug 1136514 - Add ReadRemoteRssi in GATT client. f=jocelyn, r=btian, r=mrbkap 2015-03-16 16:55:50 +08:00
Ben Tian
6cff9b7784 Bug 1141944 - [bluetooth2] Revise device paired/unpaired handlers in BluetoothAdapter, f=jaliu, r=shuang 2015-03-16 16:01:59 +08:00
Ehsan Akhgari
97b5f363cc Bug 579517 follow-up: Remove NSPR types that crept in 2015-03-16 21:15:10 -04:00
Ben Tian
619354ada2 Bug 1128383 - [bluetooth2] Add adapter.onpairingaborted event handler, f=jocelyn, f=jaliu, r=shuang, r=bz 2015-03-06 11:55:30 +08:00
Jocelyn Liu
3cdfc298aa Bug 1139298: Replace type int with BluetoothGattStatus enum for GATT client callbacks. r=btian 2015-03-06 17:21:00 +08:00
Jamin Liu
00ccab58ed Bug 1128441 - [BlueDroid] Set Bluetooth discoverable timeout properly in 'Convert' function of Bluetooth interface. r=shuang 2015-03-05 13:32:23 +08:00
Jamin Liu
e79e868f7e Bug 1127665 - Fix the condition of if-statement of name updating when the Bluetoooth device paired. r=btian 2015-03-04 18:34:55 +08:00
Ben Tian
34a718604e Bug 1137103 - Simplify Bluetooth signal distribution function, r=shuang 2015-03-04 09:28:32 +08:00
Jamin Liu
84fa7aad1d Bug 1127665 - Append name of paired device to 'DevicePaired' and 'PropertyChanged' BT signal. r=btian 2015-03-03 17:13:12 +08:00
Ben Tian
0dc9c10b21 Bug 1133655 - Replace |DispatchBluetoothReply| with |DispatchReplySuccess| and |DispatchReplyError|, f=jocelyn, f=jaliu, r=shuang 2015-03-03 13:24:49 +08:00
Ben Tian
52fb401150 Bug 1137601 - Fire onadapterremoved before onattributechanged in BluetoothManager, f=jocelyn, r=shuang 2015-02-27 15:32:30 +08:00
Ben Tian
3e9a8cc5a9 Bug 1137579 - [bluetooth2] Replace constant with |sizeof| in |StringToUuid| function, r=shuang 2015-03-02 12:05:15 +08:00
Jocelyn Liu
84f14f7306 Bug 1127670 - Replace device property of BluetoothPairingEvent with device name. r=btian, r=bz
--HG--
extra : rebase_source : 26f252f46b1d738b1f89ddab54354479b9c36508
2015-02-24 22:33:00 +01:00
Jocelyn Liu
272edd5ffd Bug 1132330 - Reject pair/unpair promise if operation failed. r=btian 2015-02-16 22:38:00 -05:00
Jocelyn Liu
71a7aa2236 Bug 1063449 - Add and implement GATT client connection related bluetooth Web APIs. r=btian, r=bz
This patch mainly covers:
  1) Implement register/unregister client, connect/disconnect methods in BluetoothGatt object.
  2) Add/Modify related webidls for 1).
  3) Implement result handlers, notifications in BluetoothGattManager.
2015-02-13 17:13:00 +01:00
Thomas Zimmermann
f521db364a Bug 1126720: Implement Bluetooth backend selection; use Bluedroid by default (under bluetooth2/), r=btian
This patch adds proper selection of the Bluetooth backend. The backend
is configurable via environment property 'ro.moz.bluetooth.backend'. The
default value is still Bluedroid.

On systems that are not Android 4.2 or later, the code does not return
a backend. These systems should use BlueZ instead.

This patch is based on bug 1065336, patch [01] and bug 1124565,
patch [01]. It also contains an extra fix in 'moz.build' to set
the pre-processor constant 'MOZ_B2G_BT_DAEMON'.
2015-02-12 10:12:07 +01:00
Thomas Zimmermann
cf53a40920 Bug 1126720: Support random postfix for Bluetooth daemon socket name (under bluetooth2/), r=btian
This patch adds support for a random postfix for bluetoothd's socket
name. The postfix is re-generated for every instance of the daemon.
This prevents name collisions between mutliple sessions and malicious
programs from taking over the connection easily.

This patch is based on bug 1119746, patch [05].
2015-02-12 10:12:07 +01:00
Thomas Zimmermann
99a984e211 Bug 1126720: Listen for socket connections when starting Bluetooth (under bluetooth2/), r=btian
Currently, Gecko connects to a running instance of bluetoothd when
it starts the daemon backend. This contains a race condition between
the startup of the daemon and the startup of Gecko.

This patch changes the initialization and cleanup of Bluetooth's
daemon backend so that the Bluetooth daemon connects to Gecko. The
daemon process is now started as part of the initialization and
quits during shutdown. The steps are strictly ordered, so no race
condition exists.

The initialization and cleanup procedures should now be compatible
with BlueZ 5.

This patch is based on bug 1119746, patch [04].
2015-02-12 10:12:07 +01:00
Thomas Zimmermann
c38017e280 Bug 1126720: Fix ref-counting of bluetoothd channels (under bluetooth2/), r=btian
The class |BluetoothDaemonChannel| for the bluetoothd channels
supports reference counting. This patch fixes the respective
variable to use |nsRefPtr| instead of |nsAutoPtr|.

This patch is based on bug 1119746, patch [03]
2015-02-12 10:12:07 +01:00
Thomas Zimmermann
54771250c1 Bug 1126720: Use |int32_t| for |Channel| in Bluetooth Socket HAL (under bluetooth2/), r=btian
This patch is based on bug 1129257.
2015-02-04 17:21:50 +08:00
Thomas Zimmermann
db3ff31476 Bug 1126720: Handle all used type in PDU explicitly (under bluetooth2/), r=btian
This patch is based on bug 1129846.
2015-02-05 15:35:57 +08:00
Thomas Zimmermann
92591b515d Bug 1131653: Move GATT helper classes to BluetoothGattManager namespace, r=btian
Another patch to fix conflicting symbol names in the Bluetooth namespace.
2015-02-11 10:24:10 +01:00
Thomas Zimmermann
f3bcd0dd2a Bug 1131653: Move OPP helper classes into BluetoothOppManager namespace, r=btian
This will resolve possible naming collisions between equally named
classes in the Bluetooth namespace.
2015-02-11 10:24:09 +01:00
Thomas Zimmermann
4cfeb753d3 Bug 1131653: Move A2DP/AVRCP helper classes into BluetoothA2dpManager namespace, r=btian
As for Handsfree helpers, A2DP and AVRCP helpers might create naming
conflicts with other classes. Moving them into |BluetoothA2dpManager|'s
namespace resolves this problem.
2015-02-11 10:24:09 +01:00
Thomas Zimmermann
ff591d7ff2 Bug 1131653: Move Handsfree helper classes into BluetoothHandsfreeManager namespace, r=btian
There are several equal-named, but different, classes in the Bluetooth
namespace. The linker will pick only one of them, which leads to crashes
in the compiled program.
2015-02-11 10:24:09 +01:00
Thomas Zimmermann
a01f7739b4 Bug 1123077: Protect PROPERTY_REMOTE_VERSION_INFO by ANDROID_VERSION, r=shuang 2015-02-03 12:26:56 +01:00
Ben Tian
4a78f1b54b Bug 1128797 - [bluetooth2] Fix build break on emulators, r=shuang 2015-02-03 12:02:07 +08:00
Ben Tian
8d30181595 Bug 1106017 - Patch 2/2: Merge BluetoothUtils.{cpp,h}, r=tzimmermann
--HG--
rename : dom/bluetooth2/bluedroid/BluetoothUtils.cpp => dom/bluetooth2/BluetoothUtils.cpp
rename : dom/bluetooth2/bluedroid/BluetoothUtils.h => dom/bluetooth2/BluetoothUtils.h
2015-02-03 10:06:53 +08:00
Ben Tian
91eb52fd5b Bug 1106017 - Patch 1/2: Cleanup non-shared functions in BlueZ' BluetoothUtils.{cpp,h}, r=tzimmermann 2015-02-02 12:03:11 +08:00
Thomas Zimmermann
ad45e70877 Bug 1118693: Added AVRCP support for Bluetooth daemon backend (bluetooth2/), r=btian 2015-01-30 10:05:48 +01:00
Thomas Zimmermann
d0d2425bd1 Bug 1118693: Added Bluetooth AVRCP interface (under bluetooth2/), r=btian 2015-01-30 10:05:48 +01:00
Thomas Zimmermann
f4a5685a22 Bug 1118693: Add Bluetooth AVRCP module (under bluetooth2/), r=btian 2015-01-30 10:05:48 +01:00
Thomas Zimmermann
57eed9ca42 Bug 1118693: Add Bluetooth AVRCP helpers (under bluetooth2/), r=btian 2015-01-30 10:05:48 +01:00
Jamin Liu
21112546e2 Bug 1121404 - Cache addresses of bonded devices and notify adapter properly. r=btian 2015-01-29 15:49:53 +08:00
Jocelyn Liu
8799c4f27b Bug 1126151 - Fix build break resulting from bug 1125356. r=shuang 2015-01-26 22:28:00 -05:00
Thomas Zimmermann
cdf296e1bb Bug 1110049: Add Blueooth A2DP support when using daemon backend (under bluetooth2/), r=btian 2015-01-26 18:39:09 +01:00