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

Side by Side Diff: device/bluetooth/bluetooth_gatt_connection.h

Issue 1287753002: bluetooth: Remove callback from BluetoothGattConnection::Disconnect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge TOT Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_GATT_CONNECTION_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_GATT_CONNECTION_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_GATT_CONNECTION_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_GATT_CONNECTION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 16 matching lines...) Expand all
27 // a possible error via the callback. 27 // a possible error via the callback.
28 virtual ~BluetoothGattConnection(); 28 virtual ~BluetoothGattConnection();
29 29
30 // Returns the Bluetooth address of the device that this connection is open 30 // Returns the Bluetooth address of the device that this connection is open
31 // to. 31 // to.
32 virtual std::string GetDeviceAddress() const = 0; 32 virtual std::string GetDeviceAddress() const = 0;
33 33
34 // Returns true if this connection is open. 34 // Returns true if this connection is open.
35 virtual bool IsConnected() = 0; 35 virtual bool IsConnected() = 0;
36 36
37 // Disconnects this GATT connection and calls |callback| upon completion. 37 // Disconnects this GATT connection. The device may still remain connected due
38 // After a successful invocation, the device may still remain connected due to 38 // to other GATT connections.
39 // other GATT connections. 39 virtual void Disconnect() = 0;
40 virtual void Disconnect(const base::Closure& callback) = 0;
41 40
42 protected: 41 protected:
43 BluetoothGattConnection(); 42 BluetoothGattConnection();
44 43
45 private: 44 private:
46 DISALLOW_COPY_AND_ASSIGN(BluetoothGattConnection); 45 DISALLOW_COPY_AND_ASSIGN(BluetoothGattConnection);
47 }; 46 };
48 47
49 } // namespace device 48 } // namespace device
50 49
51 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_CONNECTION_H_ 50 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_CONNECTION_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_gatt_chromeos_unittest.cc ('k') | device/bluetooth/bluetooth_gatt_connection_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698