| Index: components/arc/bluetooth/bluetooth_struct_traits.h
|
| diff --git a/components/arc/bluetooth/bluetooth_struct_traits.h b/components/arc/bluetooth/bluetooth_struct_traits.h
|
| index 2178fc1365103a6822c674453ac619a97ee65449..8dc64afdcd014d02d0aa41230312597784fc0f6f 100644
|
| --- a/components/arc/bluetooth/bluetooth_struct_traits.h
|
| +++ b/components/arc/bluetooth/bluetooth_struct_traits.h
|
| @@ -5,8 +5,15 @@
|
| #ifndef COMPONENTS_ARC_BLUETOOTH_BLUETOOTH_STRUCT_TRAITS_H_
|
| #define COMPONENTS_ARC_BLUETOOTH_BLUETOOTH_STRUCT_TRAITS_H_
|
|
|
| +#include <map>
|
| +#include <utility>
|
| +#include <vector>
|
| +
|
| #include "components/arc/common/bluetooth.mojom.h"
|
| #include "device/bluetooth/bluetooth_common.h"
|
| +#include "device/bluetooth/bluez/bluetooth_service_attribute_value_bluez.h"
|
| +#include "device/bluetooth/bluez/bluetooth_service_record_bluez.h"
|
| +#include "ipc/ipc_message_utils.h"
|
|
|
| namespace mojo {
|
|
|
| @@ -49,6 +56,105 @@ struct EnumTraits<arc::mojom::BluetoothDeviceType,
|
| }
|
| };
|
|
|
| +template <>
|
| +struct EnumTraits<arc::mojom::BluetoothSdpAttributeType,
|
| + bluez::BluetoothServiceAttributeValueBlueZ::Type> {
|
| + static arc::mojom::BluetoothSdpAttributeType ToMojom(
|
| + bluez::BluetoothServiceAttributeValueBlueZ::Type input);
|
| + static bool FromMojom(
|
| + arc::mojom::BluetoothSdpAttributeType input,
|
| + bluez::BluetoothServiceAttributeValueBlueZ::Type* output);
|
| +};
|
| +
|
| +template <>
|
| +struct StructTraits<arc::mojom::BluetoothSdpAttributeLayer2DataView,
|
| + bluez::BluetoothServiceAttributeValueBlueZ> {
|
| + static void* SetUpContext(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value);
|
| + static void TearDownContext(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value,
|
| + void* context);
|
| +
|
| + static bluez::BluetoothServiceAttributeValueBlueZ::Type type(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value,
|
| + void* context);
|
| + static uint32_t type_size(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value,
|
| + void* context);
|
| + static const base::ListValue& value(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value,
|
| + void* context);
|
| +
|
| + static bool Read(arc::mojom::BluetoothSdpAttributeLayer2DataView data,
|
| + bluez::BluetoothServiceAttributeValueBlueZ* output);
|
| +};
|
| +
|
| +template <>
|
| +struct StructTraits<arc::mojom::BluetoothSdpAttributeLayer1DataView,
|
| + bluez::BluetoothServiceAttributeValueBlueZ> {
|
| + static void* SetUpContext(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value);
|
| + static void TearDownContext(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value,
|
| + void* context);
|
| +
|
| + static bluez::BluetoothServiceAttributeValueBlueZ::Type type(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value,
|
| + void* context);
|
| + static uint32_t type_size(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value,
|
| + void* context);
|
| + static const base::ListValue& value(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value,
|
| + void* context);
|
| + static const bluez::BluetoothServiceAttributeValueBlueZ::Sequence& sequence(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value,
|
| + void* context);
|
| +
|
| + static bool Read(arc::mojom::BluetoothSdpAttributeLayer1DataView data,
|
| + bluez::BluetoothServiceAttributeValueBlueZ* output);
|
| +};
|
| +
|
| +template <>
|
| +struct StructTraits<arc::mojom::BluetoothSdpAttributeDataView,
|
| + bluez::BluetoothServiceAttributeValueBlueZ> {
|
| + static void* SetUpContext(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value);
|
| + static void TearDownContext(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value,
|
| + void* context);
|
| +
|
| + static bluez::BluetoothServiceAttributeValueBlueZ::Type type(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value,
|
| + void* context);
|
| + static uint32_t type_size(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value,
|
| + void* context);
|
| + static const base::ListValue& value(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value,
|
| + void* context);
|
| + static const bluez::BluetoothServiceAttributeValueBlueZ::Sequence& sequence(
|
| + const bluez::BluetoothServiceAttributeValueBlueZ& value,
|
| + void* context);
|
| +
|
| + static bool Read(arc::mojom::BluetoothSdpAttributeDataView data,
|
| + bluez::BluetoothServiceAttributeValueBlueZ* output);
|
| +};
|
| +
|
| +template <>
|
| +struct StructTraits<arc::mojom::BluetoothSdpRecordDataView,
|
| + bluez::BluetoothServiceRecordBlueZ> {
|
| + static void* SetUpContext(const bluez::BluetoothServiceRecordBlueZ& value);
|
| + static void TearDownContext(const bluez::BluetoothServiceRecordBlueZ& value,
|
| + void* context);
|
| +
|
| + static const std::map<uint16_t, bluez::BluetoothServiceAttributeValueBlueZ>&
|
| + attrs(const bluez::BluetoothServiceRecordBlueZ& value, void* context);
|
| +
|
| + static bool Read(arc::mojom::BluetoothSdpRecordDataView data,
|
| + bluez::BluetoothServiceRecordBlueZ* output);
|
| +};
|
| +
|
| } // namespace mojo
|
|
|
| #endif // COMPONENTS_ARC_BLUETOOTH_BLUETOOTH_STRUCT_TRAITS_H_
|
|
|