chromium/services/service_manager/public/mojom/BUILD.gn

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

import("//mojo/public/tools/bindings/mojom.gni")

mojom_component("mojom") {
  generate_java = true
  output_prefix = "service_manager_mojom"
  macro_prefix = "SERVICE_MANAGER_MOJOM"

  sources = [
    "connector.mojom",
    "interface_provider.mojom",
    "interface_provider_spec.mojom",
    "service.mojom",
    "service_control.mojom",
    "service_filter.mojom",
    "service_manager.mojom",
  ]

  public_deps = [
    ":constants",
    "//mojo/public/mojom/base",
  ]

  cpp_typemaps = [
    {
      types = [
        {
          mojom = "service_manager.mojom.BindSourceInfo"
          cpp = "::service_manager::BindSourceInfo"
        },
      ]
      traits_headers = [
        "//services/service_manager/public/cpp/bind_source_info_mojom_traits.h",
      ]
      traits_public_deps = [
        "//services/service_manager/public/cpp:cpp_types",
        "//services/service_manager/public/cpp:mojom_traits",
      ]
    },
    {
      types = [
        {
          mojom = "service_manager.mojom.Identity"
          cpp = "::service_manager::Identity"
        },
      ]
      traits_headers =
          [ "//services/service_manager/public/cpp/identity_mojom_traits.h" ]
      traits_public_deps = [
        "//services/service_manager/public/cpp:cpp_types",
        "//services/service_manager/public/cpp:mojom_traits",
      ]
    },
    {
      types = [
        {
          mojom = "service_manager.mojom.InterfaceProviderSpec"
          cpp = "::service_manager::InterfaceProviderSpec"
        },
        {
          mojom = "service_manager.mojom.InterfaceSet"
          cpp = "::service_manager::InterfaceSet"
        },
        {
          mojom = "service_manager.mojom.CapabilitySet"
          cpp = "::service_manager::CapabilitySet"
        },
      ]
      traits_headers = [ "//services/service_manager/public/cpp/interface_provider_spec_mojom_traits.h" ]
      traits_public_deps = [ "//services/service_manager/public/cpp:cpp_types" ]
    },
    {
      types = [
        {
          mojom = "service_manager.mojom.ServiceFilter"
          cpp = "::service_manager::ServiceFilter"
        },
      ]

      traits_headers = [
        "//services/service_manager/public/cpp/service_filter_mojom_traits.h",
      ]
      traits_public_deps = [
        "//services/service_manager/public/cpp:cpp_types",
        "//services/service_manager/public/cpp:mojom_traits",
      ]
    },
  ]
}

mojom_component("constants") {
  generate_java = true
  output_prefix = "service_manager_mojom_constants"
  macro_prefix = "SERVICE_MANAGER_MOJOM_CONSTANTS"
  sources = [ "constants.mojom" ]
}