blob: aae7eb533c7c7797a6e6268f93c804a8a69449cc [file] [log] [blame]
// chromeos/services/machine_learning/public/mojom/graph_executor.mojom.h is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROMEOS_SERVICES_MACHINE_LEARNING_PUBLIC_MOJOM_GRAPH_EXECUTOR_MOJOM_H_
#define CHROMEOS_SERVICES_MACHINE_LEARNING_PUBLIC_MOJOM_GRAPH_EXECUTOR_MOJOM_H_
#include <stdint.h>
#include <limits>
#include <type_traits>
#include <utility>
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "mojo/public/cpp/bindings/clone_traits.h"
#include "mojo/public/cpp/bindings/equals_traits.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"
#include "mojo/public/cpp/bindings/struct_ptr.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "mojo/public/cpp/bindings/union_traits.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h"
#include "chromeos/services/machine_learning/public/mojom/graph_executor.mojom-shared.h"
#include "chromeos/services/machine_learning/public/mojom/graph_executor.mojom-forward.h"
#include "chromeos/services/machine_learning/public/mojom/tensor.mojom-forward.h"
#include <string>
#include <vector>
#include "mojo/public/cpp/bindings/lib/control_message_handler.h"
#include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h"
#include "base/component_export.h"
#ifdef KYTHE_IS_RUNNING
#pragma kythe_inline_metadata "Metadata comment"
#endif
namespace chromeos {
namespace machine_learning {
namespace mojom {
class GraphExecutorProxy;
template <typename ImplRefTraits>
class GraphExecutorStub;
class GraphExecutorRequestValidator;
class GraphExecutorResponseValidator;
// @generated_from: chromeos.machine_learning.mojom.GraphExecutor
class COMPONENT_EXPORT(MLSERVICE_MOJOM) GraphExecutor
: public GraphExecutorInterfaceBase {
public:
static const char Name_[];
static std::pair<uint32_t, const void*> MessageToMethodInfo_(mojo::Message& message);
static const char* MessageToMethodName_(mojo::Message& message);
static constexpr uint32_t Version_ = 0;
static constexpr bool PassesAssociatedKinds_ = false;
static constexpr bool HasSyncMethods_ = false;
static constexpr bool HasUninterruptableMethods_ = false;
using Base_ = GraphExecutorInterfaceBase;
using Proxy_ = GraphExecutorProxy;
template <typename ImplRefTraits>
using Stub_ = GraphExecutorStub<ImplRefTraits>;
using RequestValidator_ = GraphExecutorRequestValidator;
using ResponseValidator_ = GraphExecutorResponseValidator;
enum MethodMinVersions : uint32_t {
kExecuteMinVersion = 0,
};
// crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK
// with not having this data in traces there.
#if !BUILDFLAG(IS_FUCHSIA)
struct Execute_Sym {
NOINLINE static void IPCSymbol();
};
#endif // !BUILDFLAG(IS_FUCHSIA)
virtual ~GraphExecutor() = default;
using ExecuteCallback = base::OnceCallback<void(ExecuteResult, absl::optional<std::vector<::chromeos::machine_learning::mojom::TensorPtr>>)>;
// @generated_from: chromeos.machine_learning.mojom.GraphExecutor.Execute
virtual void Execute(base::flat_map<std::string, ::chromeos::machine_learning::mojom::TensorPtr> inputs, const std::vector<std::string>& output_names, ExecuteCallback callback) = 0;
};
// @generated_from: chromeos.machine_learning.mojom.GraphExecutor
class COMPONENT_EXPORT(MLSERVICE_MOJOM) GraphExecutorProxy
: public GraphExecutor {
public:
using InterfaceType = GraphExecutor;
explicit GraphExecutorProxy(mojo::MessageReceiverWithResponder* receiver);
// @generated_from: chromeos.machine_learning.mojom.GraphExecutor.Execute
void Execute(base::flat_map<std::string, ::chromeos::machine_learning::mojom::TensorPtr> inputs, const std::vector<std::string>& output_names, ExecuteCallback callback) final;
private:
mojo::MessageReceiverWithResponder* receiver_;
};
class COMPONENT_EXPORT(MLSERVICE_MOJOM) GraphExecutorStubDispatch {
public:
static bool Accept(GraphExecutor* impl, mojo::Message* message);
static bool AcceptWithResponder(
GraphExecutor* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<GraphExecutor>>
class GraphExecutorStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
GraphExecutorStub() = default;
~GraphExecutorStub() override = default;
void set_sink(ImplPointerType sink) { sink_ = std::move(sink); }
ImplPointerType& sink() { return sink_; }
bool Accept(mojo::Message* message) override {
if (ImplRefTraits::IsNull(sink_))
return false;
return GraphExecutorStubDispatch::Accept(
ImplRefTraits::GetRawPointer(&sink_), message);
}
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
if (ImplRefTraits::IsNull(sink_))
return false;
return GraphExecutorStubDispatch::AcceptWithResponder(
ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
}
private:
ImplPointerType sink_;
};
class COMPONENT_EXPORT(MLSERVICE_MOJOM) GraphExecutorRequestValidator : public mojo::MessageReceiver {
public:
bool Accept(mojo::Message* message) override;
};
class COMPONENT_EXPORT(MLSERVICE_MOJOM) GraphExecutorResponseValidator : public mojo::MessageReceiver {
public:
bool Accept(mojo::Message* message) override;
};
} // namespace mojom
} // namespace machine_learning
} // namespace chromeos
namespace mojo {
} // namespace mojo
#endif // CHROMEOS_SERVICES_MACHINE_LEARNING_PUBLIC_MOJOM_GRAPH_EXECUTOR_MOJOM_H_
/* Metadata comment
eyJtZXRhIjogW3siZW5kIjogMTg5MywgImJlZ2luIjogMTg4MCwgImVkZ2UiOiAiJS9reXRoZS9l
ZGdlL2dlbmVyYXRlcyIsICJ0eXBlIjogImFuY2hvcl9kZWZpbmVzIiwgInZuYW1lIjogeyJjb3Jw
dXMiOiAiY2hyb21pdW0uZ29vZ2xlc291cmNlLmNvbS9jaHJvbWl1bS9zcmMiLCAibGFuZ3VhZ2Ui
OiAibW9qb20iLCAic2lnbmF0dXJlIjogImNocm9tZW9zLm1hY2hpbmVfbGVhcm5pbmcubW9qb20u
R3JhcGhFeGVjdXRvciJ9fSwgeyJlbm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