Commit Graph

26 Commits

Author SHA1 Message Date
Anderson Lizardo
dbb2b838c7 plugins: Fix remaining references to bluetooth/uuid.h
These headers are not public anymore, so need to use "lib/uuid.h".
2013-01-10 15:10:44 +02:00
Johan Hedberg
b8779d2202 Revert "Ensure config.h is included by using CPPFLAGS"
This reverts commit 8a03376544.

The patch needs to be split up and the gdbus/ changes were bogus
compared to the original commit message.

Conflicts:
	Makefile.am
	Makefile.obexd
	profiles/cyclingspeed/cyclingspeed.c
	profiles/heartrate/heartrate.c
	src/error.c
2012-12-07 12:46:04 +02:00
Lucas De Marchi
8a03376544 Ensure config.h is included by using CPPFLAGS
Instead of trying to include config.h in each file over the tree and
possibly forgetting to include it, give a "-include config.h" argument
to the compiler so it's guaranteed that a) it will be included for all
source files and b) it will be the first header included.

gdbus/ directory is left out, since it would break other projects using
it.
2012-12-05 17:18:07 +02:00
Marcel Holtmann
ce06826bd7 build: Remove stupid -I directives 2012-11-20 16:12:51 +01:00
Marcel Holtmann
8efc4e221f plugins: Remove GATT enable option 2012-11-09 20:37:17 +01:00
Claudio Takahasi
932bc368ef GATT: Move GATT assigned numbers to GATT header 2012-05-30 10:39:03 +03:00
Arik Nemtsov
3374e0ca32 att: add remote btd_device to ATT read/write callbacks
This allows us to identify the remote device that made the ATT
read/write.
2012-04-03 12:58:12 +03:00
Chen Ganir
afb04979ee GATT: Profile support for EnableGatt
Add support for the EnableGatt for all GATT profiles.
2012-03-26 12:12:24 +03:00
Chen Ganir
f47e7204b4 GATT: Rename AttributeServer switch
Rename the AttributeServer main.conf option to EnableGatt and
change its purpose to enable/disable all GATT related activity.
2012-03-26 12:12:00 +03:00
Santiago Carot-Nemesio
f97adf23c0 gatt-example: Fix g_assert checks when an uint16_t value overflows
g_assert statements are buggy when the last handler available
overflows the uint16_t range. This check is currently used to
evaluate if the number of requested attributes for a sevice
match with the number of attributes added in the data base.
2012-02-03 10:47:18 -08:00
Santiago Carot-Nemesio
d16b0ead39 gatt-service: Provide service uuid in attrib_db_find_avail function
We need to provide the service uuid because of GATT server should group
16-bit uuid services together and 128-bit uuid services together,
(Bluetooth 4.0, Vol 3, Part G, 3.1).
2012-02-03 10:44:48 -08:00
Santiago Carot-Nemesio
24124f1181 gatt-service: Add support for 128-bit Bluetooth UUIDs
UUID services in GATT should be either 16-bit or 128-bit. Current
GATT interface does not allow to provide 128-bit ones. This patch
enables plugins to register services using 128-bit UUIDs.
2012-02-03 10:44:21 -08:00
Santiago Carot-Nemesio
927ec06fe2 gatt-example: Fix memory leak
Remove the example-plugin data element from the list whenever an adapter
is removed.
2012-01-09 14:28:29 +02:00
Santiago Carot-Nemesio
5da4dd8afa gatt-service: Add missing user_data parameter for callbacks 2012-01-09 14:28:29 +02:00
Santiago Carot-Nemesio
54f49e31d5 attrib-server: Add adapter in attrib_create_sdp function 2011-12-30 13:02:27 +02:00
Santiago Carot-Nemesio
99156a2444 attrib-server: Add adapter in attrib_db_update function 2011-12-30 13:01:05 +02:00
Santiago Carot-Nemesio
7188fe255e gatt-service: Add adapter in gatt_service_add function 2011-12-30 13:00:34 +02:00
Santiago Carot-Nemesio
6a1e46afaf attrib-server: Add adapter in attrib_db_add
Because of there can be many adapters plugged, the GATT servers must
provide the adapter in which the attributes will be registered.
2011-12-30 13:00:00 +02:00
Santiago Carot-Nemesio
bbc34269b0 attrib-server: Add adapter to attrib_db_find_avail function
Adapters manage their own list of handlers so we need to specify the
adapter where the handlers will be registered.
2011-12-30 12:59:09 +02:00
Santiago Carot-Nemesio
caa6034e46 gatt-example: Use adapter driver to register GATT attributes
GATT servers should register their attributes on each adapter when it is
plugged instead of doing that when the plugins is loaded. This patch
registers a new adapter driver to manage plug and unplug events in order
to register attributes in each GATT served managed in each adapter.
2011-12-30 12:57:33 +02:00
Santiago Carot-Nemesio
f2fa8743c8 Update gatt-example to check if attributes were registered 2011-12-02 13:29:11 +02:00
Anderson Lizardo
f4d4dd6d41 Migrate example service to high level GATT API
This commit migrates the dummy "Battery Service" from example GATT
plugin to demonstrate how the new API is used.
2011-11-14 21:09:50 +02:00
Vinicius Costa Gomes
6184bc5911 Attrib server integration for outgoing connections
We need support for attaching a client connection to the attribute
server because the server that we are connected may want to do
something similar to a reverse service discovery, and we need to be
able to receive indications and notifications.
2011-09-22 20:25:23 +09:00
Anderson Lizardo
c703241170 Fix characteristic property on GATT example plugin
Any GATT characteristics which have a Client Characteristic
Configuration must have "Notify" property set.
2011-09-22 20:01:40 +09:00
Anderson Lizardo
d3c57d0f63 Remove hard-coded handles from example GATT plugin
Instead of having static handles, use attrib_db_find_avail() to find
available handle ranges.

Also split the big register_attributes() into one function per service.
2011-03-30 19:37:47 +03:00
Anderson Lizardo
a3e9d397f0 Move GATT example server to a standalone plugin
The GATT example server was in the same plugin as the GATT client.
Moving it to a separate plugin will allow to easily disable it.
2011-03-30 19:19:29 +03:00