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

#ifndef MOMParentalRating_h
#define MOMParentalRating_h

#if ENABLE(RMAI)

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

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

namespace WebCore {

class MOMParentalRatingScheme;

class MOMParentalRating : public RefCounted<MOMParentalRating> {
public:
    enum {
        LABEL_DIALOGUE = 1,
        LABEL_LANGUAGE = 2,
        LABEL_SEX = 4,
        LABEL_VIOLENCE = 8,
        LABEL_FANTASY_VIOLENCE = 16,
        PIN_OK = 0,
        PIN_FAILED = 1,
        PIN_LOCKED = 2,
    };

    static PassRefPtr<MOMParentalRating> create(mom_content_item item);
    ~MOMParentalRating();

    MOMParentalRatingScheme* scheme() const;
    int value() const;
    int labels() const;

    String toString();

protected:
    MOMParentalRating(mom_content_item item);

private:
    mom_content_item m_item;
    mutable RefPtr<MOMParentalRatingScheme> m_scheme;
};

} // namespace WebCore

#endif // ENABLE(RMAI)

#endif // MOMParentalRating_h
