//
// Automatically generated by ipdlc.
// Edit at your own risk
//


#include "mozilla/hal_sandbox/PHalChild.h"

#include "mozilla/dom/PContentChild.h"
#include "mozilla/dom/PBrowserChild.h"

#include "nsIFile.h"
#include "GeckoProfiler.h"

namespace mozilla {
namespace hal_sandbox {


auto PHalChild::ActorDestroy(ActorDestroyReason aWhy) -> void
{
}

MOZ_IMPLICIT PHalChild::PHalChild() :
    mozilla::ipc::IProtocol(mozilla::ipc::ChildSide),
    mState(PHal::__Dead)
{
    MOZ_COUNT_CTOR(PHalChild);
}

PHalChild::~PHalChild()
{
    MOZ_COUNT_DTOR(PHalChild);
}

auto PHalChild::Manager() const -> PContentChild*
{
    return static_cast<PContentChild*>(IProtocol::Manager());
}

auto PHalChild::state() -> PHal::State
{
    return mState;
}

auto PHalChild::SendVibrate(
        const nsTArray<uint32_t>& pattern,
        const nsTArray<uint64_t>& id,
        PBrowserChild* browser) -> bool
{
    IPC::Message* msg__ = PHal::Msg_Vibrate(Id());

    Write(pattern, msg__);
    // Sentinel = 'pattern'
    (msg__)->WriteSentinel(2105892009);
    Write(id, msg__);
    // Sentinel = 'id'
    (msg__)->WriteSentinel(2794505629);
    Write(browser, msg__, false);
    // Sentinel = 'browser'
    (msg__)->WriteSentinel(2836343679);




    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_Vibrate", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_Vibrate__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendCancelVibrate(
        const nsTArray<uint64_t>& id,
        PBrowserChild* browser) -> bool
{
    IPC::Message* msg__ = PHal::Msg_CancelVibrate(Id());

    Write(id, msg__);
    // Sentinel = 'id'
    (msg__)->WriteSentinel(2794505629);
    Write(browser, msg__, false);
    // Sentinel = 'browser'
    (msg__)->WriteSentinel(2836343679);




    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_CancelVibrate", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_CancelVibrate__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendEnableBatteryNotifications() -> bool
{
    IPC::Message* msg__ = PHal::Msg_EnableBatteryNotifications(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_EnableBatteryNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_EnableBatteryNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendDisableBatteryNotifications() -> bool
{
    IPC::Message* msg__ = PHal::Msg_DisableBatteryNotifications(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_DisableBatteryNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_DisableBatteryNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendGetCurrentBatteryInformation(BatteryInformation* aBatteryInfo) -> bool
{
    IPC::Message* msg__ = PHal::Msg_GetCurrentBatteryInformation(Id());


    (msg__)->set_sync();


    Message reply__;

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_GetCurrentBatteryInformation", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_GetCurrentBatteryInformation__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
    if ((!(sendok__))) {
        return false;
    }

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
    }

    PickleIterator iter__ = PickleIterator(reply__);
    if ((!(Read(aBatteryInfo, (&(reply__)), (&(iter__)))))) {
        FatalError("Error deserializing 'BatteryInformation'");
        return false;
    }
    // Sentinel = 'aBatteryInfo'
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 2078351088)))) {
        FatalError("Error deserializing 'BatteryInformation'");
        return false;
    }
    (reply__).EndRead(iter__);

    return true;
}

auto PHalChild::SendEnableNetworkNotifications() -> bool
{
    IPC::Message* msg__ = PHal::Msg_EnableNetworkNotifications(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_EnableNetworkNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_EnableNetworkNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendDisableNetworkNotifications() -> bool
{
    IPC::Message* msg__ = PHal::Msg_DisableNetworkNotifications(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_DisableNetworkNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_DisableNetworkNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendGetCurrentNetworkInformation(NetworkInformation* aNetworkInfo) -> bool
{
    IPC::Message* msg__ = PHal::Msg_GetCurrentNetworkInformation(Id());


    (msg__)->set_sync();


    Message reply__;

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_GetCurrentNetworkInformation", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_GetCurrentNetworkInformation__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
    if ((!(sendok__))) {
        return false;
    }

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
    }

    PickleIterator iter__ = PickleIterator(reply__);
    if ((!(Read(aNetworkInfo, (&(reply__)), (&(iter__)))))) {
        FatalError("Error deserializing 'NetworkInformation'");
        return false;
    }
    // Sentinel = 'aNetworkInfo'
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 1908218217)))) {
        FatalError("Error deserializing 'NetworkInformation'");
        return false;
    }
    (reply__).EndRead(iter__);

    return true;
}

auto PHalChild::SendGetScreenEnabled(bool* enabled) -> bool
{
    IPC::Message* msg__ = PHal::Msg_GetScreenEnabled(Id());


    (msg__)->set_sync();


    Message reply__;

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_GetScreenEnabled", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_GetScreenEnabled__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
    if ((!(sendok__))) {
        return false;
    }

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
    }

    PickleIterator iter__ = PickleIterator(reply__);
    if ((!(Read(enabled, (&(reply__)), (&(iter__)))))) {
        FatalError("Error deserializing 'bool'");
        return false;
    }
    // Sentinel = 'enabled'
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3743499116)))) {
        FatalError("Error deserializing 'bool'");
        return false;
    }
    (reply__).EndRead(iter__);

    return true;
}

auto PHalChild::SendSetScreenEnabled(const bool& aEnabled) -> bool
{
    IPC::Message* msg__ = PHal::Msg_SetScreenEnabled(Id());

    Write(aEnabled, msg__);
    // Sentinel = 'aEnabled'
    (msg__)->WriteSentinel(2225039408);




    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_SetScreenEnabled", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_SetScreenEnabled__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendGetKeyLightEnabled(bool* enabled) -> bool
{
    IPC::Message* msg__ = PHal::Msg_GetKeyLightEnabled(Id());


    (msg__)->set_sync();


    Message reply__;

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_GetKeyLightEnabled", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_GetKeyLightEnabled__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
    if ((!(sendok__))) {
        return false;
    }

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
    }

    PickleIterator iter__ = PickleIterator(reply__);
    if ((!(Read(enabled, (&(reply__)), (&(iter__)))))) {
        FatalError("Error deserializing 'bool'");
        return false;
    }
    // Sentinel = 'enabled'
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3743499116)))) {
        FatalError("Error deserializing 'bool'");
        return false;
    }
    (reply__).EndRead(iter__);

    return true;
}

auto PHalChild::SendSetKeyLightEnabled(const bool& aEnabled) -> bool
{
    IPC::Message* msg__ = PHal::Msg_SetKeyLightEnabled(Id());

    Write(aEnabled, msg__);
    // Sentinel = 'aEnabled'
    (msg__)->WriteSentinel(2225039408);




    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_SetKeyLightEnabled", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_SetKeyLightEnabled__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendGetCpuSleepAllowed(bool* allowed) -> bool
{
    IPC::Message* msg__ = PHal::Msg_GetCpuSleepAllowed(Id());


    (msg__)->set_sync();


    Message reply__;

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_GetCpuSleepAllowed", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_GetCpuSleepAllowed__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
    if ((!(sendok__))) {
        return false;
    }

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
    }

    PickleIterator iter__ = PickleIterator(reply__);
    if ((!(Read(allowed, (&(reply__)), (&(iter__)))))) {
        FatalError("Error deserializing 'bool'");
        return false;
    }
    // Sentinel = 'allowed'
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 1297156503)))) {
        FatalError("Error deserializing 'bool'");
        return false;
    }
    (reply__).EndRead(iter__);

    return true;
}

auto PHalChild::SendSetCpuSleepAllowed(const bool& aAllowed) -> bool
{
    IPC::Message* msg__ = PHal::Msg_SetCpuSleepAllowed(Id());

    Write(aAllowed, msg__);
    // Sentinel = 'aAllowed'
    (msg__)->WriteSentinel(785233983);




    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_SetCpuSleepAllowed", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_SetCpuSleepAllowed__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendGetScreenBrightness(double* brightness) -> bool
{
    IPC::Message* msg__ = PHal::Msg_GetScreenBrightness(Id());


    (msg__)->set_sync();


    Message reply__;

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_GetScreenBrightness", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_GetScreenBrightness__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
    if ((!(sendok__))) {
        return false;
    }

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
    }

    PickleIterator iter__ = PickleIterator(reply__);
    if ((!(Read(brightness, (&(reply__)), (&(iter__)))))) {
        FatalError("Error deserializing 'double'");
        return false;
    }
    // Sentinel = 'brightness'
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 288670311)))) {
        FatalError("Error deserializing 'double'");
        return false;
    }
    (reply__).EndRead(iter__);

    return true;
}

auto PHalChild::SendSetScreenBrightness(const double& aBrightness) -> bool
{
    IPC::Message* msg__ = PHal::Msg_SetScreenBrightness(Id());

    Write(aBrightness, msg__);
    // Sentinel = 'aBrightness'
    (msg__)->WriteSentinel(2646084451);




    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_SetScreenBrightness", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_SetScreenBrightness__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendAdjustSystemClock(const int64_t& aDeltaMilliseconds) -> bool
{
    IPC::Message* msg__ = PHal::Msg_AdjustSystemClock(Id());

    Write(aDeltaMilliseconds, msg__);
    // Sentinel = 'aDeltaMilliseconds'
    (msg__)->WriteSentinel(596392573);




    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_AdjustSystemClock", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_AdjustSystemClock__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendSetTimezone(const nsCString& aTimezoneSpec) -> bool
{
    IPC::Message* msg__ = PHal::Msg_SetTimezone(Id());

    Write(aTimezoneSpec, msg__);
    // Sentinel = 'aTimezoneSpec'
    (msg__)->WriteSentinel(2553958496);




    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_SetTimezone", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_SetTimezone__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendGetTimezone(nsCString* aTimezoneSpec) -> bool
{
    IPC::Message* msg__ = PHal::Msg_GetTimezone(Id());


    (msg__)->set_sync();


    Message reply__;

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_GetTimezone", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_GetTimezone__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
    if ((!(sendok__))) {
        return false;
    }

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
    }

    PickleIterator iter__ = PickleIterator(reply__);
    if ((!(Read(aTimezoneSpec, (&(reply__)), (&(iter__)))))) {
        FatalError("Error deserializing 'nsCString'");
        return false;
    }
    // Sentinel = 'aTimezoneSpec'
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 2553958496)))) {
        FatalError("Error deserializing 'nsCString'");
        return false;
    }
    (reply__).EndRead(iter__);

    return true;
}

auto PHalChild::SendGetTimezoneOffset(int32_t* aTimezoneOffset) -> bool
{
    IPC::Message* msg__ = PHal::Msg_GetTimezoneOffset(Id());


    (msg__)->set_sync();


    Message reply__;

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_GetTimezoneOffset", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_GetTimezoneOffset__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
    if ((!(sendok__))) {
        return false;
    }

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
    }

    PickleIterator iter__ = PickleIterator(reply__);
    if ((!(Read(aTimezoneOffset, (&(reply__)), (&(iter__)))))) {
        FatalError("Error deserializing 'int32_t'");
        return false;
    }
    // Sentinel = 'aTimezoneOffset'
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 4001217354)))) {
        FatalError("Error deserializing 'int32_t'");
        return false;
    }
    (reply__).EndRead(iter__);

    return true;
}

auto PHalChild::SendEnableSystemClockChangeNotifications() -> bool
{
    IPC::Message* msg__ = PHal::Msg_EnableSystemClockChangeNotifications(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_EnableSystemClockChangeNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_EnableSystemClockChangeNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendDisableSystemClockChangeNotifications() -> bool
{
    IPC::Message* msg__ = PHal::Msg_DisableSystemClockChangeNotifications(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_DisableSystemClockChangeNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_DisableSystemClockChangeNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendEnableSystemTimezoneChangeNotifications() -> bool
{
    IPC::Message* msg__ = PHal::Msg_EnableSystemTimezoneChangeNotifications(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_EnableSystemTimezoneChangeNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_EnableSystemTimezoneChangeNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendDisableSystemTimezoneChangeNotifications() -> bool
{
    IPC::Message* msg__ = PHal::Msg_DisableSystemTimezoneChangeNotifications(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_DisableSystemTimezoneChangeNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_DisableSystemTimezoneChangeNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendModifyWakeLock(
        const nsString& aTopic,
        const WakeLockControl& aLockAdjust,
        const WakeLockControl& aHiddenAdjust,
        const uint64_t& aProcessID) -> bool
{
    IPC::Message* msg__ = PHal::Msg_ModifyWakeLock(Id());

    Write(aTopic, msg__);
    // Sentinel = 'aTopic'
    (msg__)->WriteSentinel(2759450316);
    Write(aLockAdjust, msg__);
    // Sentinel = 'aLockAdjust'
    (msg__)->WriteSentinel(3857892778);
    Write(aHiddenAdjust, msg__);
    // Sentinel = 'aHiddenAdjust'
    (msg__)->WriteSentinel(2900615369);
    Write(aProcessID, msg__);
    // Sentinel = 'aProcessID'
    (msg__)->WriteSentinel(2181368637);




    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_ModifyWakeLock", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_ModifyWakeLock__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendEnableWakeLockNotifications() -> bool
{
    IPC::Message* msg__ = PHal::Msg_EnableWakeLockNotifications(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_EnableWakeLockNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_EnableWakeLockNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendDisableWakeLockNotifications() -> bool
{
    IPC::Message* msg__ = PHal::Msg_DisableWakeLockNotifications(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_DisableWakeLockNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_DisableWakeLockNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendGetWakeLockInfo(
        const nsString& aTopic,
        WakeLockInformation* aWakeLockInfo) -> bool
{
    IPC::Message* msg__ = PHal::Msg_GetWakeLockInfo(Id());

    Write(aTopic, msg__);
    // Sentinel = 'aTopic'
    (msg__)->WriteSentinel(2759450316);

    (msg__)->set_sync();


    Message reply__;

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_GetWakeLockInfo", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_GetWakeLockInfo__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
    if ((!(sendok__))) {
        return false;
    }

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
    }

    PickleIterator iter__ = PickleIterator(reply__);
    if ((!(Read(aWakeLockInfo, (&(reply__)), (&(iter__)))))) {
        FatalError("Error deserializing 'WakeLockInformation'");
        return false;
    }
    // Sentinel = 'aWakeLockInfo'
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 1498930717)))) {
        FatalError("Error deserializing 'WakeLockInformation'");
        return false;
    }
    (reply__).EndRead(iter__);

    return true;
}

auto PHalChild::SendEnableScreenConfigurationNotifications() -> bool
{
    IPC::Message* msg__ = PHal::Msg_EnableScreenConfigurationNotifications(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_EnableScreenConfigurationNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_EnableScreenConfigurationNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendDisableScreenConfigurationNotifications() -> bool
{
    IPC::Message* msg__ = PHal::Msg_DisableScreenConfigurationNotifications(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_DisableScreenConfigurationNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_DisableScreenConfigurationNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendGetCurrentScreenConfiguration(ScreenConfiguration* aScreenConfiguration) -> bool
{
    IPC::Message* msg__ = PHal::Msg_GetCurrentScreenConfiguration(Id());


    (msg__)->set_sync();


    Message reply__;

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_GetCurrentScreenConfiguration", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_GetCurrentScreenConfiguration__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
    if ((!(sendok__))) {
        return false;
    }

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
    }

    PickleIterator iter__ = PickleIterator(reply__);
    if ((!(Read(aScreenConfiguration, (&(reply__)), (&(iter__)))))) {
        FatalError("Error deserializing 'ScreenConfiguration'");
        return false;
    }
    // Sentinel = 'aScreenConfiguration'
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 1811386433)))) {
        FatalError("Error deserializing 'ScreenConfiguration'");
        return false;
    }
    (reply__).EndRead(iter__);

    return true;
}

auto PHalChild::SendLockScreenOrientation(
        const ScreenOrientationInternal& aOrientation,
        bool* allowed) -> bool
{
    IPC::Message* msg__ = PHal::Msg_LockScreenOrientation(Id());

    Write(aOrientation, msg__);
    // Sentinel = 'aOrientation'
    (msg__)->WriteSentinel(1665072289);

    (msg__)->set_sync();


    Message reply__;

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_LockScreenOrientation", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_LockScreenOrientation__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
    if ((!(sendok__))) {
        return false;
    }

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
    }

    PickleIterator iter__ = PickleIterator(reply__);
    if ((!(Read(allowed, (&(reply__)), (&(iter__)))))) {
        FatalError("Error deserializing 'bool'");
        return false;
    }
    // Sentinel = 'allowed'
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 1297156503)))) {
        FatalError("Error deserializing 'bool'");
        return false;
    }
    (reply__).EndRead(iter__);

    return true;
}

auto PHalChild::SendUnlockScreenOrientation() -> bool
{
    IPC::Message* msg__ = PHal::Msg_UnlockScreenOrientation(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_UnlockScreenOrientation", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_UnlockScreenOrientation__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendEnableSwitchNotifications(const SwitchDevice& aDevice) -> bool
{
    IPC::Message* msg__ = PHal::Msg_EnableSwitchNotifications(Id());

    Write(aDevice, msg__);
    // Sentinel = 'aDevice'
    (msg__)->WriteSentinel(2436697236);




    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_EnableSwitchNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_EnableSwitchNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendDisableSwitchNotifications(const SwitchDevice& aDevice) -> bool
{
    IPC::Message* msg__ = PHal::Msg_DisableSwitchNotifications(Id());

    Write(aDevice, msg__);
    // Sentinel = 'aDevice'
    (msg__)->WriteSentinel(2436697236);




    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_DisableSwitchNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_DisableSwitchNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendGetCurrentSwitchState(
        const SwitchDevice& aDevice,
        SwitchState* aState) -> bool
{
    IPC::Message* msg__ = PHal::Msg_GetCurrentSwitchState(Id());

    Write(aDevice, msg__);
    // Sentinel = 'aDevice'
    (msg__)->WriteSentinel(2436697236);

    (msg__)->set_sync();


    Message reply__;

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_GetCurrentSwitchState", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_GetCurrentSwitchState__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
    if ((!(sendok__))) {
        return false;
    }

    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received reply ", ((&(reply__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
    }

    PickleIterator iter__ = PickleIterator(reply__);
    if ((!(Read(aState, (&(reply__)), (&(iter__)))))) {
        FatalError("Error deserializing 'SwitchState'");
        return false;
    }
    // Sentinel = 'aState'
    if ((!(((&(reply__)))->ReadSentinel((&(iter__)), 3694751962)))) {
        FatalError("Error deserializing 'SwitchState'");
        return false;
    }
    (reply__).EndRead(iter__);

    return true;
}

auto PHalChild::SendFactoryReset(const nsString& aReason) -> bool
{
    IPC::Message* msg__ = PHal::Msg_FactoryReset(Id());

    Write(aReason, msg__);
    // Sentinel = 'aReason'
    (msg__)->WriteSentinel(829905706);




    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_FactoryReset", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_FactoryReset__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendEnableSensorNotifications(const SensorType& aSensor) -> bool
{
    IPC::Message* msg__ = PHal::Msg_EnableSensorNotifications(Id());

    Write(aSensor, msg__);
    // Sentinel = 'aSensor'
    (msg__)->WriteSentinel(942615000);




    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_EnableSensorNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_EnableSensorNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::SendDisableSensorNotifications(const SensorType& aSensor) -> bool
{
    IPC::Message* msg__ = PHal::Msg_DisableSensorNotifications(Id());

    Write(aSensor, msg__);
    // Sentinel = 'aSensor'
    (msg__)->WriteSentinel(942615000);




    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg_DisableSensorNotifications", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg_DisableSensorNotifications__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHalChild::Send__delete__(PHalChild* actor) -> bool
{
    if ((!(actor))) {
        return false;
    }

    IPC::Message* msg__ = PHal::Msg___delete__((actor)->Id());

    (actor)->Write(actor, msg__, false);
    // Sentinel = 'actor'
    (msg__)->WriteSentinel(875202478);



    if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
        mozilla::ipc::LogMessageForProtocol("PHalChild", (actor)->OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHal", "Msg___delete__", js::ProfileEntry::Category::OTHER);
    if ((!(PHal::Transition(Trigger(Trigger::Recv, PHal::Msg___delete____ID), (&((actor)->mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = ((actor)->GetIPCChannel())->Send(msg__);

    (actor)->DestroySubtree(Deletion);
    (actor)->DeallocSubtree();
    ((actor)->Manager())->RemoveManagee(PHalMsgStart, actor);
    return sendok__;
}

auto PHalChild::RemoveManagee(
        int32_t aProtocolId,
        ProtocolBase* aListener) -> void
{
    FatalError("unreached");
    return;
}

auto PHalChild::OnMessageReceived(const Message& msg__) -> PHalChild::Result
{
    switch ((msg__).type()) {
    case PHal::Msg_NotifyBatteryChange__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
                mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHal", "Msg_NotifyBatteryChange", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            BatteryInformation aBatteryInfo;

            if ((!(Read((&(aBatteryInfo)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'BatteryInformation'");
                return MsgValueError;
            }
            // Sentinel = 'aBatteryInfo'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2078351088)))) {
                FatalError("Error deserializing 'BatteryInformation'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHal::Transition(Trigger(Trigger::Send, PHal::Msg_NotifyBatteryChange__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvNotifyBatteryChange(mozilla::Move(aBatteryInfo))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHal::Msg_NotifyNetworkChange__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
                mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHal", "Msg_NotifyNetworkChange", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            NetworkInformation aNetworkInfo;

            if ((!(Read((&(aNetworkInfo)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'NetworkInformation'");
                return MsgValueError;
            }
            // Sentinel = 'aNetworkInfo'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1908218217)))) {
                FatalError("Error deserializing 'NetworkInformation'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHal::Transition(Trigger(Trigger::Send, PHal::Msg_NotifyNetworkChange__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvNotifyNetworkChange(mozilla::Move(aNetworkInfo))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHal::Msg_NotifyWakeLockChange__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
                mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHal", "Msg_NotifyWakeLockChange", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            WakeLockInformation aWakeLockInfo;

            if ((!(Read((&(aWakeLockInfo)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'WakeLockInformation'");
                return MsgValueError;
            }
            // Sentinel = 'aWakeLockInfo'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1498930717)))) {
                FatalError("Error deserializing 'WakeLockInformation'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHal::Transition(Trigger(Trigger::Send, PHal::Msg_NotifyWakeLockChange__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvNotifyWakeLockChange(mozilla::Move(aWakeLockInfo))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHal::Msg_NotifyScreenConfigurationChange__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
                mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHal", "Msg_NotifyScreenConfigurationChange", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            ScreenConfiguration aScreenOrientation;

            if ((!(Read((&(aScreenOrientation)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'ScreenConfiguration'");
                return MsgValueError;
            }
            // Sentinel = 'aScreenOrientation'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2886778787)))) {
                FatalError("Error deserializing 'ScreenConfiguration'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHal::Transition(Trigger(Trigger::Send, PHal::Msg_NotifyScreenConfigurationChange__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvNotifyScreenConfigurationChange(mozilla::Move(aScreenOrientation))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHal::Msg_NotifySwitchChange__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
                mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHal", "Msg_NotifySwitchChange", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            SwitchEvent aEvent;

            if ((!(Read((&(aEvent)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'SwitchEvent'");
                return MsgValueError;
            }
            // Sentinel = 'aEvent'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3531117325)))) {
                FatalError("Error deserializing 'SwitchEvent'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHal::Transition(Trigger(Trigger::Send, PHal::Msg_NotifySwitchChange__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvNotifySwitchChange(mozilla::Move(aEvent))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHal::Msg_NotifySystemClockChange__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
                mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHal", "Msg_NotifySystemClockChange", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            int64_t aClockDeltaMS;

            if ((!(Read((&(aClockDeltaMS)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'int64_t'");
                return MsgValueError;
            }
            // Sentinel = 'aClockDeltaMS'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 490214104)))) {
                FatalError("Error deserializing 'int64_t'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHal::Transition(Trigger(Trigger::Send, PHal::Msg_NotifySystemClockChange__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvNotifySystemClockChange(mozilla::Move(aClockDeltaMS))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHal::Msg_NotifySystemTimezoneChange__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
                mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHal", "Msg_NotifySystemTimezoneChange", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            SystemTimezoneChangeInformation aSystemTimezoneChangeInfo;

            if ((!(Read((&(aSystemTimezoneChangeInfo)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'SystemTimezoneChangeInformation'");
                return MsgValueError;
            }
            // Sentinel = 'aSystemTimezoneChangeInfo'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3797357450)))) {
                FatalError("Error deserializing 'SystemTimezoneChangeInformation'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHal::Transition(Trigger(Trigger::Send, PHal::Msg_NotifySystemTimezoneChange__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvNotifySystemTimezoneChange(mozilla::Move(aSystemTimezoneChangeInfo))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHal::Msg_NotifySensorChange__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHalChild")) {
                mozilla::ipc::LogMessageForProtocol("PHalChild", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHal", "Msg_NotifySensorChange", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            SensorData aSensorData;

            if ((!(Read((&(aSensorData)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'SensorData'");
                return MsgValueError;
            }
            // Sentinel = 'aSensorData'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2949034804)))) {
                FatalError("Error deserializing 'SensorData'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHal::Transition(Trigger(Trigger::Send, PHal::Msg_NotifySensorChange__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvNotifySensorChange(mozilla::Move(aSensorData))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHal::Reply___delete____ID:
        {
            return MsgProcessed;
        }
    default:
        {
            return MsgNotKnown;
        }
    }
}

auto PHalChild::OnMessageReceived(
        const Message& msg__,
        Message*& reply__) -> PHalChild::Result
{
    return MsgNotKnown;
}

auto PHalChild::OnCallReceived(
        const Message& msg__,
        Message*& reply__) -> PHalChild::Result
{
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
    return MsgNotKnown;
}

auto PHalChild::GetProtocolTypeId() -> int32_t
{
    return PHalMsgStart;
}

auto PHalChild::ProtocolName() const -> const char*
{
    return "PHalChild";
}

auto PHalChild::DestroySubtree(ActorDestroyReason why) -> void
{
    // Unregister from our manager.
    Unregister(Id());
    SetId(1);

    // Finally, destroy "us".
    ActorDestroy(why);
}

auto PHalChild::DeallocSubtree() -> void
{
}

auto PHalChild::Write(
        const SwitchEvent& v__,
        Message* msg__) -> void
{
    Write((v__).device(), msg__);
    // Sentinel = 'device'
    (msg__)->WriteSentinel(1277795288);
    Write((v__).status(), msg__);
    // Sentinel = 'status'
    (msg__)->WriteSentinel(3714608576);
}

auto PHalChild::Read(
        SwitchEvent* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->device())), msg__, iter__)))) {
        FatalError("Error deserializing 'device' (SwitchDevice) member of 'SwitchEvent'");
        return false;
    }
    // Sentinel = 'device'
    if ((!((msg__)->ReadSentinel(iter__, 1277795288)))) {
        FatalError("Error deserializing 'device' (SwitchDevice) member of 'SwitchEvent'");
        return false;
    }
    if ((!(Read((&((v__)->status())), msg__, iter__)))) {
        FatalError("Error deserializing 'status' (SwitchState) member of 'SwitchEvent'");
        return false;
    }
    // Sentinel = 'status'
    if ((!((msg__)->ReadSentinel(iter__, 3714608576)))) {
        FatalError("Error deserializing 'status' (SwitchState) member of 'SwitchEvent'");
        return false;
    }
    return true;
}

auto PHalChild::Write(
        const PBrowserChild* v__,
        Message* msg__,
        bool nullable__) -> void
{
    int32_t id;
    if ((!(v__))) {
        if ((!(nullable__))) {
            FatalError("NULL actor value passed to non-nullable param");
        }
        id = 0;
    }
    else {
        id = (v__)->Id();
        if ((1) == (id)) {
            FatalError("actor has been |delete|d");
        }
    }

    Write(id, msg__);
}

auto PHalChild::Read(
        PBrowserChild** v__,
        const Message* msg__,
        PickleIterator* iter__,
        bool nullable__) -> bool
{
    Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PBrowser", PBrowserMsgStart);
    if ((actor).isNothing()) {
        return false;
    }

    (*(v__)) = static_cast<PBrowserChild*>((actor).value());
    return true;
}

auto PHalChild::Write(
        const ScreenConfiguration& v__,
        Message* msg__) -> void
{
    Write((v__).rect(), msg__);
    // Sentinel = 'rect'
    (msg__)->WriteSentinel(438776542);
    Write((v__).orientation(), msg__);
    // Sentinel = 'orientation'
    (msg__)->WriteSentinel(759639429);
    Write((v__).angle(), msg__);
    // Sentinel = 'angle'
    (msg__)->WriteSentinel(3388308388);
    Write((v__).colorDepth(), msg__);
    // Sentinel = 'colorDepth'
    (msg__)->WriteSentinel(4107545146);
    Write((v__).pixelDepth(), msg__);
    // Sentinel = 'pixelDepth'
    (msg__)->WriteSentinel(4055642053);
}

auto PHalChild::Read(
        ScreenConfiguration* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->rect())), msg__, iter__)))) {
        FatalError("Error deserializing 'rect' (nsIntRect) member of 'ScreenConfiguration'");
        return false;
    }
    // Sentinel = 'rect'
    if ((!((msg__)->ReadSentinel(iter__, 438776542)))) {
        FatalError("Error deserializing 'rect' (nsIntRect) member of 'ScreenConfiguration'");
        return false;
    }
    if ((!(Read((&((v__)->orientation())), msg__, iter__)))) {
        FatalError("Error deserializing 'orientation' (ScreenOrientationInternal) member of 'ScreenConfiguration'");
        return false;
    }
    // Sentinel = 'orientation'
    if ((!((msg__)->ReadSentinel(iter__, 759639429)))) {
        FatalError("Error deserializing 'orientation' (ScreenOrientationInternal) member of 'ScreenConfiguration'");
        return false;
    }
    if ((!(Read((&((v__)->angle())), msg__, iter__)))) {
        FatalError("Error deserializing 'angle' (uint16_t) member of 'ScreenConfiguration'");
        return false;
    }
    // Sentinel = 'angle'
    if ((!((msg__)->ReadSentinel(iter__, 3388308388)))) {
        FatalError("Error deserializing 'angle' (uint16_t) member of 'ScreenConfiguration'");
        return false;
    }
    if ((!(Read((&((v__)->colorDepth())), msg__, iter__)))) {
        FatalError("Error deserializing 'colorDepth' (uint32_t) member of 'ScreenConfiguration'");
        return false;
    }
    // Sentinel = 'colorDepth'
    if ((!((msg__)->ReadSentinel(iter__, 4107545146)))) {
        FatalError("Error deserializing 'colorDepth' (uint32_t) member of 'ScreenConfiguration'");
        return false;
    }
    if ((!(Read((&((v__)->pixelDepth())), msg__, iter__)))) {
        FatalError("Error deserializing 'pixelDepth' (uint32_t) member of 'ScreenConfiguration'");
        return false;
    }
    // Sentinel = 'pixelDepth'
    if ((!((msg__)->ReadSentinel(iter__, 4055642053)))) {
        FatalError("Error deserializing 'pixelDepth' (uint32_t) member of 'ScreenConfiguration'");
        return false;
    }
    return true;
}

auto PHalChild::Write(
        const BatteryInformation& v__,
        Message* msg__) -> void
{
    Write((v__).level(), msg__);
    // Sentinel = 'level'
    (msg__)->WriteSentinel(144336999);
    Write((v__).charging(), msg__);
    // Sentinel = 'charging'
    (msg__)->WriteSentinel(253813181);
    Write((v__).remainingTime(), msg__);
    // Sentinel = 'remainingTime'
    (msg__)->WriteSentinel(3991324882);
}

auto PHalChild::Read(
        BatteryInformation* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->level())), msg__, iter__)))) {
        FatalError("Error deserializing 'level' (double) member of 'BatteryInformation'");
        return false;
    }
    // Sentinel = 'level'
    if ((!((msg__)->ReadSentinel(iter__, 144336999)))) {
        FatalError("Error deserializing 'level' (double) member of 'BatteryInformation'");
        return false;
    }
    if ((!(Read((&((v__)->charging())), msg__, iter__)))) {
        FatalError("Error deserializing 'charging' (bool) member of 'BatteryInformation'");
        return false;
    }
    // Sentinel = 'charging'
    if ((!((msg__)->ReadSentinel(iter__, 253813181)))) {
        FatalError("Error deserializing 'charging' (bool) member of 'BatteryInformation'");
        return false;
    }
    if ((!(Read((&((v__)->remainingTime())), msg__, iter__)))) {
        FatalError("Error deserializing 'remainingTime' (double) member of 'BatteryInformation'");
        return false;
    }
    // Sentinel = 'remainingTime'
    if ((!((msg__)->ReadSentinel(iter__, 3991324882)))) {
        FatalError("Error deserializing 'remainingTime' (double) member of 'BatteryInformation'");
        return false;
    }
    return true;
}

auto PHalChild::Write(
        const WakeLockInformation& v__,
        Message* msg__) -> void
{
    Write((v__).topic(), msg__);
    // Sentinel = 'topic'
    (msg__)->WriteSentinel(261826960);
    Write((v__).numLocks(), msg__);
    // Sentinel = 'numLocks'
    (msg__)->WriteSentinel(2358740108);
    Write((v__).numHidden(), msg__);
    // Sentinel = 'numHidden'
    (msg__)->WriteSentinel(813961573);
    Write((v__).lockingProcesses(), msg__);
    // Sentinel = 'lockingProcesses'
    (msg__)->WriteSentinel(1213055746);
}

auto PHalChild::Read(
        WakeLockInformation* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->topic())), msg__, iter__)))) {
        FatalError("Error deserializing 'topic' (nsString) member of 'WakeLockInformation'");
        return false;
    }
    // Sentinel = 'topic'
    if ((!((msg__)->ReadSentinel(iter__, 261826960)))) {
        FatalError("Error deserializing 'topic' (nsString) member of 'WakeLockInformation'");
        return false;
    }
    if ((!(Read((&((v__)->numLocks())), msg__, iter__)))) {
        FatalError("Error deserializing 'numLocks' (uint32_t) member of 'WakeLockInformation'");
        return false;
    }
    // Sentinel = 'numLocks'
    if ((!((msg__)->ReadSentinel(iter__, 2358740108)))) {
        FatalError("Error deserializing 'numLocks' (uint32_t) member of 'WakeLockInformation'");
        return false;
    }
    if ((!(Read((&((v__)->numHidden())), msg__, iter__)))) {
        FatalError("Error deserializing 'numHidden' (uint32_t) member of 'WakeLockInformation'");
        return false;
    }
    // Sentinel = 'numHidden'
    if ((!((msg__)->ReadSentinel(iter__, 813961573)))) {
        FatalError("Error deserializing 'numHidden' (uint32_t) member of 'WakeLockInformation'");
        return false;
    }
    if ((!(Read((&((v__)->lockingProcesses())), msg__, iter__)))) {
        FatalError("Error deserializing 'lockingProcesses' (uint64_t[]) member of 'WakeLockInformation'");
        return false;
    }
    // Sentinel = 'lockingProcesses'
    if ((!((msg__)->ReadSentinel(iter__, 1213055746)))) {
        FatalError("Error deserializing 'lockingProcesses' (uint64_t[]) member of 'WakeLockInformation'");
        return false;
    }
    return true;
}

auto PHalChild::Write(
        const NetworkInformation& v__,
        Message* msg__) -> void
{
    Write((v__).type(), msg__);
    // Sentinel = 'type'
    (msg__)->WriteSentinel(2982068540);
    Write((v__).isWifi(), msg__);
    // Sentinel = 'isWifi'
    (msg__)->WriteSentinel(68302097);
    Write((v__).dhcpGateway(), msg__);
    // Sentinel = 'dhcpGateway'
    (msg__)->WriteSentinel(1492137774);
}

auto PHalChild::Read(
        NetworkInformation* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->type())), msg__, iter__)))) {
        FatalError("Error deserializing 'type' (uint32_t) member of 'NetworkInformation'");
        return false;
    }
    // Sentinel = 'type'
    if ((!((msg__)->ReadSentinel(iter__, 2982068540)))) {
        FatalError("Error deserializing 'type' (uint32_t) member of 'NetworkInformation'");
        return false;
    }
    if ((!(Read((&((v__)->isWifi())), msg__, iter__)))) {
        FatalError("Error deserializing 'isWifi' (bool) member of 'NetworkInformation'");
        return false;
    }
    // Sentinel = 'isWifi'
    if ((!((msg__)->ReadSentinel(iter__, 68302097)))) {
        FatalError("Error deserializing 'isWifi' (bool) member of 'NetworkInformation'");
        return false;
    }
    if ((!(Read((&((v__)->dhcpGateway())), msg__, iter__)))) {
        FatalError("Error deserializing 'dhcpGateway' (uint32_t) member of 'NetworkInformation'");
        return false;
    }
    // Sentinel = 'dhcpGateway'
    if ((!((msg__)->ReadSentinel(iter__, 1492137774)))) {
        FatalError("Error deserializing 'dhcpGateway' (uint32_t) member of 'NetworkInformation'");
        return false;
    }
    return true;
}

auto PHalChild::Write(
        const SystemTimezoneChangeInformation& v__,
        Message* msg__) -> void
{
    Write((v__).oldTimezoneOffsetMinutes(), msg__);
    // Sentinel = 'oldTimezoneOffsetMinutes'
    (msg__)->WriteSentinel(3940000210);
    Write((v__).newTimezoneOffsetMinutes(), msg__);
    // Sentinel = 'newTimezoneOffsetMinutes'
    (msg__)->WriteSentinel(2391265445);
}

auto PHalChild::Read(
        SystemTimezoneChangeInformation* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->oldTimezoneOffsetMinutes())), msg__, iter__)))) {
        FatalError("Error deserializing 'oldTimezoneOffsetMinutes' (int32_t) member of 'SystemTimezoneChangeInformation'");
        return false;
    }
    // Sentinel = 'oldTimezoneOffsetMinutes'
    if ((!((msg__)->ReadSentinel(iter__, 3940000210)))) {
        FatalError("Error deserializing 'oldTimezoneOffsetMinutes' (int32_t) member of 'SystemTimezoneChangeInformation'");
        return false;
    }
    if ((!(Read((&((v__)->newTimezoneOffsetMinutes())), msg__, iter__)))) {
        FatalError("Error deserializing 'newTimezoneOffsetMinutes' (int32_t) member of 'SystemTimezoneChangeInformation'");
        return false;
    }
    // Sentinel = 'newTimezoneOffsetMinutes'
    if ((!((msg__)->ReadSentinel(iter__, 2391265445)))) {
        FatalError("Error deserializing 'newTimezoneOffsetMinutes' (int32_t) member of 'SystemTimezoneChangeInformation'");
        return false;
    }
    return true;
}

auto PHalChild::Write(
        const SensorData& v__,
        Message* msg__) -> void
{
    Write((v__).sensor(), msg__);
    // Sentinel = 'sensor'
    (msg__)->WriteSentinel(1053903548);
    Write((v__).timestamp(), msg__);
    // Sentinel = 'timestamp'
    (msg__)->WriteSentinel(2167067209);
    Write((v__).values(), msg__);
    // Sentinel = 'values'
    (msg__)->WriteSentinel(3006433652);
    Write((v__).accuracy(), msg__);
    // Sentinel = 'accuracy'
    (msg__)->WriteSentinel(354491327);
}

auto PHalChild::Read(
        SensorData* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->sensor())), msg__, iter__)))) {
        FatalError("Error deserializing 'sensor' (SensorType) member of 'SensorData'");
        return false;
    }
    // Sentinel = 'sensor'
    if ((!((msg__)->ReadSentinel(iter__, 1053903548)))) {
        FatalError("Error deserializing 'sensor' (SensorType) member of 'SensorData'");
        return false;
    }
    if ((!(Read((&((v__)->timestamp())), msg__, iter__)))) {
        FatalError("Error deserializing 'timestamp' (PRTime) member of 'SensorData'");
        return false;
    }
    // Sentinel = 'timestamp'
    if ((!((msg__)->ReadSentinel(iter__, 2167067209)))) {
        FatalError("Error deserializing 'timestamp' (PRTime) member of 'SensorData'");
        return false;
    }
    if ((!(Read((&((v__)->values())), msg__, iter__)))) {
        FatalError("Error deserializing 'values' (float[]) member of 'SensorData'");
        return false;
    }
    // Sentinel = 'values'
    if ((!((msg__)->ReadSentinel(iter__, 3006433652)))) {
        FatalError("Error deserializing 'values' (float[]) member of 'SensorData'");
        return false;
    }
    if ((!(Read((&((v__)->accuracy())), msg__, iter__)))) {
        FatalError("Error deserializing 'accuracy' (SensorAccuracyType) member of 'SensorData'");
        return false;
    }
    // Sentinel = 'accuracy'
    if ((!((msg__)->ReadSentinel(iter__, 354491327)))) {
        FatalError("Error deserializing 'accuracy' (SensorAccuracyType) member of 'SensorData'");
        return false;
    }
    return true;
}

auto PHalChild::Write(
        const PHalChild* v__,
        Message* msg__,
        bool nullable__) -> void
{
    int32_t id;
    if ((!(v__))) {
        if ((!(nullable__))) {
            FatalError("NULL actor value passed to non-nullable param");
        }
        id = 0;
    }
    else {
        id = (v__)->Id();
        if ((1) == (id)) {
            FatalError("actor has been |delete|d");
        }
    }

    Write(id, msg__);
}

auto PHalChild::Read(
        PHalChild** v__,
        const Message* msg__,
        PickleIterator* iter__,
        bool nullable__) -> bool
{
    Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PHal", PHalMsgStart);
    if ((actor).isNothing()) {
        return false;
    }

    (*(v__)) = static_cast<PHalChild*>((actor).value());
    return true;
}



} // namespace hal_sandbox
} // namespace mozilla
