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

    [
        ActiveDOMObject,
        Conditional=RMAI,
        JSGenerateToJSObject,
        JSGenerateToNativeObject
    ] interface MOM : EventTarget {
        const unsigned short NONE = 0;
        const unsigned short SOURCE = 1;
        const unsigned short RECORDER = 2;
        const unsigned short RF = 10;
        const unsigned short IPTV = 11;
        const unsigned short UPNP = 12;
        const unsigned short PORTABLE = 13;
        const unsigned short VOD = 14;
        const unsigned short IDLE = 0;
        const unsigned short CONNECTING = 101;
        const unsigned short CONNECTED = 102;
        const unsigned short PLAYING = 103;
        const unsigned short STOPPED = 104;
        const unsigned short FAILED = 105;
        const unsigned short PROBLEM = 106;
        const unsigned short RECORDING = 107;
        const unsigned short SCHEDULED = 108;
        const unsigned short DELETED = 109;
        const unsigned short DUE_SOON = 110;
        const unsigned short UPDATED = 111;
        const unsigned short PARTIAL = 112;
        const unsigned short REMINDER = 113;
        const unsigned short REMINDER_DUE = 114;
        const unsigned short ADDED = 115;
        const unsigned short CANCELLED = 116;
        const unsigned short PLAYING_INTERSTITIAL = 117;
        const unsigned short PLAYING_WITHOUT_PRESENTATION = 118;
        const unsigned short BUFFERING = 119;
        const unsigned short OK = 0;
        const unsigned short INVALID = 1;
        const unsigned short BUSY = 2;
        const unsigned short NOTPRESENT = 3;
        const unsigned short DISCFULL = 4;
        const unsigned short FAILURE = 5;
        const unsigned short NOTAUTHORISED = 6;
        const unsigned short RATING = 7;
        const unsigned short DIALOG = 8;
        const unsigned short START_OF_STREAM = 9;
        const unsigned short END_OF_STREAM = 10;
        const unsigned short TSB_WRAP = 11;
        const unsigned short PIN_WRONG = 12;
        const unsigned short PIN_LOCKED = 13;
        const unsigned short EXPIRED = 14;
        const unsigned short SERVER_ERROR = 15;
        const unsigned short CLIENT_ERROR = 16;
        const unsigned short PROGRESSED = 17;
        const unsigned short VIEW = 0;
        const unsigned short PREVIEW = 1;
        const unsigned short PURCHASE = 2;
        const unsigned short SORT_UID = 0;
        const unsigned short SORT_START_TIME = 1;
        const unsigned short SORT_TITLE = 2;
        const unsigned short SORT_DVR_AND_TITLE = 3;
        const unsigned short SORT_TITLE_AND_DESC_DATE = 4;
        const unsigned short SORT_CHANNEL = 5;
        const unsigned short SORT_CHANNEL_AND_DESC_DATE = 6;

        readonly attribute MOMDeviceCollection devices;
        readonly attribute MOMDVR dvr;
        readonly attribute MOMDRMAgent drmAgent;
        readonly attribute MOMConfiguration configuration;
        readonly attribute MOMLocalSystem localSystem;
        readonly attribute MOMParentalRatingSchemeCollection parentalRatingSchemes;
        readonly attribute MOMPackageManager packageManager;
        readonly attribute MOMChannelManager channels;
        readonly attribute MOMChannelManager channelManager;
        readonly attribute MOMContentItem catalogues;
        readonly attribute MOMVODManager vodManager;

        boolean hasFeature( in DOMString feature, in DOMString version );
        MOMDeviceCollection getDevicesByType( in long type, in boolean localOnly );
        MOMDeviceCollection getDevicesByURI( in DOMString uri, in boolean localOnly );
        MOMRenderer getRenderer() raises(MOMException);
        MOMPlayer createPlayer( in DOMString source, in boolean trickplay ) raises(MOMException);
        void setText( in DOMString name, in DOMString value );
        DOMString getText( in DOMString name );
        DOMString formatTime( in DOMString format, in long time, in optional boolean formatAsUTC );
        boolean downloadImage();
    };
