Copy as Markdown
Other Tools
//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#ifndef PWinFileDialog_h
#define PWinFileDialog_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"
#include "mozilla/widget/filedialog/WinFileDialogCommandsDefn.h"
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |union FileResult|
//
namespace mozilla {
namespace widget {
namespace filedialog {
class FileResult final
{
public:
enum Type {
T__None,
TMaybeResults = 1,
TRemoteError,
T__Last = TRemoteError
};
private:
typedef ::mozilla::widget::filedialog::Results Results;
typedef ::mozilla::widget::filedialog::RemoteError RemoteError;
typedef mozilla::Maybe<Results> MaybeResults__tdef;
typedef RemoteError RemoteError__tdef;
mozilla::Maybe<Results>*
ptr_MaybeResults()
{
return (&(mVMaybeResults));
}
const mozilla::Maybe<Results>*
constptr_MaybeResults() const
{
return (&(mVMaybeResults));
}
RemoteError*
ptr_RemoteError()
{
return (&(mVRemoteError));
}
const RemoteError*
constptr_RemoteError() const
{
return (&(mVRemoteError));
}
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 FileResult() :
mType(T__None)
{
}
MOZ_IMPLICIT FileResult(const mozilla::Maybe<Results>& aOther);
MOZ_IMPLICIT FileResult(mozilla::Maybe<Results>&& aOther);
MOZ_IMPLICIT FileResult(const RemoteError& aOther);
MOZ_IMPLICIT FileResult(RemoteError&& aOther);
MOZ_IMPLICIT FileResult(const FileResult& aOther);
MOZ_IMPLICIT FileResult(FileResult&& aOther);
~FileResult();
Type
type() const
{
return mType;
}
FileResult&
operator=(const mozilla::Maybe<Results>& aRhs);
FileResult&
operator=(mozilla::Maybe<Results>&& aRhs);
FileResult&
operator=(const RemoteError& aRhs);
FileResult&
operator=(RemoteError&& aRhs);
FileResult&
operator=(const FileResult& aRhs);
FileResult&
operator=(FileResult&& aRhs);
mozilla::Maybe<Results>&
get_MaybeResults()
{
AssertSanity(TMaybeResults);
return (*(ptr_MaybeResults()));
}
const mozilla::Maybe<Results>&
get_MaybeResults() const
{
AssertSanity(TMaybeResults);
return (*(constptr_MaybeResults()));
}
operator mozilla::Maybe<Results>&()
{
return get_MaybeResults();
}
operator const mozilla::Maybe<Results>&() const
{
return get_MaybeResults();
}
RemoteError&
get_RemoteError()
{
AssertSanity(TRemoteError);
return (*(ptr_RemoteError()));
}
const RemoteError&
get_RemoteError() const
{
AssertSanity(TRemoteError);
return (*(constptr_RemoteError()));
}
operator RemoteError&()
{
return get_RemoteError();
}
operator const RemoteError&() const
{
return get_RemoteError();
}
private:
union {
mozilla::Maybe<Results> mVMaybeResults;
RemoteError mVRemoteError;
};
Type mType;
};
} // namespace filedialog
} // namespace widget
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::widget::filedialog::FileResult>
{
typedef ::mozilla::widget::filedialog::FileResult 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 FolderResult|
//
namespace mozilla {
namespace widget {
namespace filedialog {
class FolderResult final
{
public:
enum Type {
T__None,
TMaybensString = 1,
TRemoteError,
T__Last = TRemoteError
};
private:
typedef ::nsString nsString;
typedef ::mozilla::widget::filedialog::RemoteError RemoteError;
typedef mozilla::Maybe<nsString> MaybensString__tdef;
typedef RemoteError RemoteError__tdef;
mozilla::Maybe<nsString>*
ptr_MaybensString()
{
return (&(mVMaybensString));
}
const mozilla::Maybe<nsString>*
constptr_MaybensString() const
{
return (&(mVMaybensString));
}
RemoteError*
ptr_RemoteError()
{
return (&(mVRemoteError));
}
const RemoteError*
constptr_RemoteError() const
{
return (&(mVRemoteError));
}
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 FolderResult() :
mType(T__None)
{
}
MOZ_IMPLICIT FolderResult(const mozilla::Maybe<nsString>& aOther);
MOZ_IMPLICIT FolderResult(mozilla::Maybe<nsString>&& aOther);
MOZ_IMPLICIT FolderResult(const RemoteError& aOther);
MOZ_IMPLICIT FolderResult(RemoteError&& aOther);
MOZ_IMPLICIT FolderResult(const FolderResult& aOther);
MOZ_IMPLICIT FolderResult(FolderResult&& aOther);
~FolderResult();
Type
type() const
{
return mType;
}
FolderResult&
operator=(const mozilla::Maybe<nsString>& aRhs);
FolderResult&
operator=(mozilla::Maybe<nsString>&& aRhs);
FolderResult&
operator=(const RemoteError& aRhs);
FolderResult&
operator=(RemoteError&& aRhs);
FolderResult&
operator=(const FolderResult& aRhs);
FolderResult&
operator=(FolderResult&& aRhs);
mozilla::Maybe<nsString>&
get_MaybensString()
{
AssertSanity(TMaybensString);
return (*(ptr_MaybensString()));
}
const mozilla::Maybe<nsString>&
get_MaybensString() const
{
AssertSanity(TMaybensString);
return (*(constptr_MaybensString()));
}
operator mozilla::Maybe<nsString>&()
{
return get_MaybensString();
}
operator const mozilla::Maybe<nsString>&() const
{
return get_MaybensString();
}
RemoteError&
get_RemoteError()
{
AssertSanity(TRemoteError);
return (*(ptr_RemoteError()));
}
const RemoteError&
get_RemoteError() const
{
AssertSanity(TRemoteError);
return (*(constptr_RemoteError()));
}
operator RemoteError&()
{
return get_RemoteError();
}
operator const RemoteError&() const
{
return get_RemoteError();
}
private:
union {
mozilla::Maybe<nsString> mVMaybensString;
RemoteError mVRemoteError;
};
Type mType;
};
} // namespace filedialog
} // namespace widget
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::widget::filedialog::FolderResult>
{
typedef ::mozilla::widget::filedialog::FolderResult paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
namespace mozilla {
namespace widget {
namespace filedialog {
class PWinFileDialogParent;
} // namespace filedialog
} // namespace widget
} // namespace mozilla
namespace mozilla {
namespace widget {
namespace filedialog {
class PWinFileDialogChild;
} // namespace filedialog
} // namespace widget
} // namespace mozilla
//-----------------------------------------------------------------------------
// Code common to PWinFileDialogChild and PWinFileDialogParent
//
namespace mozilla {
namespace widget {
namespace filedialog {
namespace PWinFileDialog {
nsresult
CreateEndpoints(
mozilla::ipc::EndpointProcInfo aParentDestInfo,
mozilla::ipc::EndpointProcInfo aChildDestInfo,
mozilla::ipc::Endpoint<::mozilla::widget::filedialog::PWinFileDialogParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::widget::filedialog::PWinFileDialogChild>* aChild);
nsresult
CreateEndpoints(
mozilla::ipc::Endpoint<::mozilla::widget::filedialog::PWinFileDialogParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::widget::filedialog::PWinFileDialogChild>* aChild);
enum MessageType {
PWinFileDialogStart = PWinFileDialogMsgStart << 16,
Msg_ShowFileDialog__ID,
Reply_ShowFileDialog__ID,
Msg_ShowFolderDialog__ID,
Reply_ShowFolderDialog__ID,
PWinFileDialogEnd
};
mozilla::UniquePtr<IPC::Message>
Msg_ShowFileDialog(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_ShowFileDialog(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_ShowFolderDialog(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_ShowFolderDialog(int32_t routingId);
} // namespace PWinFileDialog
} // namespace filedialog
} // namespace widget
} // namespace mozilla
#endif // ifndef PWinFileDialog_h