Copy as Markdown
Other Tools
//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#ifndef PWebTransport_h
#define PWebTransport_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/ipc/DataPipe.h"
#include "mozilla/ipc/IPDLStructMember.h"
#include "mozilla/ipc/PBackgroundSharedTypes.h"
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct UnidirectionalStream|
//
namespace mozilla {
namespace dom {
class UnidirectionalStream final
{
private:
typedef ::uint64_t uint64_t;
typedef ::mozilla::ipc::DataPipeSender DataPipeSender;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
UnidirectionalStream() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT UnidirectionalStream(
const uint64_t& _streamId,
DataPipeSender* _outStream) :
outStream_(_outStream),
streamId_(_streamId)
{
}
MOZ_IMPLICIT UnidirectionalStream(
uint64_t&& _streamId,
RefPtr<DataPipeSender>&& _outStream) :
outStream_(std::move(_outStream)),
streamId_(std::move(_streamId))
{
}
uint64_t&
streamId()
{
return streamId_;
}
const uint64_t&
streamId() const
{
return streamId_;
}
RefPtr<DataPipeSender>&
outStream()
{
return outStream_;
}
DataPipeSender*
outStream() const
{
return outStream_;
}
private:
::mozilla::ipc::IPDLStructMember<RefPtr<DataPipeSender>> outStream_;
::mozilla::ipc::IPDLStructMember<uint64_t> streamId_;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::UnidirectionalStream>
{
typedef ::mozilla::dom::UnidirectionalStream 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 |union UnidirectionalStreamResponse|
//
namespace mozilla {
namespace dom {
class UnidirectionalStreamResponse final
{
public:
enum Type {
T__None,
Tnsresult = 1,
TUnidirectionalStream,
T__Last = TUnidirectionalStream
};
private:
typedef ::nsresult nsresult;
typedef ::mozilla::dom::UnidirectionalStream UnidirectionalStream;
typedef nsresult nsresult__tdef;
typedef UnidirectionalStream UnidirectionalStream__tdef;
nsresult*
ptr_nsresult()
{
return (&(mVnsresult));
}
const nsresult*
constptr_nsresult() const
{
return (&(mVnsresult));
}
UnidirectionalStream*
ptr_UnidirectionalStream()
{
return (&(mVUnidirectionalStream));
}
const UnidirectionalStream*
constptr_UnidirectionalStream() const
{
return (&(mVUnidirectionalStream));
}
void
MaybeDestroy();
void
AssertSanity() const
{
MOZ_RELEASE_ASSERT((T__None) <= (mType), "invalid type tag");
MOZ_RELEASE_ASSERT((mType) <= (T__Last), "invalid type tag");
}
void
AssertSanity(Type aType) const
{
AssertSanity();
MOZ_RELEASE_ASSERT((mType) == (aType), "unexpected type tag");
}
public:
MOZ_IMPLICIT UnidirectionalStreamResponse() :
mType(T__None)
{
}
MOZ_IMPLICIT UnidirectionalStreamResponse(const nsresult& aOther);
MOZ_IMPLICIT UnidirectionalStreamResponse(nsresult&& aOther);
MOZ_IMPLICIT UnidirectionalStreamResponse(const UnidirectionalStream& aOther);
MOZ_IMPLICIT UnidirectionalStreamResponse(UnidirectionalStream&& aOther);
MOZ_IMPLICIT UnidirectionalStreamResponse(const UnidirectionalStreamResponse& aOther);
MOZ_IMPLICIT UnidirectionalStreamResponse(UnidirectionalStreamResponse&& aOther);
~UnidirectionalStreamResponse();
Type
type() const
{
return mType;
}
UnidirectionalStreamResponse&
operator=(const nsresult& aRhs);
UnidirectionalStreamResponse&
operator=(nsresult&& aRhs);
UnidirectionalStreamResponse&
operator=(const UnidirectionalStream& aRhs);
UnidirectionalStreamResponse&
operator=(UnidirectionalStream&& aRhs);
UnidirectionalStreamResponse&
operator=(const UnidirectionalStreamResponse& aRhs);
UnidirectionalStreamResponse&
operator=(UnidirectionalStreamResponse&& aRhs);
nsresult&
get_nsresult()
{
AssertSanity(Tnsresult);
return (*(ptr_nsresult()));
}
const nsresult&
get_nsresult() const
{
AssertSanity(Tnsresult);
return (*(constptr_nsresult()));
}
operator nsresult&()
{
return get_nsresult();
}
operator const nsresult&() const
{
return get_nsresult();
}
UnidirectionalStream&
get_UnidirectionalStream()
{
AssertSanity(TUnidirectionalStream);
return (*(ptr_UnidirectionalStream()));
}
const UnidirectionalStream&
get_UnidirectionalStream() const
{
AssertSanity(TUnidirectionalStream);
return (*(constptr_UnidirectionalStream()));
}
operator UnidirectionalStream&()
{
return get_UnidirectionalStream();
}
operator const UnidirectionalStream&() const
{
return get_UnidirectionalStream();
}
private:
union {
nsresult mVnsresult;
UnidirectionalStream mVUnidirectionalStream;
};
Type mType;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::UnidirectionalStreamResponse>
{
typedef ::mozilla::dom::UnidirectionalStreamResponse 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 BidirectionalStream|
//
namespace mozilla {
namespace dom {
class BidirectionalStream final
{
private:
typedef ::uint64_t uint64_t;
typedef ::mozilla::ipc::DataPipeReceiver DataPipeReceiver;
typedef ::mozilla::ipc::DataPipeSender DataPipeSender;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
BidirectionalStream() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT BidirectionalStream(
const uint64_t& _streamId,
DataPipeReceiver* _inStream,
DataPipeSender* _outStream) :
inStream_(_inStream),
outStream_(_outStream),
streamId_(_streamId)
{
}
MOZ_IMPLICIT BidirectionalStream(
uint64_t&& _streamId,
RefPtr<DataPipeReceiver>&& _inStream,
RefPtr<DataPipeSender>&& _outStream) :
inStream_(std::move(_inStream)),
outStream_(std::move(_outStream)),
streamId_(std::move(_streamId))
{
}
uint64_t&
streamId()
{
return streamId_;
}
const uint64_t&
streamId() const
{
return streamId_;
}
RefPtr<DataPipeReceiver>&
inStream()
{
return inStream_;
}
DataPipeReceiver*
inStream() const
{
return inStream_;
}
RefPtr<DataPipeSender>&
outStream()
{
return outStream_;
}
DataPipeSender*
outStream() const
{
return outStream_;
}
private:
::mozilla::ipc::IPDLStructMember<RefPtr<DataPipeReceiver>> inStream_;
::mozilla::ipc::IPDLStructMember<RefPtr<DataPipeSender>> outStream_;
::mozilla::ipc::IPDLStructMember<uint64_t> streamId_;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::BidirectionalStream>
{
typedef ::mozilla::dom::BidirectionalStream 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 |union BidirectionalStreamResponse|
//
namespace mozilla {
namespace dom {
class BidirectionalStreamResponse final
{
public:
enum Type {
T__None,
Tnsresult = 1,
TBidirectionalStream,
T__Last = TBidirectionalStream
};
private:
typedef ::nsresult nsresult;
typedef ::mozilla::dom::BidirectionalStream BidirectionalStream;
typedef nsresult nsresult__tdef;
typedef BidirectionalStream BidirectionalStream__tdef;
nsresult*
ptr_nsresult()
{
return (&(mVnsresult));
}
const nsresult*
constptr_nsresult() const
{
return (&(mVnsresult));
}
BidirectionalStream*
ptr_BidirectionalStream()
{
return (&(mVBidirectionalStream));
}
const BidirectionalStream*
constptr_BidirectionalStream() const
{
return (&(mVBidirectionalStream));
}
void
MaybeDestroy();
void
AssertSanity() const
{
MOZ_RELEASE_ASSERT((T__None) <= (mType), "invalid type tag");
MOZ_RELEASE_ASSERT((mType) <= (T__Last), "invalid type tag");
}
void
AssertSanity(Type aType) const
{
AssertSanity();
MOZ_RELEASE_ASSERT((mType) == (aType), "unexpected type tag");
}
public:
MOZ_IMPLICIT BidirectionalStreamResponse() :
mType(T__None)
{
}
MOZ_IMPLICIT BidirectionalStreamResponse(const nsresult& aOther);
MOZ_IMPLICIT BidirectionalStreamResponse(nsresult&& aOther);
MOZ_IMPLICIT BidirectionalStreamResponse(const BidirectionalStream& aOther);
MOZ_IMPLICIT BidirectionalStreamResponse(BidirectionalStream&& aOther);
MOZ_IMPLICIT BidirectionalStreamResponse(const BidirectionalStreamResponse& aOther);
MOZ_IMPLICIT BidirectionalStreamResponse(BidirectionalStreamResponse&& aOther);
~BidirectionalStreamResponse();
Type
type() const
{
return mType;
}
BidirectionalStreamResponse&
operator=(const nsresult& aRhs);
BidirectionalStreamResponse&
operator=(nsresult&& aRhs);
BidirectionalStreamResponse&
operator=(const BidirectionalStream& aRhs);
BidirectionalStreamResponse&
operator=(BidirectionalStream&& aRhs);
BidirectionalStreamResponse&
operator=(const BidirectionalStreamResponse& aRhs);
BidirectionalStreamResponse&
operator=(BidirectionalStreamResponse&& aRhs);
nsresult&
get_nsresult()
{
AssertSanity(Tnsresult);
return (*(ptr_nsresult()));
}
const nsresult&
get_nsresult() const
{
AssertSanity(Tnsresult);
return (*(constptr_nsresult()));
}
operator nsresult&()
{
return get_nsresult();
}
operator const nsresult&() const
{
return get_nsresult();
}
BidirectionalStream&
get_BidirectionalStream()
{
AssertSanity(TBidirectionalStream);
return (*(ptr_BidirectionalStream()));
}
const BidirectionalStream&
get_BidirectionalStream() const
{
AssertSanity(TBidirectionalStream);
return (*(constptr_BidirectionalStream()));
}
operator BidirectionalStream&()
{
return get_BidirectionalStream();
}
operator const BidirectionalStream&() const
{
return get_BidirectionalStream();
}
private:
union {
nsresult mVnsresult;
BidirectionalStream mVBidirectionalStream;
};
Type mType;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::BidirectionalStreamResponse>
{
typedef ::mozilla::dom::BidirectionalStreamResponse 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 ResetError|
//
namespace mozilla {
namespace dom {
class ResetError final
{
private:
typedef ::nsresult nsresult;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
ResetError() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT ResetError(const nsresult& _error) :
error_(_error)
{
}
MOZ_IMPLICIT ResetError(nsresult&& _error) :
error_(std::move(_error))
{
}
nsresult&
error()
{
return error_;
}
const nsresult&
error() const
{
return error_;
}
private:
::mozilla::ipc::IPDLStructMember<nsresult> error_;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::ResetError>
{
typedef ::mozilla::dom::ResetError 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 StopSendingError|
//
namespace mozilla {
namespace dom {
class StopSendingError final
{
private:
typedef ::nsresult nsresult;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
StopSendingError() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT StopSendingError(const nsresult& _error) :
error_(_error)
{
}
MOZ_IMPLICIT StopSendingError(nsresult&& _error) :
error_(std::move(_error))
{
}
nsresult&
error()
{
return error_;
}
const nsresult&
error() const
{
return error_;
}
private:
::mozilla::ipc::IPDLStructMember<nsresult> error_;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::StopSendingError>
{
typedef ::mozilla::dom::StopSendingError 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 |union StreamResetOrStopSendingError|
//
namespace mozilla {
namespace dom {
class StreamResetOrStopSendingError final
{
public:
enum Type {
T__None,
TResetError = 1,
TStopSendingError,
T__Last = TStopSendingError
};
private:
typedef ::mozilla::dom::ResetError ResetError;
typedef ::mozilla::dom::StopSendingError StopSendingError;
typedef ResetError ResetError__tdef;
typedef StopSendingError StopSendingError__tdef;
ResetError*
ptr_ResetError()
{
return (&(mVResetError));
}
const ResetError*
constptr_ResetError() const
{
return (&(mVResetError));
}
StopSendingError*
ptr_StopSendingError()
{
return (&(mVStopSendingError));
}
const StopSendingError*
constptr_StopSendingError() const
{
return (&(mVStopSendingError));
}
void
MaybeDestroy();
void
AssertSanity() const
{
MOZ_RELEASE_ASSERT((T__None) <= (mType), "invalid type tag");
MOZ_RELEASE_ASSERT((mType) <= (T__Last), "invalid type tag");
}
void
AssertSanity(Type aType) const
{
AssertSanity();
MOZ_RELEASE_ASSERT((mType) == (aType), "unexpected type tag");
}
public:
MOZ_IMPLICIT StreamResetOrStopSendingError() :
mType(T__None)
{
}
MOZ_IMPLICIT StreamResetOrStopSendingError(const ResetError& aOther);
MOZ_IMPLICIT StreamResetOrStopSendingError(ResetError&& aOther);
MOZ_IMPLICIT StreamResetOrStopSendingError(const StopSendingError& aOther);
MOZ_IMPLICIT StreamResetOrStopSendingError(StopSendingError&& aOther);
MOZ_IMPLICIT StreamResetOrStopSendingError(const StreamResetOrStopSendingError& aOther);
MOZ_IMPLICIT StreamResetOrStopSendingError(StreamResetOrStopSendingError&& aOther);
~StreamResetOrStopSendingError();
Type
type() const
{
return mType;
}
StreamResetOrStopSendingError&
operator=(const ResetError& aRhs);
StreamResetOrStopSendingError&
operator=(ResetError&& aRhs);
StreamResetOrStopSendingError&
operator=(const StopSendingError& aRhs);
StreamResetOrStopSendingError&
operator=(StopSendingError&& aRhs);
StreamResetOrStopSendingError&
operator=(const StreamResetOrStopSendingError& aRhs);
StreamResetOrStopSendingError&
operator=(StreamResetOrStopSendingError&& aRhs);
ResetError&
get_ResetError()
{
AssertSanity(TResetError);
return (*(ptr_ResetError()));
}
const ResetError&
get_ResetError() const
{
AssertSanity(TResetError);
return (*(constptr_ResetError()));
}
operator ResetError&()
{
return get_ResetError();
}
operator const ResetError&() const
{
return get_ResetError();
}
StopSendingError&
get_StopSendingError()
{
AssertSanity(TStopSendingError);
return (*(ptr_StopSendingError()));
}
const StopSendingError&
get_StopSendingError() const
{
AssertSanity(TStopSendingError);
return (*(constptr_StopSendingError()));
}
operator StopSendingError&()
{
return get_StopSendingError();
}
operator const StopSendingError&() const
{
return get_StopSendingError();
}
private:
union {
ResetError mVResetError;
StopSendingError mVStopSendingError;
};
Type mType;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::StreamResetOrStopSendingError>
{
typedef ::mozilla::dom::StreamResetOrStopSendingError paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
namespace mozilla {
namespace dom {
class PWebTransportParent;
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
class PWebTransportChild;
} // namespace dom
} // namespace mozilla
//-----------------------------------------------------------------------------
// Code common to PWebTransportChild and PWebTransportParent
//
namespace mozilla {
namespace dom {
namespace PWebTransport {
nsresult
CreateEndpoints(
mozilla::ipc::EndpointProcInfo aParentDestInfo,
mozilla::ipc::EndpointProcInfo aChildDestInfo,
mozilla::ipc::Endpoint<::mozilla::dom::PWebTransportParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::dom::PWebTransportChild>* aChild);
nsresult
CreateEndpoints(
mozilla::ipc::Endpoint<::mozilla::dom::PWebTransportParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::dom::PWebTransportChild>* aChild);
enum MessageType {
PWebTransportStart = PWebTransportMsgStart << 16,
Msg_Close__ID,
Msg_CreateUnidirectionalStream__ID,
Reply_CreateUnidirectionalStream__ID,
Msg_CreateBidirectionalStream__ID,
Reply_CreateBidirectionalStream__ID,
Msg_OutgoingDatagram__ID,
Reply_OutgoingDatagram__ID,
Msg_GetMaxDatagramSize__ID,
Reply_GetMaxDatagramSize__ID,
Msg_SetSendOrder__ID,
Msg_IncomingUnidirectionalStream__ID,
Msg_IncomingBidirectionalStream__ID,
Msg_IncomingDatagram__ID,
Msg_RemoteClosed__ID,
Msg_OnStreamResetOrStopSending__ID,
Msg_CloseAll__ID,
Reply_CloseAll__ID,
PWebTransportEnd
};
mozilla::UniquePtr<IPC::Message>
Msg_Close(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_CreateUnidirectionalStream(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_CreateUnidirectionalStream(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_CreateBidirectionalStream(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_CreateBidirectionalStream(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_OutgoingDatagram(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_OutgoingDatagram(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_GetMaxDatagramSize(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_GetMaxDatagramSize(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_SetSendOrder(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_IncomingUnidirectionalStream(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_IncomingBidirectionalStream(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_IncomingDatagram(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_RemoteClosed(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_OnStreamResetOrStopSending(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_CloseAll(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_CloseAll(int32_t routingId);
} // namespace PWebTransport
} // namespace dom
} // namespace mozilla
#endif // ifndef PWebTransport_h