Closed Bug 1196046 Opened 9 years ago Closed 9 years ago

Move bluetoothd's PDU code into separate library

Categories

(Firefox OS Graveyard :: General, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
FxOS-S9 (16Oct)

People

(Reporter: tzimmermann, Assigned: tzimmermann)

References

Details

Attachments

(1 file, 1 obsolete file)

Bluetoothd contains code for processing PDUs. We should move this code into a shared library and reuse it for other system services.
Attached file Github repository (obsolete) —
This library packs and unpacks PDUs in a B2G system service. The PDUs are used for communication between Gecko and the service's process.

Shawn, this code has previously been in bluetoothd, but it will be useful for other system services. We can later also convert bluetoothd to use this library.

Michael, I'd like to add this library to b2g under https://github.com/mozilla-b2g/platform_system_libpdu. It will be useful for new system services (e.g., bug 1194721). The master branch only contains licensing information, the code is in this bug's branch. I'll create a pull request once there's a repository on mozilla-b2g.

Thanks to both of you.
Attachment #8649572 - Flags: review?(shuang)
Attachment #8649572 - Flags: review?(mwu)
No longer blocks: 1194721
Comment on attachment 8649572 [details]
Github repository

Updated Github tree

  - set LOCAL_MODULE_CLASS for libpdu
  - improved ICS compatibility
The reason I add comment for 'LOCAL_MODULE_CLASS':
1. There are many shared libraries put LOCAL_MODULE_CLASS in Android.mk, like bluez/android/Android.mk
2.  http://androidxref.com/5.1.1_r6/xref/build/core/definitions.mk#439
    http://androidxref.com/5.1.1_r6/xref/build/core/definitions.mk#485
It looks like it can affect the path to install intermediates files, force to install files into /system/lib.
3. It might be meaningful for prebuilt library, so that you don't need to specify LOCAL_MODULE_PATH literally.

include $(CLEAR_VARS)
LOCAL_MODULE := libsomething
LOCAL_SRC_FILES := lib/$(jni_shared_libraries_abi)/$(LOCAL_MODULE).so
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
LOCAL_MODULE_TAGS := optional
include $(BUILD_PREBUILT)
Thanks a lot.
Comment on attachment 8649572 [details]
Github repository

Updated Github tree:

  - fixed comments
Comment on attachment 8649572 [details]
Github repository

Updated Github tree

  - renamed cleanup_ to destroy_
  - added size macros for PDUs

I pushed those two small changes as result of the review in bug 1196046.
(In reply to Thomas Zimmermann [:tzimmermann] [:tdz] from comment #6)
> Comment on attachment 8649572 [details]
> Github repository
> 
> Updated Github tree
> 
>   - renamed cleanup_ to destroy_
>   - added size macros for PDUs
> 
> I pushed those two small changes as result of the review in bug 1196046.

Sorry, bug 1196221.
Attached file Github pull request
Equivalent to the previous Github tree, r=shuang.
Attachment #8649572 - Attachment is obsolete: true
Attachment #8649572 - Flags: review?(mwu)
Attachment #8664277 - Flags: review+
Depends on: 1208990
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: