/** @file MOMComponentEvent.h
 *
 * Copyright (C) Espial Limited 2014 - Company confidential - All rights reserved.
 *
 */

#ifndef MOMComponentEvent_h
#define MOMComponentEvent_h

#if ENABLE(RMAI)

#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
#include <wtf/text/AtomicString.h>

#include "MOMEvent.h"
#include "MOMComponent.h"

namespace WebCore {

class MOMComponentEvent : public MOMEvent {
public:
    enum {
        COMPONENT_DATA = 1,
    };

    static PassRefPtr<MOMComponentEvent> create()
    {
        return adoptRef(new MOMComponentEvent);
    }

    int reason() const { return getIntParam(mom_event_COMPONENT_REASON); }
    MOMComponent* component() const { return m_object.get(); }

    MOMComponentEvent(const mom_event_params* params, ScriptExecutionContext* context);
private:
    MOMComponentEvent();
    mutable RefPtr<MOMComponent> m_object;
};

} // namespace WebCore

#endif // ENABLE(RMAI)

#endif // MOMComponentEvent_h
