OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DEVICE_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 // Calls any pending callbacks for CreateGattConnection based on result of | 619 // Calls any pending callbacks for CreateGattConnection based on result of |
620 // subclasses actions initiated in CreateGattConnectionImpl or related | 620 // subclasses actions initiated in CreateGattConnectionImpl or related |
621 // disconnection events. These may be called at any time, even multiple times, | 621 // disconnection events. These may be called at any time, even multiple times, |
622 // to ensure a change in platform state is correctly tracked. | 622 // to ensure a change in platform state is correctly tracked. |
623 // | 623 // |
624 // Under normal behavior it is expected that after CreateGattConnectionImpl | 624 // Under normal behavior it is expected that after CreateGattConnectionImpl |
625 // an platform will call DidConnectGatt or DidFailToConnectGatt, but not | 625 // an platform will call DidConnectGatt or DidFailToConnectGatt, but not |
626 // DidDisconnectGatt. | 626 // DidDisconnectGatt. |
627 void DidConnectGatt(); | 627 void DidConnectGatt(); |
628 void DidFailToConnectGatt(ConnectErrorCode); | 628 void DidFailToConnectGatt(ConnectErrorCode); |
629 void DidDisconnectGatt(); | 629 void DidDisconnectGatt(bool notifyDeviceChanged); |
630 | 630 |
631 // Tracks BluetoothGattConnection instances that act as a reference count | 631 // Tracks BluetoothGattConnection instances that act as a reference count |
632 // keeping the GATT connection open. Instances call Add/RemoveGattConnection | 632 // keeping the GATT connection open. Instances call Add/RemoveGattConnection |
633 // at creation & deletion. | 633 // at creation & deletion. |
634 void AddGattConnection(BluetoothGattConnection*); | 634 void AddGattConnection(BluetoothGattConnection*); |
635 void RemoveGattConnection(BluetoothGattConnection*); | 635 void RemoveGattConnection(BluetoothGattConnection*); |
636 | 636 |
637 // Update last_update_time_ so that the device appears as expired. | 637 // Update last_update_time_ so that the device appears as expired. |
638 void SetAsExpiredForTesting(); | 638 void SetAsExpiredForTesting(); |
639 | 639 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 // Returns a localized string containing the device's bluetooth address and | 676 // Returns a localized string containing the device's bluetooth address and |
677 // a device type for display when |name_| is empty. | 677 // a device type for display when |name_| is empty. |
678 base::string16 GetAddressWithLocalizedDeviceTypeName() const; | 678 base::string16 GetAddressWithLocalizedDeviceTypeName() const; |
679 | 679 |
680 DISALLOW_COPY_AND_ASSIGN(BluetoothDevice); | 680 DISALLOW_COPY_AND_ASSIGN(BluetoothDevice); |
681 }; | 681 }; |
682 | 682 |
683 } // namespace device | 683 } // namespace device |
684 | 684 |
685 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ | 685 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
OLD | NEW |