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

#ifndef PWebBrowserPersistDocumentChild_h
#define PWebBrowserPersistDocumentChild_h

#include "mozilla/PWebBrowserPersistDocument.h"
#ifdef DEBUG
#include "prenv.h"
#endif // DEBUG
#include "base/id_map.h"
#include "mozilla/ipc/MessageChannel.h"

namespace mozilla {
namespace dom {
class PContentChild;
} // namespace dom
} // namespace mozilla
namespace mozilla {
namespace dom {
class PContentParent;
} // namespace dom
} // namespace mozilla

namespace mozilla {
class PWebBrowserPersistResourcesChild;
} // namespace mozilla
namespace mozilla {
class PWebBrowserPersistResourcesParent;
} // namespace mozilla

namespace mozilla {
class PWebBrowserPersistSerializeChild;
} // namespace mozilla
namespace mozilla {
class PWebBrowserPersistSerializeParent;
} // namespace mozilla

namespace mozilla {
namespace dom {
class PContentChild;
} // namespace dom
} // namespace mozilla

namespace mozilla {
class PWebBrowserPersistSerializeChild;
} // namespace mozilla

namespace mozilla {
class PWebBrowserPersistResourcesChild;
} // namespace mozilla

namespace mozilla {


class PWebBrowserPersistDocumentChild :
    public mozilla::ipc::IProtocol
{
    friend class mozilla::dom::PContentChild;

    friend class mozilla::PWebBrowserPersistSerializeChild;

    friend class mozilla::PWebBrowserPersistResourcesChild;

protected:
    typedef mozilla::ipc::ActorHandle ActorHandle;
    typedef mozilla::ipc::BufferedInputStreamParams BufferedInputStreamParams;
    template<class FooSide> using Endpoint = mozilla::ipc::Endpoint<FooSide>;
    typedef mozilla::ipc::FileDescriptor FileDescriptor;
    typedef mozilla::ipc::FileInputStreamParams FileInputStreamParams;
    typedef mozilla::ipc::InputStreamParams InputStreamParams;
    typedef mozilla::ipc::MIMEInputStreamParams MIMEInputStreamParams;
    typedef mozilla::ipc::MultiplexInputStreamParams MultiplexInputStreamParams;
    typedef mozilla::ipc::OptionalInputStreamParams OptionalInputStreamParams;
    typedef mozilla::ipc::PartialFileInputStreamParams PartialFileInputStreamParams;
    typedef base::ProcessId ProcessId;
    typedef mozilla::ipc::ProtocolFdMapping ProtocolFdMapping;
    typedef mozilla::ipc::ProtocolId ProtocolId;
    typedef mozilla::ipc::RemoteInputStreamParams RemoteInputStreamParams;
    typedef mozilla::ipc::SameProcessInputStreamParams SameProcessInputStreamParams;
    typedef mozilla::ipc::Shmem Shmem;
    typedef mozilla::ipc::StringInputStreamParams StringInputStreamParams;
    typedef mozilla::ipc::TemporaryFileInputStreamParams TemporaryFileInputStreamParams;
    typedef mozilla::ipc::Transport Transport;
    typedef mozilla::ipc::TransportDescriptor TransportDescriptor;
    typedef mozilla::WebBrowserPersistDocumentAttrs WebBrowserPersistDocumentAttrs;
    typedef mozilla::WebBrowserPersistURIMap WebBrowserPersistURIMap;
    typedef mozilla::WebBrowserPersistURIMapEntry WebBrowserPersistURIMapEntry;
    typedef mozilla::void_t void_t;
    typedef mozilla::dom::PContentChild PContentChild;
    typedef mozilla::dom::PContentParent PContentParent;
    typedef mozilla::PWebBrowserPersistResourcesChild PWebBrowserPersistResourcesChild;
    typedef mozilla::PWebBrowserPersistResourcesParent PWebBrowserPersistResourcesParent;
    typedef mozilla::PWebBrowserPersistSerializeChild PWebBrowserPersistSerializeChild;
    typedef mozilla::PWebBrowserPersistSerializeParent PWebBrowserPersistSerializeParent;

    typedef PWebBrowserPersistDocument::State State;

    virtual bool
    RecvSetPersistFlags(const uint32_t& aNewFlags) = 0;
    virtual bool
    RecvPWebBrowserPersistResourcesConstructor(PWebBrowserPersistResourcesChild* actor);
    virtual bool
    RecvPWebBrowserPersistSerializeConstructor(
            PWebBrowserPersistSerializeChild* actor,
            const WebBrowserPersistURIMap& aMap,
            const nsCString& aRequestedContentType,
            const uint32_t& aEncoderFlags,
            const uint32_t& aWrapColumn);
    virtual bool
    Recv__delete__();
    virtual PWebBrowserPersistResourcesChild*
    AllocPWebBrowserPersistResourcesChild() = 0;
    virtual bool
    DeallocPWebBrowserPersistResourcesChild(PWebBrowserPersistResourcesChild* aActor) = 0;
    virtual PWebBrowserPersistSerializeChild*
    AllocPWebBrowserPersistSerializeChild(
            const WebBrowserPersistURIMap& aMap,
            const nsCString& aRequestedContentType,
            const uint32_t& aEncoderFlags,
            const uint32_t& aWrapColumn) = 0;
    virtual bool
    DeallocPWebBrowserPersistSerializeChild(PWebBrowserPersistSerializeChild* aActor) = 0;

    virtual void
    ActorDestroy(ActorDestroyReason aWhy);

public:
    typedef mozilla::ipc::IProtocol ProtocolBase;
    typedef IPC::Message Message;
    typedef mozilla::ipc::MessageChannel Channel;
    typedef mozilla::ipc::IProtocol ChannelListener;
    typedef base::ProcessHandle ProcessHandle;
    typedef mozilla::ipc::MessageChannel MessageChannel;
    typedef mozilla::ipc::SharedMemory SharedMemory;
    typedef mozilla::ipc::Trigger Trigger;

public:
    MOZ_IMPLICIT PWebBrowserPersistDocumentChild();

    virtual ~PWebBrowserPersistDocumentChild();

    PContentChild*
    Manager() const;

    void
    ManagedPWebBrowserPersistResourcesChild(nsTArray<PWebBrowserPersistResourcesChild*>& aArr) const;
    const ManagedContainer<PWebBrowserPersistResourcesChild>&
    ManagedPWebBrowserPersistResourcesChild() const;

    void
    ManagedPWebBrowserPersistSerializeChild(nsTArray<PWebBrowserPersistSerializeChild*>& aArr) const;
    const ManagedContainer<PWebBrowserPersistSerializeChild>&
    ManagedPWebBrowserPersistSerializeChild() const;

    PWebBrowserPersistDocument::State
    state();

    bool
    SendAttributes(
            const WebBrowserPersistDocumentAttrs& aAttrs,
            const OptionalInputStreamParams& postData,
            const nsTArray<FileDescriptor>& postFiles);

    bool
    SendInitFailure(const nsresult& aStatus);

    virtual void
    RemoveManagee(
            int32_t aProtocolId,
            ProtocolBase* aListener);

    virtual Result
    OnMessageReceived(const Message& msg__);

    virtual Result
    OnMessageReceived(
            const Message& msg__,
            Message*& reply__);

    virtual Result
    OnCallReceived(
            const Message& msg__,
            Message*& reply__);

    int32_t
    GetProtocolTypeId();

private:
    virtual const char*
    ProtocolName() const;

    void
    DestroySubtree(ActorDestroyReason why);

    void
    DeallocSubtree();

    template<typename T>
    void
    Write(
            const T& v__,
            Message* msg__)
    {
        IPC::WriteParam(msg__, v__);
    }

    template<typename T>
    bool
    Read(
            T* v__,
            const Message* msg__,
            PickleIterator* iter__)
    {
        return IPC::ReadParam(msg__, iter__, v__);
    }

    void
    Write(
            const StringInputStreamParams& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            StringInputStreamParams* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const FileInputStreamParams& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            FileInputStreamParams* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const PWebBrowserPersistSerializeChild* v__,
            Message* msg__,
            bool nullable__);

    MOZ_MUST_USE bool
    Read(
            PWebBrowserPersistSerializeChild** v__,
            const Message* msg__,
            PickleIterator* iter__,
            bool nullable__);

    void
    Write(
            const MultiplexInputStreamParams& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            MultiplexInputStreamParams* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const PWebBrowserPersistDocumentChild* v__,
            Message* msg__,
            bool nullable__);

    MOZ_MUST_USE bool
    Read(
            PWebBrowserPersistDocumentChild** v__,
            const Message* msg__,
            PickleIterator* iter__,
            bool nullable__);

    void
    Write(
            const nsTArray<InputStreamParams>& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            nsTArray<InputStreamParams>* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const OptionalInputStreamParams& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            OptionalInputStreamParams* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const WebBrowserPersistURIMapEntry& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            WebBrowserPersistURIMapEntry* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const WebBrowserPersistDocumentAttrs& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            WebBrowserPersistDocumentAttrs* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const TemporaryFileInputStreamParams& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            TemporaryFileInputStreamParams* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const WebBrowserPersistURIMap& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            WebBrowserPersistURIMap* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const MIMEInputStreamParams& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            MIMEInputStreamParams* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const nsTArray<WebBrowserPersistURIMapEntry>& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            nsTArray<WebBrowserPersistURIMapEntry>* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const InputStreamParams& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            InputStreamParams* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const BufferedInputStreamParams& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            BufferedInputStreamParams* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const SameProcessInputStreamParams& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            SameProcessInputStreamParams* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const PWebBrowserPersistResourcesChild* v__,
            Message* msg__,
            bool nullable__);

    MOZ_MUST_USE bool
    Read(
            PWebBrowserPersistResourcesChild** v__,
            const Message* msg__,
            PickleIterator* iter__,
            bool nullable__);

    void
    Write(
            const PartialFileInputStreamParams& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            PartialFileInputStreamParams* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const RemoteInputStreamParams& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            RemoteInputStreamParams* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const nsTArray<FileDescriptor>& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            nsTArray<FileDescriptor>* v__,
            const Message* msg__,
            PickleIterator* iter__);

    void
    Write(
            const FileDescriptor& v__,
            Message* msg__);

    MOZ_MUST_USE bool
    Read(
            FileDescriptor* v__,
            const Message* msg__,
            PickleIterator* iter__);

    State mState;
    ManagedContainer<PWebBrowserPersistResourcesChild> mManagedPWebBrowserPersistResourcesChild;
    ManagedContainer<PWebBrowserPersistSerializeChild> mManagedPWebBrowserPersistSerializeChild;
};


} // namespace mozilla

#if 0

//-----------------------------------------------------------------------------
// Skeleton implementation of abstract actor class

// Header file contents
namespace mozilla {
class WebBrowserPersistDocumentChild :
    public PWebBrowserPersistDocumentChild
{
    virtual bool
    RecvSetPersistFlags(const uint32_t& aNewFlags);

    virtual PWebBrowserPersistResourcesChild*
    AllocPWebBrowserPersistResourcesChild();

    virtual bool
    DeallocPWebBrowserPersistResourcesChild(PWebBrowserPersistResourcesChild* aActor);

    virtual PWebBrowserPersistSerializeChild*
    AllocPWebBrowserPersistSerializeChild(
            const WebBrowserPersistURIMap& aMap,
            const nsCString& aRequestedContentType,
            const uint32_t& aEncoderFlags,
            const uint32_t& aWrapColumn);

    virtual bool
    DeallocPWebBrowserPersistSerializeChild(PWebBrowserPersistSerializeChild* aActor);

    MOZ_IMPLICIT WebBrowserPersistDocumentChild();
    virtual ~WebBrowserPersistDocumentChild();
};
} // namespace mozilla


// C++ file contents
namespace mozilla {
bool
WebBrowserPersistDocumentChild::RecvSetPersistFlags(const uint32_t& aNewFlags)
{
    return false;
}

PWebBrowserPersistResourcesChild*
WebBrowserPersistDocumentChild::AllocPWebBrowserPersistResourcesChild()
{
    return 0;
}

bool
WebBrowserPersistDocumentChild::DeallocPWebBrowserPersistResourcesChild(PWebBrowserPersistResourcesChild* aActor)
{
    return false;
}

PWebBrowserPersistSerializeChild*
WebBrowserPersistDocumentChild::AllocPWebBrowserPersistSerializeChild(
        const WebBrowserPersistURIMap& aMap,
        const nsCString& aRequestedContentType,
        const uint32_t& aEncoderFlags,
        const uint32_t& aWrapColumn)
{
    return 0;
}

bool
WebBrowserPersistDocumentChild::DeallocPWebBrowserPersistSerializeChild(PWebBrowserPersistSerializeChild* aActor)
{
    return false;
}

MOZ_IMPLICIT WebBrowserPersistDocumentChild::WebBrowserPersistDocumentChild()
{
    MOZ_COUNT_CTOR(WebBrowserPersistDocumentChild);
}

MOZ_IMPLICIT WebBrowserPersistDocumentChild::~WebBrowserPersistDocumentChild()
{
    MOZ_COUNT_DTOR(WebBrowserPersistDocumentChild);
}

} // namespace mozilla
#endif // if 0

#endif // ifndef PWebBrowserPersistDocumentChild_h
