//
// Automatically generated by ipdlc.
// Edit at your own risk
//

#ifndef PHandlerService_h
#define PHandlerService_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 HandlerApp|
//
namespace mozilla {
namespace dom {
class HandlerApp 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
    HandlerApp() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT HandlerApp(
            const nsString& _name,
            const nsString& _detailedDescription) :
        name_(_name),
        detailedDescription_(_detailedDescription)
    {
    }

    MOZ_IMPLICIT HandlerApp(
            nsString&& _name,
            nsString&& _detailedDescription) :
        name_(std::move(_name)),
        detailedDescription_(std::move(_detailedDescription))
    {
    }

    nsString&
    name()
    {
        return name_;
    }
    const nsString&
    name() const
    {
        return name_;
    }

    nsString&
    detailedDescription()
    {
        return detailedDescription_;
    }
    const nsString&
    detailedDescription() const
    {
        return detailedDescription_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<nsString> name_;
    ::mozilla::ipc::IPDLStructMember<nsString> detailedDescription_;
};
} // namespace dom
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::HandlerApp>
{
    typedef ::mozilla::dom::HandlerApp 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 HandlerInfo|
//
namespace mozilla {
namespace dom {
class HandlerInfo final
{
private:
    typedef ::nsCString nsCString;
    typedef ::nsString nsString;
    typedef ::mozilla::dom::HandlerApp HandlerApp;
    typedef ::int32_t int32_t;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    HandlerInfo() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT HandlerInfo(
            const nsCString& _type,
            const bool& _isMIMEInfo,
            const nsString& _description,
            const bool& _alwaysAskBeforeHandling,
            const nsTArray<nsCString>& _extensions,
            const HandlerApp& _preferredApplicationHandler,
            const nsTArray<HandlerApp>& _possibleApplicationHandlers,
            const int32_t& _preferredAction) :
        type_(_type),
        isMIMEInfo_(_isMIMEInfo),
        description_(_description),
        alwaysAskBeforeHandling_(_alwaysAskBeforeHandling),
        extensions_(_extensions),
        preferredApplicationHandler_(_preferredApplicationHandler),
        possibleApplicationHandlers_(_possibleApplicationHandlers),
        preferredAction_(_preferredAction)
    {
    }

    MOZ_IMPLICIT HandlerInfo(
            nsCString&& _type,
            bool&& _isMIMEInfo,
            nsString&& _description,
            bool&& _alwaysAskBeforeHandling,
            nsTArray<nsCString>&& _extensions,
            HandlerApp&& _preferredApplicationHandler,
            nsTArray<HandlerApp>&& _possibleApplicationHandlers,
            int32_t&& _preferredAction) :
        type_(std::move(_type)),
        isMIMEInfo_(std::move(_isMIMEInfo)),
        description_(std::move(_description)),
        alwaysAskBeforeHandling_(std::move(_alwaysAskBeforeHandling)),
        extensions_(std::move(_extensions)),
        preferredApplicationHandler_(std::move(_preferredApplicationHandler)),
        possibleApplicationHandlers_(std::move(_possibleApplicationHandlers)),
        preferredAction_(std::move(_preferredAction))
    {
    }

    nsCString&
    type()
    {
        return type_;
    }
    const nsCString&
    type() const
    {
        return type_;
    }

    bool&
    isMIMEInfo()
    {
        return isMIMEInfo_;
    }
    const bool&
    isMIMEInfo() const
    {
        return isMIMEInfo_;
    }

    nsString&
    description()
    {
        return description_;
    }
    const nsString&
    description() const
    {
        return description_;
    }

    bool&
    alwaysAskBeforeHandling()
    {
        return alwaysAskBeforeHandling_;
    }
    const bool&
    alwaysAskBeforeHandling() const
    {
        return alwaysAskBeforeHandling_;
    }

    nsTArray<nsCString>&
    extensions()
    {
        return extensions_;
    }
    const nsTArray<nsCString>&
    extensions() const
    {
        return extensions_;
    }

    HandlerApp&
    preferredApplicationHandler()
    {
        return preferredApplicationHandler_;
    }
    const HandlerApp&
    preferredApplicationHandler() const
    {
        return preferredApplicationHandler_;
    }

    nsTArray<HandlerApp>&
    possibleApplicationHandlers()
    {
        return possibleApplicationHandlers_;
    }
    const nsTArray<HandlerApp>&
    possibleApplicationHandlers() const
    {
        return possibleApplicationHandlers_;
    }

    int32_t&
    preferredAction()
    {
        return preferredAction_;
    }
    const int32_t&
    preferredAction() const
    {
        return preferredAction_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<nsCString> type_;
    ::mozilla::ipc::IPDLStructMember<bool> isMIMEInfo_;
    ::mozilla::ipc::IPDLStructMember<nsString> description_;
    ::mozilla::ipc::IPDLStructMember<bool> alwaysAskBeforeHandling_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<nsCString>> extensions_;
    ::mozilla::ipc::IPDLStructMember<HandlerApp> preferredApplicationHandler_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<HandlerApp>> possibleApplicationHandlers_;
    ::mozilla::ipc::IPDLStructMember<int32_t> preferredAction_;
};
} // namespace dom
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::HandlerInfo>
{
    typedef ::mozilla::dom::HandlerInfo paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC

namespace mozilla {
namespace dom {
class PHandlerServiceParent;
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
class PHandlerServiceChild;
} // namespace dom
} // namespace mozilla

//-----------------------------------------------------------------------------
// Code common to PHandlerServiceChild and PHandlerServiceParent
//
namespace mozilla {
namespace dom {
namespace PHandlerService {

nsresult
CreateEndpoints(
        mozilla::ipc::EndpointProcInfo aParentDestInfo,
        mozilla::ipc::EndpointProcInfo aChildDestInfo,
        mozilla::ipc::Endpoint<::mozilla::dom::PHandlerServiceParent>* aParent,
        mozilla::ipc::Endpoint<::mozilla::dom::PHandlerServiceChild>* aChild);

enum MessageType {
    PHandlerServiceStart = PHandlerServiceMsgStart << 16,
    Msg_FillHandlerInfo__ID,
    Reply_FillHandlerInfo__ID,
    Msg_ExistsForProtocolOS__ID,
    Reply_ExistsForProtocolOS__ID,
    Msg_ExistsForProtocol__ID,
    Reply_ExistsForProtocol__ID,
    Msg_Exists__ID,
    Reply_Exists__ID,
    Msg_GetTypeFromExtension__ID,
    Reply_GetTypeFromExtension__ID,
    Msg_GetMIMEInfoFromOS__ID,
    Reply_GetMIMEInfoFromOS__ID,
    Msg_GetApplicationDescription__ID,
    Reply_GetApplicationDescription__ID,
    Msg___delete____ID,
    Reply___delete____ID,
    PHandlerServiceEnd
};

mozilla::UniquePtr<IPC::Message>
Msg_FillHandlerInfo(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_FillHandlerInfo(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_ExistsForProtocolOS(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_ExistsForProtocolOS(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_ExistsForProtocol(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_ExistsForProtocol(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_Exists(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_Exists(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_GetTypeFromExtension(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_GetTypeFromExtension(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_GetMIMEInfoFromOS(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_GetMIMEInfoFromOS(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_GetApplicationDescription(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_GetApplicationDescription(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg___delete__(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply___delete__(IPC::Message::routeid_t routingId);



} // namespace PHandlerService
} // namespace dom
} // namespace mozilla

#endif // ifndef PHandlerService_h
