| 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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 // Calls any pending callbacks for CreateGattConnection based on result of | 610 // Calls any pending callbacks for CreateGattConnection based on result of |
| 611 // subclasses actions initiated in CreateGattConnectionImpl or related | 611 // subclasses actions initiated in CreateGattConnectionImpl or related |
| 612 // disconnection events. These may be called at any time, even multiple times, | 612 // disconnection events. These may be called at any time, even multiple times, |
| 613 // to ensure a change in platform state is correctly tracked. | 613 // to ensure a change in platform state is correctly tracked. |
| 614 // | 614 // |
| 615 // Under normal behavior it is expected that after CreateGattConnectionImpl | 615 // Under normal behavior it is expected that after CreateGattConnectionImpl |
| 616 // an platform will call DidConnectGatt or DidFailToConnectGatt, but not | 616 // an platform will call DidConnectGatt or DidFailToConnectGatt, but not |
| 617 // DidDisconnectGatt. | 617 // DidDisconnectGatt. |
| 618 void DidConnectGatt(); | 618 void DidConnectGatt(); |
| 619 void DidFailToConnectGatt(ConnectErrorCode); | 619 void DidFailToConnectGatt(ConnectErrorCode); |
| 620 void DidDisconnectGatt(bool notifyDeviceChanged); | 620 void DidDisconnectGatt(); |
| 621 | 621 |
| 622 // Tracks BluetoothGattConnection instances that act as a reference count | 622 // Tracks BluetoothGattConnection instances that act as a reference count |
| 623 // keeping the GATT connection open. Instances call Add/RemoveGattConnection | 623 // keeping the GATT connection open. Instances call Add/RemoveGattConnection |
| 624 // at creation & deletion. | 624 // at creation & deletion. |
| 625 void AddGattConnection(BluetoothGattConnection*); | 625 void AddGattConnection(BluetoothGattConnection*); |
| 626 void RemoveGattConnection(BluetoothGattConnection*); | 626 void RemoveGattConnection(BluetoothGattConnection*); |
| 627 | 627 |
| 628 // Update last_update_time_ so that the device appears as expired. | 628 // Update last_update_time_ so that the device appears as expired. |
| 629 void SetAsExpiredForTesting(); | 629 void SetAsExpiredForTesting(); |
| 630 | 630 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 // Returns a localized string containing the device's bluetooth address and | 667 // Returns a localized string containing the device's bluetooth address and |
| 668 // a device type for display when |name_| is empty. | 668 // a device type for display when |name_| is empty. |
| 669 base::string16 GetAddressWithLocalizedDeviceTypeName() const; | 669 base::string16 GetAddressWithLocalizedDeviceTypeName() const; |
| 670 | 670 |
| 671 DISALLOW_COPY_AND_ASSIGN(BluetoothDevice); | 671 DISALLOW_COPY_AND_ASSIGN(BluetoothDevice); |
| 672 }; | 672 }; |
| 673 | 673 |
| 674 } // namespace device | 674 } // namespace device |
| 675 | 675 |
| 676 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ | 676 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
| OLD | NEW |