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

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

Issue 12310048: Bluetooth: Add a "connectable" property to the BluetoothDevice. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: niiiiiiiiiiits Created 7 years, 10 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_SERVICE_RECORD_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 11 matching lines...) Expand all
22 // The human-readable name of this service. 22 // The human-readable name of this service.
23 const std::string& name() const { return name_; } 23 const std::string& name() const { return name_; }
24 24
25 // The address of the BluetoothDevice providing this service. 25 // The address of the BluetoothDevice providing this service.
26 const std::string& address() const { return address_; } 26 const std::string& address() const { return address_; }
27 27
28 // The UUID of the service. This field may be empty if no UUID was 28 // The UUID of the service. This field may be empty if no UUID was
29 // specified in the service record. 29 // specified in the service record.
30 const std::string& uuid() const { return uuid_; } 30 const std::string& uuid() const { return uuid_; }
31 31
32 // Indicates if this service supports HID.
33 bool SupportsHid() const { return supports_hid_; }
34
35 // For HID services, returns the HIDReconnectInitiate attribute. For non-HID
36 // or unknown services defaults to true.
37 bool hid_reconnect_initiate() const { return hid_reconnect_initiate_; }
38
39 // For HID services, returns the HIDNormallyConnectable attribute. For non-HID
40 // or unknown services defaults to true.
41 bool hid_normally_connectable() const { return hid_normally_connectable_; }
42
32 // Indicates if this service supports RFCOMM communication. 43 // Indicates if this service supports RFCOMM communication.
33 bool SupportsRfcomm() const { return supports_rfcomm_; } 44 bool SupportsRfcomm() const { return supports_rfcomm_; }
34 45
35 // The RFCOMM channel to use, if this service supports RFCOMM communication. 46 // The RFCOMM channel to use, if this service supports RFCOMM communication.
36 // The return value is undefined if SupportsRfcomm() returns false. 47 // The return value is undefined if SupportsRfcomm() returns false.
37 uint8 rfcomm_channel() const { return rfcomm_channel_; } 48 uint8 rfcomm_channel() const { return rfcomm_channel_; }
38 49
39 protected: 50 protected:
40 BluetoothServiceRecord(); 51 BluetoothServiceRecord();
41 52
42 std::string address_; 53 std::string address_;
43 std::string name_; 54 std::string name_;
44 std::string uuid_; 55 std::string uuid_;
45 56
57 bool supports_hid_;
58 bool hid_reconnect_initiate_;
59 bool hid_normally_connectable_;
60
46 bool supports_rfcomm_; 61 bool supports_rfcomm_;
47 uint8 rfcomm_channel_; 62 uint8 rfcomm_channel_;
48 63
49 private: 64 private:
50 DISALLOW_COPY_AND_ASSIGN(BluetoothServiceRecord); 65 DISALLOW_COPY_AND_ASSIGN(BluetoothServiceRecord);
51 }; 66 };
52 67
53 } // namespace device 68 } // namespace device
54 69
55 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_H_ 70 #endif // DEVICE_BLUETOOTH_BLUETOOTH_SERVICE_RECORD_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device_chromeos.cc ('k') | device/bluetooth/bluetooth_service_record_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698