| 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 virtual void DisconnectGatt() = 0; | 502 virtual void DisconnectGatt() = 0; |
| 503 | 503 |
| 504 // Calls any pending callbacks for CreateGattConnection based on result of | 504 // Calls any pending callbacks for CreateGattConnection based on result of |
| 505 // subclasses actions initiated in CreateGattConnectionImpl or related | 505 // subclasses actions initiated in CreateGattConnectionImpl or related |
| 506 // disconnection events. These may be called at any time, even multiple times, | 506 // disconnection events. These may be called at any time, even multiple times, |
| 507 // to ensure a change in platform state is correctly tracked. | 507 // to ensure a change in platform state is correctly tracked. |
| 508 // | 508 // |
| 509 // Under normal behavior it is expected that after CreateGattConnectionImpl | 509 // Under normal behavior it is expected that after CreateGattConnectionImpl |
| 510 // an platform will call DidConnectGatt or DidFailToConnectGatt, but not | 510 // an platform will call DidConnectGatt or DidFailToConnectGatt, but not |
| 511 // DidDisconnectGatt. | 511 // DidDisconnectGatt. |
| 512 void DidConnectGatt(); | 512 virtual void DidConnectGatt(); |
| 513 void DidFailToConnectGatt(ConnectErrorCode); | 513 void DidFailToConnectGatt(ConnectErrorCode); |
| 514 void DidDisconnectGatt(); | 514 void DidDisconnectGatt(); |
| 515 | 515 |
| 516 // Tracks BluetoothGattConnection instances that act as a reference count | 516 // Tracks BluetoothGattConnection instances that act as a reference count |
| 517 // keeping the GATT connection open. Instances call Add/RemoveGattConnection | 517 // keeping the GATT connection open. Instances call Add/RemoveGattConnection |
| 518 // at creation & deletion. | 518 // at creation & deletion. |
| 519 void AddGattConnection(BluetoothGattConnection*); | 519 void AddGattConnection(BluetoothGattConnection*); |
| 520 void RemoveGattConnection(BluetoothGattConnection*); | 520 void RemoveGattConnection(BluetoothGattConnection*); |
| 521 | 521 |
| 522 // Clears the list of service data. | 522 // Clears the list of service data. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 552 | 552 |
| 553 private: | 553 private: |
| 554 // Returns a localized string containing the device's bluetooth address and | 554 // Returns a localized string containing the device's bluetooth address and |
| 555 // a device type for display when |name_| is empty. | 555 // a device type for display when |name_| is empty. |
| 556 base::string16 GetAddressWithLocalizedDeviceTypeName() const; | 556 base::string16 GetAddressWithLocalizedDeviceTypeName() const; |
| 557 }; | 557 }; |
| 558 | 558 |
| 559 } // namespace device | 559 } // namespace device |
| 560 | 560 |
| 561 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ | 561 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ |
| OLD | NEW |