| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_UUID_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_UUID_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_UUID_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_UUID_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "device/bluetooth/bluetooth_export.h" | 10 #include "device/bluetooth/bluetooth_export.h" |
| 11 #include "ipc/ipc_param_traits.h" | 11 #include "ipc/ipc_param_traits.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class Pickle; |
| 14 class PickleIterator; | 15 class PickleIterator; |
| 15 } // namespace base | 16 } // namespace base |
| 16 | 17 |
| 17 namespace device { | 18 namespace device { |
| 18 | 19 |
| 19 // Opaque wrapper around a Bluetooth UUID. Instances of UUID represent the | 20 // Opaque wrapper around a Bluetooth UUID. Instances of UUID represent the |
| 20 // 128-bit universally unique identifiers (UUIDs) of profiles and attributes | 21 // 128-bit universally unique identifiers (UUIDs) of profiles and attributes |
| 21 // used in Bluetooth based communication, such as a peripheral's services, | 22 // used in Bluetooth based communication, such as a peripheral's services, |
| 22 // characteristics, and characteristic descriptors. An instance are | 23 // characteristics, and characteristic descriptors. An instance are |
| 23 // constructed using a string representing 16, 32, or 128 bit UUID formats. | 24 // constructed using a string representing 16, 32, or 128 bit UUID formats. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } // namespace device | 104 } // namespace device |
| 104 | 105 |
| 105 namespace IPC { | 106 namespace IPC { |
| 106 | 107 |
| 107 class Message; | 108 class Message; |
| 108 | 109 |
| 109 // Tell the IPC system how to serialize and deserialize a BluetoothUUID. | 110 // Tell the IPC system how to serialize and deserialize a BluetoothUUID. |
| 110 template <> | 111 template <> |
| 111 struct DEVICE_BLUETOOTH_EXPORT ParamTraits<device::BluetoothUUID> { | 112 struct DEVICE_BLUETOOTH_EXPORT ParamTraits<device::BluetoothUUID> { |
| 112 typedef device::BluetoothUUID param_type; | 113 typedef device::BluetoothUUID param_type; |
| 113 static void Write(Message* m, const param_type& p); | 114 static void Write(base::Pickle* m, const param_type& p); |
| 114 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); | 115 static bool Read(const base::Pickle* m, |
| 116 base::PickleIterator* iter, |
| 117 param_type* r); |
| 115 static void Log(const param_type& p, std::string* l); | 118 static void Log(const param_type& p, std::string* l); |
| 116 }; | 119 }; |
| 117 | 120 |
| 118 } // namespace IPC | 121 } // namespace IPC |
| 119 | 122 |
| 120 #endif // DEVICE_BLUETOOTH_BLUETOOTH_UUID_H_ | 123 #endif // DEVICE_BLUETOOTH_BLUETOOTH_UUID_H_ |
| OLD | NEW |