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

#ifndef MOMVODAsset_h
#define MOMVODAsset_h

#if ENABLE(RMAI)

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

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

namespace WebCore {

class MOMPlayer;
class MOMStringCollection;

class MOMVODAsset : public MOMContentItem {
public:
    MOMVODAsset(ScriptExecutionContext *context, mom_content_item item);

    void connect( MOMPlayer* player, ExceptionCode& ec );
    void connect( MOMPlayer* player, int mode, ExceptionCode& ec );
    void connect( MOMPlayer* player, int mode, int offset, ExceptionCode& ec );
    int purchase(ExceptionCode& ec );
    int purchase( const String & pin, ExceptionCode& ec );
    void cancel(ExceptionCode& ec);
    void setBookmark( int bookmark, ExceptionCode& ec );

    ALWAYS_INLINE mom_asset_item itemAsAssetItem() const { return (mom_asset_item)m_item; }
    ALWAYS_INLINE mom_vod_asset itemAsVODAsset() const { return (mom_vod_asset)m_item; }
};

} // namespace WebCore

#endif // ENABLE(RMAI)

#endif // MOMVODAsset_h
