Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#ifndef MIDITypes_h
#define MIDITypes_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/TimeStamp.h"
#include "mozilla/ipc/IPDLStructMember.h"
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct MIDIPortInfo|
//
namespace mozilla {
namespace dom {
class MIDIPortInfo final
{
private:
typedef ::nsString nsString;
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
MIDIPortInfo() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT MIDIPortInfo(
const nsString& _id,
const nsString& _name,
const nsString& _manufacturer,
const nsString& _version,
const uint32_t& _type) :
id_(_id),
name_(_name),
manufacturer_(_manufacturer),
version_(_version),
type_(_type)
{
}
MOZ_IMPLICIT MIDIPortInfo(
nsString&& _id,
nsString&& _name,
nsString&& _manufacturer,
nsString&& _version,
uint32_t&& _type) :
id_(std::move(_id)),
name_(std::move(_name)),
manufacturer_(std::move(_manufacturer)),
version_(std::move(_version)),
type_(std::move(_type))
{
}
bool
operator==(const MIDIPortInfo& _o) const;
bool
operator!=(const MIDIPortInfo& _o) const;
nsString&
id()
{
return id_;
}
const nsString&
id() const
{
return id_;
}
nsString&
name()
{
return name_;
}
const nsString&
name() const
{
return name_;
}
nsString&
manufacturer()
{
return manufacturer_;
}
const nsString&
manufacturer() const
{
return manufacturer_;
}
nsString&
version()
{
return version_;
}
const nsString&
version() const
{
return version_;
}
uint32_t&
type()
{
return type_;
}
const uint32_t&
type() const
{
return type_;
}
private:
::mozilla::ipc::IPDLStructMember<nsString> id_;
::mozilla::ipc::IPDLStructMember<nsString> name_;
::mozilla::ipc::IPDLStructMember<nsString> manufacturer_;
::mozilla::ipc::IPDLStructMember<nsString> version_;
::mozilla::ipc::IPDLStructMember<uint32_t> type_;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::MIDIPortInfo>
{
typedef ::mozilla::dom::MIDIPortInfo 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 MIDIMessage|
//
namespace mozilla {
namespace dom {
class MIDIMessage final
{
private:
typedef ::uint8_t uint8_t;
typedef ::mozilla::TimeStamp TimeStamp;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
MIDIMessage() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT MIDIMessage(
const nsTArray<uint8_t>& _data,
const TimeStamp& _timestamp) :
data_(_data),
timestamp_(_timestamp)
{
}
MOZ_IMPLICIT MIDIMessage(
nsTArray<uint8_t>&& _data,
TimeStamp&& _timestamp) :
data_(std::move(_data)),
timestamp_(std::move(_timestamp))
{
}
nsTArray<uint8_t>&
data()
{
return data_;
}
const nsTArray<uint8_t>&
data() const
{
return data_;
}
TimeStamp&
timestamp()
{
return timestamp_;
}
const TimeStamp&
timestamp() const
{
return timestamp_;
}
private:
::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> data_;
::mozilla::ipc::IPDLStructMember<TimeStamp> timestamp_;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::MIDIMessage>
{
typedef ::mozilla::dom::MIDIMessage 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 MIDIPortList|
//
namespace mozilla {
namespace dom {
class MIDIPortList final
{
private:
typedef ::mozilla::dom::MIDIPortInfo MIDIPortInfo;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
MIDIPortList() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT MIDIPortList(const nsTArray<MIDIPortInfo>& _ports) :
ports_(_ports)
{
}
MOZ_IMPLICIT MIDIPortList(nsTArray<MIDIPortInfo>&& _ports) :
ports_(std::move(_ports))
{
}
nsTArray<MIDIPortInfo>&
ports()
{
return ports_;
}
const nsTArray<MIDIPortInfo>&
ports() const
{
return ports_;
}
private:
::mozilla::ipc::IPDLStructMember<CopyableTArray<MIDIPortInfo>> ports_;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::MIDIPortList>
{
typedef ::mozilla::dom::MIDIPortList paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
#endif // ifndef MIDITypes_h