Commit Graph

1818 Commits

Author SHA1 Message Date
Louis_Chang
9843bbdf08 Bug 1217778 - Ensure sBluetoothGattService is not null before accessing GattInterface in GattManager. r=jocelyn 2015-12-02 09:31:45 +08:00
Wes Kocher
50e8f21d5b Merge inbound to central, a=merge
--HG--
extra : commitid : 9WZlbf1Q29D
2015-12-01 15:43:33 -08:00
Jocelyn Liu
fa7b21647d Bug 1229290 - Pack/unpack UUIDs in a reverse order when adding characteristics and descriptors in GATT server API. r=brsun 2015-12-01 18:54:55 +08:00
Shawn Huang
fb992c848d Bug 1186840 - [MAP] Implement MessageUpdate function, r=btian 2015-12-01 15:55:41 +08:00
Ben Tian
2b918d0fd2 Bug 1228471 - use Endian.h to write filename and handleId into OBEX packet, r=shuang 2015-12-01 10:36:43 +08:00
Jocelyn Liu
963cd9f23f Bug 1228519 - Fix RequestReadNotification for GATT Server API. r=brsun 2015-11-30 20:24:07 +08:00
Jocelyn Liu
a84e009ffd Bug 1228521 - Fix PDU packing in |ServerSendResponseCmd| for GATT Server API. r=brsun 2015-11-30 20:23:04 +08:00
Jocelyn Liu
f692ee9ee4 Bug 1228909 - Fix PDU packing in |ClientSetAdvDataCmd| for GATT API. r=brsun 2015-11-30 20:21:52 +08:00
Thomas Zimmermann
63fd9969ce Bug 1228946: Remove '#if 0' block from Bluetooth module, r=joliu
This is a cleanup patch for removing an '#if 0' that was landed in
the Bluetooth code.
2015-11-30 12:46:09 +01:00
Ben Tian
9cb17c7756 Bug 1228479 - Remove redundant blob handling in BluetoothMapRequestHandle::ReplyToFolderListing, r=shuang 2015-11-27 14:03:03 +08:00
Ben Tian
cdd3762041 Bug 1227440 - Reject pin reply by cancelling bond to trigger BondStateChangedNotification, in order to inform gaia setting app, r=shuang 2015-11-26 16:31:42 +08:00
Nathan Froyd
199217336c Bug 1224240 - fix memory leak in Bluetooth*Manager::CompareHeaderTarget; r=btian
ObexHeaderSet::GetTarget copies the data associated with the
ObexHeaderId::Target id into a newly-allocated buffer.  All callers of
this function, however, fail to free the buffer once they are done with it.

Instead of simply freeing the buffer in the caller, however, let's add
an API to ObexHeaderSet that gives direct access to the desired header.
Doing this means that we have direct access to the data--no copying
necessary--and we also make the caller slightly faster, since it no
longer has to verify that the appropriate header is there, followed by
re-searching for the header it already knows is there.
2015-11-04 10:42:01 -05:00
Carsten "Tomcat" Book
2dd57597de Merge mozilla-central to b2g-inbound 2015-11-23 14:53:00 +01:00
Ben Tian
5397ef7325 Bug 1225340 - Refine nullity check macros in BluetoothServiceBluedroid, r=tzimmermann 2015-11-23 10:09:47 +08:00
Carsten "Tomcat" Book
133a1d2dae Merge mozilla-central to b2g-inbound on a CLOSED TREE 2015-11-20 14:36:21 +01:00
Bruce Sun
4492d3aae8 Bug 1225787: Fix wrong arguments of BluetoothGattInterface::AddCharacteristic; r=jocelyn 2015-11-19 14:26:58 +08:00
Bruce Sun
ab7cea57cc Bug 1225785: Fix WriteRequested mismatch; r=jocelyn 2015-11-19 14:26:23 +08:00
Wes Kocher
f2a69ef549 Merge b2ginbound to central, a=merge
--HG--
extra : commitid : DJ1BP2VTWLm
2015-11-19 13:36:16 -08:00
Nathan Froyd
1ad1a76ff4 Bug 1226063 - take advantage of UniquePtr in BluetoothMapSmsManager::SendMasObexData; r=btian
Now that UnixSocketRawData can assume ownership of UniquePtrs, we can
enhance SendMasObexData to accept UniquePtrs where possible.
2015-11-18 17:14:07 -05:00
Thomas Zimmermann
764c23b828 Bug 1223806: Convert Bluetooth to |BluetoothCoreInterface|, r=btian 2015-11-19 11:21:03 +01:00
Thomas Zimmermann
c9a3c00a12 Bug 1223806: Add |BluetoothDaemonCoreInterface|, r=btian 2015-11-19 11:21:03 +01:00
Thomas Zimmermann
3c5994d6ba Bug 1223806: Convert Bluetooth to |BluetoothCoreNotificationHandler|, r=btian 2015-11-19 11:21:03 +01:00
Thomas Zimmermann
971e8406ba Bug 1223806: Convert Bluetooth to |BluetoothCoreResultHandler|, r=btian 2015-11-19 11:21:03 +01:00
Thomas Zimmermann
350896bf18 Bug 1223806: Add Bluetooth Core interface, notification and result handler, r=btian 2015-11-19 11:21:03 +01:00
Thomas Zimmermann
8294faa09b Bug 1223720: Support UUIDs and addresses for Bluetooth signal paths, r=joliu
This patch improves the Bluetooth signal API by adding methods for
dealing with UUIDs and addresses directly. Callers have been converted
where possible.
2015-11-17 11:25:34 +01:00
Bevis Tseng
039c5e3a81 Bug 1110619 - Part 3: Bluetooth Changes. r=btian
--HG--
extra : rebase_source : f7f286ac25c9b5bb1e813c7c4b0aab75f5808d40
2015-11-12 17:04:00 +08:00
Thomas Zimmermann
c89087189f Bug 1220121: Convert IPDL of Bluetooth GATT API to |BluetoothUuid|, r=joliu 2015-11-13 15:26:50 +01:00
Thomas Zimmermann
0d85c6c530 Bug 1220121: Convert IPDL of Bluetooth GATT API to |BluetoothAddress|, r=joliu 2015-11-13 15:26:50 +01:00
Thomas Zimmermann
5b81d46a91 Bug 1220121: Convert IPDL of Bluetooth AVRCP API to |ControlPlayStatus|, r=shuang 2015-11-13 15:26:50 +01:00
Thomas Zimmermann
df67765d87 Bug 1220121: Convert IPDL of Bluetooth OPP API to |BluetoothAddress|, r=btian 2015-11-13 15:26:50 +01:00
Thomas Zimmermann
becd273af5 Bug 1220121: Convert IPDL of Bluetooth Core API to |BluetoothPinCode|, r=brsun 2015-11-13 15:26:50 +01:00
Thomas Zimmermann
37ee544cc5 Bug 1220121: Convert IPDL of Bluetooth Core API to |BluetoothAddress|, r=brsun 2015-11-13 15:26:50 +01:00
Thomas Zimmermann
09cd7942e9 Bug 1220121: Prepare IPDL support for additional Bluetooth types, r=brsun
This patch adds IPDL helpers for transfering |BluetoothAddress|,
|BluetoothPinCode|, and |ControlPlayStatus|.
2015-11-13 15:26:50 +01:00
Thomas Zimmermann
9e90060d9e Bug 1224166: Build BluetoothCommon.cpp unconditionally, r=shuang 2015-11-13 15:23:41 +01:00
Thomas Zimmermann
2db6ced4da Bug 1224166: Define Bluetooth debug flag in BluetoothCommon.cpp, r=shuang
This patch moves |gBluetoothDebugFlag| to BluetoothCommon.cpp. In the long
run, it should be cleaned up.
2015-11-13 15:23:41 +01:00
Kyle Huey
078f499859 Bug 1224061: Fuck bluetooth. r=me CLOSED TREE 2015-11-13 11:01:40 +08:00
Kyle Huey
6d6879a0da Bug 1224061: Followup to fix b2g bustage r=me CLOSED TREE 2015-11-13 10:27:43 +08:00
Wes Kocher
965f61f745 Merge m-c to inbound, a=merge CLOSED TREE
--HG--
extra : commitid : GWqH03Ikv84
2015-11-12 16:26:18 -08:00
Carsten "Tomcat" Book
f8d5bb5846 Backed out changeset 0f1e0ea245ef (bug 1220121) for bustage on a CLOSED TREE 2015-11-12 11:49:13 +01:00
Carsten "Tomcat" Book
f603f4b528 Backed out changeset 31a5c454f6fc (bug 1220121) 2015-11-12 11:48:59 +01:00
Carsten "Tomcat" Book
4b689b06f4 Backed out changeset dc164758f576 (bug 1220121) 2015-11-12 11:48:57 +01:00
Carsten "Tomcat" Book
d03ac03d02 Backed out changeset 71d0b47d316a (bug 1220121) 2015-11-12 11:48:56 +01:00
Carsten "Tomcat" Book
537f869a11 Backed out changeset 6fc769997278 (bug 1220121) 2015-11-12 11:48:54 +01:00
Carsten "Tomcat" Book
07869fe632 Backed out changeset 0f3562e114b1 (bug 1220121) 2015-11-12 11:48:53 +01:00
Carsten "Tomcat" Book
4bf2867843 Backed out changeset 74199d201199 (bug 1220121) 2015-11-12 11:48:51 +01:00
Thomas Zimmermann
d15fbe07f1 Bug 1220121: Convert IPDL of Bluetooth GATT API to |BluetoothUuid|, r=joliu 2015-11-12 11:23:36 +01:00
Thomas Zimmermann
10e5c8cb29 Bug 1220121: Convert IPDL of Bluetooth GATT API to |BluetoothAddress|, r=joliu 2015-11-12 11:23:36 +01:00
Thomas Zimmermann
9ec12aea49 Bug 1220121: Convert IPDL of Bluetooth AVRCP API to |ControlPlayStatus|, r=shuang 2015-11-12 11:23:35 +01:00
Thomas Zimmermann
62d409ef30 Bug 1220121: Convert IPDL of Bluetooth OPP API to |BluetoothAddress|, r=btian 2015-11-12 11:23:35 +01:00
Thomas Zimmermann
0b0f22bed8 Bug 1220121: Convert IPDL of Bluetooth Core API to |BluetoothPinCode|, r=brsun 2015-11-12 11:23:35 +01:00
Thomas Zimmermann
c1ee8d6d40 Bug 1220121: Convert IPDL of Bluetooth Core API to |BluetoothAddress|, r=brsun 2015-11-12 11:23:35 +01:00
Thomas Zimmermann
b861723a21 Bug 1220121: Prepare IPDL support for additional Bluetooth types, r=brsun
This patch adds IPDL helpers for transfering |BluetoothAddress|,
|BluetoothPinCode|, and |ControlPlayStatus|.
2015-11-12 11:23:35 +01:00
Jan Varga
c1c950896a Bug 961049 - Part 3: Move PersistenceType serializer from indexedDB to quota module; r=baku 2015-11-22 10:43:34 +01:00
Ben Tian
d5e9e224f3 Bug 1224109 - [PBAP] Return early if OBEX authentication password is empty, r=shuang 2015-11-12 14:54:48 +08:00
Carsten "Tomcat" Book
b544b52fe5 Backed out changeset 0af975118f61 (bug 1220121) for bustage on a CLOSED TREE 2015-11-11 12:07:05 +01:00
Carsten "Tomcat" Book
8c97f8e21f Backed out changeset 28725f253f82 (bug 1220121) 2015-11-11 12:06:50 +01:00
Carsten "Tomcat" Book
340ef80c63 Backed out changeset a7ea5f2e3444 (bug 1220121) 2015-11-11 12:06:48 +01:00
Carsten "Tomcat" Book
10913bbc26 Backed out changeset 975e3b3d7504 (bug 1220121) 2015-11-11 12:06:47 +01:00
Carsten "Tomcat" Book
ecf2991010 Backed out changeset 1ebe50bb4fad (bug 1220121) 2015-11-11 12:06:46 +01:00
Carsten "Tomcat" Book
ecd9413df1 Backed out changeset 7251fc4dce99 (bug 1220121) 2015-11-11 12:06:44 +01:00
Carsten "Tomcat" Book
ca229888f4 Backed out changeset aa607b61225c (bug 1220121) 2015-11-11 12:06:43 +01:00
Thomas Zimmermann
94c38f831b Bug 1220121: Convert IPDL of Bluetooth GATT API to |BluetoothUuid|, r=joliu 2015-11-11 11:14:40 +01:00
Thomas Zimmermann
979ae5cc25 Bug 1220121: Convert IPDL of Bluetooth GATT API to |BluetoothAddress|, r=joliu 2015-11-11 11:14:40 +01:00
Thomas Zimmermann
de98d385d5 Bug 1220121: Convert IPDL of Bluetooth AVRCP API to |ControlPlayStatus|, r=shuang 2015-11-11 11:14:40 +01:00
Thomas Zimmermann
eee910e817 Bug 1220121: Convert IPDL of Bluetooth OPP API to |BluetoothAddress|, r=btian 2015-11-11 11:14:39 +01:00
Thomas Zimmermann
0f91652650 Bug 1220121: Convert IPDL of Bluetooth Core API to |BluetoothPinCode|, r=brsun 2015-11-11 11:14:39 +01:00
Thomas Zimmermann
d1d8ccfb94 Bug 1220121: Convert IPDL of Bluetooth Core API to |BluetoothAddress|, r=brsun 2015-11-11 11:14:39 +01:00
Thomas Zimmermann
685ba0b178 Bug 1220121: Prepare IPDL support for additional Bluetooth types, r=brsun
This patch adds IPDL helpers for transfering |BluetoothAddress|,
|BluetoothPinCode|, and |ControlPlayStatus|.
2015-11-11 11:14:39 +01:00
Shawn Huang
cf42136aa0 Bug 1211769 - [MAP] Pack MAP replies to OBEX response packets, r=btain, sr=mrbkap 2015-11-10 19:04:12 +08:00
Ben Tian
883404e323 Bug 1168298 - Support OBEX authentication procedure, r=shuang, r=mrbkap 2015-11-10 11:34:11 +08:00
Ben Tian
cc694d7066 Bug 1221898 - Fix PBAP memory leakage, r=brsun 2015-11-06 16:23:30 +08:00
Nicholas Nethercote
d137133367 Bug 1187115 - Replace nsBaseHashtable::EnumerateRead() calls in dom/{bluetooth,messagechannel}/ with iterators. r=khuey.
--HG--
extra : rebase_source : 1c02cc79902eff27686904e8fa139175756446de
2015-11-18 19:38:55 -08:00
Nathan Froyd
0bb0df5675 Bug 1221547 - part 2 - copy less data for file transfers over bluetooth; r=btian
We have a number of places where we create a Bluetooth request with
allocated memory, then copy that memory into the raw data to be sent
over the socket.  We can do better by transferring ownership to the
socket data, rather than copying.
2015-11-02 16:16:38 -05:00
Nathan Froyd
80108dcc19 Bug 1223804 - remove unused container macro; r=btian 2015-11-10 16:41:18 -05:00
Nathan Froyd
555ffcc8b5 Bug 1221326 - use Endian.h more widely in bluetooth code; r=btian 2015-11-02 15:13:10 -05:00
Ben Tian
c7602b0544 Bug 1207998 - Convert nsCString to nsString for BluetoothVCardListingEvent.mSearchValue, r=shuang 2015-11-03 10:40:36 +08:00
Carsten "Tomcat" Book
d22b2c9770 Merge mozilla-central to b2g-inbound 2015-11-02 12:06:26 +01:00
Birunthan Mohanathas
9985829ecc Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Thomas Zimmermann
15782f1cec Bug 1215525: Use strong typing in Bluetooth GATT mid-layer interfaces, r=joliu 2015-10-30 14:54:41 +01:00
Thomas Zimmermann
912f69954b Bug 1215525: Replace strings with Bluetooth addresses and UUIDs in GATT mid-layer, r=joliu 2015-10-30 14:54:41 +01:00
Thomas Zimmermann
cb9c58250a Bug 1215525: Replace strings with Bluetooth addresses and UUIDs in Bluetooth mid-layer, r=brsun 2015-10-30 14:54:41 +01:00
Thomas Zimmermann
da8fa8c983 Bug 1215525: Update |BluetoothUuid| structure with c'tors and helper methods, r=brsun 2015-10-30 14:54:41 +01:00
Carsten "Tomcat" Book
e8397e7416 Backed out changeset 078dd0e39cc8 (bug 1215525) for bustage 2015-10-29 14:37:47 +01:00
Carsten "Tomcat" Book
aa4d7353fb Backed out changeset 4a99cfd718aa (bug 1215525) 2015-10-29 14:37:34 +01:00
Carsten "Tomcat" Book
c99fbefe39 Backed out changeset 1a9ea2369c03 (bug 1215525) 2015-10-29 14:37:32 +01:00
Carsten "Tomcat" Book
3d9387c2b0 Backed out changeset fa87615a341c (bug 1215525) 2015-10-29 14:37:30 +01:00
Thomas Zimmermann
c33668c2d7 Bug 1215525: Use strong typing in Bluetooth GATT mid-layer interfaces, r=joliu 2015-10-29 13:30:02 +01:00
Thomas Zimmermann
a3b649dfa8 Bug 1215525: Replace strings with Bluetooth addresses and UUIDs in GATT mid-layer, r=joliu 2015-10-29 13:30:02 +01:00
Thomas Zimmermann
dc14c6ccee Bug 1215525: Replace strings with Bluetooth addresses and UUIDs in Bluetooth mid-layer, r=brsun 2015-10-29 13:30:02 +01:00
Thomas Zimmermann
e88ddf0797 Bug 1215525: Update |BluetoothUuid| structure with c'tors and helper methods, r=brsun 2015-10-29 13:30:01 +01:00
Thomas Zimmermann
a100955efb Bug 1207480: Remove B2G Bluedroid configuration from tree, r=shuang
The Bluedroid configuration header for B2G is now located in the repo
of libhardware_moz, as Bluedroid drivers should not depend on Gecko's
source code. This patch removes the configuration header from Gecko.
2015-10-29 12:47:07 +01:00
Jamin Liu
ed9ab9dd8d Bug 1218295 - Convert the relative path of PullvCardEntry to absolute path if PBAP request isn't using X-BT-UID. r=btian 2015-10-26 22:41:00 +01:00
Shawn Huang
40066e9d8b Bug 1217339 - Fix illegal format of folder-listing object, r=btian 2015-10-23 22:21:09 +08:00
Ben Tian
85c9f0cd43 Bug 1214139 - Connect to HFP, A2DP, and AVRCP if CoD is invalid, r=shuang 2015-10-22 21:03:08 +08:00
Nathan Froyd
228bcd741e Bug 1216195 - use mozilla/Endian.h facilities in bluetooth code; r=btian
We have a number of functions in mozilla/Endian.h for doing endianness
conversions, and these functions should be used instead of hand-rolled
functions.  Using those functions in the bluetooth code makes the code
clearer and more portable (ReadLittleEndianUint16 won't do the right
thing if we're running on a big-endian processor, for instance).
Endian.h is also careful to avoid assumptions about memory alignment,
which utility functions like ReadLittleEndianUint16 don't do.
2015-09-18 19:36:05 -04:00
Thomas Zimmermann
3af39620cf Bug 1216179: Fix broken interface of fall-back Bluetooth HFP manager, r=btian 2015-10-20 10:41:36 +02:00
Ben Hsu
b55221ca1f Bug 1155072 - Part 2: Deprecate nsITelephonyListener.conferenceCallStateChanged (Bluetooth). r=btian 2015-10-11 20:43:00 +02:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd
583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Thomas Zimmermann
7e168a7489 Bug 1211948: Remove registry interfaces from |BluetoothDaemonProtocol|, r=brsun
The interfaces for registering and unregistering in |BluetoothDaemonProtocol|
were used by profile modules to call into the Setup module for registering and
unregistering themselves. Registry is now done in the profile managers, so
these interfaces are not required any longer.
2015-10-16 15:20:35 +02:00