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

#ifndef PWebBrowserPersistDocument_h
#define PWebBrowserPersistDocument_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"
#include "nsIReferrerInfo.h"
#include "mozilla/ipc/PBackgroundSharedTypes.h"
#include "mozilla/ipc/IPCStream.h"
#include "mozilla/net/NeckoChannelParams.h"


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct WebBrowserPersistDocumentAttrs|
//
namespace mozilla {
class WebBrowserPersistDocumentAttrs final
{
private:
    typedef ::nsCString nsCString;
    typedef ::nsString nsString;
    typedef ::nsIReferrerInfo nsIReferrerInfo;
    typedef ::mozilla::net::CookieJarSettingsArgs CookieJarSettingsArgs;
    typedef ::uint32_t uint32_t;
    typedef ::mozilla::ipc::PrincipalInfo PrincipalInfo;

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

    MOZ_IMPLICIT WebBrowserPersistDocumentAttrs(
            const bool& _isPrivate,
            const nsCString& _documentURI,
            const nsCString& _baseURI,
            const nsCString& _contentType,
            const nsCString& _characterSet,
            const nsString& _title,
            nsIReferrerInfo* _referrerInfo,
            const CookieJarSettingsArgs& _cookieJarSettings,
            const nsString& _contentDisposition,
            const uint32_t& _sessionHistoryCacheKey,
            const uint32_t& _persistFlags,
            const PrincipalInfo& _principal) :
        isPrivate_(_isPrivate),
        documentURI_(_documentURI),
        baseURI_(_baseURI),
        contentType_(_contentType),
        characterSet_(_characterSet),
        title_(_title),
        referrerInfo_(_referrerInfo),
        cookieJarSettings_(_cookieJarSettings),
        contentDisposition_(_contentDisposition),
        principal_(_principal),
        sessionHistoryCacheKey_(_sessionHistoryCacheKey),
        persistFlags_(_persistFlags)
    {
    }

    MOZ_IMPLICIT WebBrowserPersistDocumentAttrs(
            bool&& _isPrivate,
            nsCString&& _documentURI,
            nsCString&& _baseURI,
            nsCString&& _contentType,
            nsCString&& _characterSet,
            nsString&& _title,
            RefPtr<nsIReferrerInfo>&& _referrerInfo,
            CookieJarSettingsArgs&& _cookieJarSettings,
            nsString&& _contentDisposition,
            uint32_t&& _sessionHistoryCacheKey,
            uint32_t&& _persistFlags,
            PrincipalInfo&& _principal) :
        isPrivate_(std::move(_isPrivate)),
        documentURI_(std::move(_documentURI)),
        baseURI_(std::move(_baseURI)),
        contentType_(std::move(_contentType)),
        characterSet_(std::move(_characterSet)),
        title_(std::move(_title)),
        referrerInfo_(std::move(_referrerInfo)),
        cookieJarSettings_(std::move(_cookieJarSettings)),
        contentDisposition_(std::move(_contentDisposition)),
        principal_(std::move(_principal)),
        sessionHistoryCacheKey_(std::move(_sessionHistoryCacheKey)),
        persistFlags_(std::move(_persistFlags))
    {
    }

    bool&
    isPrivate()
    {
        return isPrivate_;
    }
    const bool&
    isPrivate() const
    {
        return isPrivate_;
    }

    nsCString&
    documentURI()
    {
        return documentURI_;
    }
    const nsCString&
    documentURI() const
    {
        return documentURI_;
    }

    nsCString&
    baseURI()
    {
        return baseURI_;
    }
    const nsCString&
    baseURI() const
    {
        return baseURI_;
    }

    nsCString&
    contentType()
    {
        return contentType_;
    }
    const nsCString&
    contentType() const
    {
        return contentType_;
    }

    nsCString&
    characterSet()
    {
        return characterSet_;
    }
    const nsCString&
    characterSet() const
    {
        return characterSet_;
    }

    nsString&
    title()
    {
        return title_;
    }
    const nsString&
    title() const
    {
        return title_;
    }

    RefPtr<nsIReferrerInfo>&
    referrerInfo()
    {
        return referrerInfo_;
    }
    nsIReferrerInfo*
    referrerInfo() const
    {
        return referrerInfo_;
    }

    CookieJarSettingsArgs&
    cookieJarSettings()
    {
        return cookieJarSettings_;
    }
    const CookieJarSettingsArgs&
    cookieJarSettings() const
    {
        return cookieJarSettings_;
    }

    nsString&
    contentDisposition()
    {
        return contentDisposition_;
    }
    const nsString&
    contentDisposition() const
    {
        return contentDisposition_;
    }

    uint32_t&
    sessionHistoryCacheKey()
    {
        return sessionHistoryCacheKey_;
    }
    const uint32_t&
    sessionHistoryCacheKey() const
    {
        return sessionHistoryCacheKey_;
    }

    uint32_t&
    persistFlags()
    {
        return persistFlags_;
    }
    const uint32_t&
    persistFlags() const
    {
        return persistFlags_;
    }

    PrincipalInfo&
    principal()
    {
        return principal_;
    }
    const PrincipalInfo&
    principal() const
    {
        return principal_;
    }

private:
    void
    StaticAssertions() const;
    ::mozilla::ipc::IPDLStructMember<bool> isPrivate_;
    ::mozilla::ipc::IPDLStructMember<nsCString> documentURI_;
    ::mozilla::ipc::IPDLStructMember<nsCString> baseURI_;
    ::mozilla::ipc::IPDLStructMember<nsCString> contentType_;
    ::mozilla::ipc::IPDLStructMember<nsCString> characterSet_;
    ::mozilla::ipc::IPDLStructMember<nsString> title_;
    ::mozilla::ipc::IPDLStructMember<RefPtr<nsIReferrerInfo>> referrerInfo_;
    ::mozilla::ipc::IPDLStructMember<CookieJarSettingsArgs> cookieJarSettings_;
    ::mozilla::ipc::IPDLStructMember<nsString> contentDisposition_;
    ::mozilla::ipc::IPDLStructMember<PrincipalInfo> principal_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> sessionHistoryCacheKey_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> persistFlags_;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::WebBrowserPersistDocumentAttrs>
{
    typedef ::mozilla::WebBrowserPersistDocumentAttrs 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 WebBrowserPersistURIMapEntry|
//
namespace mozilla {
class WebBrowserPersistURIMapEntry final
{
private:
    typedef ::nsCString nsCString;

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

    MOZ_IMPLICIT WebBrowserPersistURIMapEntry(
            const nsCString& _mapFrom,
            const nsCString& _mapTo) :
        mapFrom_(_mapFrom),
        mapTo_(_mapTo)
    {
    }

    MOZ_IMPLICIT WebBrowserPersistURIMapEntry(
            nsCString&& _mapFrom,
            nsCString&& _mapTo) :
        mapFrom_(std::move(_mapFrom)),
        mapTo_(std::move(_mapTo))
    {
    }

    nsCString&
    mapFrom()
    {
        return mapFrom_;
    }
    const nsCString&
    mapFrom() const
    {
        return mapFrom_;
    }

    nsCString&
    mapTo()
    {
        return mapTo_;
    }
    const nsCString&
    mapTo() const
    {
        return mapTo_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<nsCString> mapFrom_;
    ::mozilla::ipc::IPDLStructMember<nsCString> mapTo_;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::WebBrowserPersistURIMapEntry>
{
    typedef ::mozilla::WebBrowserPersistURIMapEntry 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 WebBrowserPersistURIMap|
//
namespace mozilla {
class WebBrowserPersistURIMap final
{
private:
    typedef ::mozilla::WebBrowserPersistURIMapEntry WebBrowserPersistURIMapEntry;
    typedef ::nsCString nsCString;

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

    MOZ_IMPLICIT WebBrowserPersistURIMap(
            const nsTArray<WebBrowserPersistURIMapEntry>& _mapURIs,
            const nsCString& _targetBaseURI) :
        mapURIs_(_mapURIs),
        targetBaseURI_(_targetBaseURI)
    {
    }

    MOZ_IMPLICIT WebBrowserPersistURIMap(
            nsTArray<WebBrowserPersistURIMapEntry>&& _mapURIs,
            nsCString&& _targetBaseURI) :
        mapURIs_(std::move(_mapURIs)),
        targetBaseURI_(std::move(_targetBaseURI))
    {
    }

    nsTArray<WebBrowserPersistURIMapEntry>&
    mapURIs()
    {
        return mapURIs_;
    }
    const nsTArray<WebBrowserPersistURIMapEntry>&
    mapURIs() const
    {
        return mapURIs_;
    }

    nsCString&
    targetBaseURI()
    {
        return targetBaseURI_;
    }
    const nsCString&
    targetBaseURI() const
    {
        return targetBaseURI_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<WebBrowserPersistURIMapEntry>> mapURIs_;
    ::mozilla::ipc::IPDLStructMember<nsCString> targetBaseURI_;
};
} // namespace mozilla

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

namespace mozilla {
class PWebBrowserPersistDocumentParent;
} // namespace mozilla
namespace mozilla {
class PWebBrowserPersistDocumentChild;
} // namespace mozilla

//-----------------------------------------------------------------------------
// Code common to PWebBrowserPersistDocumentChild and PWebBrowserPersistDocumentParent
//
namespace mozilla {
namespace PWebBrowserPersistDocument {

nsresult
CreateEndpoints(
        mozilla::ipc::EndpointProcInfo aParentDestInfo,
        mozilla::ipc::EndpointProcInfo aChildDestInfo,
        mozilla::ipc::Endpoint<::mozilla::PWebBrowserPersistDocumentParent>* aParent,
        mozilla::ipc::Endpoint<::mozilla::PWebBrowserPersistDocumentChild>* aChild);

enum MessageType {
    PWebBrowserPersistDocumentStart = PWebBrowserPersistDocumentMsgStart << 16,
    Msg_Attributes__ID,
    Msg_InitFailure__ID,
    Msg_SetPersistFlags__ID,
    Msg_PWebBrowserPersistResourcesConstructor__ID,
    Reply_PWebBrowserPersistResourcesConstructor__ID,
    Msg_PWebBrowserPersistSerializeConstructor__ID,
    Reply_PWebBrowserPersistSerializeConstructor__ID,
    Msg___delete____ID,
    Reply___delete____ID,
    PWebBrowserPersistDocumentEnd
};

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

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

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

mozilla::UniquePtr<IPC::Message>
Msg_PWebBrowserPersistResourcesConstructor(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_PWebBrowserPersistResourcesConstructor(IPC::Message::routeid_t routingId);

mozilla::UniquePtr<IPC::Message>
Msg_PWebBrowserPersistSerializeConstructor(IPC::Message::routeid_t routingId);
mozilla::UniquePtr<IPC::Message>
Reply_PWebBrowserPersistSerializeConstructor(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 PWebBrowserPersistDocument
} // namespace mozilla

#endif // ifndef PWebBrowserPersistDocument_h
