blob: 4d7fe0a73d0afade9119ce8010d4501695b6abaa [file] [log] [blame]
// services/device/public/mojom/vibration_manager.mojom.h is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SERVICES_DEVICE_PUBLIC_MOJOM_VIBRATION_MANAGER_MOJOM_H_
#define SERVICES_DEVICE_PUBLIC_MOJOM_VIBRATION_MANAGER_MOJOM_H_
#include <stdint.h>
#include <limits>
#include <optional>
#include <type_traits>
#include <utility>
#include "base/types/cxx23_to_underlying.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 "services/device/public/mojom/vibration_manager.mojom-features.h"
#include "services/device/public/mojom/vibration_manager.mojom-shared.h"
#include "services/device/public/mojom/vibration_manager.mojom-forward.h"
#include <string>
#include <vector>
#include "mojo/public/cpp/bindings/lib/control_message_handler.h"
#include "mojo/public/cpp/bindings/lib/message_size_estimator.h"
#include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h"
#ifdef KYTHE_IS_RUNNING
#pragma kythe_inline_metadata "Metadata comment"
#endif
namespace device::mojom {
class VibrationManagerProxy;
template <typename ImplRefTraits>
class VibrationManagerStub;
class VibrationManagerRequestValidator;
class VibrationManagerResponseValidator;
// @generated_from: device.mojom.VibrationManager
class VibrationManager
: public VibrationManagerInterfaceBase {
public:
using IPCStableHashFunction = uint32_t(*)();
static const char Name_[];
static IPCStableHashFunction 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 HasUninterruptableMethods_ = false;
using Base_ = VibrationManagerInterfaceBase;
using Proxy_ = VibrationManagerProxy;
template <typename ImplRefTraits>
using Stub_ = VibrationManagerStub<ImplRefTraits>;
using RequestValidator_ = VibrationManagerRequestValidator;
using ResponseValidator_ = VibrationManagerResponseValidator;
enum MethodMinVersions : uint32_t {
kVibrateMinVersion = 0,
kCancelMinVersion = 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 Vibrate_Sym {
NOINLINE static uint32_t IPCStableHash();
};
struct Cancel_Sym {
NOINLINE static uint32_t IPCStableHash();
};
#endif // !BUILDFLAG(IS_FUCHSIA)
virtual ~VibrationManager() = default;
using VibrateCallback = base::OnceCallback<void()>;
// @generated_from: device.mojom.VibrationManager.Vibrate
virtual void Vibrate(int64_t milliseconds, VibrateCallback callback) = 0;
using CancelCallback = base::OnceCallback<void()>;
// @generated_from: device.mojom.VibrationManager.Cancel
virtual void Cancel(CancelCallback callback) = 0;
};
// @generated_from: device.mojom.VibrationManager
class VibrationManagerProxy
: public VibrationManager {
public:
using InterfaceType = VibrationManager;
explicit VibrationManagerProxy(mojo::MessageReceiverWithResponder* receiver);
// @generated_from: device.mojom.VibrationManager.Vibrate
void Vibrate(int64_t milliseconds, VibrateCallback callback) final;
// @generated_from: device.mojom.VibrationManager.Cancel
void Cancel(CancelCallback callback) final;
private:
mojo::MessageReceiverWithResponder* receiver_;
};
class VibrationManagerStubDispatch {
public:
static bool Accept(VibrationManager* impl, mojo::Message* message);
static bool AcceptWithResponder(
VibrationManager* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<VibrationManager>>
class VibrationManagerStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
VibrationManagerStub() = default;
~VibrationManagerStub() 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 VibrationManagerStubDispatch::Accept(
ImplRefTraits::GetRawPointer(&sink_), message);
}
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
if (ImplRefTraits::IsNull(sink_))
return false;
return VibrationManagerStubDispatch::AcceptWithResponder(
ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
}
private:
ImplPointerType sink_;
};
class VibrationManagerRequestValidator : public mojo::MessageReceiver {
public:
bool Accept(mojo::Message* message) override;
};
class VibrationManagerResponseValidator : public mojo::MessageReceiver {
public:
bool Accept(mojo::Message* message) override;
};
} // device::mojom
namespace mojo {
} // namespace mojo
#endif // SERVICES_DEVICE_PUBLIC_MOJOM_VIBRATION_MANAGER_MOJOM_H_
/* Metadata comment
eyJ0eXBlIjogImt5dGhlMCIsICJtZXRhIjogW3sidHlwZSI6ICJhbmNob3JfZGVmaW5lcyIsICJi
ZWdpbiI6IDE3MjksICJlbmQiOiAxNzQ1LCAidm5hbWUiOiB7Imxhbmd1YWdlIjogIm1vam9tIiwg
ImNvcnB1cyI6ICJjaHJvbWl1bS5nb29nbGVzb3VyY2UuY29tL2NvZGVzZWFyY2gvY2hyb21pdW0v
c3JjLy9tYWluIiwgInNpZ25hdHVyZSI6ICJkZXZpY2UubW9qb20uVmlicmF0aW9uTWFuYWdlciJ9
LCAiZWRnZSI6ICIlL2t5dGhlL2VkZ2UvZ2VuZXJhdGVzIn0sIHsidHlwZSI6ICJhbmNob3JfZGVm
aW5lcyIsICJiZWdpbiI6IDMwODcsICJlbmQiOiAzMDk0LCAidm5hbWUiOiB7Imxhbmd1YWdlIjog
Im1vam9tIiwgImNvcnB1cyI6ICJjaHJvbWl1bS5nb29nbGVzb3VyY2UuY29tL2NvZGVzZWFyY2gv
Y2hyb21pdW0vc3JjLy9tYWluIiwgInNpZ25hdHVyZSI6ICJkZXZpY2Uub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