Copy as Markdown
Other Tools
//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#ifndef PQuotaRequest_h
#define PQuotaRequest_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/quota/CommonMetadata.h"
#include "mozilla/ipc/IPDLStructMember.h"
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct StorageNameResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
class StorageNameResponse final
{
private:
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
StorageNameResponse() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT StorageNameResponse(const nsString& _name) :
name_(_name)
{
}
MOZ_IMPLICIT StorageNameResponse(nsString&& _name) :
name_(std::move(_name))
{
}
nsString&
name()
{
return name_;
}
const nsString&
name() const
{
return name_;
}
private:
::mozilla::ipc::IPDLStructMember<nsString> name_;
};
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::quota::StorageNameResponse>
{
typedef ::mozilla::dom::quota::StorageNameResponse 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 GetFullOriginMetadataResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
class GetFullOriginMetadataResponse final
{
private:
typedef ::mozilla::dom::quota::FullOriginMetadata FullOriginMetadata;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
GetFullOriginMetadataResponse() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT GetFullOriginMetadataResponse(const mozilla::Maybe<FullOriginMetadata>& _maybeFullOriginMetadata) :
maybeFullOriginMetadata_(_maybeFullOriginMetadata)
{
}
MOZ_IMPLICIT GetFullOriginMetadataResponse(mozilla::Maybe<FullOriginMetadata>&& _maybeFullOriginMetadata) :
maybeFullOriginMetadata_(std::move(_maybeFullOriginMetadata))
{
}
mozilla::Maybe<FullOriginMetadata>&
maybeFullOriginMetadata()
{
return maybeFullOriginMetadata_;
}
const mozilla::Maybe<FullOriginMetadata>&
maybeFullOriginMetadata() const
{
return maybeFullOriginMetadata_;
}
private:
::mozilla::ipc::IPDLStructMember<mozilla::Maybe<FullOriginMetadata>> maybeFullOriginMetadata_;
};
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::quota::GetFullOriginMetadataResponse>
{
typedef ::mozilla::dom::quota::GetFullOriginMetadataResponse 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 PersistedResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
class PersistedResponse final
{
private:
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
PersistedResponse() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT PersistedResponse(const bool& _persisted) :
persisted_(_persisted)
{
}
MOZ_IMPLICIT PersistedResponse(bool&& _persisted) :
persisted_(std::move(_persisted))
{
}
bool&
persisted()
{
return persisted_;
}
const bool&
persisted() const
{
return persisted_;
}
private:
::mozilla::ipc::IPDLStructMember<bool> persisted_;
};
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::quota::PersistedResponse>
{
typedef ::mozilla::dom::quota::PersistedResponse 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 PersistResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
class PersistResponse final
{
private:
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
PersistResponse() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
private:
};
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::quota::PersistResponse>
{
typedef ::mozilla::dom::quota::PersistResponse 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 EstimateResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
class EstimateResponse final
{
private:
typedef ::uint64_t uint64_t;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
EstimateResponse() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT EstimateResponse(
const uint64_t& _usage,
const uint64_t& _limit) :
usage_(_usage),
limit_(_limit)
{
}
MOZ_IMPLICIT EstimateResponse(
uint64_t&& _usage,
uint64_t&& _limit) :
usage_(std::move(_usage)),
limit_(std::move(_limit))
{
}
uint64_t&
usage()
{
return usage_;
}
const uint64_t&
usage() const
{
return usage_;
}
uint64_t&
limit()
{
return limit_;
}
const uint64_t&
limit() const
{
return limit_;
}
private:
void
StaticAssertions() const;
::mozilla::ipc::IPDLStructMember<uint64_t> usage_;
::mozilla::ipc::IPDLStructMember<uint64_t> limit_;
};
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::quota::EstimateResponse>
{
typedef ::mozilla::dom::quota::EstimateResponse 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 ListOriginsResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
class ListOriginsResponse final
{
private:
typedef ::nsCString nsCString;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
ListOriginsResponse() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT ListOriginsResponse(const nsTArray<nsCString>& _origins) :
origins_(_origins)
{
}
MOZ_IMPLICIT ListOriginsResponse(nsTArray<nsCString>&& _origins) :
origins_(std::move(_origins))
{
}
nsTArray<nsCString>&
origins()
{
return origins_;
}
const nsTArray<nsCString>&
origins() const
{
return origins_;
}
private:
::mozilla::ipc::IPDLStructMember<CopyableTArray<nsCString>> origins_;
};
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::quota::ListOriginsResponse>
{
typedef ::mozilla::dom::quota::ListOriginsResponse 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 RequestResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
class RequestResponse final
{
public:
enum Type {
T__None,
Tnsresult = 1,
TStorageNameResponse,
TGetFullOriginMetadataResponse,
TPersistedResponse,
TPersistResponse,
TEstimateResponse,
TListOriginsResponse,
T__Last = TListOriginsResponse
};
private:
typedef ::nsresult nsresult;
typedef ::mozilla::dom::quota::StorageNameResponse StorageNameResponse;
typedef ::mozilla::dom::quota::GetFullOriginMetadataResponse GetFullOriginMetadataResponse;
typedef ::mozilla::dom::quota::PersistedResponse PersistedResponse;
typedef ::mozilla::dom::quota::PersistResponse PersistResponse;
typedef ::mozilla::dom::quota::EstimateResponse EstimateResponse;
typedef ::mozilla::dom::quota::ListOriginsResponse ListOriginsResponse;
typedef nsresult nsresult__tdef;
typedef StorageNameResponse StorageNameResponse__tdef;
typedef GetFullOriginMetadataResponse GetFullOriginMetadataResponse__tdef;
typedef PersistedResponse PersistedResponse__tdef;
typedef PersistResponse PersistResponse__tdef;
typedef EstimateResponse EstimateResponse__tdef;
typedef ListOriginsResponse ListOriginsResponse__tdef;
nsresult*
ptr_nsresult()
{
return (&(mVnsresult));
}
const nsresult*
constptr_nsresult() const
{
return (&(mVnsresult));
}
StorageNameResponse*
ptr_StorageNameResponse()
{
return (&(mVStorageNameResponse));
}
const StorageNameResponse*
constptr_StorageNameResponse() const
{
return (&(mVStorageNameResponse));
}
GetFullOriginMetadataResponse*
ptr_GetFullOriginMetadataResponse()
{
return (&(mVGetFullOriginMetadataResponse));
}
const GetFullOriginMetadataResponse*
constptr_GetFullOriginMetadataResponse() const
{
return (&(mVGetFullOriginMetadataResponse));
}
PersistedResponse*
ptr_PersistedResponse()
{
return (&(mVPersistedResponse));
}
const PersistedResponse*
constptr_PersistedResponse() const
{
return (&(mVPersistedResponse));
}
PersistResponse*
ptr_PersistResponse()
{
return (&(mVPersistResponse));
}
const PersistResponse*
constptr_PersistResponse() const
{
return (&(mVPersistResponse));
}
EstimateResponse*
ptr_EstimateResponse()
{
return (&(mVEstimateResponse));
}
const EstimateResponse*
constptr_EstimateResponse() const
{
return (&(mVEstimateResponse));
}
ListOriginsResponse*
ptr_ListOriginsResponse()
{
return (&(mVListOriginsResponse));
}
const ListOriginsResponse*
constptr_ListOriginsResponse() const
{
return (&(mVListOriginsResponse));
}
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 RequestResponse() :
mType(T__None)
{
}
MOZ_IMPLICIT RequestResponse(const nsresult& aOther);
MOZ_IMPLICIT RequestResponse(nsresult&& aOther);
MOZ_IMPLICIT RequestResponse(const StorageNameResponse& aOther);
MOZ_IMPLICIT RequestResponse(StorageNameResponse&& aOther);
MOZ_IMPLICIT RequestResponse(const GetFullOriginMetadataResponse& aOther);
MOZ_IMPLICIT RequestResponse(GetFullOriginMetadataResponse&& aOther);
MOZ_IMPLICIT RequestResponse(const PersistedResponse& aOther);
MOZ_IMPLICIT RequestResponse(PersistedResponse&& aOther);
MOZ_IMPLICIT RequestResponse(const PersistResponse& aOther);
MOZ_IMPLICIT RequestResponse(PersistResponse&& aOther);
MOZ_IMPLICIT RequestResponse(const EstimateResponse& aOther);
MOZ_IMPLICIT RequestResponse(EstimateResponse&& aOther);
MOZ_IMPLICIT RequestResponse(const ListOriginsResponse& aOther);
MOZ_IMPLICIT RequestResponse(ListOriginsResponse&& aOther);
MOZ_IMPLICIT RequestResponse(const RequestResponse& aOther);
MOZ_IMPLICIT RequestResponse(RequestResponse&& aOther);
~RequestResponse();
Type
type() const
{
return mType;
}
RequestResponse&
operator=(const nsresult& aRhs);
RequestResponse&
operator=(nsresult&& aRhs);
RequestResponse&
operator=(const StorageNameResponse& aRhs);
RequestResponse&
operator=(StorageNameResponse&& aRhs);
RequestResponse&
operator=(const GetFullOriginMetadataResponse& aRhs);
RequestResponse&
operator=(GetFullOriginMetadataResponse&& aRhs);
RequestResponse&
operator=(const PersistedResponse& aRhs);
RequestResponse&
operator=(PersistedResponse&& aRhs);
RequestResponse&
operator=(const PersistResponse& aRhs);
RequestResponse&
operator=(PersistResponse&& aRhs);
RequestResponse&
operator=(const EstimateResponse& aRhs);
RequestResponse&
operator=(EstimateResponse&& aRhs);
RequestResponse&
operator=(const ListOriginsResponse& aRhs);
RequestResponse&
operator=(ListOriginsResponse&& aRhs);
RequestResponse&
operator=(const RequestResponse& aRhs);
RequestResponse&
operator=(RequestResponse&& 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();
}
StorageNameResponse&
get_StorageNameResponse()
{
AssertSanity(TStorageNameResponse);
return (*(ptr_StorageNameResponse()));
}
const StorageNameResponse&
get_StorageNameResponse() const
{
AssertSanity(TStorageNameResponse);
return (*(constptr_StorageNameResponse()));
}
operator StorageNameResponse&()
{
return get_StorageNameResponse();
}
operator const StorageNameResponse&() const
{
return get_StorageNameResponse();
}
GetFullOriginMetadataResponse&
get_GetFullOriginMetadataResponse()
{
AssertSanity(TGetFullOriginMetadataResponse);
return (*(ptr_GetFullOriginMetadataResponse()));
}
const GetFullOriginMetadataResponse&
get_GetFullOriginMetadataResponse() const
{
AssertSanity(TGetFullOriginMetadataResponse);
return (*(constptr_GetFullOriginMetadataResponse()));
}
operator GetFullOriginMetadataResponse&()
{
return get_GetFullOriginMetadataResponse();
}
operator const GetFullOriginMetadataResponse&() const
{
return get_GetFullOriginMetadataResponse();
}
PersistedResponse&
get_PersistedResponse()
{
AssertSanity(TPersistedResponse);
return (*(ptr_PersistedResponse()));
}
const PersistedResponse&
get_PersistedResponse() const
{
AssertSanity(TPersistedResponse);
return (*(constptr_PersistedResponse()));
}
operator PersistedResponse&()
{
return get_PersistedResponse();
}
operator const PersistedResponse&() const
{
return get_PersistedResponse();
}
PersistResponse&
get_PersistResponse()
{
AssertSanity(TPersistResponse);
return (*(ptr_PersistResponse()));
}
const PersistResponse&
get_PersistResponse() const
{
AssertSanity(TPersistResponse);
return (*(constptr_PersistResponse()));
}
operator PersistResponse&()
{
return get_PersistResponse();
}
operator const PersistResponse&() const
{
return get_PersistResponse();
}
EstimateResponse&
get_EstimateResponse()
{
AssertSanity(TEstimateResponse);
return (*(ptr_EstimateResponse()));
}
const EstimateResponse&
get_EstimateResponse() const
{
AssertSanity(TEstimateResponse);
return (*(constptr_EstimateResponse()));
}
operator EstimateResponse&()
{
return get_EstimateResponse();
}
operator const EstimateResponse&() const
{
return get_EstimateResponse();
}
ListOriginsResponse&
get_ListOriginsResponse()
{
AssertSanity(TListOriginsResponse);
return (*(ptr_ListOriginsResponse()));
}
const ListOriginsResponse&
get_ListOriginsResponse() const
{
AssertSanity(TListOriginsResponse);
return (*(constptr_ListOriginsResponse()));
}
operator ListOriginsResponse&()
{
return get_ListOriginsResponse();
}
operator const ListOriginsResponse&() const
{
return get_ListOriginsResponse();
}
private:
union {
nsresult mVnsresult;
StorageNameResponse mVStorageNameResponse;
GetFullOriginMetadataResponse mVGetFullOriginMetadataResponse;
PersistedResponse mVPersistedResponse;
PersistResponse mVPersistResponse;
EstimateResponse mVEstimateResponse;
ListOriginsResponse mVListOriginsResponse;
};
Type mType;
};
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::quota::RequestResponse>
{
typedef ::mozilla::dom::quota::RequestResponse paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
namespace mozilla {
namespace dom {
namespace quota {
class PQuotaRequestParent;
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
namespace quota {
class PQuotaRequestChild;
} // namespace quota
} // namespace dom
} // namespace mozilla
//-----------------------------------------------------------------------------
// Code common to PQuotaRequestChild and PQuotaRequestParent
//
namespace mozilla {
namespace dom {
namespace quota {
namespace PQuotaRequest {
nsresult
CreateEndpoints(
mozilla::ipc::EndpointProcInfo aParentDestInfo,
mozilla::ipc::EndpointProcInfo aChildDestInfo,
mozilla::ipc::Endpoint<::mozilla::dom::quota::PQuotaRequestParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::dom::quota::PQuotaRequestChild>* aChild);
enum MessageType {
PQuotaRequestStart = PQuotaRequestMsgStart << 16,
Msg___delete____ID,
Reply___delete____ID,
PQuotaRequestEnd
};
mozilla::UniquePtr<IPC::Message>
Msg___delete__(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply___delete__(int32_t routingId);
} // namespace PQuotaRequest
} // namespace quota
} // namespace dom
} // namespace mozilla
#endif // ifndef PQuotaRequest_h