Closed Bug 1159709 Opened 9 years ago Closed 9 years ago

Cleanup class hierarchy of Gonk socket I/O classes

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox40 fixed)

RESOLVED FIXED
2.2 S11 (1may)
Tracking Status
firefox40 --- fixed

People

(Reporter: tzimmermann, Assigned: tzimmermann)

References

Details

Attachments

(6 files)

The hierarchy of Gonk socket I/O classes is mostly inconsistent and confusing. It should be cleaned up to reflect actual socket features and capabilities. Below is a class diagram to illustrate the relationship.


>                   |SocketBase|
>                         ^
>                         |
>               +------------------+
>               |                  |
>          |DataSocket|       |ListenSocket|
>               ^
>               |
>               +------------------------------+
>               |                              |
>    |ConnectionOrientedSocket|        |BluetoothSocket|
>               ^
>               |
>       +-----------------+
>       |                 |
> |StreamSocket| |BluetoothDaemonConnection|


|StreamSocket| and |ListenSocket| serve as base classes for task-specific classes (RIL, NFC), but hopefully, they can be used on their own in the future. |ListenSocket| returns accepted connections in instances of |ConnectionOrientedSocket|.

|BluetoothSocket| is special. It supports listening and data transfers, but Bluedroid's interfaces are not fully POSIX compatible, so |BlutoothSocket| is currently only supported as |DataSocket|.

This bug is about establishing the outlined class hierarchy.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ef2d5c06e335

I had to send some other bugs' patches as well that haven't landed on m-c yet.
Patch [01] does some refactoring of |BluetoothDaemonConnection|. The other patches only move code around.
Attachment #8599321 - Flags: review?(kyle) → review+
Attachment #8599322 - Flags: review?(kyle) → review+
Attachment #8599323 - Flags: review?(kyle) → review+
Attachment #8599324 - Flags: review?(kyle) → review+
Attachment #8599325 - Flags: review?(kyle) → review+
Attachment #8599326 - Flags: review?(kyle) → review+
You need to log in before you can comment on or make changes to this bug.