Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(441)

Side by Side Diff: device/bluetooth/bluetooth_device.h

Issue 2466223002: Implement WebBluetooth getDescriptor[s] (Closed)
Patch Set: Implement WebBluetooth getDescriptor[s] Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 14 matching lines...) Expand all
25 #include "device/bluetooth/bluetooth_common.h" 25 #include "device/bluetooth/bluetooth_common.h"
26 #include "device/bluetooth/bluetooth_export.h" 26 #include "device/bluetooth/bluetooth_export.h"
27 #include "device/bluetooth/bluetooth_remote_gatt_service.h" 27 #include "device/bluetooth/bluetooth_remote_gatt_service.h"
28 #include "device/bluetooth/bluetooth_uuid.h" 28 #include "device/bluetooth/bluetooth_uuid.h"
29 29
30 namespace device { 30 namespace device {
31 31
32 class BluetoothAdapter; 32 class BluetoothAdapter;
33 class BluetoothGattConnection; 33 class BluetoothGattConnection;
34 class BluetoothRemoteGattCharacteristic; 34 class BluetoothRemoteGattCharacteristic;
35 class BluetoothRemoteGattDescriptor;
35 class BluetoothSocket; 36 class BluetoothSocket;
36 class BluetoothUUID; 37 class BluetoothUUID;
37 38
38 // BluetoothDevice represents a remote Bluetooth device, both its properties and 39 // BluetoothDevice represents a remote Bluetooth device, both its properties and
39 // capabilities as discovered by a local adapter and actions that may be 40 // capabilities as discovered by a local adapter and actions that may be
40 // performed on the remove device such as pairing, connection and disconnection. 41 // performed on the remove device such as pairing, connection and disconnection.
41 // 42 //
42 // The class is instantiated and managed by the BluetoothAdapter class 43 // The class is instantiated and managed by the BluetoothAdapter class
43 // and pointers should only be obtained from that class and not cached, 44 // and pointers should only be obtained from that class and not cached,
44 // instead use the GetAddress() method as a unique key for a device. 45 // instead use the GetAddress() method as a unique key for a device.
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 559
559 std::vector<BluetoothRemoteGattService*> GetPrimaryServices(); 560 std::vector<BluetoothRemoteGattService*> GetPrimaryServices();
560 561
561 std::vector<BluetoothRemoteGattService*> GetPrimaryServicesByUUID( 562 std::vector<BluetoothRemoteGattService*> GetPrimaryServicesByUUID(
562 const BluetoothUUID& service_uuid); 563 const BluetoothUUID& service_uuid);
563 564
564 std::vector<BluetoothRemoteGattCharacteristic*> GetCharacteristicsByUUID( 565 std::vector<BluetoothRemoteGattCharacteristic*> GetCharacteristicsByUUID(
565 const std::string& service_instance_id, 566 const std::string& service_instance_id,
566 const BluetoothUUID& characteristic_uuid); 567 const BluetoothUUID& characteristic_uuid);
567 568
569 std::vector<device::BluetoothRemoteGattDescriptor*> GetDescriptorsByUUID(
570 device::BluetoothRemoteGattCharacteristic* characteristic,
571 const BluetoothUUID& descriptor_uuid);
572
568 protected: 573 protected:
569 // BluetoothGattConnection is a friend to call Add/RemoveGattConnection. 574 // BluetoothGattConnection is a friend to call Add/RemoveGattConnection.
570 friend BluetoothGattConnection; 575 friend BluetoothGattConnection;
571 FRIEND_TEST_ALL_PREFIXES( 576 FRIEND_TEST_ALL_PREFIXES(
572 BluetoothTest, 577 BluetoothTest,
573 BluetoothGattConnection_DisconnectGatt_SimulateConnect); 578 BluetoothGattConnection_DisconnectGatt_SimulateConnect);
574 FRIEND_TEST_ALL_PREFIXES( 579 FRIEND_TEST_ALL_PREFIXES(
575 BluetoothTest, 580 BluetoothTest,
576 BluetoothGattConnection_DisconnectGatt_SimulateDisconnect); 581 BluetoothGattConnection_DisconnectGatt_SimulateDisconnect);
577 FRIEND_TEST_ALL_PREFIXES(BluetoothTest, 582 FRIEND_TEST_ALL_PREFIXES(BluetoothTest,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 // Returns a localized string containing the device's bluetooth address and 691 // Returns a localized string containing the device's bluetooth address and
687 // a device type for display when |name_| is empty. 692 // a device type for display when |name_| is empty.
688 base::string16 GetAddressWithLocalizedDeviceTypeName() const; 693 base::string16 GetAddressWithLocalizedDeviceTypeName() const;
689 694
690 DISALLOW_COPY_AND_ASSIGN(BluetoothDevice); 695 DISALLOW_COPY_AND_ASSIGN(BluetoothDevice);
691 }; 696 };
692 697
693 } // namespace device 698 } // namespace device
694 699
695 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ 700 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698