summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc
Commit message (Collapse)AuthorAgeFilesLines
* Reland: Refactor DBusThreadManager to split away BT clients.rkc2015-11-051-562/+0
| | | | | | | | | | | | | | | | | | | | | This is a reland of This CL doesn't change any of the code except for merge and lint changes. The original CL was triggering a test crash in Valgrind. On this patch, I've run Valgrind multiple times locally and also additionally run TSan. Since I am seeing no failures, after talking to glider@ (who works on Valgrind), I'm attempting to re-land this CL. TBR=armansito@chromium.org, glider@chromium.org, isherman@chromium.org, oshima@chromium.org, sky@chromium.org, stevenjb@chromium.org BUG=None. Committed: c56b94daaf6513891e7da3094ab5054ffbd6262 Cr-Commit-Position: refs/heads/master@{#357707} Review URL: https://codereview.chromium.org/1411793010 Cr-Commit-Position: refs/heads/master@{#357976}
* Revert of Reland: Refactor DBusThreadManager to split away BT clients. ↵tommycli2015-11-041-0/+562
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #1 id:1 of https://codereview.chromium.org/1411793010/ ) Reason for revert: Crashes memory bot http://build.chromium.org/p/chromium.memory.fyi/builders/Chromium%20OS%20%28valgrind%29%284%29 Original issue's description: > Reland: Refactor DBusThreadManager to split away BT clients. > > This is a reland of https://codereview.chromium.org/1347193004/ > > This CL doesn't change any of the code except for merge and lint changes. > > The original CL was triggering a test crash in Valgrind. On this patch, > I've run Valgrind multiple times locally and also additionally run TSan. > Since I am seeing no failures, after talking to glider@ (who works on > Valgrind), I'm attempting to re-land this CL. > > TBR=armansito@chromium.org, glider@chromium.org, isherman@chromium.org, oshima@chromium.org, sky@chromium.org, stevenjb@chromium.org > BUG=None. > > Committed: https://crrev.com/3c56b94daaf6513891e7da3094ab5054ffbd6262 > Cr-Commit-Position: refs/heads/master@{#357707} TBR=armansito@chromium.org,glider@chromium.org,isherman@chromium.org,oshima@chromium.org,sky@chromium.org,stevenjb@chromium.org,rkc@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=None. Review URL: https://codereview.chromium.org/1409383004 Cr-Commit-Position: refs/heads/master@{#357834}
* Reland: Refactor DBusThreadManager to split away BT clients.rkc2015-11-041-562/+0
| | | | | | | | | | | | | | | | | | This is a reland of https://codereview.chromium.org/1347193004/ This CL doesn't change any of the code except for merge and lint changes. The original CL was triggering a test crash in Valgrind. On this patch, I've run Valgrind multiple times locally and also additionally run TSan. Since I am seeing no failures, after talking to glider@ (who works on Valgrind), I'm attempting to re-land this CL. TBR=armansito@chromium.org, glider@chromium.org, isherman@chromium.org, oshima@chromium.org, sky@chromium.org, stevenjb@chromium.org BUG=None. Review URL: https://codereview.chromium.org/1411793010 Cr-Commit-Position: refs/heads/master@{#357707}
* Revert "Refactor DBusThreadManager to split away BT clients."rkc2015-10-061-0/+562
| | | | | | | | | | | | | | This reverts commit 5d3c8959a7aee861b6750fd734cad96bd24e1f9f. This commit is breaking the valgrind tests. R=rkc@chromium.org TBR=armansito@chromium.org, stevenjb@chromium.org, sky@chromium.org BUG=None. Review URL: https://codereview.chromium.org/1382923003 Cr-Commit-Position: refs/heads/master@{#352581}
* Refactor DBusThreadManager to split away BT clients.rkc2015-09-281-568/+0
| | | | | | | | | | | | | | | | | | | To be able to reuse the bluetooth DBus clients on linux, we need to be able to separate them out from DBusThreadManager and move them out of //chromeos. This CL introduces no functional change but instead only refactors the code so we now have a BluezDbusManager that handles a Bluetooth specific DBus client bundle to create all the bluetooth related DBus clients. We will be able to extend this code to add a Linux specific BluezDbusManager implementation, allowing us to reuse all these DBus clients on Linux instead of copy/pasting the code. R=armansito@chromium.org, stevenjb@chromium.org BUG=522663 Review URL: https://codereview.chromium.org/1347193004 Cr-Commit-Position: refs/heads/master@{#351197}
* Fixed bluetooth read write not supported errorsbeaufort.francois2015-08-241-2/+2
| | | | | | | | BUG=522847 Review URL: https://codereview.chromium.org/1307153002 Cr-Commit-Position: refs/heads/master@{#345158}
* chromeos: Remove use of MessageLoopProxy and deprecated MessageLoop APIsskyostil2015-06-111-11/+11
| | | | | | | | | | This patch was mostly autogenerated with https://codereview.chromium.org/1010073002/. BUG=465354 Review URL: https://codereview.chromium.org/1173593002 Cr-Commit-Position: refs/heads/master@{#333996}
* chromeos/dbus: Update Bluetooth GATT API clients to upstream definitionarmansito2015-02-061-9/+18
| | | | | | | | | | | | This CL ports the GATT API bindings from the D-Bus API in our Chrome OS fork to the API definition in doc/gatt-api.txt in BlueZ upstream. TBR=keybuk@chromium.org BUG=440968 Review URL: https://codereview.chromium.org/788193004 Cr-Commit-Position: refs/heads/master@{#315095}
* Add unit testing for org.bluez.Error.* translationjamuraa2014-10-021-18/+123
| | | | | | | | | | | | | | | | | | Added checks for correct translation: * Error.Failed * Error.ReadNotPermitted * Error.WriteNotPermitted * Error.NotSupported Error.InProgress tested via new SetExtraProcessing Error.NotAuthorized tested via new SetAuthorized Error.NotPaired tested via new SetAuthenticated BUG=377232 Review URL: https://codereview.chromium.org/619973002 Cr-Commit-Position: refs/heads/master@{#297752}
* First part of errors coming up from the dbus APIjamuraa2014-10-011-2/+7
| | | | | | | | BUG=377232 Review URL: https://codereview.chromium.org/604023004 Cr-Commit-Position: refs/heads/master@{#297656}
* bluetoothLowEnergy: Send onServiceAdded after all characteristics are discoveredarmansito@chromium.org2014-07-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | This CL makes the following changes: - Add support for the new "Characteristics" and "Descriptors" properties exposed under org.bluez.GattService1 and org.bluez.GattCharacteristic1, respectively. - Add device::BluetoothGattService::Observer::GattDiscoveryCompleteForService event, which gets called after the first PropertiesChanged signal is received for the "Characteristics" property of a service. - Change BluetoothLowEnergyEventRouter, so that it sends the "onServiceAdded" event not in GattServiceAdded but in GattDiscoveryCompleteForService. BUG=394537 TEST=browser_tests:BluetoothLowEnergyApiTest, device_unittests:BluetoothGattChromeOSTest Review URL: https://codereview.chromium.org/402303002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284955 0039d316-1c4b-4281-b951-d872f2087c98
* device/bluetooth: Add device::BluetoothGattNotifySession.armansito@chromium.org2014-06-271-6/+62
| | | | | | | | | | | | | | | | | | | | | | This CL introduces device::BluetoothGattNotifySession, which represents a single instance of a request to a remote characteristic to start sending value updates if it supports notifications or indications. Instances are obtained by calling BluetoothGattCharacteristic::StartNotifySession and sessions are stopped by calling BluetoothGattNotifySession::Stop on the received instance, which is owned by the caller. The characteristic will keep sending value updates as long as there is at least one active session. This CL implements this functionality for Chrome OS by adding the necessary bindings for the new D-Bus API calls "StartNotify" and "StopNotify" on org.bluez.GattCharacteristic1. A reference count is kept for all created sessions inside BluetoothRemoteGattCharacteristicChromeOS. BUG=387989 TEST=device_unittests Review URL: https://codereview.chromium.org/352063002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280433 0039d316-1c4b-4281-b951-d872f2087c98
* device/bluetooth: Update characteristic value D-Bus bindings.armansito@chromium.org2014-06-071-67/+62
| | | | | | | | | | | | | | | The original BlueZ GATT API doc spec used DBus.Properties interface for characteristic value access. Since we are modifying this API for Chrome OS, this CL updates the Chrome D-Bus bindings and modifies the device/bluetooth GATT code to use the new bindings for characteristic value reads, writes, and updates. BUG=378182 TEST=Tested against my custom bluetoothd build; device_unittests Review URL: https://codereview.chromium.org/301093003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275693 0039d316-1c4b-4281-b951-d872f2087c98
* device/bluetooth: Implement GATT characteristic properties on Chrome OS.armansito@chromium.org2014-06-071-12/+27
| | | | | | | | | | | | | This CL implements GATT characteristic properties for BluetoothRemoteGattCharacteristicChromeOS. Also, a typo in the "Writable Auxiliaries" property declaration has been fixed. BUG=362799 TEST=device_unittests, browser_tests Review URL: https://codereview.chromium.org/307453007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275599 0039d316-1c4b-4281-b951-d872f2087c98
* device/bluetooth: Add chromeos::BluetoothRemoteGattDescriptorChromeOS.armansito@chromium.org2014-04-111-1/+19
| | | | | | | | | | | | Added the chromeos::BluetoothRemoteGattDescriptorChromeOS class which implements a remote instance of device::BluetoothGattDescriptor for the Chrome OS platform. BUG=360266,340529 TEST=device_unittests Review URL: https://codereview.chromium.org/234443005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263194 0039d316-1c4b-4281-b951-d872f2087c98
* device/bluetooth: Add chromeos::BluetoothRemoteGattCharacteristicChromeOS.armansito@chromium.org2014-04-101-3/+21
| | | | | | | | | | | | | Added the chromeos::BluetoothRemoteGattCharacteristicChromeOS class which implements a remote instance of device::BluetoothGattCharacteristic for the Chrome OS platform. BUG=360266,340529 TEST=device_unittests Review URL: https://codereview.chromium.org/228643004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262964 0039d316-1c4b-4281-b951-d872f2087c98
* device/bluetooth: Add chromeos::BluetoothRemoteGattServiceChromeOS.armansito@chromium.org2014-04-081-7/+7
| | | | | | | | | | | | | | | | Added the chromeos::BluetoothRemoteGattServiceChromeOS class which implements a remote instance of device::BluetoothGattService for the Chrome OS platform. This CL also introduces some minor changes to the GATT API, namely removing the characteristic and descriptor Observer interfaces. Addition, removal, and value changes of remote characteristics will instead be tracked via BluetoothGattService::Observer. BUG=360266,340529 TEST=device_unittests Review URL: https://codereview.chromium.org/224953003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262327 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos/dbus: Add fake D-Bus clients for GATT client-mode.armansito@chromium.org2014-03-241-0/+342
Added fake implementations of GATT service, characteristic, and descriptor clients. A new "Low Energy" fake device is introduced, which uses the fake GATT clients to simulate the Heart Rate Service. BUG=351229 TEST=1. device_unittests, chromeos_unittests. 2. Build and run chrome for Linux with "chromeos=1". Run Bluetooth device discovery, connect to the device named "Bluetooth 4.0 Heart Rate Monitor". Watch the debug output (vmodule="*bluetooth_gatt*=2") for the GATT clients, which should create fake heart rate service and descriptors and update the measurement value at regular intervals. R=keybuk@chromium.org, stevenjb@chromium.org Review URL: https://codereview.chromium.org/206443009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259022 0039d316-1c4b-4281-b951-d872f2087c98