Copy as Markdown
Other Tools
//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#ifndef PGMPService_h
#define PGMPService_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 "GMPNativeTypes.h"
#include "base/process.h"
#include "mozilla/ipc/Endpoint.h"
#include "mozilla/ipc/IPDLStructMember.h"
#include "mozilla/ipc/SideVariant.h"
#include "mozilla/gmp/GMPTypes.h"
namespace mozilla {
namespace gmp {
class PGMPContentParent;
} // namespace gmp
} // namespace mozilla
namespace mozilla {
namespace gmp {
class PGMPContentChild;
} // namespace gmp
} // namespace mozilla
//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct GMPLaunchResult|
//
namespace mozilla {
namespace gmp {
class GMPLaunchResult final
{
private:
    typedef ::uint32_t uint32_t;
    typedef ::GMPPluginType GMPPluginType;
    typedef ::base::ProcessId ProcessId;
    typedef ::nsCString nsCString;
    template<class FooSide> using Endpoint = ::mozilla::ipc::Endpoint<FooSide>;
    typedef ::mozilla::gmp::PGMPContentParent PGMPContentParent;
    typedef ::mozilla::gmp::PGMPContentChild PGMPContentChild;
    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
    GMPLaunchResult() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif
    MOZ_IMPLICIT GMPLaunchResult(
            const uint32_t& _pluginId,
            const GMPPluginType& _pluginType,
            const ProcessId& _pid,
            const nsCString& _displayName,
            Endpoint<::mozilla::gmp::PGMPContentParent>&& _endpoint,
            const nsresult& _result,
            const nsCString& _errorDescription) :
        pluginType_(_pluginType),
        pid_(_pid),
        displayName_(_displayName),
        endpoint_(std::move(_endpoint)),
        result_(_result),
        errorDescription_(_errorDescription),
        pluginId_(_pluginId)
    {
    }
    MOZ_IMPLICIT GMPLaunchResult(
            uint32_t&& _pluginId,
            GMPPluginType&& _pluginType,
            ProcessId&& _pid,
            nsCString&& _displayName,
            Endpoint<::mozilla::gmp::PGMPContentParent>&& _endpoint,
            nsresult&& _result,
            nsCString&& _errorDescription) :
        pluginType_(std::move(_pluginType)),
        pid_(std::move(_pid)),
        displayName_(std::move(_displayName)),
        endpoint_(std::move(_endpoint)),
        result_(std::move(_result)),
        errorDescription_(std::move(_errorDescription)),
        pluginId_(std::move(_pluginId))
    {
    }
    uint32_t&
    pluginId()
    {
        return pluginId_;
    }
    const uint32_t&
    pluginId() const
    {
        return pluginId_;
    }
    GMPPluginType&
    pluginType()
    {
        return pluginType_;
    }
    const GMPPluginType&
    pluginType() const
    {
        return pluginType_;
    }
    ProcessId&
    pid()
    {
        return pid_;
    }
    const ProcessId&
    pid() const
    {
        return pid_;
    }
    nsCString&
    displayName()
    {
        return displayName_;
    }
    const nsCString&
    displayName() const
    {
        return displayName_;
    }
    Endpoint<::mozilla::gmp::PGMPContentParent>&
    endpoint()
    {
        return endpoint_;
    }
    const Endpoint<::mozilla::gmp::PGMPContentParent>&
    endpoint() const
    {
        return endpoint_;
    }
    nsresult&
    result()
    {
        return result_;
    }
    const nsresult&
    result() const
    {
        return result_;
    }
    nsCString&
    errorDescription()
    {
        return errorDescription_;
    }
    const nsCString&
    errorDescription() const
    {
        return errorDescription_;
    }
private:
    ::mozilla::ipc::IPDLStructMember<GMPPluginType> pluginType_;
    ::mozilla::ipc::IPDLStructMember<ProcessId> pid_;
    ::mozilla::ipc::IPDLStructMember<nsCString> displayName_;
    ::mozilla::ipc::IPDLStructMember<Endpoint<::mozilla::gmp::PGMPContentParent>> endpoint_;
    ::mozilla::ipc::IPDLStructMember<nsresult> result_;
    ::mozilla::ipc::IPDLStructMember<nsCString> errorDescription_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> pluginId_;
};
} // namespace gmp
} // namespace mozilla
namespace IPC {
template<>
struct ParamTraits <::mozilla::gmp::GMPLaunchResult>
{
    typedef ::mozilla::gmp::GMPLaunchResult paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            paramType&& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC
namespace mozilla {
namespace gmp {
class PGMPServiceParent;
} // namespace gmp
} // namespace mozilla
namespace mozilla {
namespace gmp {
class PGMPServiceChild;
} // namespace gmp
} // namespace mozilla
//-----------------------------------------------------------------------------
// Code common to PGMPServiceChild and PGMPServiceParent
//
namespace mozilla {
namespace gmp {
namespace PGMPService {
nsresult
CreateEndpoints(
        mozilla::ipc::EndpointProcInfo aParentDestInfo,
        mozilla::ipc::EndpointProcInfo aChildDestInfo,
        mozilla::ipc::Endpoint<::mozilla::gmp::PGMPServiceParent>* aParent,
        mozilla::ipc::Endpoint<::mozilla::gmp::PGMPServiceChild>* aChild);
enum MessageType {
    PGMPServiceStart = PGMPServiceMsgStart << 16,
    Msg_LaunchGMP__ID,
    Reply_LaunchGMP__ID,
    Msg_GetGMPNodeId__ID,
    Reply_GetGMPNodeId__ID,
    Msg_BeginShutdown__ID,
    PGMPServiceEnd
};
mozilla::UniquePtr<IPC::Message>
Msg_LaunchGMP(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_LaunchGMP(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_GetGMPNodeId(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_GetGMPNodeId(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Msg_BeginShutdown(IPC::Message::routeid_t routingId);
} // namespace PGMPService
} // namespace gmp
} // namespace mozilla
#endif // ifndef PGMPService_h