Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#ifndef PSMIPCTypes_h
#define PSMIPCTypes_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"
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct ByteArray|
//
namespace mozilla {
namespace psm {
class ByteArray final
{
private:
typedef ::uint8_t uint8_t;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
ByteArray() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT ByteArray(const nsTArray<uint8_t>& _data) :
data_(_data)
{
}
MOZ_IMPLICIT ByteArray(nsTArray<uint8_t>&& _data) :
data_(std::move(_data))
{
}
nsTArray<uint8_t>&
data()
{
return data_;
}
const nsTArray<uint8_t>&
data() const
{
return data_;
}
private:
::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> data_;
};
} // namespace psm
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::psm::ByteArray>
{
typedef ::mozilla::psm::ByteArray 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 ECKey|
//
namespace mozilla {
namespace psm {
class ECKey final
{
private:
typedef ::uint8_t uint8_t;
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
ECKey() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT ECKey(
const nsTArray<uint8_t>& _params,
const nsTArray<uint8_t>& _cert,
const uint32_t& _slotType) :
params_(_params),
cert_(_cert),
slotType_(_slotType)
{
}
MOZ_IMPLICIT ECKey(
nsTArray<uint8_t>&& _params,
nsTArray<uint8_t>&& _cert,
uint32_t&& _slotType) :
params_(std::move(_params)),
cert_(std::move(_cert)),
slotType_(std::move(_slotType))
{
}
nsTArray<uint8_t>&
params()
{
return params_;
}
const nsTArray<uint8_t>&
params() const
{
return params_;
}
nsTArray<uint8_t>&
cert()
{
return cert_;
}
const nsTArray<uint8_t>&
cert() const
{
return cert_;
}
uint32_t&
slotType()
{
return slotType_;
}
const uint32_t&
slotType() const
{
return slotType_;
}
private:
::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> params_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> cert_;
::mozilla::ipc::IPDLStructMember<uint32_t> slotType_;
};
} // namespace psm
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::psm::ECKey>
{
typedef ::mozilla::psm::ECKey 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 RSAKey|
//
namespace mozilla {
namespace psm {
class RSAKey final
{
private:
typedef ::uint8_t uint8_t;
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
RSAKey() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT RSAKey(
const nsTArray<uint8_t>& _modulus,
const nsTArray<uint8_t>& _cert,
const uint32_t& _slotType) :
modulus_(_modulus),
cert_(_cert),
slotType_(_slotType)
{
}
MOZ_IMPLICIT RSAKey(
nsTArray<uint8_t>&& _modulus,
nsTArray<uint8_t>&& _cert,
uint32_t&& _slotType) :
modulus_(std::move(_modulus)),
cert_(std::move(_cert)),
slotType_(std::move(_slotType))
{
}
nsTArray<uint8_t>&
modulus()
{
return modulus_;
}
const nsTArray<uint8_t>&
modulus() const
{
return modulus_;
}
nsTArray<uint8_t>&
cert()
{
return cert_;
}
const nsTArray<uint8_t>&
cert() const
{
return cert_;
}
uint32_t&
slotType()
{
return slotType_;
}
const uint32_t&
slotType() const
{
return slotType_;
}
private:
::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> modulus_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> cert_;
::mozilla::ipc::IPDLStructMember<uint32_t> slotType_;
};
} // namespace psm
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::psm::RSAKey>
{
typedef ::mozilla::psm::RSAKey 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 Certificate|
//
namespace mozilla {
namespace psm {
class Certificate final
{
private:
typedef ::uint8_t uint8_t;
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
Certificate() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT Certificate(
const nsTArray<uint8_t>& _der,
const uint32_t& _slotType) :
der_(_der),
slotType_(_slotType)
{
}
MOZ_IMPLICIT Certificate(
nsTArray<uint8_t>&& _der,
uint32_t&& _slotType) :
der_(std::move(_der)),
slotType_(std::move(_slotType))
{
}
nsTArray<uint8_t>&
der()
{
return der_;
}
const nsTArray<uint8_t>&
der() const
{
return der_;
}
uint32_t&
slotType()
{
return slotType_;
}
const uint32_t&
slotType() const
{
return slotType_;
}
private:
::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> der_;
::mozilla::ipc::IPDLStructMember<uint32_t> slotType_;
};
} // namespace psm
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::psm::Certificate>
{
typedef ::mozilla::psm::Certificate 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 IPCClientCertObject|
//
namespace mozilla {
namespace psm {
class IPCClientCertObject final
{
public:
enum Type {
T__None,
TECKey = 1,
TRSAKey,
TCertificate,
T__Last = TCertificate
};
private:
typedef ::mozilla::psm::ECKey ECKey;
typedef ::mozilla::psm::RSAKey RSAKey;
typedef ::mozilla::psm::Certificate Certificate;
typedef ECKey ECKey__tdef;
typedef RSAKey RSAKey__tdef;
typedef Certificate Certificate__tdef;
union Value {
mozilla::AlignedStorage2<ECKey> VECKey;
mozilla::AlignedStorage2<RSAKey> VRSAKey;
mozilla::AlignedStorage2<Certificate> VCertificate;
};
ECKey*
ptr_ECKey()
{
return ((mValue).VECKey).addr();
}
const ECKey*
constptr_ECKey() const
{
return ((mValue).VECKey).addr();
}
RSAKey*
ptr_RSAKey()
{
return ((mValue).VRSAKey).addr();
}
const RSAKey*
constptr_RSAKey() const
{
return ((mValue).VRSAKey).addr();
}
Certificate*
ptr_Certificate()
{
return ((mValue).VCertificate).addr();
}
const Certificate*
constptr_Certificate() const
{
return ((mValue).VCertificate).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 IPCClientCertObject() :
mType(T__None)
{
}
MOZ_IMPLICIT IPCClientCertObject(const ECKey& aOther);
MOZ_IMPLICIT IPCClientCertObject(ECKey&& aOther);
MOZ_IMPLICIT IPCClientCertObject(const RSAKey& aOther);
MOZ_IMPLICIT IPCClientCertObject(RSAKey&& aOther);
MOZ_IMPLICIT IPCClientCertObject(const Certificate& aOther);
MOZ_IMPLICIT IPCClientCertObject(Certificate&& aOther);
MOZ_IMPLICIT IPCClientCertObject(const IPCClientCertObject& aOther);
MOZ_IMPLICIT IPCClientCertObject(IPCClientCertObject&& aOther);
~IPCClientCertObject();
Type
type() const
{
return mType;
}
IPCClientCertObject&
operator=(const ECKey& aRhs);
IPCClientCertObject&
operator=(ECKey&& aRhs);
IPCClientCertObject&
operator=(const RSAKey& aRhs);
IPCClientCertObject&
operator=(RSAKey&& aRhs);
IPCClientCertObject&
operator=(const Certificate& aRhs);
IPCClientCertObject&
operator=(Certificate&& aRhs);
IPCClientCertObject&
operator=(const IPCClientCertObject& aRhs);
IPCClientCertObject&
operator=(IPCClientCertObject&& aRhs);
ECKey&
get_ECKey()
{
AssertSanity(TECKey);
return (*(ptr_ECKey()));
}
const ECKey&
get_ECKey() const
{
AssertSanity(TECKey);
return (*(constptr_ECKey()));
}
operator ECKey&()
{
return get_ECKey();
}
operator const ECKey&() const
{
return get_ECKey();
}
RSAKey&
get_RSAKey()
{
AssertSanity(TRSAKey);
return (*(ptr_RSAKey()));
}
const RSAKey&
get_RSAKey() const
{
AssertSanity(TRSAKey);
return (*(constptr_RSAKey()));
}
operator RSAKey&()
{
return get_RSAKey();
}
operator const RSAKey&() const
{
return get_RSAKey();
}
Certificate&
get_Certificate()
{
AssertSanity(TCertificate);
return (*(ptr_Certificate()));
}
const Certificate&
get_Certificate() const
{
AssertSanity(TCertificate);
return (*(constptr_Certificate()));
}
operator Certificate&()
{
return get_Certificate();
}
operator const Certificate&() const
{
return get_Certificate();
}
private:
Value mValue;
Type mType;
};
} // namespace psm
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::psm::IPCClientCertObject>
{
typedef ::mozilla::psm::IPCClientCertObject 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 DelegatedCredentialInfoArg|
//
namespace mozilla {
namespace psm {
class DelegatedCredentialInfoArg final
{
private:
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
DelegatedCredentialInfoArg() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT DelegatedCredentialInfoArg(
const uint32_t& _scheme,
const uint32_t& _authKeyBits) :
scheme_(_scheme),
authKeyBits_(_authKeyBits)
{
}
MOZ_IMPLICIT DelegatedCredentialInfoArg(
uint32_t&& _scheme,
uint32_t&& _authKeyBits) :
scheme_(std::move(_scheme)),
authKeyBits_(std::move(_authKeyBits))
{
}
uint32_t&
scheme()
{
return scheme_;
}
const uint32_t&
scheme() const
{
return scheme_;
}
uint32_t&
authKeyBits()
{
return authKeyBits_;
}
const uint32_t&
authKeyBits() const
{
return authKeyBits_;
}
private:
void
StaticAssertions() const;
::mozilla::ipc::IPDLStructMember<uint32_t> scheme_;
::mozilla::ipc::IPDLStructMember<uint32_t> authKeyBits_;
};
} // namespace psm
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::psm::DelegatedCredentialInfoArg>
{
typedef ::mozilla::psm::DelegatedCredentialInfoArg paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
#endif // ifndef PSMIPCTypes_h