[b2g-bluetooth] Implement function to get RFCOMM channel of specific Bluetooth service

RESOLVED FIXED in mozilla17

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: ericchou, Assigned: ericchou)

Tracking

Trunk
mozilla17
ARM
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
To connect with remote device on profile level, we need to get the rfcomm channel of target service beforehand.
(Assignee)

Updated

5 years ago
Blocks: 727618
(Assignee)

Comment 1

5 years ago
Created attachment 649555 [details] [diff] [review]
v1: patch 1: Added function QueryServerChannel

Function QueryServerChannel() can be used to get the server channel of specific service on remote device. Note this function will not establish a connection with remote device, it only searches local database.
Attachment #649555 - Flags: review?(kyle)
(Assignee)

Comment 2

5 years ago
sorry, function name -> GetDeviceServiceChannel()
Comment on attachment 649555 [details] [diff] [review]
v1: patch 1: Added function QueryServerChannel

Review of attachment 649555 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/bluetooth/linux/BluetoothDBusService.cpp
@@ +1288,5 @@
> +int
> +BluetoothDBusService::GetDeviceServiceChannelInternal(const nsAString& aObjectPath,
> +                                                      const nsAString& aPattern,
> +                                                      int aAttributeId)
> +{

Nit: This blocks, so we should put a thread assertion check in to make sure it's not called from the main thread.

::: dom/bluetooth/linux/BluetoothDBusService.h
@@ +64,4 @@
>    RemoveServicesInternal(const nsAString& aAdapterPath,
>                           const nsTArray<PRUint32>& aServiceHandles);
>  
> +  virtual int 

Nit: Delete space at end of line
Attachment #649555 - Flags: review?(kyle) → review+
(Assignee)

Comment 4

5 years ago
Created attachment 649944 [details] [diff] [review]
Final version: patch 1: Added function GetDeviceServiceChannel(), r=qDot

Nits picked.
Assignee: nobody → echou
Attachment #649555 - Attachment is obsolete: true
https://hg.mozilla.org/integration/mozilla-inbound/rev/9e64393fa8c0
Target Milestone: --- → mozilla17
Version: unspecified → Trunk

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/9e64393fa8c0
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.