Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#ifndef RandomAccessStreamParams_h
#define RandomAccessStreamParams_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/IPDLStructMember.h"
#include "mozilla/dom/quota/IPCQuotaObject.h"
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct FileRandomAccessStreamParams|
//
namespace mozilla {
namespace ipc {
class FileRandomAccessStreamParams final
{
private:
typedef ::mozilla::ipc::FileDescriptor FileDescriptor;
typedef ::int32_t int32_t;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
FileRandomAccessStreamParams() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT FileRandomAccessStreamParams(
const FileDescriptor& _fileDescriptor,
const int32_t& _behaviorFlags) :
fileDescriptor_(_fileDescriptor),
behaviorFlags_(_behaviorFlags)
{
}
MOZ_IMPLICIT FileRandomAccessStreamParams(
FileDescriptor&& _fileDescriptor,
int32_t&& _behaviorFlags) :
fileDescriptor_(std::move(_fileDescriptor)),
behaviorFlags_(std::move(_behaviorFlags))
{
}
FileDescriptor&
fileDescriptor()
{
return fileDescriptor_;
}
const FileDescriptor&
fileDescriptor() const
{
return fileDescriptor_;
}
int32_t&
behaviorFlags()
{
return behaviorFlags_;
}
const int32_t&
behaviorFlags() const
{
return behaviorFlags_;
}
private:
::mozilla::ipc::IPDLStructMember<FileDescriptor> fileDescriptor_;
::mozilla::ipc::IPDLStructMember<int32_t> behaviorFlags_;
};
} // namespace ipc
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::ipc::FileRandomAccessStreamParams>
{
typedef ::mozilla::ipc::FileRandomAccessStreamParams 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 LimitingFileRandomAccessStreamParams|
//
namespace mozilla {
namespace ipc {
class LimitingFileRandomAccessStreamParams final
{
private:
typedef ::mozilla::ipc::FileRandomAccessStreamParams FileRandomAccessStreamParams;
typedef ::mozilla::dom::quota::IPCQuotaObject IPCQuotaObject;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
LimitingFileRandomAccessStreamParams() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT LimitingFileRandomAccessStreamParams(
const FileRandomAccessStreamParams& _fileRandomAccessStreamParams,
IPCQuotaObject&& _quotaObject) :
fileRandomAccessStreamParams_(_fileRandomAccessStreamParams),
quotaObject_(std::move(_quotaObject))
{
}
MOZ_IMPLICIT LimitingFileRandomAccessStreamParams(
FileRandomAccessStreamParams&& _fileRandomAccessStreamParams,
IPCQuotaObject&& _quotaObject) :
fileRandomAccessStreamParams_(std::move(_fileRandomAccessStreamParams)),
quotaObject_(std::move(_quotaObject))
{
}
FileRandomAccessStreamParams&
fileRandomAccessStreamParams()
{
return fileRandomAccessStreamParams_;
}
const FileRandomAccessStreamParams&
fileRandomAccessStreamParams() const
{
return fileRandomAccessStreamParams_;
}
IPCQuotaObject&
quotaObject()
{
return quotaObject_;
}
const IPCQuotaObject&
quotaObject() const
{
return quotaObject_;
}
private:
::mozilla::ipc::IPDLStructMember<FileRandomAccessStreamParams> fileRandomAccessStreamParams_;
::mozilla::ipc::IPDLStructMember<IPCQuotaObject> quotaObject_;
};
} // namespace ipc
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::ipc::LimitingFileRandomAccessStreamParams>
{
typedef ::mozilla::ipc::LimitingFileRandomAccessStreamParams paramType;
static void
Write(
IPC::MessageWriter* aWriter,
paramType&& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |union RandomAccessStreamParams|
//
namespace mozilla {
namespace ipc {
class RandomAccessStreamParams final
{
public:
enum Type {
T__None,
TFileRandomAccessStreamParams = 1,
TLimitingFileRandomAccessStreamParams,
T__Last = TLimitingFileRandomAccessStreamParams
};
private:
typedef ::mozilla::ipc::FileRandomAccessStreamParams FileRandomAccessStreamParams;
typedef ::mozilla::ipc::LimitingFileRandomAccessStreamParams LimitingFileRandomAccessStreamParams;
typedef FileRandomAccessStreamParams FileRandomAccessStreamParams__tdef;
typedef LimitingFileRandomAccessStreamParams LimitingFileRandomAccessStreamParams__tdef;
union Value {
mozilla::AlignedStorage2<FileRandomAccessStreamParams> VFileRandomAccessStreamParams;
mozilla::AlignedStorage2<LimitingFileRandomAccessStreamParams> VLimitingFileRandomAccessStreamParams;
};
FileRandomAccessStreamParams*
ptr_FileRandomAccessStreamParams()
{
return ((mValue).VFileRandomAccessStreamParams).addr();
}
const FileRandomAccessStreamParams*
constptr_FileRandomAccessStreamParams() const
{
return ((mValue).VFileRandomAccessStreamParams).addr();
}
LimitingFileRandomAccessStreamParams*
ptr_LimitingFileRandomAccessStreamParams()
{
return ((mValue).VLimitingFileRandomAccessStreamParams).addr();
}
const LimitingFileRandomAccessStreamParams*
constptr_LimitingFileRandomAccessStreamParams() const
{
return ((mValue).VLimitingFileRandomAccessStreamParams).addr();
}
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 RandomAccessStreamParams() :
mType(T__None)
{
}
MOZ_IMPLICIT RandomAccessStreamParams(const FileRandomAccessStreamParams& aOther);
MOZ_IMPLICIT RandomAccessStreamParams(FileRandomAccessStreamParams&& aOther);
MOZ_IMPLICIT RandomAccessStreamParams(LimitingFileRandomAccessStreamParams&& aOther);
MOZ_IMPLICIT RandomAccessStreamParams(RandomAccessStreamParams&& aOther);
~RandomAccessStreamParams();
Type
type() const
{
return mType;
}
RandomAccessStreamParams&
operator=(const FileRandomAccessStreamParams& aRhs);
RandomAccessStreamParams&
operator=(FileRandomAccessStreamParams&& aRhs);
RandomAccessStreamParams&
operator=(LimitingFileRandomAccessStreamParams&& aRhs);
RandomAccessStreamParams&
operator=(RandomAccessStreamParams&& aRhs);
FileRandomAccessStreamParams&
get_FileRandomAccessStreamParams()
{
AssertSanity(TFileRandomAccessStreamParams);
return (*(ptr_FileRandomAccessStreamParams()));
}
const FileRandomAccessStreamParams&
get_FileRandomAccessStreamParams() const
{
AssertSanity(TFileRandomAccessStreamParams);
return (*(constptr_FileRandomAccessStreamParams()));
}
operator FileRandomAccessStreamParams&()
{
return get_FileRandomAccessStreamParams();
}
operator const FileRandomAccessStreamParams&() const
{
return get_FileRandomAccessStreamParams();
}
LimitingFileRandomAccessStreamParams&
get_LimitingFileRandomAccessStreamParams()
{
AssertSanity(TLimitingFileRandomAccessStreamParams);
return (*(ptr_LimitingFileRandomAccessStreamParams()));
}
const LimitingFileRandomAccessStreamParams&
get_LimitingFileRandomAccessStreamParams() const
{
AssertSanity(TLimitingFileRandomAccessStreamParams);
return (*(constptr_LimitingFileRandomAccessStreamParams()));
}
operator LimitingFileRandomAccessStreamParams&()
{
return get_LimitingFileRandomAccessStreamParams();
}
operator const LimitingFileRandomAccessStreamParams&() const
{
return get_LimitingFileRandomAccessStreamParams();
}
private:
Value mValue;
Type mType;
};
} // namespace ipc
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::ipc::RandomAccessStreamParams>
{
typedef ::mozilla::ipc::RandomAccessStreamParams paramType;
static void
Write(
IPC::MessageWriter* aWriter,
paramType&& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
#endif // ifndef RandomAccessStreamParams_h