Closed Bug 780812 Opened 9 years ago Closed 9 years ago

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

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: echou, Assigned: echou)

References

Details

Attachments

(1 file, 1 obsolete file)

To connect with remote device on profile level, we need to get the rfcomm channel of target service beforehand.
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)
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+
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
https://hg.mozilla.org/mozilla-central/rev/9e64393fa8c0
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.