Commit Graph

40 Commits

Author SHA1 Message Date
Thomas Zimmermann
d3aefc367b Bug 1251541: Replace |nsAutoArrayPtr<>| with |UniquePtr<[]>| in Bluetooth interfaces, r=shuang
This patch replaces all instances of |nsAutoArrayPtr<>| in the Bluetooth
interfaces with |UniquePtr<[]>|.

In contrast to |nsAutoArrayPtr<>|, |UniquePtr<[]>| doesn't convert to the
underlying pointer type implicitly. This is a problem for the daemon-socket
runnable, which depend on this feature when calling their operations. To
solve this issue, the patch adds |ConvertArg| for each arguemnt, which does
the conversion explicitly.
2016-02-29 12:15:08 +01:00
Thomas Zimmermann
98dad46bf0 Bug 1194721: Add helpers for Gonk sensors daemon, r=gsvelto
This patch adds helpers for using the Gonk sensors daemon. The types
and functions allow for packing and unpacking messages of the daemon's
IPC protocol.
2016-02-04 12:35:13 +01:00
Thomas Zimmermann
3a35f019a6 Bug 1194721: Add additional PDU pack and unpack functions, r=shuang
This patch adds PDU pack and unpack functions for 64-bit integer
values and floating-point values.
2016-02-04 12:35:13 +01:00
Thomas Zimmermann
57b67a5438 Bug 1194721: Add |DaemonRunnable8|, r=shuang
The runnable template |DaemonRunnable8| runs an operation with 8
arguments.
2016-02-04 12:35:13 +01:00
Thomas Zimmermann
5945b1b215 Bug 1194721: Add PDU_ prefix to daemon PDU constants, r=shuang
Something defines HEADER_SIZE when including the PDU headers from
hal/gonk. This break the HEADER_SIZE constant in |DaemonSocketPDU|.

This patch adds the prefix PDU_ to all PDU constants.
2016-02-04 12:35:13 +01:00
Carsten "Tomcat" Book
3e83365f61 Backed out changeset bbadd0a1367d (bug 1194721) 2016-02-03 16:24:31 +01:00
Carsten "Tomcat" Book
4e3f3d8d53 Backed out changeset e7a5a6174748 (bug 1194721) 2016-02-03 16:24:29 +01:00
Carsten "Tomcat" Book
e8a8b2a7da Backed out changeset 2a5cf57e8b67 (bug 1194721) 2016-02-03 16:24:28 +01:00
Carsten "Tomcat" Book
352f0d39a6 Backed out changeset 2a7dbf51f1e8 (bug 1194721) 2016-02-03 16:24:26 +01:00
Thomas Zimmermann
3f820a81c2 Bug 1194721: Add helpers for Gonk sensors daemon, r=gsvelto
This patch adds helpers for using the Gonk sensors daemon. The types
and functions allow for packing and unpacking messages of the daemon's
IPC protocol.
2016-02-03 15:16:00 +01:00
Thomas Zimmermann
e8de319161 Bug 1194721: Add additional PDU pack and unpack functions, r=shuang
This patch adds PDU pack and unpack functions for 64-bit integer
values and floating-point values.
2016-02-03 15:16:00 +01:00
Thomas Zimmermann
520696482a Bug 1194721: Add |DaemonRunnable8|, r=shuang
The runnable template |DaemonRunnable8| runs an operation with 8
arguments.
2016-02-03 15:16:00 +01:00
Thomas Zimmermann
cda8b190f3 Bug 1194721: Add PDU_ prefix to daemon PDU constants, r=shuang
Something defines HEADER_SIZE when including the PDU headers from
hal/gonk. This break the HEADER_SIZE constant in |DaemonSocketPDU|.

This patch adds the prefix PDU_ to all PDU constants.
2016-02-03 15:16:00 +01:00
Jocelyn Liu
3dc4c35ece Bug 1228546 - Implement peripheral mode support for GATT API. r=brsun, r=mrbkap 2016-01-15 09:50:54 +08:00
Nathan Froyd
40441ccdb8 Bug 1236574 - use UniquePtr<T[]> instead of nsAutoArrayPtr<T> in SocketBase subclasses; r=tzimmerman 2015-12-06 10:53:37 -05:00
Birunthan Mohanathas
f6aa64ea3b Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Nathan Froyd
9c5965b035 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
2015-10-18 01:24:48 -04:00
Thomas Zimmermann
fb2ccd21e5 Bug 1209085: Add 6-argument operator () to |UnpackPDUInitOp|, r=joliu 2015-10-06 10:08:14 +02:00
Chris Peterson
b06d7f99a7 Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Thomas Zimmermann
275e2bd3f4 Bug 1203092: Remove void pointers from Bluetooth's daemon backend, r=shuang 2015-09-15 12:55:02 +02:00
Thomas Zimmermann
2b7d27b40b Bug 1203092: Add |DaemonSocketResultHandler| base class to HAL IPC, r=shuang 2015-09-15 12:55:02 +02:00
Nigel Babu
c1309187cf Backed out changeset 23cb9eb406f9 (bug 1203092) for build bustage 2015-09-15 15:17:40 +05:30
Nigel Babu
046ab322b8 Backed out changeset bed325ace368 (bug 1203092) 2015-09-15 15:17:30 +05:30
Thomas Zimmermann
34fd52e610 Bug 1203092: Remove void pointers from Bluetooth's daemon backend, r=shuang 2015-09-15 10:38:13 +02:00
Thomas Zimmermann
21d537e6b5 Bug 1203092: Add |DaemonSocketResultHandler| base class to HAL IPC, r=shuang 2015-09-15 10:38:13 +02:00
Thomas Zimmermann
9776c484a2 Bug 1202386: Output clear HAL IPC errors, r=shuang
This patch improves error logging in the IPC PDU packing and unpacking
code.
2015-09-10 11:32:26 +02:00
Thomas Zimmermann
eb7a1c046a Bug 1202386: Add logging macros for HAL IPC, r=shuang
The code for packing and unpacking IPC messages does currently not
output detailed error message. This patch adds macros that display
information about the failed operation and arguments. The overhead
of the macros is small and the fast path can be inlined.
2015-09-10 11:32:26 +02:00
Thomas Zimmermann
8db43ac2f5 Bug 1202704: Move Bluetooth's |UnpackPDUInitOp| to generic HAL IPC code, r=shuang 2015-09-09 13:40:26 +02:00
Thomas Zimmermann
be56b8fd96 Bug 1202704: Move Bluetooth IPC unpack functions to generic HAL IPC, r=shuang 2015-09-09 13:40:26 +02:00
Thomas Zimmermann
dbd06919a1 Bug 1202704: Move Bluetooth IPC pack functions to generic HAL IPC, r=shuang 2015-09-09 13:40:26 +02:00
Nicholas Nethercote
10d95cca57 Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
2015-08-27 20:44:53 -07:00
Thomas Zimmermann
e12e2b923f Bug 1187904: Add |DaemonSocketConnector|, r=shuang
|DaemonSocketConnector| is a copy of |BluetoothDaemonConnector| and
also includes |BluetoothDaemonInterface::CreateRandomAddressString|.
2015-08-03 13:17:02 +02:00
Thomas Zimmermann
bd17253ac7 Bug 1187249: Move Bluetooth init operators to ipc/hal, r=shuang 2015-07-30 10:34:51 +02:00
Thomas Zimmermann
f4f402420d Bug 1183249: Move PDU helper functions to ipc/hal, r=shuang 2015-07-30 10:34:51 +02:00
Thomas Zimmermann
f2449f1905 Bug 1187249: Move |DaemonSocketPDUHeader| to hal/ipc, r=shuang 2015-07-30 10:34:51 +02:00
Thomas Zimmermann
9d5274ac92 Bug 1187230: Generalize Bluetooth daemon runnables, r=shuang
The new daemon runnables are generalized implementations of the
Bluetooth daemon runnables. The code is unchanged, except for name
changes and fixes to the coding style.
2015-07-27 13:33:17 +02:00
Carsten "Tomcat" Book
9237895ae0 Backed out changeset fa4f742c5c11 (bug 1187230) for bustage on a CLOSED TREE 2015-07-24 15:42:39 +02:00
Thomas Zimmermann
e9838bafe8 Bug 1187230: Generalize Bluetooth daemon runnables, r=shuang
The new daemon runnables are generalized implementations of the
Bluetooth daemon runnables. The code is unchanged, except for name
changes and fixes to the coding style.
2015-07-24 14:50:06 +02:00
Thomas Zimmermann
1cdfb998aa Bug 1185478: Add leak checks to socket I/O classes 2015-07-21 08:06:29 +02:00
Thomas Zimmermann
32140d4795 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.
2015-06-15 14:44:03 +02:00