//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/hwinference/PHWInferenceManagerChild.h"
#include "mozilla/hwinference/HWInferenceManagerChild.h"
#include "mozilla/ipc/UtilityProcessSandboxing.h"
#include "ipc/IPCMessageUtils.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "nsIFile.h"
#include "mozilla/ipc/Endpoint.h"
#include "mozilla/ipc/ProtocolMessageUtils.h"
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/ipc/ShmemMessageUtils.h"
#include "mozilla/ipc/TaintingIPCUtils.h"
namespace mozilla {
namespace hwinference {
auto PHWInferenceManagerChild::ProcessingError(
Result aCode,
const char* aReason) -> void
{
}
auto PHWInferenceManagerChild::ShouldContinueFromReplyTimeout() -> bool
{
return true;
}
MOZ_IMPLICIT PHWInferenceManagerChild::PHWInferenceManagerChild() :
mozilla::ipc::IToplevelProtocol("PHWInferenceManagerChild", kProtocolId, mozilla::ipc::ChildSide)
{
MOZ_COUNT_CTOR(PHWInferenceManagerChild);
}
PHWInferenceManagerChild::~PHWInferenceManagerChild()
{
MOZ_COUNT_DTOR(PHWInferenceManagerChild);
}
auto PHWInferenceManagerChild::ActorAlloc() -> void
{
MOZ_RELEASE_ASSERT(XRE_IsContentProcess(), "Invalid process for `PHWInferenceManagerChild'");
AddRef();
}
auto PHWInferenceManagerChild::ActorDealloc() -> void
{
Release();
}
auto PHWInferenceManagerChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
return {};
}
auto PHWInferenceManagerChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
switch (aProtocol) {
default:
return nullptr;
}
}
auto PHWInferenceManagerChild::DeallocManagee(
mozilla::ipc::ProtocolId aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PHWInferenceManagerChild::OnMessageReceived(const Message& msg__) -> PHWInferenceManagerChild::Result
{
if (!CanSend()) {
if (mozilla::ipc::LoggingEnabledFor("PHWInferenceManager", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PHWInferenceManagerChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Ignored message for dead actor",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eSending);
}
return MsgProcessed;
}
switch (msg__.type()) {
default:
return MsgNotKnown;
case SHMEM_CREATED_MESSAGE_TYPE:
{
if (!ShmemCreated(msg__)) {
return MsgPayloadError;
}
return MsgProcessed;
}
case SHMEM_DESTROYED_MESSAGE_TYPE:
{
if (!ShmemDestroyed(msg__)) {
return MsgPayloadError;
}
return MsgProcessed;
}
}
}
auto PHWInferenceManagerChild::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PHWInferenceManagerChild::Result
{
if (!CanSend()) {
return MsgDropped;
}
MOZ_ASSERT_UNREACHABLE("message protocol not supported");
return MsgNotKnown;
}
} // namespace hwinference
} // namespace mozilla