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

#ifndef MOMPlayEvent_h
#define MOMPlayEvent_h

#if ENABLE(RMAI)

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

#include "MOMEvent.h"

namespace WebCore {

class MOMContentItem;

class MOMPlayEvent : public MOMEvent {
public:
    static PassRefPtr<MOMPlayEvent> create()
    {
        return adoptRef(new MOMPlayEvent);
    }

    int state() const { return getIntParam(mom_event_PLAY_STATE); }
    int condition() const { return getIntParam(mom_event_PLAY_CONDITION); }
    int position() const { return getIntParam(mom_event_PLAY_POSITION); }
    int speed() const { return getIntParam(mom_event_PLAY_SPEED); }
    MOMContentItem* object() const { return m_object.get(); }

    MOMPlayEvent(const mom_event_params* params, ScriptExecutionContext* context);

private:
    MOMPlayEvent();
    mutable RefPtr<MOMContentItem> m_object;
};

} // namespace WebCore

#endif // ENABLE(RMAI)

#endif // MOMPlayEvent_h
