Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#ifndef PRemoteSandboxBroker_h
#define PRemoteSandboxBroker_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 EnvVar|
//
namespace mozilla {
class EnvVar 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
EnvVar() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT EnvVar(
const nsString& _name,
const nsString& _value) :
name_(_name),
value_(_value)
{
}
MOZ_IMPLICIT EnvVar(
nsString&& _name,
nsString&& _value) :
name_(std::move(_name)),
value_(std::move(_value))
{
}
nsString&
name()
{
return name_;
}
const nsString&
name() const
{
return name_;
}
nsString&
value()
{
return value_;
}
const nsString&
value() const
{
return value_;
}
private:
::mozilla::ipc::IPDLStructMember<nsString> name_;
::mozilla::ipc::IPDLStructMember<nsString> value_;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::EnvVar>
{
typedef ::mozilla::EnvVar 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 LaunchParameters|
//
namespace mozilla {
class LaunchParameters final
{
private:
typedef ::nsString nsString;
typedef ::mozilla::EnvVar EnvVar;
typedef ::uint32_t uint32_t;
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
LaunchParameters() = default;
#ifdef __clang__
# pragma clang diagnostic pop
#endif
MOZ_IMPLICIT LaunchParameters(
const nsString& _path,
const nsString& _args,
const nsTArray<EnvVar>& _env,
const uint32_t& _processType,
const uint32_t& _sandboxLevel,
const nsTArray<nsString>& _allowedReadFiles,
const nsTArray<uint64_t>& _shareHandles,
const bool& _enableLogging) :
path_(_path),
args_(_args),
env_(_env),
allowedReadFiles_(_allowedReadFiles),
shareHandles_(_shareHandles),
enableLogging_(_enableLogging),
processType_(_processType),
sandboxLevel_(_sandboxLevel)
{
}
MOZ_IMPLICIT LaunchParameters(
nsString&& _path,
nsString&& _args,
nsTArray<EnvVar>&& _env,
uint32_t&& _processType,
uint32_t&& _sandboxLevel,
nsTArray<nsString>&& _allowedReadFiles,
nsTArray<uint64_t>&& _shareHandles,
bool&& _enableLogging) :
path_(std::move(_path)),
args_(std::move(_args)),
env_(std::move(_env)),
allowedReadFiles_(std::move(_allowedReadFiles)),
shareHandles_(std::move(_shareHandles)),
enableLogging_(std::move(_enableLogging)),
processType_(std::move(_processType)),
sandboxLevel_(std::move(_sandboxLevel))
{
}
nsString&
path()
{
return path_;
}
const nsString&
path() const
{
return path_;
}
nsString&
args()
{
return args_;
}
const nsString&
args() const
{
return args_;
}
nsTArray<EnvVar>&
env()
{
return env_;
}
const nsTArray<EnvVar>&
env() const
{
return env_;
}
uint32_t&
processType()
{
return processType_;
}
const uint32_t&
processType() const
{
return processType_;
}
uint32_t&
sandboxLevel()
{
return sandboxLevel_;
}
const uint32_t&
sandboxLevel() const
{
return sandboxLevel_;
}
nsTArray<nsString>&
allowedReadFiles()
{
return allowedReadFiles_;
}
const nsTArray<nsString>&
allowedReadFiles() const
{
return allowedReadFiles_;
}
nsTArray<uint64_t>&
shareHandles()
{
return shareHandles_;
}
const nsTArray<uint64_t>&
shareHandles() const
{
return shareHandles_;
}
bool&
enableLogging()
{
return enableLogging_;
}
const bool&
enableLogging() const
{
return enableLogging_;
}
private:
void
StaticAssertions() const;
::mozilla::ipc::IPDLStructMember<nsString> path_;
::mozilla::ipc::IPDLStructMember<nsString> args_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<EnvVar>> env_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<nsString>> allowedReadFiles_;
::mozilla::ipc::IPDLStructMember<CopyableTArray<uint64_t>> shareHandles_;
::mozilla::ipc::IPDLStructMember<bool> enableLogging_;
::mozilla::ipc::IPDLStructMember<uint32_t> processType_;
::mozilla::ipc::IPDLStructMember<uint32_t> sandboxLevel_;
};
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::LaunchParameters>
{
typedef ::mozilla::LaunchParameters paramType;
static void
Write(
IPC::MessageWriter* aWriter,
const paramType& aVar);
static IPC::ReadResult<paramType>
Read(IPC::MessageReader* aReader);
};
} // namespace IPC
namespace mozilla {
class PRemoteSandboxBrokerParent;
} // namespace mozilla
namespace mozilla {
class PRemoteSandboxBrokerChild;
} // namespace mozilla
//-----------------------------------------------------------------------------
// Code common to PRemoteSandboxBrokerChild and PRemoteSandboxBrokerParent
//
namespace mozilla {
namespace PRemoteSandboxBroker {
nsresult
CreateEndpoints(
base::ProcessId aParentDestPid,
base::ProcessId aChildDestPid,
mozilla::ipc::Endpoint<::mozilla::PRemoteSandboxBrokerParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::PRemoteSandboxBrokerChild>* aChild);
enum MessageType {
PRemoteSandboxBrokerStart = PRemoteSandboxBrokerMsgStart << 16,
Msg_InitCrashReporter__ID,
Msg_LaunchApp__ID,
Reply_LaunchApp__ID,
PRemoteSandboxBrokerEnd
};
mozilla::UniquePtr<IPC::Message>
Msg_InitCrashReporter(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_LaunchApp(int32_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_LaunchApp(int32_t routingId);
} // namespace PRemoteSandboxBroker
} // namespace mozilla
#endif // ifndef PRemoteSandboxBroker_h