chromium/media/learning/mojo/public/cpp/learning_mojom_traits.h

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

#ifndef MEDIA_LEARNING_MOJO_PUBLIC_CPP_LEARNING_MOJOM_TRAITS_H_
#define MEDIA_LEARNING_MOJO_PUBLIC_CPP_LEARNING_MOJOM_TRAITS_H_

#include <vector>

#include "base/component_export.h"
#include "media/learning/common/learning_task_controller.h"
#include "media/learning/common/value.h"
#include "media/learning/mojo/public/mojom/learning_types.mojom-shared.h"
#include "mojo/public/cpp/bindings/struct_traits.h"

namespace mojo {

template <>
struct COMPONENT_EXPORT(MEDIA_LEARNING_SHARED_TYPEMAP_TRAITS)
    StructTraits<media::learning::mojom::LabelledExampleDataView,
                 media::learning::LabelledExample> {};

template <>
struct COMPONENT_EXPORT(MEDIA_LEARNING_SHARED_TYPEMAP_TRAITS)
    StructTraits<media::learning::mojom::FeatureValueDataView,
                 media::learning::FeatureValue> {};

template <>
struct COMPONENT_EXPORT(MEDIA_LEARNING_SHARED_TYPEMAP_TRAITS)
    StructTraits<media::learning::mojom::TargetValueDataView,
                 media::learning::TargetValue> {};

template <>
struct COMPONENT_EXPORT(MEDIA_LEARNING_SHARED_TYPEMAP_TRAITS)
    StructTraits<media::learning::mojom::ObservationCompletionDataView,
                 media::learning::ObservationCompletion> {};

template <>
struct COMPONENT_EXPORT(MEDIA_LEARNING_SHARED_TYPEMAP_TRAITS)
    StructTraits<media::learning::mojom::TargetHistogramPairDataView,
                 media::learning::TargetHistogramPair> {};

template <>
struct COMPONENT_EXPORT(MEDIA_LEARNING_SHARED_TYPEMAP_TRAITS)
    StructTraits<media::learning::mojom::TargetHistogramDataView,
                 media::learning::TargetHistogram> {};

}  // namespace mojo

#endif  // MEDIA_LEARNING_MOJO_PUBLIC_CPP_LEARNING_MOJOM_TRAITS_H_