Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#ifndef IPCBlob_h
#define IPCBlob_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/RemoteLazyInputStream.h"
#include "mozilla/ipc/IPDLStructMember.h"
#include "mozilla/ipc/IPCStream.h"
#include "mozilla/ipc/ProtocolTypes.h"
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |union RemoteLazyStream|
//
namespace mozilla {
class RemoteLazyStream final
{
public:
enum Type {
T__None,
TRemoteLazyInputStream = 1,
TIPCStream,
T__Last = TIPCStream
};
private:
typedef ::mozilla::RemoteLazyInputStream RemoteLazyInputStream;
typedef ::mozilla::ipc::IPCStream IPCStream;
typedef RefPtr<RemoteLazyInputStream> RemoteLazyInputStream__tdef;
typedef IPCStream IPCStream__tdef;
union Value {
mozilla::AlignedStorage2<RefPtr<RemoteLazyInputStream>> VRemoteLazyInputStream;
mozilla::AlignedStorage2<IPCStream> VIPCStream;
};
RefPtr<RemoteLazyInputStream>*
ptr_RemoteLazyInputStream()
{
return ((mValue).VRemoteLazyInputStream).addr();
}
const RefPtr<RemoteLazyInputStream>*
constptr_RemoteLazyInputStream() const
{
return ((mValue).VRemoteLazyInputStream).addr();
}
IPCStream*
ptr_IPCStream()
{
return ((mValue).VIPCStream).addr();
}
const IPCStream*
constptr_IPCStream() const
{
return ((mValue).VIPCStream).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 RemoteLazyStream() :
mType(T__None)
{
}
MOZ_IMPLICIT RemoteLazyStream(RemoteLazyInputStream* aOther);
MOZ_IMPLICIT RemoteLazyStream(RefPtr<RemoteLazyInputStream>&& aOther);
MOZ_IMPLICIT RemoteLazyStream(const IPCStream& aOther);
MOZ_IMPLICIT RemoteLazyStream(IPCStream&& aOther);
MOZ_IMPLICIT RemoteLazyStream(const RemoteLazyStream& aOther);
MOZ_IMPLICIT RemoteLazyStream(RemoteLazyStream&& aOther);
~RemoteLazyStream();
Type
type() const
{
return mType;
}
RemoteLazyStream&
operator=(RemoteLazyInputStream* aRhs);
RemoteLazyStream&
operator=(RefPtr<RemoteLazyInputStream>&& aRhs);
RemoteLazyStream&
operator=(const IPCStream& aRhs);
RemoteLazyStream&
operator=(IPCStream&& aRhs);
RemoteLazyStream&
operator=(const RemoteLazyStream& aRhs);
RemoteLazyStream&
operator=(RemoteLazyStream&& aRhs);
RefPtr<RemoteLazyInputStream>&
get_RemoteLazyInputStream()
{
AssertSanity(TRemoteLazyInputStream);
return (*(ptr_RemoteLazyInputStream()));
}
RemoteLazyInputStream*
get_RemoteLazyInputStream() const
{
AssertSanity(TRemoteLazyInputStream);
return (*(constptr_RemoteLazyInputStream()));
}
operator RefPtr<RemoteLazyInputStream>&()
{
return get_RemoteLazyInputStream();
}
operator RemoteLazyInputStream*() const
{
return get_RemoteLazyInputStream();
}
IPCStream&
get_IPCStream()
{
AssertSanity(TIPCStream);
return (*(ptr_IPCStream()));
}
const IPCStream&
get_IPCStream() const
{
AssertSanity(TIPCStream);
return (*(constptr_IPCStream()));
}
operator IPCStream&()
{
return get_IPCStream();
}
operator const IPCStream&() const
{
return get_IPCStream();
}
private:
Value mValue;
Type mType;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::RemoteLazyStream>
{
typedef ::mozilla::RemoteLazyStream 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 IPCFile|
//
namespace mozilla {
namespace dom {
class IPCFile final
{
private:
typedef ::nsString nsString;
typedef ::int64_t int64_t;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
IPCFile() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT IPCFile(
const nsString& _name,
const int64_t& _lastModified,
const nsString& _DOMPath,
const nsString& _fullPath,
const bool& _isDirectory) :
name_(_name),
DOMPath_(_DOMPath),
fullPath_(_fullPath),
isDirectory_(_isDirectory),
lastModified_(_lastModified)
{
}
MOZ_IMPLICIT IPCFile(
nsString&& _name,
int64_t&& _lastModified,
nsString&& _DOMPath,
nsString&& _fullPath,
bool&& _isDirectory) :
name_(std::move(_name)),
DOMPath_(std::move(_DOMPath)),
fullPath_(std::move(_fullPath)),
isDirectory_(std::move(_isDirectory)),
lastModified_(std::move(_lastModified))
{
}
nsString&
name()
{
return name_;
}
const nsString&
name() const
{
return name_;
}
int64_t&
lastModified()
{
return lastModified_;
}
const int64_t&
lastModified() const
{
return lastModified_;
}
nsString&
DOMPath()
{
return DOMPath_;
}
const nsString&
DOMPath() const
{
return DOMPath_;
}
nsString&
fullPath()
{
return fullPath_;
}
const nsString&
fullPath() const
{
return fullPath_;
}
bool&
isDirectory()
{
return isDirectory_;
}
const bool&
isDirectory() const
{
return isDirectory_;
}
private:
::mozilla::ipc::IPDLStructMember<nsString> name_;
::mozilla::ipc::IPDLStructMember<nsString> DOMPath_;
::mozilla::ipc::IPDLStructMember<nsString> fullPath_;
::mozilla::ipc::IPDLStructMember<bool> isDirectory_;
::mozilla::ipc::IPDLStructMember<int64_t> lastModified_;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::IPCFile>
{
typedef ::mozilla::dom::IPCFile 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 IPCBlob|
//
namespace mozilla {
namespace dom {
class IPCBlob final
{
private:
typedef ::nsString nsString;
typedef ::uint64_t uint64_t;
typedef ::mozilla::RemoteLazyStream RemoteLazyStream;
typedef ::mozilla::dom::IPCFile IPCFile;
typedef ::int64_t int64_t;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
IPCBlob() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT IPCBlob(
const nsString& _type,
const uint64_t& _size,
const nsString& _blobImplType,
const RemoteLazyStream& _inputStream,
const mozilla::Maybe<IPCFile>& _file,
const int64_t& _fileId) :
type_(_type),
blobImplType_(_blobImplType),
inputStream_(_inputStream),
file_(_file),
size_(_size),
fileId_(_fileId)
{
}
MOZ_IMPLICIT IPCBlob(
nsString&& _type,
uint64_t&& _size,
nsString&& _blobImplType,
RemoteLazyStream&& _inputStream,
mozilla::Maybe<IPCFile>&& _file,
int64_t&& _fileId) :
type_(std::move(_type)),
blobImplType_(std::move(_blobImplType)),
inputStream_(std::move(_inputStream)),
file_(std::move(_file)),
size_(std::move(_size)),
fileId_(std::move(_fileId))
{
}
nsString&
type()
{
return type_;
}
const nsString&
type() const
{
return type_;
}
uint64_t&
size()
{
return size_;
}
const uint64_t&
size() const
{
return size_;
}
nsString&
blobImplType()
{
return blobImplType_;
}
const nsString&
blobImplType() const
{
return blobImplType_;
}
RemoteLazyStream&
inputStream()
{
return inputStream_;
}
const RemoteLazyStream&
inputStream() const
{
return inputStream_;
}
mozilla::Maybe<IPCFile>&
file()
{
return file_;
}
const mozilla::Maybe<IPCFile>&
file() const
{
return file_;
}
int64_t&
fileId()
{
return fileId_;
}
const int64_t&
fileId() const
{
return fileId_;
}
private:
void
StaticAssertions() const;
::mozilla::ipc::IPDLStructMember<nsString> type_;
::mozilla::ipc::IPDLStructMember<nsString> blobImplType_;
::mozilla::ipc::IPDLStructMember<RemoteLazyStream> inputStream_;
::mozilla::ipc::IPDLStructMember<mozilla::Maybe<IPCFile>> file_;
::mozilla::ipc::IPDLStructMember<uint64_t> size_;
::mozilla::ipc::IPDLStructMember<int64_t> fileId_;
};
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::IPCBlob>
{
typedef ::mozilla::dom::IPCBlob paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
#endif // ifndef IPCBlob_h