//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/hwinference/PHWInferenceManagerParent.h"
#include "mozilla/hwinference/HWInferenceManagerParent.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 PHWInferenceManagerParent::ProcessingError(
Result aCode,
const char* aReason) -> void
{
}
auto PHWInferenceManagerParent::ShouldContinueFromReplyTimeout() -> bool
{
return true;
}
MOZ_IMPLICIT PHWInferenceManagerParent::PHWInferenceManagerParent() :
mozilla::ipc::IToplevelProtocol("PHWInferenceManagerParent", kProtocolId, mozilla::ipc::ParentSide)
{
MOZ_COUNT_CTOR(PHWInferenceManagerParent);
}
PHWInferenceManagerParent::~PHWInferenceManagerParent()
{
MOZ_COUNT_DTOR(PHWInferenceManagerParent);
}
auto PHWInferenceManagerParent::ActorAlloc() -> void
{
MOZ_RELEASE_ASSERT(XRE_IsUtilityProcess(), "Invalid process for `PHWInferenceManagerParent'");
AddRef();
}
auto PHWInferenceManagerParent::ActorDealloc() -> void
{
Release();
}
auto PHWInferenceManagerParent::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
return {};
}
auto PHWInferenceManagerParent::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
switch (aProtocol) {
default:
return nullptr;
}
}
auto PHWInferenceManagerParent::DeallocManagee(
mozilla::ipc::ProtocolId aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PHWInferenceManagerParent::OnMessageReceived(const Message& msg__) -> PHWInferenceManagerParent::Result
{
if (!CanSend()) {
if (mozilla::ipc::LoggingEnabledFor("PHWInferenceManager", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PHWInferenceManagerParent",
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 PHWInferenceManagerParent::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PHWInferenceManagerParent::Result
{
if (!CanSend()) {
return MsgDropped;
}
MOZ_ASSERT_UNREACHABLE("message protocol not supported");
return MsgNotKnown;
}
} // namespace hwinference
} // namespace mozilla