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

#ifndef PHal_h
#define PHal_h

#include "mozilla/Attributes.h"
#include "IPCMessageStart.h"
#include "mozilla/RefPtr.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsTHashtable.h"
#include "mozilla/MozPromise.h"
#include "mozilla/OperatorNewExtensions.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/ipc/ByteBuf.h"
#include "mozilla/ipc/FileDescriptor.h"
#include "mozilla/ipc/IPCForwards.h"
#include "mozilla/ipc/Shmem.h"

// Headers for typedefs
#include "mozilla/HalSensor.h"
#include "mozilla/ipc/IPDLStructMember.h"
#include "prtime.h"


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct BatteryInformation|
//
namespace mozilla {
namespace hal {
class BatteryInformation final
{
private:

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    BatteryInformation() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT BatteryInformation(
            const double& _level,
            const bool& _charging,
            const double& _remainingTime) :
        charging_(_charging),
        level_(_level),
        remainingTime_(_remainingTime)
    {
    }

    MOZ_IMPLICIT BatteryInformation(
            double&& _level,
            bool&& _charging,
            double&& _remainingTime) :
        charging_(std::move(_charging)),
        level_(std::move(_level)),
        remainingTime_(std::move(_remainingTime))
    {
    }

    double&
    level()
    {
        return level_;
    }
    const double&
    level() const
    {
        return level_;
    }

    bool&
    charging()
    {
        return charging_;
    }
    const bool&
    charging() const
    {
        return charging_;
    }

    double&
    remainingTime()
    {
        return remainingTime_;
    }
    const double&
    remainingTime() const
    {
        return remainingTime_;
    }

private:
    void
    StaticAssertions() const;
    ::mozilla::ipc::IPDLStructMember<bool> charging_;
    ::mozilla::ipc::IPDLStructMember<double> level_;
    ::mozilla::ipc::IPDLStructMember<double> remainingTime_;
};
} // namespace hal
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::hal::BatteryInformation>
{
    typedef ::mozilla::hal::BatteryInformation paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SensorData|
//
namespace mozilla {
namespace hal {
class SensorData final
{
private:
    typedef ::mozilla::hal::SensorType SensorType;
    typedef ::PRTime PRTime;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SensorData() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT SensorData(
            const SensorType& _sensor,
            const PRTime& _timestamp,
            const nsTArray<float>& _values) :
        sensor_(_sensor),
        timestamp_(_timestamp),
        values_(_values)
    {
    }

    MOZ_IMPLICIT SensorData(
            SensorType&& _sensor,
            PRTime&& _timestamp,
            nsTArray<float>&& _values) :
        sensor_(std::move(_sensor)),
        timestamp_(std::move(_timestamp)),
        values_(std::move(_values))
    {
    }

    SensorType&
    sensor()
    {
        return sensor_;
    }
    const SensorType&
    sensor() const
    {
        return sensor_;
    }

    PRTime&
    timestamp()
    {
        return timestamp_;
    }
    const PRTime&
    timestamp() const
    {
        return timestamp_;
    }

    nsTArray<float>&
    values()
    {
        return values_;
    }
    const nsTArray<float>&
    values() const
    {
        return values_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<SensorType> sensor_;
    ::mozilla::ipc::IPDLStructMember<PRTime> timestamp_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<float>> values_;
};
} // namespace hal
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::hal::SensorData>
{
    typedef ::mozilla::hal::SensorData paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct NetworkInformation|
//
namespace mozilla {
namespace hal {
class NetworkInformation final
{
private:
    typedef ::uint32_t uint32_t;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    NetworkInformation() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT NetworkInformation(
            const uint32_t& _type,
            const bool& _isWifi,
            const uint32_t& _dhcpGateway) :
        isWifi_(_isWifi),
        type_(_type),
        dhcpGateway_(_dhcpGateway)
    {
    }

    MOZ_IMPLICIT NetworkInformation(
            uint32_t&& _type,
            bool&& _isWifi,
            uint32_t&& _dhcpGateway) :
        isWifi_(std::move(_isWifi)),
        type_(std::move(_type)),
        dhcpGateway_(std::move(_dhcpGateway))
    {
    }

    uint32_t&
    type()
    {
        return type_;
    }
    const uint32_t&
    type() const
    {
        return type_;
    }

    bool&
    isWifi()
    {
        return isWifi_;
    }
    const bool&
    isWifi() const
    {
        return isWifi_;
    }

    uint32_t&
    dhcpGateway()
    {
        return dhcpGateway_;
    }
    const uint32_t&
    dhcpGateway() const
    {
        return dhcpGateway_;
    }

private:
    void
    StaticAssertions() const;
    ::mozilla::ipc::IPDLStructMember<bool> isWifi_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> type_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> dhcpGateway_;
};
} // namespace hal
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::hal::NetworkInformation>
{
    typedef ::mozilla::hal::NetworkInformation paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct WakeLockInformation|
//
namespace mozilla {
namespace hal {
class WakeLockInformation final
{
private:
    typedef ::nsString nsString;
    typedef ::uint32_t uint32_t;
    typedef ::uint64_t uint64_t;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    WakeLockInformation() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT WakeLockInformation(
            const nsString& _topic,
            const uint32_t& _numLocks,
            const uint32_t& _numHidden,
            const nsTArray<uint64_t>& _lockingProcesses) :
        topic_(_topic),
        lockingProcesses_(_lockingProcesses),
        numLocks_(_numLocks),
        numHidden_(_numHidden)
    {
    }

    MOZ_IMPLICIT WakeLockInformation(
            nsString&& _topic,
            uint32_t&& _numLocks,
            uint32_t&& _numHidden,
            nsTArray<uint64_t>&& _lockingProcesses) :
        topic_(std::move(_topic)),
        lockingProcesses_(std::move(_lockingProcesses)),
        numLocks_(std::move(_numLocks)),
        numHidden_(std::move(_numHidden))
    {
    }

    nsString&
    topic()
    {
        return topic_;
    }
    const nsString&
    topic() const
    {
        return topic_;
    }

    uint32_t&
    numLocks()
    {
        return numLocks_;
    }
    const uint32_t&
    numLocks() const
    {
        return numLocks_;
    }

    uint32_t&
    numHidden()
    {
        return numHidden_;
    }
    const uint32_t&
    numHidden() const
    {
        return numHidden_;
    }

    nsTArray<uint64_t>&
    lockingProcesses()
    {
        return lockingProcesses_;
    }
    const nsTArray<uint64_t>&
    lockingProcesses() const
    {
        return lockingProcesses_;
    }

private:
    void
    StaticAssertions() const;
    ::mozilla::ipc::IPDLStructMember<nsString> topic_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint64_t>> lockingProcesses_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> numLocks_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> numHidden_;
};
} // namespace hal
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::hal::WakeLockInformation>
{
    typedef ::mozilla::hal::WakeLockInformation paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC

namespace mozilla {
namespace hal_sandbox {
class PHalParent;
} // namespace hal_sandbox
} // namespace mozilla
namespace mozilla {
namespace hal_sandbox {
class PHalChild;
} // namespace hal_sandbox
} // namespace mozilla

//-----------------------------------------------------------------------------
// Code common to PHalChild and PHalParent
//
namespace mozilla {
namespace hal_sandbox {
namespace PHal {

nsresult
CreateEndpoints(
        mozilla::ipc::EndpointProcInfo aParentDestInfo,
        mozilla::ipc::EndpointProcInfo aChildDestInfo,
        mozilla::ipc::Endpoint<::mozilla::hal_sandbox::PHalParent>* aParent,
        mozilla::ipc::Endpoint<::mozilla::hal_sandbox::PHalChild>* aChild);

enum MessageType {
    PHalStart = PHalMsgStart << 16,
    Msg_NotifyBatteryChange__ID,
    Msg_NotifyNetworkChange__ID,
    Msg_NotifyWakeLockChange__ID,
    Msg_Vibrate__ID,
    Msg_CancelVibrate__ID,
    Msg_EnableBatteryNotifications__ID,
    Msg_DisableBatteryNotifications__ID,
    Msg_GetCurrentBatteryInformation__ID,
    Reply_GetCurrentBatteryInformation__ID,
    Msg_EnableNetworkNotifications__ID,
    Msg_DisableNetworkNotifications__ID,
    Msg_GetCurrentNetworkInformation__ID,
    Reply_GetCurrentNetworkInformation__ID,
    Msg_ModifyWakeLock__ID,
    Msg_EnableWakeLockNotifications__ID,
    Msg_DisableWakeLockNotifications__ID,
    Msg_GetWakeLockInfo__ID,
    Reply_GetWakeLockInfo__ID,
    Msg_LockScreenOrientation__ID,
    Reply_LockScreenOrientation__ID,
    Msg_UnlockScreenOrientation__ID,
    Msg_PerformHapticFeedback__ID,
    Msg_NotifySensorChange__ID,
    Msg_EnableSensorNotifications__ID,
    Msg_DisableSensorNotifications__ID,
    Msg___delete____ID,
    Reply___delete____ID,
    PHalEnd
};

mozilla::UniquePtr<IPC::Message>
Msg_NotifyBatteryChange(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_NotifyNetworkChange(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_NotifyWakeLockChange(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_Vibrate(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_CancelVibrate(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_EnableBatteryNotifications(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_DisableBatteryNotifications(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_GetCurrentBatteryInformation(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_GetCurrentBatteryInformation(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_EnableNetworkNotifications(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_DisableNetworkNotifications(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_GetCurrentNetworkInformation(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_GetCurrentNetworkInformation(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_ModifyWakeLock(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_EnableWakeLockNotifications(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_DisableWakeLockNotifications(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_GetWakeLockInfo(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_GetWakeLockInfo(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_LockScreenOrientation(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_LockScreenOrientation(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_UnlockScreenOrientation(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_PerformHapticFeedback(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_NotifySensorChange(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_EnableSensorNotifications(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_DisableSensorNotifications(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg___delete__(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply___delete__(IPC::Message::routeid_t routingId);



} // namespace PHal
} // namespace hal_sandbox
} // namespace mozilla

#endif // ifndef PHal_h
