zephyr icon indicating copy to clipboard operation
zephyr copied to clipboard

Bluetooth: Host: Move GAP service to new file

Open alwa-nordic opened this issue 2 years ago • 5 comments

alwa-nordic avatar Aug 01 '22 15:08 alwa-nordic

Wouldn't subsys/bluetooth/services/gap.c make more sense as the location?

jhedberg avatar Aug 03 '22 12:08 jhedberg

Wouldn't subsys/bluetooth/services/gap.c make more sense as the location?

To be clear, I'm not 100% convinced of this since GAP is a "core" service, but we do have a "services" directory for GATT services, so...

jhedberg avatar Aug 03 '22 12:08 jhedberg

Wouldn't subsys/bluetooth/services/gap.c make more sense as the location?

EDIT: I misread your comment as proposing subsys/bluetooth/gap.c.

My intention is that gap_svc.c is the GATT "frontend" for GAP. This file will not be compiled in when the GATT server is not.

I want to move the GAP "values" "backend" into gap.c later. What I would put into gap.c is at least bt_dev.name, bt_dev.appearance, bt_get_name, bt_set_name, bt_get_appearance, bt_set_appearance. These are used by more than just the GAP service, for example, advertising.

alwa-nordic avatar Aug 03 '22 13:08 alwa-nordic

Wouldn't subsys/bluetooth/services/gap.c make more sense as the location?

I am positive to this. True, the service is mandatory on all GATT servers, but that can just be enforced by kconfig / build system.

alwa-nordic avatar Aug 03 '22 13:08 alwa-nordic

Fixed failing compliance.

alwa-nordic avatar Aug 03 '22 14:08 alwa-nordic

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

github-actions[bot] avatar Oct 10 '22 00:10 github-actions[bot]