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.
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.
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.
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.
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
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.
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.
--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
|DaemonSocketConnector| is a copy of |BluetoothDaemonConnector| and
also includes |BluetoothDaemonInterface::CreateRandomAddressString|.
--HG--
rename : dom/bluetooth/bluedroid/BluetoothDaemonConnector.cpp => ipc/hal/DaemonSocketConnector.cpp
rename : dom/bluetooth/bluedroid/BluetoothDaemonConnector.h => ipc/hal/DaemonSocketConnector.h
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.
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.
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