summaryrefslogtreecommitdiff
path: root/profiles/scanparam
Commit message (Collapse)AuthorAgeFilesLines
* scanparam: Remove unneeded header includeClaudio Takahasi2013-07-301-2/+0
|
* scanparam: Apply convention for "GSource id" like variableAnderson Lizardo2013-07-301-2/+2
| | | | | | | | | | By convention, BlueZ code checks for "Gsource id" like variables using: if (source_id > 0) ... Also fix the variable type to match that returned by g_attrib_unregister().
* scanparam: Fix missing check for valid GAttrib when removing deviceAnderson Lizardo2013-07-301-1/+1
| | | | | | | If device is removed while there is no connection, scan->attrib will be NULL, because its reference is managed by attio connect/disconnect callbacks. This means that on disconnect any resources owned by GAttrib will be properly destroyed.
* scanparam: Remove unnecessary assignmentAnderson Lizardo2013-07-301-3/+1
| | | | | "scan" will be g_free()'d on this same function, so no need to assign 0 to refresh_cb_id.
* scanparam: Fix handle range check on descriptor discoveryAnderson Lizardo2013-07-301-1/+1
| | | | | | | | | When discovering descriptors, if there is only a single descriptor, the start handle will be equal to the end handle. It is valid to issue the Find Information Request on this case. Before this fix, notification for Scan Refresh characteristic was never enabled.
* attrib: Do not use Write Command in gatt_write_char()Anderson Lizardo2013-07-241-1/+1
| | | | | | | | | | | | | Previously, if no callback was given to gatt_write_char(), it was assumed that a "Write Without Response" (which uses Write Command) should be used instead of Write Request. This "shortcut" is unnecessary (there is gatt_write_cmd() for the situations where Write Without Response is required) and just duplicates code. This commit also fixes the few places where gatt_write_cmd() should be used.
* attrib: Rename gatt_find_info() to gatt_discover_char_desc()Anderson Lizardo2013-07-241-2/+2
| | | | | | The old name referred to the underlying ATT PDU (Find Information Request and Find Information Response) and not to the actual GATT procedure (Discover All Characteristic Descriptors).
* scanparam: Use btd_service userdata pointerMikel Astiz2013-06-241-30/+6
| | | | | Avoid maintaining an internal list of probed struct scan instances by making use of btd_service's userdata pointer.
* scanparam: Get rid of gintLucas De Marchi2013-05-011-1/+1
| | | | | 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.
* profile: Use btd_service for probing profilesMikel Astiz2013-04-261-2/+6
| | | | | | | | | | | | | | 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.
* profile: Remove UUID list from probe functionMikel Astiz2013-04-261-2/+1
| | | | | | 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.
* profile: Limit to one remote UUID per profileMikel Astiz2013-03-101-1/+1
| | | | | The code can be considerably simplified by constraining struct btd_profile to one single remote UUID.
* scanparam: Fix remaining references to bluetooth/uuid.hAnderson Lizardo2013-01-101-1/+1
| | | | These headers are not public anymore, so need to use "lib/uuid.h".
* profiles: Make use of btd_device_get_primaryJohan Hedberg2012-12-141-15/+4
|
* scanparam: Remove left-over main.c fileJohan Hedberg2012-12-141-50/+0
|
* scanparam: Remove useless filesJohan Hedberg2012-12-144-147/+58
|
* Revert "Ensure config.h is included by using CPPFLAGS"Johan Hedberg2012-12-073-0/+12
| | | | | | | | | | | | | | This reverts commit 8a03376544b046a84301847d1594f6c3674983ff. 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
* Ensure config.h is included by using CPPFLAGSLucas De Marchi2012-12-053-12/+0
| | | | | | | | | | 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.
* build: Remove stupid -I directivesMarcel Holtmann2012-11-202-6/+6
|
* profiles: Remove GATT enable optionMarcel Holtmann2012-11-091-5/+0
|
* scan: Use the per handle GATT event notifierVinicius Costa Gomes2012-10-111-13/+2
|
* gattrib: Add support for listening for events for specific handlesVinicius Costa Gomes2012-10-111-2/+2
| | | | | | We want only the profile that implements a service to be notified of changes on that service. Before this patch, all the registered event notifiers are being called.
* scanparam: Fix servers list to be staticJohan Hedberg2012-09-281-1/+1
|
* scan: Avoid discover if scan handle is knownClaudio Takahasi2012-09-281-2/+7
| | | | | This patch avoids the characteristic discovery for Scan Interval Window if the attribute value handle was discovered on a previous interaction.
* scan: Write parameters when requestedClaudio Takahasi2012-09-281-8/+18
| | | | | | | This patch implements the update procedure of the scan parameters when the Scan Server requests. The Scan Refresh characteristic is used to inform the Scan Client(BlueZ) that the Scan Server requires the most recent scan settings.
* scan: Register notification handlerClaudio Takahasi2012-09-281-1/+35
| | | | | This patch registers the GAttrib notification handler for Refresh Characteristic notification.
* scan: Enable Scan Refresh notificationClaudio Takahasi2012-09-281-1/+80
| | | | | This patch discovers the Scan Refresh Characteristic handle and sets it's Client Characteristic Configuration bit to enable notifications.
* scan: Add write scan interval windowClaudio Takahasi2012-09-281-0/+41
| | | | | | This patch adds the handle discovery of the Scan Interval Window Characteristic and writes the default value (hard-coded in the kernel) of the scan interval, and scan window in the remote's characteristic.
* scan: Add ATTIO callbacks registrationClaudio Takahasi2012-09-283-1/+156
| | | | | | | | This patch add the functions to manage ATTIO callbacks. The current registration mechanism is not suitable for this service since it needs to be passive. Scan Parameters should not actively request connections, it needs to be notified if the connections has been established requested by other services.
* scan: Register profileClaudio Takahasi2012-09-283-1/+97
| | | | | This patch add the probe and remove callbacks for the GATT Scan Parameters service.
* scan: Add plugin skeletonClaudio Takahasi2012-09-281-0/+53
This patch adds the Makefile changes and plugin declaration to support Scan Parameters service. BlueZ will act as Scan Client writting to a Scan Server the scanning parameters.