blob: 8413f87c1327a1c9188fe62716674fe4f5dc5b7b [file] [log] [blame]
guidouff9858142016-08-17 16:39:591// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef DEVICE_BLUETOOTH_BLUETOOTH_GATT_NOTIFY_SESSION_ANDROID_H_
6#define DEVICE_BLUETOOTH_BLUETOOTH_GATT_NOTIFY_SESSION_ANDROID_H_
7
8#include <string>
9
10#include "base/callback.h"
11#include "base/macros.h"
12#include "device/bluetooth/bluetooth_gatt_notify_session.h"
13
14namespace device {
15
16class BluetoothAdapter;
17class BluetoothRemoteGattCharacteristicAndroid;
18
19// BluetoothGattNotifySessionAndroid implements
20// BluetoothGattNotifySession for the Android platform.
21//
22// TODO(crbug.com/551634): Detect destroyed Characteristic or parents objects.
23// TODO(crbug.com/551634): Implement Stop.
24class DEVICE_BLUETOOTH_EXPORT BluetoothGattNotifySessionAndroid
25 : public device::BluetoothGattNotifySession {
26 public:
27 explicit BluetoothGattNotifySessionAndroid(
28 const std::string& characteristic_identifier);
29 ~BluetoothGattNotifySessionAndroid() override;
30
31 // BluetoothGattNotifySession overrides.
32 std::string GetCharacteristicIdentifier() const override;
33 bool IsActive() override;
34 void Stop(const base::Closure& callback) override;
35
36 private:
37 // Identifier of the associated characteristic.
38 std::string characteristic_id_;
39
40 DISALLOW_COPY_AND_ASSIGN(BluetoothGattNotifySessionAndroid);
41};
42
43} // namespace device
44
45#endif // DEVICE_BLUETOOTH_BLUETOOTH_GATT_NOTIFY_SESSION_ANDROID_H_