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

#ifndef MOMDVREvent_h
#define MOMDVREvent_h

#if ENABLE(RMAI)

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

#include "MOMEvent.h"
#include "MOMScheduledRecording.h"

namespace WebCore {

class MOMScheduledRecording;

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

    int state() const { return getIntParam(mom_event_DVR_STATE); }
    int action() const { return getIntParam(mom_event_DVR_ACTION); }
    int index() const { return getIntParam(mom_event_DVR_INDEX); }
    MOMScheduledRecording* recording() const { return m_object.get(); }

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

} // namespace WebCore

#endif // ENABLE(RMAI)

#endif // MOMDVREvent_h
