Generated file

Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#ifndef PHWInference_h
#define PHWInference_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 GetModelFileSuccess|
//
namespace mozilla {
namespace hwinference {
class GetModelFileSuccess final
{
private:
typedef ::mozilla::ipc::FileDescriptor FileDescriptor;
public:
#ifdef __clang__
# pragma clang diagnostic push
# if __has_warning("-Wdefaulted-function-deleted")
# pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
# endif
#endif
GetModelFileSuccess() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT GetModelFileSuccess(const FileDescriptor& _fd) :
fd_(_fd)
{
}
MOZ_IMPLICIT GetModelFileSuccess(FileDescriptor&& _fd) :
fd_(std::move(_fd))
{
}
FileDescriptor&
fd()
{
return fd_;
}
const FileDescriptor&
fd() const
{
return fd_;
}
private:
::mozilla::ipc::IPDLStructMember<FileDescriptor> fd_;
};
} // namespace hwinference
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::hwinference::GetModelFileSuccess>
{
typedef ::mozilla::hwinference::GetModelFileSuccess 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 GetModelError|
//
namespace mozilla {
namespace hwinference {
class GetModelError 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
GetModelError() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT GetModelError(const nsresult& _errorCode) :
errorCode_(_errorCode)
{
}
MOZ_IMPLICIT GetModelError(nsresult&& _errorCode) :
errorCode_(std::move(_errorCode))
{
}
nsresult&
errorCode()
{
return errorCode_;
}
const nsresult&
errorCode() const
{
return errorCode_;
}
private:
::mozilla::ipc::IPDLStructMember<nsresult> errorCode_;
};
} // namespace hwinference
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::hwinference::GetModelError>
{
typedef ::mozilla::hwinference::GetModelError 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 GetModelFileResult|
//
namespace mozilla {
namespace hwinference {
class GetModelFileResult final
{
public:
enum Type {
T__None,
TGetModelFileSuccess = 1,
TGetModelError,
T__Last = TGetModelError
};
private:
typedef ::mozilla::hwinference::GetModelFileSuccess GetModelFileSuccess;
typedef ::mozilla::hwinference::GetModelError GetModelError;
typedef GetModelFileSuccess GetModelFileSuccess__tdef;
typedef GetModelError GetModelError__tdef;
GetModelFileSuccess*
ptr_GetModelFileSuccess()
{
return (&(mVGetModelFileSuccess));
}
const GetModelFileSuccess*
constptr_GetModelFileSuccess() const
{
return (&(mVGetModelFileSuccess));
}
GetModelError*
ptr_GetModelError()
{
return (&(mVGetModelError));
}
const GetModelError*
constptr_GetModelError() const
{
return (&(mVGetModelError));
}
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 GetModelFileResult() :
mType(T__None)
{
}
MOZ_IMPLICIT GetModelFileResult(const GetModelFileSuccess& aOther);
MOZ_IMPLICIT GetModelFileResult(GetModelFileSuccess&& aOther);
MOZ_IMPLICIT GetModelFileResult(const GetModelError& aOther);
MOZ_IMPLICIT GetModelFileResult(GetModelError&& aOther);
MOZ_IMPLICIT GetModelFileResult(const GetModelFileResult& aOther);
MOZ_IMPLICIT GetModelFileResult(GetModelFileResult&& aOther);
~GetModelFileResult();
Type
type() const
{
return mType;
}
GetModelFileResult&
operator=(const GetModelFileSuccess& aRhs);
GetModelFileResult&
operator=(GetModelFileSuccess&& aRhs);
GetModelFileResult&
operator=(const GetModelError& aRhs);
GetModelFileResult&
operator=(GetModelError&& aRhs);
GetModelFileResult&
operator=(const GetModelFileResult& aRhs);
GetModelFileResult&
operator=(GetModelFileResult&& aRhs);
GetModelFileSuccess&
get_GetModelFileSuccess()
{
AssertSanity(TGetModelFileSuccess);
return (*(ptr_GetModelFileSuccess()));
}
const GetModelFileSuccess&
get_GetModelFileSuccess() const
{
AssertSanity(TGetModelFileSuccess);
return (*(constptr_GetModelFileSuccess()));
}
operator GetModelFileSuccess&()
{
return get_GetModelFileSuccess();
}
operator const GetModelFileSuccess&() const
{
return get_GetModelFileSuccess();
}
GetModelError&
get_GetModelError()
{
AssertSanity(TGetModelError);
return (*(ptr_GetModelError()));
}
const GetModelError&
get_GetModelError() const
{
AssertSanity(TGetModelError);
return (*(constptr_GetModelError()));
}
operator GetModelError&()
{
return get_GetModelError();
}
operator const GetModelError&() const
{
return get_GetModelError();
}
private:
union {
GetModelFileSuccess mVGetModelFileSuccess;
GetModelError mVGetModelError;
};
Type mType;
};
} // namespace hwinference
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::hwinference::GetModelFileResult>
{
typedef ::mozilla::hwinference::GetModelFileResult paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
namespace mozilla {
namespace hwinference {
class PHWInferenceParent;
} // namespace hwinference
} // namespace mozilla
namespace mozilla {
namespace hwinference {
class PHWInferenceChild;
} // namespace hwinference
} // namespace mozilla
//-----------------------------------------------------------------------------
// Code common to PHWInferenceChild and PHWInferenceParent
//
namespace mozilla {
namespace hwinference {
namespace PHWInference {
nsresult
CreateEndpoints(
mozilla::ipc::EndpointProcInfo aParentDestInfo,
mozilla::ipc::EndpointProcInfo aChildDestInfo,
mozilla::ipc::Endpoint<::mozilla::hwinference::PHWInferenceParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::hwinference::PHWInferenceChild>* aChild);
nsresult
CreateEndpoints(
mozilla::ipc::Endpoint<::mozilla::hwinference::PHWInferenceParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::hwinference::PHWInferenceChild>* aChild);
enum MessageType {
PHWInferenceStart = PHWInferenceMsgStart << 16,
Msg_IsModelAvailable__ID,
Reply_IsModelAvailable__ID,
Msg_IsModelInstalled__ID,
Reply_IsModelInstalled__ID,
Msg_InstallModel__ID,
Reply_InstallModel__ID,
Msg_GetModelFile__ID,
Reply_GetModelFile__ID,
Msg_NewContentSpeechRecognition__ID,
PHWInferenceEnd
};
mozilla::UniquePtr<IPC::Message>
Msg_IsModelAvailable(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_IsModelAvailable(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_IsModelInstalled(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_IsModelInstalled(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_InstallModel(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_InstallModel(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_GetModelFile(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_GetModelFile(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_NewContentSpeechRecognition(IPC::Message::routeid_t routingId);
} // namespace PHWInference
} // namespace hwinference
} // namespace mozilla
#endif // ifndef PHWInference_h