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

74 Коммитов

Автор SHA1 Сообщение Дата
Thomas Zimmermann 7c9e4a41c9 Bug 1209469: Expose |BluetoothServiceName| in Bluetooth backend interface, r=brsun 2015-10-02 11:07:47 +02:00
Thomas Zimmermann bccae2b2f9 Bug 1207649: Convert Bluetooth Socket backend to |BluetoothAddress|, r=brsun
This patch converts all methods in Bluetooth's Socket interface to
|BluetoothAddress|.
2015-09-30 09:42:33 +02:00
Carsten "Tomcat" Book 113003e824 Backed out 8 changesets (bug 1207649) for bustage on a CLOSED TREE
Backed out changeset df09a48144a5 (bug 1207649)
Backed out changeset fcbf5852361f (bug 1207649)
Backed out changeset d63567af5fa2 (bug 1207649)
Backed out changeset 02928720b1a0 (bug 1207649)
Backed out changeset b906ed92f33a (bug 1207649)
Backed out changeset f03f71a3de8a (bug 1207649)
Backed out changeset 9c647b56f37c (bug 1207649)
Backed out changeset a336f5041c27 (bug 1207649)
2015-09-29 15:54:21 +02:00
Thomas Zimmermann 0172a482fd Bug 1207649: Convert Bluetooth Socket backend to |BluetoothAddress|, r=brsun
This patch converts all methods in Bluetooth's Socket interface to
|BluetoothAddress|.
2015-09-29 14:07:01 +02:00
Thomas Zimmermann cd10495a59 Bug 1206686: Use |BluetoothUuid| throughout Bluetooth backend interfaces, r=btian
This patch converts all public interfaces of the Bluetooth backend code
to take UUIDs as |BluetoothUuid|. The code currently uses a mixture of
|BluetoothUuid| and arrays/pointers.
2015-09-22 13:04:05 +02:00
Andrea Marchesini cd4473d62f Bug 1203426 - Rename StructuredCloneIPCHelper to StructuredCloneData, r=smaug
--HG--
rename : dom/ipc/StructuredCloneIPCHelper.cpp => dom/ipc/StructuredCloneData.cpp
rename : dom/ipc/StructuredCloneIPCHelper.h => dom/ipc/StructuredCloneData.h
2015-09-10 21:50:58 +01:00
Thomas Zimmermann 2eb3afa0bc Bug 1185478: Remove strong references from socket I/O class to socket classes
The shutdown procedure for socket classes ensures that the I/O class is
deleted independently from its socket class. If the socket class has been
deleted, no I/O is performed and no socket events are forwarded. The I/O
class therefore doesn't require a strong reference to its socket class.

This patch removes the remaining ref-counted pointers from the socket I/O
classes. The socket class clears the weak reference in its socket I/O class
when closing the socket.
2015-07-21 08:06:29 +02:00
Thomas Zimmermann 7a8e54aa54 Bug 1185478: Add leak checks to socket I/O classes 2015-07-21 08:06:29 +02:00
Thomas Zimmermann da8f73f148 Bug 1172479: Replace |nsIThread| by |MessageLoop| in socket I/O code, r=kmachulis
Dispatching events via |nsIThread| doesn't work with worker threads. This
patch replaces all uses of |nsIThread| in the socket code by equivalent
uses of |MessageLoop|.
2015-06-09 09:50:10 +02:00
Thomas Zimmermann 974a0b5beb Bug 1168806: Use 'consumer thread' in socket interface, r=kmachulis
The socket IPC interfaces still use 'main thread' in a number of
places. This patch changes all such interfaces and documentation
to speak of 'consumer thread' instead.
2015-06-02 10:01:58 +02:00
Thomas Zimmermann 7c1faa403c Bug 1168806: Configurable consumer thread for socket IPC classes, r=kmachulis
The consumer thread handles socket creation, destruction, and
data processing for socket IPC. Traditionally this has been
done on the main thread.

This patch extends the socket IPC classes to support arbitrary
consumer threads. The thread is configured when establishing a
connection, and performs all of the above operations until the
socket is closed.
2015-06-02 10:01:57 +02:00
Thomas Zimmermann 100bf3cb9c Bug 1168806: Configurable I/O thread for socket IPC classes, r=kmachulis
The I/O thread sends and receives data on a file descriptor. This
has traditionally been performed on a single I/O thread.

This patch extends the socket IPC classes to support arbitrary I/O
threads. The thread is configured when a connection is established
and used until the socket gets closed.
2015-06-02 10:01:57 +02:00
Thomas Zimmermann be105911a1 Bug 1168446: Don't store connection parameters in |BluetoothSocket|, r=shuang 2015-06-01 10:42:29 +02:00
Thomas Zimmermann 1237cad18c Bug 1164425: Rename |SocketBase::CloseSocket| to |SocketBase::Close|, r=kmachulis 2015-05-20 10:50:43 +02:00
Carsten "Tomcat" Book 1aa07d706a Backed out changeset 1e93024c9fec (bug 1164425) for bustage 2015-05-20 10:31:55 +02:00
Thomas Zimmermann 533d048a4b Bug 1164425: Rename |SocketBase::CloseSocket| to |SocketBase::Close|, r=kmachulis 2015-05-20 09:54:27 +02:00
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Thomas Zimmermann 36282f45ee Bug 1159709: Cleanup inherited methods of Bluedroid's |BluetoothSocket|, r=kmachulis
This patch cleans up the inherited methods of Bluedroid's
|BluetooothSocket|. Methods of the same base class are grouped
within the file, and each method is labeled with 'override'.
2015-04-30 12:55:37 +02:00
Thomas Zimmermann 625ab90911 Bug 1159209: Remove template parameters from |DataSocketIO|, r=kmachulis
This patch removes the template parameters from |DataSocketIO| and
moves its methods into the C++ source file. All users have been
adapted.
2015-04-29 11:19:28 +02:00
Thomas Zimmermann 9cdb8ad654 Bug 1159209: Remove template parameters from |SocketIOShutdownTask|, r=kmachulis
This patch removes the template parameters from |SocketIOShutdownTask|
and moves its methods into the C++ source file. All users have been
adapted.
2015-04-29 11:19:28 +02:00
Thomas Zimmermann f1e1ede770 Bug 1159209: Remove template parameters from |SocketIORequestClosingRunnable|, r=kmachulis
This patch removes the template parameters from
|SocketIORequestClosingRunnable| and moves its methods into
the C++ source file. All users have been adapted.
2015-04-29 11:19:28 +02:00
Thomas Zimmermann 6999dd655b Bug 1159209: Remove template parameters from |SocketIOEventRunnable|, r=kmachulis
This patch removes the template parameters from |SocketIOEventRunnable|
and moves its methods into the C++ source file. All users have been
adapted.
2015-04-29 11:19:28 +02:00
Thomas Zimmermann a8a6ff751e Bug 1158876: Move |DataSocket::ReceiveSocketData| into sub classes, r=kmachulis
|ReceiveSocketData| receives socket data on the main thread. This
is a specific detail of the current socket classes, which should not
be required by future implementations.

This patch moves the receive method and the corresponding runnable
into socket classes.
2015-04-28 10:18:13 +02:00
Thomas Zimmermann 10488d5115 Bug 1158876: Move management of socket I/O buffers into socket I/O classes, r=kmachulis
This patch moves management of received socket I/O buffers from
|DataSocketIO| into the I/O classes. Each I/O class is responsible
for (de-)allocating buffers, and consuming them once data has been
received.

All current I/O classes forward their buffers to the main thread,
but other operations are possible. For example, received data can
be parsed and processed directly in the I/O thread.
2015-04-28 10:18:13 +02:00
Thomas Zimmermann ed4b4e63be Bug 1158876: Rename |SocketConsumerBase| to |DataSocket|, r=kmachulis
This patch renames |SocketConsumerBase| to |DataSocket|, and for the
I/O classes |SocketConsumerIO| to |DataSocketIO|. |DataSocketIO| also
contains send and receive functionality from |SocketBaseIO|.

|DataSocket| is a virtual base class that represents a socket that
transfers data, without a particular constraints to what the data
represents. |DataSocketIO| is the corresponding helper class on the
I/O thread.
2015-04-28 10:18:12 +02:00
Thomas Zimmermann 417a91f162 Bug 1156352: Remove |UnixSocketRawData| from socket I/O interfaces, r=kmachulis 2015-04-23 13:48:48 +02:00
Thomas Zimmermann bbd18cd078 Bug 1156352: Remove |UnixSocketRawData| from Bluetooth interfaces, r=btian 2015-04-23 13:48:47 +02:00
Thomas Zimmermann 19481051d7 Bug 1154281: Remove references to UnixSocket.h from Bluetooth, r=btian
The code needs |UnixSocketRawData| from SocketBase.h and the data
structures in UnixSocketWatcher.h
2015-04-21 10:33:06 +02:00
Ben Tian 7895eb1e99 Bug 1152694 - Make UUID and service name as input arguments for BluetoothSocket, r=tzimmermann 2015-04-13 17:30:47 +08: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
Thomas Zimmermann 51eba88842 Bug 1083092: Data parameter for |mozilla::ipc::SocketIOSendTask| template, r=shawnjohnjr
The data class in |SocketIOSendTask| is now a template parameter, instead
of being hard-coded to |UnixSocketRawData|. The patch also adds soem minor
cleanups to the file.
2014-10-21 10:52:12 +02:00
Thomas Zimmermann 973c70e366 Bug 1083092: Introduce |mozilla::ipc::SocketBase|, r=shawnjohnjr
The new class |SocketBase| contains the notification mechanism of
|SocketConsumerBase|. The latter still contains I/O methods.
2014-10-21 10:52:11 +02:00
Thomas Zimmermann b3e7325890 Bug 1074419: Close received socket file descriptors on errors, r=shawnjohnjr 2014-10-01 10:50:33 +02:00
Jamin Liu 643d379c50 Bug 1052304 - Notify OPP manager when Bluetooth socket message error occurs. r=btian 2014-10-09 17:54:38 +08:00
Ben Tian ab68065206 Bug 1063066 - [Flame][KK] Bluetooth transfer does not work in Gallery App. r=tzimmermann 2014-09-25 18:35:54 +08:00
Thomas Zimmermann 261a3f87cf Bug 1062754: Support peer shutdown and EOF in |SocketIOBase|, r=qdot, btian
Calling read on a socket that has been closed for reading by the
peer, read returns 0. The socket is still readable however, so
polling and reading will return constant results of 0 received
bytes.

With this patch, if a socket's peer shuts down reading or if
we reached the EOF, we stop watching the file descriptor for
readability. |SocketIOBase| will detect this case exactly once
and initiate the socket's shutdown.
2014-09-05 10:16:24 +02:00
Thomas Zimmermann 4fa153dcec Bug 992206: Cleanup interface of |BluetoothSocket|, r=shuang
This patch cleans up the interface of Bluedroid's |BluetoothScoket|
to look more similar the interface of |UnixSocketConsumer|, from
which it descends.
2014-08-07 11:37:50 +02:00
Thomas Zimmermann cea72e393a Bug 992206: Use |SocketIOShutdownTask| for Bluetooth sockets, r=shuang 2014-08-07 11:37:50 +02:00
Thomas Zimmermann 9187540426 Bug 992206: Use |SocketIOSendTask| for Bluetooth sockets, r=shuang 2014-08-07 11:37:49 +02:00
Thomas Zimmermann 2088ae9735 Bug 992206: Use |SocketIOTask| for Bluetooth sockets, r=shuang 2014-08-07 11:37:49 +02:00
Thomas Zimmermann 36ac80cc0c Bug 992206: Use |SocketIOBase| for Bluetooth sockets, r=shuang 2014-08-07 11:37:49 +02:00
Thomas Zimmermann d1a9709a19 Bug 992206: Use |SocketIODeleteInstanceRunnable| for Bluetooth sockets, r=shuang 2014-08-07 11:37:49 +02:00
Thomas Zimmermann 5a48c70476 Bug 992206: Use |SocketIORequestClosingRunnable| for Bluetooth sockets, r=shuang 2014-08-07 11:37:48 +02:00
Thomas Zimmermann 74b98b9560 Bug 992206: Use |SocketIOReceiveRunnable| for Bluetooth sockets, r=shuang 2014-08-07 11:37:48 +02:00
Thomas Zimmermann 814189c271 Bug 992206: Use |SocketIOEventRunnable| for Bluetooth sockets, r=shuang 2014-08-07 11:37:48 +02:00
Thomas Zimmermann c0e4407084 Bug 992206: Use |SocketIORunnable| for Bluetooth sockets, r=shuang 2014-08-07 11:37:47 +02:00
Thomas Zimmermann dfd86e68a6 Bug 992206: Use |SocketConsumerBase| for Bluetooth sockets, r=shuang 2014-08-07 11:37:47 +02:00
Thomas Zimmermann b9008c0397 Bug 992206: Cleanup fields in |DroidSocketImpl|, r=shuang
|DroidSocketImpl| contains several unused fields that are removed
by this patch.
2014-08-07 11:37:47 +02:00
Thomas Zimmermann d4a10240a2 Bug 1038591: Convert Bluedroid status codes and error handlers, r=shuang
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-06 11:45:32 +02:00
Thomas Zimmermann 75d7fb0176 Bug 1038591: Convert Bluetooth Socket data types in |BluetoothSocketInterface|, r=shuang
With this patch |BluetoothSocketInterface| is responsible for converting all
Bluetooth data types to Bluedroid types. All callers have been adapted.
2014-08-06 11:44:56 +02:00