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

#ifndef MOMResourceConflictList_h
#define MOMResourceConflictList_h

#if ENABLE(RMAI)

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

#include "MOMContentList.h"
#include "ExceptionCode.h"

extern "C" {
#include "layers.h"
#include "cdf/mom_resource_conflict_list.h"
}

namespace WebCore {

class ScriptExecutionContext;

class MOMResourceConflictList : public MOMContentList {
public:
    enum {
        SERIES_RECORD_ALWAYS = 1,
        SERIES_RECORD_HIGHEST = 2,
        SERIES_RECORD_BEST_EFFORT = 3,
    };

    MOMResourceConflictList(ScriptExecutionContext *context, mom_content_item item);

    bool hasConflicts() const;
    bool ignorePadding() const;
    void setIgnorePadding(bool ignorePadding);

    void commit();
    void dispose();
    void setPriority( bool highest );
    PassRefPtr<MOMContentList> seriesResolutionPolicy( int policy, ExceptionCode& ec );

    ALWAYS_INLINE mom_resource_conflict_list itemAsResourceConflictList() const { return (mom_resource_conflict_list)m_item; }
};

} // namespace WebCore

#endif // ENABLE(RMAI)

#endif // MOMResourceConflictList_h
