chromium/device/bluetooth/public/mojom/gatt_result_type_converter.h

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef DEVICE_BLUETOOTH_PUBLIC_MOJOM_GATT_RESULT_TYPE_CONVERTER_H_
#define DEVICE_BLUETOOTH_PUBLIC_MOJOM_GATT_RESULT_TYPE_CONVERTER_H_

#include "base/notreached.h"
#include "device/bluetooth/bluetooth_gatt_service.h"
#include "device/bluetooth/public/mojom/device.mojom.h"
#include "mojo/public/cpp/bindings/type_converter.h"

namespace mojo {

// TypeConverter to translate from
// device::BluetoothGattService::GattErrorCode to bluetooth.mojom.GattResult.
// TODO(crbug.com/40494280): Replace because TypeConverter is deprecated.
// This TypeConverter is needed to work around the fact that the Mojo enum,
// GattResult, has more values than the C++ enum, GattErrorCode.
template <>
struct TypeConverter<bluetooth::mojom::GattResult,
                     device::BluetoothGattService::GattErrorCode> {};
}  // namespace mojo

#endif  // DEVICE_BLUETOOTH_PUBLIC_MOJOM_GATT_RESULT_TYPE_CONVERTER_H_