Skip to content

Use of secondary services #174

@kevincar

Description

@kevincar

Describe the solution you'd like

The WinRT backend uses ServiceProvider that is only capable of creating primary services. As a result, I would suggest enforcing that the primary parameter on all backend service objects not be Optional[bool] = None but instead be bool = True.

Default to true because 1) This is the default/only option for WinRT, and 2) primary services are the most common use case.

However, to address secondary services, both CoreBluetooth and BlueZ expose APIs to utilize these. Thus, when a secondary service is created, we can allow this and simply create a warning log if this is attempted on WinRT. Additionally, expose new methods such as BlessGATTService.include_service to bundle secondary services under primary services.

Describe alternatives you've considered
Not including secondary services at all.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions