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

#ifndef PWebBrowserPersistResourcesChild_h
#define PWebBrowserPersistResourcesChild_h

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

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

namespace mozilla {
class PWebBrowserPersistDocumentChild;
} // namespace mozilla

namespace mozilla {


class PWebBrowserPersistResourcesChild :
    public mozilla::ipc::IProtocol
{
    friend class mozilla::PWebBrowserPersistDocumentChild;

protected:
    typedef mozilla::ipc::ActorHandle ActorHandle;
    template<class FooSide> using Endpoint = mozilla::ipc::Endpoint<FooSide>;
    typedef mozilla::ipc::FileDescriptor FileDescriptor;
    typedef base::ProcessId ProcessId;
    typedef mozilla::ipc::ProtocolId ProtocolId;
    typedef mozilla::ipc::Shmem Shmem;
    typedef mozilla::ipc::Transport Transport;
    typedef mozilla::ipc::TransportDescriptor TransportDescriptor;
    typedef mozilla::PWebBrowserPersistDocumentChild PWebBrowserPersistDocumentChild;
    typedef mozilla::PWebBrowserPersistDocumentParent PWebBrowserPersistDocumentParent;

    typedef PWebBrowserPersistResources::State State;


    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 PWebBrowserPersistResourcesChild();

    virtual ~PWebBrowserPersistResourcesChild();

    PWebBrowserPersistDocumentChild*
    Manager() const;

    PWebBrowserPersistResources::State
    state();

    bool
    SendVisitResource(const nsCString& aURI);

    bool
    SendVisitDocument(PWebBrowserPersistDocumentChild* aSubDocument);

    static bool
    Send__delete__(
            PWebBrowserPersistResourcesChild* actor,
            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 PWebBrowserPersistResourcesChild* v__,
            Message* msg__,
            bool nullable__);

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

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

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

    State mState;
};


} // namespace mozilla

#if 0

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

// Header file contents
namespace mozilla {
class WebBrowserPersistResourcesChild :
    public PWebBrowserPersistResourcesChild
{
    MOZ_IMPLICIT WebBrowserPersistResourcesChild();
    virtual ~WebBrowserPersistResourcesChild();
};
} // namespace mozilla


// C++ file contents
namespace mozilla {
MOZ_IMPLICIT WebBrowserPersistResourcesChild::WebBrowserPersistResourcesChild()
{
    MOZ_COUNT_CTOR(WebBrowserPersistResourcesChild);
}

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

} // namespace mozilla
#endif // if 0

#endif // ifndef PWebBrowserPersistResourcesChild_h
