Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Unified Diff: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h

Issue 263333003: chrome.bluetoothLowEnergy: Implement writeCharacteristicValue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h
diff --git a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h
index 6579b4b387eacc0152e1b42e31aa61e17d1c22b5..fea7f5bc014a74952270643664e1f902a5dfb318 100644
--- a/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h
+++ b/chrome/browser/extensions/api/bluetooth_low_energy/bluetooth_low_energy_event_router.h
@@ -103,6 +103,15 @@ class BluetoothLowEnergyEventRouter
const std::string& instance_id,
api::bluetooth_low_energy::Characteristic* out_characteristic) const;
+ // Sends a request to write the value of the characteristic with instance ID
+ // |instance_id|, with value |value|. Returns false, if no such characteristic
+ // is known. Otherwise, returns true and invokes |callback| on success and
+ // |error_callback| on failure.
+ bool WriteCharacteristicValue(const std::string& instance_id,
+ const std::vector<uint8>& value,
+ const base::Closure& callback,
+ const base::Closure& error_callback);
+
// Initializes the adapter for testing. Used by unit tests only.
void SetAdapterForTesting(device::BluetoothAdapter* adapter);

Powered by Google App Engine
This is Rietveld 408576698