Commit Graph

23 Commits

Author SHA1 Message Date
Claudio Takahasi
91744cb56f Replace att_get_u16() by get_le16() 2014-03-24 22:08:20 +02:00
Marcel Holtmann
8c45ca3f2e profiles: Use full include path for header files 2014-01-25 20:08:59 -08:00
Anderson Lizardo
2704b4c83b attrib: Modify gatt_cb_t signature
Use standard C types instead of GLib ones (which are unnecessary here)
and move the "status" parameter to the first position, so it is
consistent with other callbacks.
2014-01-11 18:56:03 +02:00
Mikel Astiz
13093c8a70 deviceinfo: Use btd_service userdata pointer
Avoid maintaining an internal list of probed deviceinfo instances by
making use of btd_service's userdata pointer.
2013-06-24 11:16:49 +03:00
Lucas De Marchi
20bacbd735 deviceinfo: Get rid of gint
Use plain int instead of gint. In glib gint is always a typedef to int,
so it's safe to use it even for callbacks with glib.
2013-05-01 09:08:57 +03:00
Mikel Astiz
d6254b4113 profile: Use btd_service for probing profiles
Change the profile probe mechanism in order to pass the btd_service
instance representing the remote service. This object is bound to a
btd_profile and a btd_device, thus replacing the previous parameters.

The probe callback is allowed to hold a reference to the btd_service
by means of btd_service_ref(), which should be unreferenced during
removal.

Keeping such a reference of the btd_service allows supporting multiple
instances of the same UUID, since the reference can serve as a handle
during the interactions between the profile implementation and the core.
2013-04-26 10:29:36 +03:00
Mikel Astiz
a0207272ed profile: Remove UUID list from probe function
Each instance of btd_profile is associated to one single remote UUID
and therefore the list provided by the callback is redundant and can be
removed.
2013-04-26 10:12:09 +03:00
Mikel Astiz
21723d6bfd profile: Limit to one remote UUID per profile
The code can be considerably simplified by constraining struct
btd_profile to one single remote UUID.
2013-03-10 09:05:04 +02:00
Marcel Holtmann
211412b840 profiles: Fix includes for uuid.h 2013-01-09 20:30:30 -08:00
Johan Hedberg
766efe9e0d profiles: Make use of btd_device_get_primary 2012-12-14 15:37:26 +02:00
Johan Hedberg
3d0052c472 deviceinfo: Remove leftover main.c file 2012-12-14 13:17:22 +02:00
Johan Hedberg
12cd2f8eee deviceinfo: Remove useless files 2012-12-14 13:08:18 +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
Vinicius Costa Gomes
e224fd82eb device: Add btd_ prefix to device_set_pnpid()
As device_set_pnpid() is used inside a plugin it should have the btd_
prefix.
2012-11-26 11:23:33 +02:00
Marcel Holtmann
ce06826bd7 build: Remove stupid -I directives 2012-11-20 16:12:51 +01:00
Marcel Holtmann
91b4b3633d profiles: Remove GATT enable option 2012-11-09 20:36:46 +01:00
Jefferson Delfes
3d0e48b334 gatt: Remove offset parameter from gatt_read_char
The Core spec allows to implement Read Long Characteristic Value as a
Read Request, followed by zero or more Read Blob Requests, therefore the
offset parameter is unnecessary and is always 0 for normal use.
2012-10-01 12:54:51 +03:00
Johan Hedberg
a339670236 core: Add profile parameter to adapter and device probe functions
This is necessary for the external profile implementation (which will
have the same callback functions for all external profiles).
2012-09-25 15:38:38 +03:00
Johan Hedberg
b1cde69a66 core: Move profile code into profile.{c,h} 2012-09-11 11:29:57 +03:00
Johan Hedberg
813b674bce Add profile abstraction (replaces btd_device drivers)
This patch removes the btd_device_driver concept and replaces it with
btd_profile. The new construct also contains the necessary parts for
adapter drivers, so btd_adapter_driver is only needed for non-profile
related functionality (most of which is in plugins/*).

The main purpose of this new construct is to facilitate a centralized
connection creation mechanism for profiles, ultimately enabling the
addition of a Device.Connect() method instead of requiring a UI to know
to call e.g. Input.Connect or Audio.Connect.

This feature will also be extended to externally implemented profiles
once the internal implementation gets more stable, such as OBEX (obexd)
and HFP (oFono). The new D-Bus interface will also partially restore
functionality which was previously available through the Serial
interface.
2012-09-03 14:16:15 +03:00
Claudio Takahasi
450a2212f5 deviceinfo: Remove redundant gattrib include 2012-08-16 10:37:48 +03:00
Gustavo Padovan
6e26cb11e2 deviceinfo: move to profiles folder 2012-07-10 08:19:16 -03:00