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

Side by Side Diff: components/arc/bluetooth/bluetooth_struct_traits.h

Issue 2389393005: Revert of components/arc: implement multi advertising (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plumb-incoming-connections
Patch Set: Created 4 years, 2 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 COMPONENTS_ARC_BLUETOOTH_BLUETOOTH_STRUCT_TRAITS_H_ 5 #ifndef COMPONENTS_ARC_BLUETOOTH_BLUETOOTH_STRUCT_TRAITS_H_
6 #define COMPONENTS_ARC_BLUETOOTH_BLUETOOTH_STRUCT_TRAITS_H_ 6 #define COMPONENTS_ARC_BLUETOOTH_BLUETOOTH_STRUCT_TRAITS_H_
7 7
8 #include "components/arc/common/bluetooth.mojom.h" 8 #include "components/arc/common/bluetooth.mojom.h"
9 #include "device/bluetooth/bluetooth_advertisement.h"
10 #include "device/bluetooth/bluetooth_common.h" 9 #include "device/bluetooth/bluetooth_common.h"
11 #include "device/bluetooth/bluetooth_uuid.h"
12 #include "device/bluetooth/bluez/bluetooth_service_attribute_value_bluez.h" 10 #include "device/bluetooth/bluez/bluetooth_service_attribute_value_bluez.h"
13 11
14 namespace mojo { 12 namespace mojo {
15 13
16 template <> 14 template <>
17 struct EnumTraits<arc::mojom::BluetoothDeviceType, 15 struct EnumTraits<arc::mojom::BluetoothDeviceType,
18 device::BluetoothTransport> { 16 device::BluetoothTransport> {
19 static arc::mojom::BluetoothDeviceType ToMojom( 17 static arc::mojom::BluetoothDeviceType ToMojom(
20 device::BluetoothTransport type) { 18 device::BluetoothTransport type) {
21 switch (type) { 19 switch (type) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 93 }
96 }; 94 };
97 95
98 template <> 96 template <>
99 struct StructTraits<arc::mojom::BluetoothUUIDDataView, device::BluetoothUUID> { 97 struct StructTraits<arc::mojom::BluetoothUUIDDataView, device::BluetoothUUID> {
100 static std::vector<uint8_t> uuid(const device::BluetoothUUID& input); 98 static std::vector<uint8_t> uuid(const device::BluetoothUUID& input);
101 static bool Read(arc::mojom::BluetoothUUIDDataView data, 99 static bool Read(arc::mojom::BluetoothUUIDDataView data,
102 device::BluetoothUUID* output); 100 device::BluetoothUUID* output);
103 }; 101 };
104 102
105 template <>
106 struct StructTraits<arc::mojom::BluetoothAdvertisementDataView,
107 std::unique_ptr<device::BluetoothAdvertisement::Data>> {
108 static bool Read(
109 arc::mojom::BluetoothAdvertisementDataView advertisement,
110 std::unique_ptr<device::BluetoothAdvertisement::Data>* output);
111
112 // Dummy methods.
113 static arc::mojom::BluetoothAdvertisementType type(
114 std::unique_ptr<device::BluetoothAdvertisement::Data>& input) {
115 NOTREACHED();
116 return arc::mojom::BluetoothAdvertisementType::ADV_TYPE_NON_CONNECTABLE;
117 }
118
119 static bool include_tx_power(
120 std::unique_ptr<device::BluetoothAdvertisement::Data>& input) {
121 NOTREACHED();
122 return false;
123 }
124
125 static mojo::Array<arc::mojom::BluetoothAdvertisingDataPtr> data(
126 std::unique_ptr<device::BluetoothAdvertisement::Data>& input) {
127 NOTREACHED();
128 return mojo::Array<arc::mojom::BluetoothAdvertisingDataPtr>();
129 }
130 };
131
132 } // namespace mojo 103 } // namespace mojo
133 104
134 #endif // COMPONENTS_ARC_BLUETOOTH_BLUETOOTH_STRUCT_TRAITS_H_ 105 #endif // COMPONENTS_ARC_BLUETOOTH_BLUETOOTH_STRUCT_TRAITS_H_
OLDNEW
« no previous file with comments | « components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc ('k') | components/arc/bluetooth/bluetooth_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698