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

#ifndef MOMResourceConflictItem_h
#define MOMResourceConflictItem_h

#if ENABLE(RMAI)

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

#include "MOMContentItem.h"
#include "MOMContentList.h"

extern "C" {
#include "layers.h"
#include "cdf/mom_resource_conflict_item.h"
}
namespace WebCore {

class MOMResourceConflictItem : public MOMContentItem {
public:

    MOMResourceConflictItem(ScriptExecutionContext *context, mom_content_item item);

    String boxId() const;
    String boxName() const;
    bool isLocal() const;
    bool cancelled() const;
    void setCancelled(bool cancelled);

    int referredType() const;
    MOMContentItem* referredItem() const;
    MOMContentList* conflicts() const;
    int startTime() const;
    int duration() const;
    bool suspended() const;
    void setSuspended(bool suspended);

    ALWAYS_INLINE mom_resource_conflict_item itemAsResourceConflictItem() const { return (mom_resource_conflict_item)m_item; }

private:
    mutable RefPtr<MOMContentItem> m_referredItem;
    mutable RefPtr<MOMContentList> m_conflicts;
};

} // namespace WebCore

#endif // ENABLE(RMAI)

#endif // MOMResourceConflictItem_h
