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