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 CHROMEOS_DBUS_BLUETOOTH_OUT_OF_BAND_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_BLUETOOTH_OUT_OF_BAND_CLIENT_H_ |
6 #define CHROMEOS_DBUS_BLUETOOTH_OUT_OF_BAND_CLIENT_H_ | 6 #define CHROMEOS_DBUS_BLUETOOTH_OUT_OF_BAND_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "chromeos/chromeos_export.h" | 11 #include "chromeos/chromeos_export.h" |
12 #include "chromeos/dbus/dbus_client_implementation_type.h" | 12 #include "chromeos/dbus/dbus_client_implementation_type.h" |
13 #include "dbus/object_path.h" | 13 #include "dbus/object_path.h" |
14 | 14 |
15 namespace dbus { | 15 namespace dbus { |
16 class Bus; | 16 class Bus; |
17 } // namespace dbus | 17 } // namespace dbus |
18 | 18 |
19 namespace chromeos { | 19 namespace chromeos { |
20 | 20 |
21 const size_t kBluetoothOutOfBandPairingDataSize = 16; | 21 struct BluetoothOutOfBandPairingData; |
22 | |
23 // A simple structure representing the data required to perform Out Of Band | |
24 // Pairing. See | |
25 // http://mclean-linsky.net/joel/cv/Simple%20Pairing_WP_V10r00.pdf | |
26 struct BluetoothOutOfBandPairingData { | |
27 // Simple Pairing Hash C. | |
28 uint8_t hash[kBluetoothOutOfBandPairingDataSize]; | |
29 | |
30 // Simple Pairing Randomizer R. | |
31 uint8_t randomizer[kBluetoothOutOfBandPairingDataSize]; | |
32 }; | |
33 | 22 |
34 // BluetoothOutOfBandClient is used to manage Out Of Band Pairing | 23 // BluetoothOutOfBandClient is used to manage Out Of Band Pairing |
35 // Data for the local adapter and remote devices. | 24 // Data for the local adapter and remote devices. |
36 class CHROMEOS_EXPORT BluetoothOutOfBandClient { | 25 class CHROMEOS_EXPORT BluetoothOutOfBandClient { |
37 public: | 26 public: |
38 virtual ~BluetoothOutOfBandClient(); | 27 virtual ~BluetoothOutOfBandClient(); |
39 | 28 |
40 typedef base::Callback<void(const BluetoothOutOfBandPairingData& data, | 29 typedef base::Callback<void(const BluetoothOutOfBandPairingData& data, |
41 bool success)> DataCallback; | 30 bool success)> DataCallback; |
42 | 31 |
(...skipping 27 matching lines...) Expand all Loading... |
70 protected: | 59 protected: |
71 BluetoothOutOfBandClient(); | 60 BluetoothOutOfBandClient(); |
72 | 61 |
73 private: | 62 private: |
74 DISALLOW_COPY_AND_ASSIGN(BluetoothOutOfBandClient); | 63 DISALLOW_COPY_AND_ASSIGN(BluetoothOutOfBandClient); |
75 }; | 64 }; |
76 | 65 |
77 } // namespace chromeos | 66 } // namespace chromeos |
78 | 67 |
79 #endif // CHROMEOS_DBUS_BLUETOOTH_OUT_OF_BAND_CLIENT_H_ | 68 #endif // CHROMEOS_DBUS_BLUETOOTH_OUT_OF_BAND_CLIENT_H_ |
OLD | NEW |