Generated file

Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#ifndef SerialTypes_h
#define SerialTypes_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/dom/SerialPortBinding.h"
#include "mozilla/dom/SerialPortIPCTypes.h"
#include "mozilla/ipc/IPDLStructMember.h"
#include "nsString.h"
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct IPCSerialPortInfo|
//
namespace mozilla {
namespace dom {
class IPCSerialPortInfo final
{
private:
typedef ::nsString nsString;
typedef ::uint16_t uint16_t;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
IPCSerialPortInfo() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT IPCSerialPortInfo(
const nsString& _id,
const nsString& _path,
const nsString& _friendlyName,
const mozilla::Maybe<uint16_t>& _usbVendorId,
const mozilla::Maybe<uint16_t>& _usbProductId,
const mozilla::Maybe<nsString>& _bluetoothServiceClassId) :
id_(_id),
path_(_path),
friendlyName_(_friendlyName),
usbVendorId_(_usbVendorId),
usbProductId_(_usbProductId),
bluetoothServiceClassId_(_bluetoothServiceClassId)
{
}
MOZ_IMPLICIT IPCSerialPortInfo(
nsString&& _id,
nsString&& _path,
nsString&& _friendlyName,
mozilla::Maybe<uint16_t>&& _usbVendorId,
mozilla::Maybe<uint16_t>&& _usbProductId,
mozilla::Maybe<nsString>&& _bluetoothServiceClassId) :
id_(std::move(_id)),
path_(std::move(_path)),
friendlyName_(std::move(_friendlyName)),
usbVendorId_(std::move(_usbVendorId)),
usbProductId_(std::move(_usbProductId)),
bluetoothServiceClassId_(std::move(_bluetoothServiceClassId))
{
}
nsString&
id()
{
return id_;
}
const nsString&
id() const
{
return id_;
}
nsString&
path()
{
return path_;
}
const nsString&
path() const
{
return path_;
}
nsString&
friendlyName()
{
return friendlyName_;
}
const nsString&
friendlyName() const
{
return friendlyName_;
}
mozilla::Maybe<uint16_t>&
usbVendorId()
{
return usbVendorId_;
}
const mozilla::Maybe<uint16_t>&
usbVendorId() const
{
return usbVendorId_;
}
mozilla::Maybe<uint16_t>&
usbProductId()
{
return usbProductId_;
}
const mozilla::Maybe<uint16_t>&
usbProductId() const
{
return usbProductId_;
}
mozilla::Maybe<nsString>&
bluetoothServiceClassId()
{
return bluetoothServiceClassId_;
}
const mozilla::Maybe<nsString>&
bluetoothServiceClassId() const
{
return bluetoothServiceClassId_;
}
private:
::mozilla::ipc::IPDLStructMember<nsString> id_;
::mozilla::ipc::IPDLStructMember<nsString> path_;
::mozilla::ipc::IPDLStructMember<nsString> friendlyName_;
::mozilla::ipc::IPDLStructMember<mozilla::Maybe<uint16_t>> usbVendorId_;
::mozilla::ipc::IPDLStructMember<mozilla::Maybe<uint16_t>> usbProductId_;
::mozilla::ipc::IPDLStructMember<mozilla::Maybe<nsString>> bluetoothServiceClassId_;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::IPCSerialPortInfo>
{
typedef ::mozilla::dom::IPCSerialPortInfo 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 IPCSerialPortFilter|
//
namespace mozilla {
namespace dom {
class IPCSerialPortFilter final
{
private:
typedef ::uint16_t uint16_t;
typedef ::nsString nsString;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
IPCSerialPortFilter() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT IPCSerialPortFilter(
const mozilla::Maybe<uint16_t>& _usbVendorId,
const mozilla::Maybe<uint16_t>& _usbProductId,
const mozilla::Maybe<nsString>& _bluetoothServiceClassId) :
usbVendorId_(_usbVendorId),
usbProductId_(_usbProductId),
bluetoothServiceClassId_(_bluetoothServiceClassId)
{
}
MOZ_IMPLICIT IPCSerialPortFilter(
mozilla::Maybe<uint16_t>&& _usbVendorId,
mozilla::Maybe<uint16_t>&& _usbProductId,
mozilla::Maybe<nsString>&& _bluetoothServiceClassId) :
usbVendorId_(std::move(_usbVendorId)),
usbProductId_(std::move(_usbProductId)),
bluetoothServiceClassId_(std::move(_bluetoothServiceClassId))
{
}
mozilla::Maybe<uint16_t>&
usbVendorId()
{
return usbVendorId_;
}
const mozilla::Maybe<uint16_t>&
usbVendorId() const
{
return usbVendorId_;
}
mozilla::Maybe<uint16_t>&
usbProductId()
{
return usbProductId_;
}
const mozilla::Maybe<uint16_t>&
usbProductId() const
{
return usbProductId_;
}
mozilla::Maybe<nsString>&
bluetoothServiceClassId()
{
return bluetoothServiceClassId_;
}
const mozilla::Maybe<nsString>&
bluetoothServiceClassId() const
{
return bluetoothServiceClassId_;
}
private:
::mozilla::ipc::IPDLStructMember<mozilla::Maybe<uint16_t>> usbVendorId_;
::mozilla::ipc::IPDLStructMember<mozilla::Maybe<uint16_t>> usbProductId_;
::mozilla::ipc::IPDLStructMember<mozilla::Maybe<nsString>> bluetoothServiceClassId_;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::IPCSerialPortFilter>
{
typedef ::mozilla::dom::IPCSerialPortFilter 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 IPCRequestPortResult|
//
namespace mozilla {
namespace dom {
class IPCRequestPortResult final
{
private:
typedef ::mozilla::dom::RequestPortReason RequestPortReason;
typedef ::mozilla::dom::IPCSerialPortInfo IPCSerialPortInfo;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
IPCRequestPortResult() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT IPCRequestPortResult(
const RequestPortReason& _reason,
const mozilla::Maybe<IPCSerialPortInfo>& _port) :
reason_(_reason),
port_(_port)
{
}
MOZ_IMPLICIT IPCRequestPortResult(
RequestPortReason&& _reason,
mozilla::Maybe<IPCSerialPortInfo>&& _port) :
reason_(std::move(_reason)),
port_(std::move(_port))
{
}
RequestPortReason&
reason()
{
return reason_;
}
const RequestPortReason&
reason() const
{
return reason_;
}
mozilla::Maybe<IPCSerialPortInfo>&
port()
{
return port_;
}
const mozilla::Maybe<IPCSerialPortInfo>&
port() const
{
return port_;
}
private:
::mozilla::ipc::IPDLStructMember<RequestPortReason> reason_;
::mozilla::ipc::IPDLStructMember<mozilla::Maybe<IPCSerialPortInfo>> port_;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::IPCRequestPortResult>
{
typedef ::mozilla::dom::IPCRequestPortResult 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 IPCSerialOptions|
//
namespace mozilla {
namespace dom {
class IPCSerialOptions final
{
private:
typedef ::uint32_t uint32_t;
typedef ::uint8_t uint8_t;
typedef ::mozilla::dom::ParityType ParityType;
typedef ::mozilla::dom::FlowControlType FlowControlType;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
IPCSerialOptions() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT IPCSerialOptions(
const uint32_t& _baudRate,
const uint8_t& _dataBits,
const uint8_t& _stopBits,
const ParityType& _parity,
const uint32_t& _bufferSize,
const FlowControlType& _flowControl) :
parity_(_parity),
flowControl_(_flowControl),
baudRate_(_baudRate),
bufferSize_(_bufferSize),
dataBits_(_dataBits),
stopBits_(_stopBits)
{
}
MOZ_IMPLICIT IPCSerialOptions(
uint32_t&& _baudRate,
uint8_t&& _dataBits,
uint8_t&& _stopBits,
ParityType&& _parity,
uint32_t&& _bufferSize,
FlowControlType&& _flowControl) :
parity_(std::move(_parity)),
flowControl_(std::move(_flowControl)),
baudRate_(std::move(_baudRate)),
bufferSize_(std::move(_bufferSize)),
dataBits_(std::move(_dataBits)),
stopBits_(std::move(_stopBits))
{
}
uint32_t&
baudRate()
{
return baudRate_;
}
const uint32_t&
baudRate() const
{
return baudRate_;
}
uint8_t&
dataBits()
{
return dataBits_;
}
const uint8_t&
dataBits() const
{
return dataBits_;
}
uint8_t&
stopBits()
{
return stopBits_;
}
const uint8_t&
stopBits() const
{
return stopBits_;
}
ParityType&
parity()
{
return parity_;
}
const ParityType&
parity() const
{
return parity_;
}
uint32_t&
bufferSize()
{
return bufferSize_;
}
const uint32_t&
bufferSize() const
{
return bufferSize_;
}
FlowControlType&
flowControl()
{
return flowControl_;
}
const FlowControlType&
flowControl() const
{
return flowControl_;
}
private:
void
StaticAssertions() const;
::mozilla::ipc::IPDLStructMember<ParityType> parity_;
::mozilla::ipc::IPDLStructMember<FlowControlType> flowControl_;
::mozilla::ipc::IPDLStructMember<uint32_t> baudRate_;
::mozilla::ipc::IPDLStructMember<uint32_t> bufferSize_;
::mozilla::ipc::IPDLStructMember<uint8_t> dataBits_;
::mozilla::ipc::IPDLStructMember<uint8_t> stopBits_;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::IPCSerialOptions>
{
typedef ::mozilla::dom::IPCSerialOptions 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 IPCSerialOutputSignals|
//
namespace mozilla {
namespace dom {
class IPCSerialOutputSignals final
{
private:
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
IPCSerialOutputSignals() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT IPCSerialOutputSignals(
const mozilla::Maybe<bool>& _dataTerminalReady,
const mozilla::Maybe<bool>& _requestToSend,
const mozilla::Maybe<bool>& _breakSignal) :
dataTerminalReady_(_dataTerminalReady),
requestToSend_(_requestToSend),
breakSignal_(_breakSignal)
{
}
MOZ_IMPLICIT IPCSerialOutputSignals(
mozilla::Maybe<bool>&& _dataTerminalReady,
mozilla::Maybe<bool>&& _requestToSend,
mozilla::Maybe<bool>&& _breakSignal) :
dataTerminalReady_(std::move(_dataTerminalReady)),
requestToSend_(std::move(_requestToSend)),
breakSignal_(std::move(_breakSignal))
{
}
mozilla::Maybe<bool>&
dataTerminalReady()
{
return dataTerminalReady_;
}
const mozilla::Maybe<bool>&
dataTerminalReady() const
{
return dataTerminalReady_;
}
mozilla::Maybe<bool>&
requestToSend()
{
return requestToSend_;
}
const mozilla::Maybe<bool>&
requestToSend() const
{
return requestToSend_;
}
mozilla::Maybe<bool>&
breakSignal()
{
return breakSignal_;
}
const mozilla::Maybe<bool>&
breakSignal() const
{
return breakSignal_;
}
private:
::mozilla::ipc::IPDLStructMember<mozilla::Maybe<bool>> dataTerminalReady_;
::mozilla::ipc::IPDLStructMember<mozilla::Maybe<bool>> requestToSend_;
::mozilla::ipc::IPDLStructMember<mozilla::Maybe<bool>> breakSignal_;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::IPCSerialOutputSignals>
{
typedef ::mozilla::dom::IPCSerialOutputSignals 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 IPCSerialInputSignals|
//
namespace mozilla {
namespace dom {
class IPCSerialInputSignals final
{
private:
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
IPCSerialInputSignals() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT IPCSerialInputSignals(
const bool& _dataCarrierDetect,
const bool& _clearToSend,
const bool& _ringIndicator,
const bool& _dataSetReady) :
dataCarrierDetect_(_dataCarrierDetect),
clearToSend_(_clearToSend),
ringIndicator_(_ringIndicator),
dataSetReady_(_dataSetReady)
{
}
MOZ_IMPLICIT IPCSerialInputSignals(
bool&& _dataCarrierDetect,
bool&& _clearToSend,
bool&& _ringIndicator,
bool&& _dataSetReady) :
dataCarrierDetect_(std::move(_dataCarrierDetect)),
clearToSend_(std::move(_clearToSend)),
ringIndicator_(std::move(_ringIndicator)),
dataSetReady_(std::move(_dataSetReady))
{
}
bool&
dataCarrierDetect()
{
return dataCarrierDetect_;
}
const bool&
dataCarrierDetect() const
{
return dataCarrierDetect_;
}
bool&
clearToSend()
{
return clearToSend_;
}
const bool&
clearToSend() const
{
return clearToSend_;
}
bool&
ringIndicator()
{
return ringIndicator_;
}
const bool&
ringIndicator() const
{
return ringIndicator_;
}
bool&
dataSetReady()
{
return dataSetReady_;
}
const bool&
dataSetReady() const
{
return dataSetReady_;
}
private:
::mozilla::ipc::IPDLStructMember<bool> dataCarrierDetect_;
::mozilla::ipc::IPDLStructMember<bool> clearToSend_;
::mozilla::ipc::IPDLStructMember<bool> ringIndicator_;
::mozilla::ipc::IPDLStructMember<bool> dataSetReady_;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::IPCSerialInputSignals>
{
typedef ::mozilla::dom::IPCSerialInputSignals paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
#endif // ifndef SerialTypes_h