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

#include "config.h"

#if ENABLE(RMAI)

#include "MOMDRMMessageResultEvent.h"
#include "UtilsMOM.h"

namespace WebCore {

MOMDRMMessageResultEvent::MOMDRMMessageResultEvent(const mom_event_params* params, ScriptExecutionContext*)
    : MOMEvent(AtomicString("MOM_DRMMessageResult"), params)
{
    ASSERT(params->arg_count == mom_event_DRM_COUNT);
    ASSERT(params->string_count == mom_event_DRM_COUNT_S);

    for (int i = 0; i < params->string_count; i++)
        setStringParam(i, UtilsMOM::StringFromLayersString(params->string_params[i]));
}

MOMDRMMessageResultEvent::MOMDRMMessageResultEvent()
    : MOMEvent(AtomicString("MOM_DRMMessageResult"))
{
}

} // namespace WebCore

#endif // ENABLE(RMAI)
