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

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

Issue 778443002: bluetooth: Make device/bluetooth a shared library component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Set DelayLoadDLL settings on shared library as well Created 6 years 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
« no previous file with comments | « device/bluetooth/bluetooth_gatt_descriptor.h ('k') | device/bluetooth/bluetooth_gatt_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_NOTIFY_SESSION_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_GATT_NOTIFY_SESSION_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_GATT_NOTIFY_SESSION_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_GATT_NOTIFY_SESSION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "device/bluetooth/bluetooth_export.h"
11 12
12 namespace device { 13 namespace device {
13 14
14 // A BluetoothGattNotifySession represents an active session for listening 15 // A BluetoothGattNotifySession represents an active session for listening
15 // to value updates from GATT characteristics that support notifications and/or 16 // to value updates from GATT characteristics that support notifications and/or
16 // indications. Instances are obtained by calling 17 // indications. Instances are obtained by calling
17 // BluetoothGattCharacteristic::StartNotifySession. 18 // BluetoothGattCharacteristic::StartNotifySession.
18 class BluetoothGattNotifySession { 19 class DEVICE_BLUETOOTH_EXPORT BluetoothGattNotifySession {
19 public: 20 public:
20 // Destructor automatically stops this session. 21 // Destructor automatically stops this session.
21 virtual ~BluetoothGattNotifySession(); 22 virtual ~BluetoothGattNotifySession();
22 23
23 // Returns the identifier of the associated characteristic. 24 // Returns the identifier of the associated characteristic.
24 virtual std::string GetCharacteristicIdentifier() const = 0; 25 virtual std::string GetCharacteristicIdentifier() const = 0;
25 26
26 // Returns true if this session is active. 27 // Returns true if this session is active.
27 virtual bool IsActive() = 0; 28 virtual bool IsActive() = 0;
28 29
29 // Stops this session and calls |callback| upon completion. This won't 30 // Stops this session and calls |callback| upon completion. This won't
30 // necessarily stop value updates from the characteristic -- since updates 31 // necessarily stop value updates from the characteristic -- since updates
31 // are shared among BluetoothGattNotifySession instances -- but it will 32 // are shared among BluetoothGattNotifySession instances -- but it will
32 // terminate this session. 33 // terminate this session.
33 virtual void Stop(const base::Closure& callback) = 0; 34 virtual void Stop(const base::Closure& callback) = 0;
34 35
35 protected: 36 protected:
36 BluetoothGattNotifySession(); 37 BluetoothGattNotifySession();
37 38
38 private: 39 private:
39 DISALLOW_COPY_AND_ASSIGN(BluetoothGattNotifySession); 40 DISALLOW_COPY_AND_ASSIGN(BluetoothGattNotifySession);
40 }; 41 };
41 42
42 } // namespace device 43 } // namespace device
43 44
44 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_NOTIFY_SESSION_H_ 45 #endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_NOTIFY_SESSION_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_gatt_descriptor.h ('k') | device/bluetooth/bluetooth_gatt_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698