/*****************************************************************************
 * axvlc.idl: ActiveX control for VLC
 *****************************************************************************
 * Copyright (C) 2006 the VideoLAN team
 * Copyright (C) 2010 M2X BV
 *
 * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
 *          Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

// comments terminated by [t] are by tonsofpcs, regarding the string
// review. April 02, 2006. [t]
// Possibly change all instances of "the current playlist" to "the
// playlist" and "current playlist" to "the playlist" [t]

import "ocidl.idl";

[
  uuid(DF2BBE39-40A8-433b-A279-073F48DA94B6),
  version(1.0),
  helpstring("VideoLAN VLC ActiveX Plugin")
]
library AXVLC
{
    // Forward declare all types defined in this typelib
    interface IVLCControl;
    interface IVLCAudio;
    interface IVLCInput;
    interface IVLCLogo;
    interface IVLCDeinterlace;
    interface IVLCMarquee;
    interface IVLCPlaylist;
    interface IVLCSubtitle;
    interface IVLCVideo;
    interface IVLCControl2;
    dispinterface DVLCEvents;

    importlib("stdole2.tlb");

    typedef [public] enum VLCPlaylistMode
    {
        VLCPlayListInsert       =  1,
        VLCPlayListInsertAndGo  =  9,
        VLCPlayListReplace      =  2,
        VLCPlayListReplaceAndGo = 10,
        VLCPlayListAppend       =  4,
        VLCPlayListAppendAndGo  = 12,
        VLCPlayListCheckInsert  = 16
    } eVLCPlaylistMode;

    // playlist target position
    const int VLCPlayListEnd    = -666;

    // DISPID definitions
    const int DISPID_BackColor  = -501;

    const int DISPID_Visible    = 100;
    const int DISPID_Playing    = 101;
    const int DISPID_Position   = 102;
    const int DISPID_Time       = 103;
    const int DISPID_Length     = 104;
    const int DISPID_Volume     = 105;
    const int DISPID_MRL        = 106;
    const int DISPID_AutoPlay   = 107;
    const int DISPID_AutoLoop   = 108;
    const int DISPID_StartTime  = 109;
    const int DISPID_BaseURL    = 110;
    const int DISPID_Toolbar    = 111;
    const int DISPID_FSEnabled  = 112;

    [
      odl,
      uuid(C2FA41D0-B113-476e-AC8C-9BD14999C1C1),
      helpstring("VLC Control (deprecated)"),
      dual,
      oleautomation
    ]
    interface IVLCControl : IDispatch
    {
        [id(DISPID_Visible), propget, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
        HRESULT Visible([out, retval] VARIANT_BOOL* visible);
        [id(DISPID_Visible), propput, bindable, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
        HRESULT Visible([in] VARIANT_BOOL visible);
        [helpstring("Play current target in playlist.")]
        HRESULT play();
        [helpstring("Pause playback.")]
        HRESULT pause();
        [helpstring("Stop playback.")]
        HRESULT stop();
        [id(DISPID_Playing), hidden, propget, helpstring("Returns a value that determines whether VLC is currently playing.")]
        HRESULT Playing([out, retval] VARIANT_BOOL* isPlaying);
        [id(DISPID_Position), propget, helpstring("Returns/sets playback position within the current item. Position is a relative value ranging from 0.0 to 1.0.")]
        HRESULT Position([out, retval] float* position);
        [id(DISPID_Position), propput, helpstring("Returns/sets playback position within the current item. Position is a relative value ranging from 0.0 to 1.0.")]
        HRESULT Position([in] float position);
        [id(DISPID_Time), propget, helpstring("Returns/sets playback time relative to the start of the current item.")]
        HRESULT Time([out, retval] int* seconds);
        [id(DISPID_Time), propput, helpstring("Returns/sets playback time relative to the start of the current item.")]
        HRESULT Time([in] int seconds);
        [helpstring("Advance or backtrack playback time, relative to current time.")]  //possibly find a better word to replace 'backtrack' [t]
        HRESULT shuttle([in] int seconds);
        [helpstring("Switch video between normal and fullscreen view modes.")]
        HRESULT fullscreen();
        [id(DISPID_Length), propget, hidden, helpstring("Returns the total length, in seconds, of the current item, may be unknown.")]
        HRESULT Length([out, retval] int* seconds);
        [helpstring("Increases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]
        HRESULT playFaster();
        [helpstring("Decreases playback speed. Possible speeds are: 1x, 2x, 4x, 8x.")]
        HRESULT playSlower();
        [id(DISPID_Volume), propget, helpstring("Returns/sets playback volume, ranges from 0 to 200%.")]  //possibly remove % from 'ranges', change to 'values', and specify that 200 is equivilant to 200% (remember, 200% == 2.0, but this gets an int not a float) [t]
        HRESULT Volume([out, retval] int* volume);
        [id(DISPID_Volume), propput, helpstring("Returns/sets playback volume, ranges from 0 to 200%.")]
        HRESULT Volume([in] int volume);
        [helpstring("Mute/unmute playback audio.")]
        HRESULT toggleMute();
        [helpstring("Sets the value of a VLC variable.")]
        HRESULT setVariable([in] BSTR name, [in] VARIANT value);
        [helpstring("Returns the value of a VLC variable.")]
        HRESULT getVariable([in] BSTR name, [out, retval] VARIANT *value);

/*
** use VARIANT rather than a SAFEARRAY as argument type
** for compatibility with some scripting language (JScript)
*/

        [helpstring("Add an item to the playlist.")]
        HRESULT addTarget([in] BSTR uri, [in] VARIANT options, [in] enum VLCPlaylistMode mode, [in] int position);
        [propget, helpstring("Returns index of current item in playlist.")]
        HRESULT PlaylistIndex([out, retval] int* index);
        [propget, helpstring("Returns number of items in playlist.")]
        HRESULT PlaylistCount([out, retval] int* index);
        [helpstring("Advance to next item in playlist.")]
        HRESULT playlistNext();
        [helpstring("Advance to previous item in playlist.")]
        HRESULT playlistPrev();
        [helpstring("Remove all items from playlist.")]
        HRESULT playlistClear();
        [propget, hidden, helpstring("Returns VLC Version.")]
        HRESULT VersionInfo([out, retval] BSTR* version);
        [id(DISPID_MRL), propget, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]
        HRESULT MRL([out, retval] BSTR* mrl);
        [id(DISPID_MRL), propput, helpstring("Returns/sets the first MRL in playlist, used for AutoPlay")]
        HRESULT MRL([in] BSTR mrl);
        [id(DISPID_AutoPlay), propget, helpstring("Returns/sets a value that determines whether the playlist is played on startup")]
        HRESULT AutoPlay([out, retval] VARIANT_BOOL* autoplay);
        [id(DISPID_AutoPlay), propput, helpstring("Returns/Sets a value that determines whether the playlist is played on startup")]
        HRESULT AutoPlay([in] VARIANT_BOOL autoplay);
        [id(DISPID_AutoLoop), propget, helpstring("Returns/sets a value that determines whether the playlist is looped")]
        HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);
        [id(DISPID_AutoLoop), propput, helpstring("Returns/sets a value that determines whether the playlist is looped")]
        HRESULT AutoLoop([in] VARIANT_BOOL autoloop);
    };

    const int DISPID_PlayEvent  = 100;
    const int DISPID_PauseEvent = 101;
    const int DISPID_StopEvent  = 102;

    /* async events from libvlc */
    const int DISPID_MediaPlayerNothingSpecialEvent = 200;
    const int DISPID_MediaPlayerOpeningEvent = 201;
    const int DISPID_MediaPlayerBufferingEvent = 202;
    const int DISPID_MediaPlayerPlayingEvent = 203;
    const int DISPID_MediaPlayerPausedEvent = 204;
    const int DISPID_MediaPlayerForwardEvent = 205;
    const int DISPID_MediaPlayerBackwardEvent = 206;
    const int DISPID_MediaPlayerEncounteredErrorEvent = 207;
    const int DISPID_MediaPlayerEndReachedEvent = 208;
    const int DISPID_MediaPlayerStoppedEvent = 209;

    const int DISPID_MediaPlayerTimeChangedEvent = 210;
    const int DISPID_MediaPlayerPositionChangedEvent = 211;
    const int DISPID_MediaPlayerSeekableChangedEvent = 212;
    const int DISPID_MediaPlayerPausableChangedEvent = 213;

    [
      uuid(DF48072F-5EF8-434e-9B40-E2F3AE759B5F),
      helpstring("Event interface for VLC control"),
    ]
    dispinterface DVLCEvents
    {
        properties:
        methods:
            [id(DISPID_PlayEvent), helpstring("Playing")]
            void play();
            [id(DISPID_PauseEvent), helpstring("Paused")]
            void pause();
            [id(DISPID_StopEvent), helpstring("Stopped")]
            void stop();

            /* asyn events from libvlc */
            [id(DISPID_MediaPlayerNothingSpecialEvent), helpstring("Idle state")]
            void MediaPlayerNothingSpecial();
            [id(DISPID_MediaPlayerOpeningEvent), helpstring("Opening media")]
            void MediaPlayerOpening();
            [id(DISPID_MediaPlayerBufferingEvent), helpstring("Buffering media")]
            void MediaPlayerBuffering([in] long cache);
            [id(DISPID_MediaPlayerPlayingEvent), helpstring("Media is playing")]
            void MediaPlayerPlaying();
            [id(DISPID_MediaPlayerPausedEvent), helpstring("Media is paused")]
            void MediaPlayerPaused();
            [id(DISPID_MediaPlayerForwardEvent), helpstring("Forward playback")]
            void MediaPlayerForward();
            [id(DISPID_MediaPlayerBackwardEvent), helpstring("Backward playback")]
            void MediaPlayerBackward();
            [id(DISPID_MediaPlayerEncounteredErrorEvent), helpstring("An error has been encountered")]
            void MediaPlayerEncounteredError();
            [id(DISPID_MediaPlayerEndReachedEvent), helpstring("End of playback reached")]
            void MediaPlayerEndReached();
            [id(DISPID_MediaPlayerStoppedEvent), helpstring("Playback stopped")]
            void MediaPlayerStopped();

            [id(DISPID_MediaPlayerTimeChangedEvent), helpstring("Time changed")]
            void MediaPlayerTimeChanged([in] long time);
            [id(DISPID_MediaPlayerPositionChangedEvent), helpstring("Position changed")]
            void MediaPlayerPositionChanged([in] long position);
            [id(DISPID_MediaPlayerSeekableChangedEvent), helpstring("Seek changed")]
            void MediaPlayerSeekableChanged([in] VARIANT_BOOL seekable);
            [id(DISPID_MediaPlayerPausableChangedEvent), helpstring("Pause setting changed")]
            void MediaPlayerPausableChanged([in] VARIANT_BOOL pausable);
    };

    [
      odl,
      uuid(9E0BD17B-2D3C-4656-B94D-03084F3FD9D4),
      helpstring("VLC Audio APIs"),
      dual,
      oleautomation
    ]
    interface IVLCAudio : IDispatch
    {
        [propget, helpstring("Returns/sets the audio mute state.")]
        HRESULT mute([out, retval] VARIANT_BOOL* muted);
        [propput, helpstring("Returns/sets the audio mute state.")]
        HRESULT mute([in] VARIANT_BOOL muted);

        [propget, helpstring("Returns/sets audio volume as a percent value.")]
        HRESULT volume([out, retval] long* volume);
        [propput, helpstring("Returns/sets audio volume as a percent value.")]
        HRESULT volume([in] long volume);

        [helpstring("Mute/unmute audio playback.")]
        HRESULT toggleMute();

        [propget, helpstring("Returns/sets audio track used/to use.")]
        HRESULT track([out, retval] long* track);
        [propput, helpstring("Returns/sets audio track used/to use.")]
        HRESULT track([in] long track);

        [propget, helpstring("Returns the number of audio tracks available.")]
        HRESULT count([out, retval] long* trackNumber);
        [helpstring("Returns audio track name.")]
        HRESULT description([in] long trackID, [out, retval] BSTR* name);

        [propget, helpstring("Returns audio channel [1-5] indicating; stereo, reverse stereo, left, right, dolby.")]
        HRESULT channel([out, retval] long* channel);
        [propput, helpstring("Sets audio channel to [1-5] indicating; stereo, reverse stereo, left, right, dolby.")]
        HRESULT channel([in] long channel);
    };

    [
      odl,
      uuid(49E0DBD1-9440-466C-9C97-95C67190C603),
      helpstring("VLC Input APIs"),
      dual,
      oleautomation
    ]
    interface IVLCInput : IDispatch
    {
        [propget, helpstring("Returns the clip length, in milliseconds.")]
        HRESULT length([out, retval] double* length);

        [propget, helpstring("Returns/sets playback position in current clip.  Position is ranging from 0.0 to 1.0.")]
        HRESULT position([out, retval] double* position);
        [propput, helpstring("Returns/sets playback position in the current clip.  Position ranging from 0.0 to 1.0.")]
        HRESULT position([in] double position);

        [propget, helpstring("Returns/sets playback time in current clip, in milliseconds.")]
        HRESULT time([out, retval] double* time);
        [propput, helpstring("Returns/sets playback time in the current clip, in milliseconds.")]
        HRESULT time([in] double time);

        [propget, helpstring("Returns current playback state.")]
        HRESULT state([out, retval] long* state);

        [propget, helpstring("Returns/sets current playback rate, normal rate is 1.0 ")]
        HRESULT rate([out, retval] double* rate);
        [propput, helpstring("Returns/sets current playback rate, normal rate is 1.0.")]
        HRESULT rate([in] double rate);

        [propget, helpstring("Returns current playback frames per seconds if available.")]
        HRESULT fps([out, retval] double* fps);

        [propget, helpstring("Returns whether current playback displays video.")]
        HRESULT hasVout([out, retval] VARIANT_BOOL* hasVout);
    };

    [
      odl,
      uuid(FD37FE32-82BC-4A25-B056-315F4DBB194D),
      helpstring("VLC Playlist Items collection"),
      dual,
      oleautomation
    ]
    interface IVLCPlaylistItems : IDispatch
    {
        [propget, helpstring("Returns number of items in playlist.")]
        HRESULT count([out, retval] long* count);

        [helpstring("Remove all items from playlist.")]
        HRESULT clear();

        [helpstring("remove item from playlist.")]
        HRESULT remove([in] long itemId);
    };

    [
      odl,
      uuid(54613049-40BF-4035-9E70-0A9312C0188D),
      helpstring("VLC Playlist APIs"),
      dual,
      oleautomation
    ]
    interface IVLCPlaylist : IDispatch
    {
        [hidden, propget, helpstring("Returns number of items in playlist. (deprecated)")]
        HRESULT itemCount([out, retval] long* count);

        [propget, helpstring("Returns whether playback displays video.")]
        HRESULT isPlaying([out, retval] VARIANT_BOOL* playing);

        [helpstring("Add a playlist item.")]
        HRESULT add([in] BSTR uri, [in, optional] VARIANT name, [in, optional] VARIANT options, [out, retval] long* itemId);

        [helpstring("Play/Resume the playlist.")]
        HRESULT play();

        [helpstring("Play item in playlist.")]
        HRESULT playItem([in] long itemId);

        [helpstring("Play/Pause current clip.")]
        HRESULT togglePause();

        [helpstring("Stop current clip.")]
        HRESULT stop();

        [helpstring("Advance to next item in playlist.")]
        HRESULT next();

        [helpstring("Advance to previous item in playlist.")]
        HRESULT prev();

        [hidden, helpstring("Remove all items from playlist. (deprecated)")]
        HRESULT clear();

        [hidden, helpstring("Remove item from playlist. (deprecated)")]
        HRESULT removeItem([in] long item);

        [propget, helpstring("Returns the playlist items collection object.")]
        HRESULT items([out, retval] IVLCPlaylistItems** obj);
    };

    [
      odl,
      uuid(465E787A-0556-452F-9477-954E4A940003),
      helpstring("VLC Subtitle APIs"),
      dual,
      oleautomation
    ]
    interface IVLCSubtitle : IDispatch
    {
        [propget, helpstring("Returns video subtitle used.")]
        HRESULT track([out, retval] long* spu);
        [propput, helpstring("Sets video subtitle to use.")]
        HRESULT track([in] long spu);

        [propget, helpstring("Returns the number of video subtitles available.")]
        HRESULT count([out, retval] long* spuNumber);
        [helpstring("Returns video subtitle name.")]
        HRESULT description([in] long nameID, [out, retval] BSTR* name);
    };

    [
      odl,
      uuid(8D076AD6-9B6F-4150-A0FD-5D7E8C8CB02C),
      helpstring("VLC Marquee Filter"),
      dual,
      oleautomation
    ]
    interface IVLCMarquee : IDispatch
    {
        [helpstring("enable Marquee Filter.")]
        HRESULT enable();
        [helpstring("disable Marquee Filter.")]
        HRESULT disable();

        [propget, helpstring("Retrieve marquee text.")]
        HRESULT text([out, retval] BSTR* val);
        [propput, helpstring("Change marquee text.")]
        HRESULT text([in] BSTR val);

        [propget, helpstring("Retrieve text color.")]
        HRESULT color([out, retval] LONG* val);
        [propput, helpstring("Change text color.")]
        HRESULT color([in] LONG val);
        [propget, helpstring("Retrieve text opacity.")]
        HRESULT opacity([out, retval] LONG* val);
        [propput, helpstring("Set text opacity (0=transparent, 255=opaque).")]
        HRESULT opacity([in] LONG val);
        [propget, helpstring("Retrieve text position.")]
        HRESULT position([out, retval] BSTR* val);
        [propput, helpstring("Text positioning relative to: center, left, right, top, bottom, top-left, top-right, bottom-left, bottom-right.")]
        HRESULT position([in] BSTR val);
        [propget, helpstring("Retrieve text refresh time.")]
        HRESULT refresh([out, retval] LONG* val);
        [propput, helpstring("Set text refresh time.")]
        HRESULT refresh([in] LONG val);
        [propget, helpstring("Retrieve text size.")]
        HRESULT size([out, retval] LONG* val);
        [propput, helpstring("Set text size.")]
        HRESULT size([in] LONG val);
        [propget, helpstring("Retrieve timeout.")]
        HRESULT timeout([out, retval] LONG* val);
        [propput, helpstring("Change timeout.")]
        HRESULT timeout([in] LONG val);
        [propget, helpstring("Retrieve text abcissa.")]
        HRESULT x([out, retval] LONG* val);
        [propput, helpstring("Change text abcissa.")]
        HRESULT x([in] LONG val);
        [propget, helpstring("Retrieve text ordinate.")]
        HRESULT y([out, retval] LONG* val);
        [propput, helpstring("Change text ordinate.")]
        HRESULT y([in] LONG val);
    };

    [
      odl,
      uuid(8a4a20c2-93f3-44e8-8644-beb2e3487e84),
      helpstring("VLC Logo Filter"),
      dual,
      oleautomation
    ]
    interface IVLCLogo : IDispatch
    {
        [helpstring("Enable the logo filter.")]
        HRESULT enable();
        [helpstring("Disable the logo filter.")]
        HRESULT disable();

        [helpstring("specify input file[[,delay],alpha].")]
        HRESULT file([in] BSTR fname);

        [propget, helpstring("")]
        HRESULT delay([out, retval] long* val);
        [propput, helpstring("Set delay-to-next-picture in miliseconds.")]
        HRESULT delay([in] long val);

        [propget, helpstring("")]
        HRESULT repeat([out, retval] long* val);
        [propput, helpstring("Repeat: -1 continuous (default), 0 no repeat, ....")]
        HRESULT repeat([in] long val);

        [propget, helpstring("Returns the `global' alpha value.")]
        HRESULT opacity([out, retval] long* val);
        [propput, helpstring("Alpha value: 0 opaque to 255 fully transparent")]
        HRESULT opacity([in] long val);

        [propget, helpstring("Retrieve picture position.")]
        HRESULT position([out, retval] BSTR* val);
        [propput, helpstring("Picture positioning relative to: center, left, right, top, bottom, top-left, top-right, bottom-left, bottom-right.")]
        HRESULT position([in] BSTR val);

        [propget, helpstring("Picture x offset.")]
        HRESULT x([out, retval] long* val);
        [propput, helpstring("Picture x offset.")]
        HRESULT x([in] long val);
        [propget, helpstring("Picture y offset.")]
        HRESULT y([out, retval] long* val);
        [propput, helpstring("Picture y offset.")]
        HRESULT y([in] long val);

    };
    [
      odl,
      uuid(bc97469f-cb11-4037-8dce-5fc9f5f85307),
      helpstring("VLC Deinterlace Filter"),
      dual,
      oleautomation
    ]
    interface IVLCDeinterlace : IDispatch
    {
        [helpstring("Enable deinterlace filter and set method.")]
        HRESULT enable([in] BSTR mode);
        [helpstring("Disable deinterlace filter.")]
        HRESULT disable();

    };

    [
      odl,
      uuid(0AAEDF0B-D333-4B27-A0C6-BBF31413A42E),
      helpstring("VLC Video APIs"),
      dual,
      oleautomation
    ]
    interface IVLCVideo : IDispatch
    {
        [propget, helpstring("Returns/sets the fullscreen state.")]
        HRESULT fullscreen([out, retval] VARIANT_BOOL* fullscreen);

        [propput, helpstring("Returns/sets the fullscreen state.")]
        HRESULT fullscreen([in] VARIANT_BOOL fullscreen);

        [propget, helpstring("Returns video original width.")]
        HRESULT width([out, retval] long* width);

        [propget, helpstring("Returns video original height.")]
        HRESULT height([out, retval] long* height);

        [propget, helpstring("Returns video aspect ratio.")]
        HRESULT aspectRatio([out, retval] BSTR* aspect);
        [propput, helpstring("Sets video aspect ratio.")]
        HRESULT aspectRatio([in] BSTR aspect);

        [propget, helpstring("Returns video subtitle used.")]
        HRESULT subtitle([out, retval] long* spu);
        [propput, helpstring("Sets video subtitle to use.")]
        HRESULT subtitle([in] long spu);

        [propget, helpstring("Returns crop filter geometry.")]
        HRESULT crop([out, retval] BSTR* geometry);
        [propput, helpstring("Sets crop filter geometry.")]
        HRESULT crop([in] BSTR geometry);

        [propget, helpstring("Returns teletext page used.")]
        HRESULT teletext([out, retval] long* page);
        [propput, helpstring("Sets teletext page to use.")]
        HRESULT teletext([in] long page);

        [helpstring("toggle fullscreen/windowed state.")]
        HRESULT toggleFullscreen();

        [helpstring("take video snapshot and save it into picture object.")]
        HRESULT takeSnapshot([out, retval] IPictureDisp** picture);

        [helpstring("toggle teletext transparent state.")]
        HRESULT toggleTeletext();

        [propget, helpstring("Returns the marquee object.")]
        HRESULT marquee([out, retval] IVLCMarquee** obj);

        [propget, helpstring("Returns the logo object.")]
        HRESULT logo([out, retval] IVLCLogo** obj);

        [propget, helpstring("Returns the logo object.")]
        HRESULT deinterlace([out, retval] IVLCDeinterlace** obj);
    };

    [
      odl,
      uuid(796A2C2D-5B11-4fb5-9077-56D5E674972B),
      helpstring("VLC Media Description"),
      dual,
      oleautomation
    ]
    interface IVLCMediaDescription : IDispatch
    {
        [propget]
        HRESULT title([out, retval] BSTR* val);
        [propget]
        HRESULT artist([out, retval] BSTR* val);
        [propget]
        HRESULT genre([out, retval] BSTR* val);
        [propget]
        HRESULT copyright([out, retval] BSTR* val);
        [propget]
        HRESULT album([out, retval] BSTR* val);
        [propget]
        HRESULT trackNumber([out, retval] BSTR* val);
        [propget]
        HRESULT description([out, retval] BSTR* val);
        [propget]
        HRESULT rating([out, retval] BSTR* val);
        [propget]
        HRESULT date([out, retval] BSTR* val);
        [propget]
        HRESULT setting([out, retval] BSTR* val);
        [propget]
        HRESULT URL([out, retval] BSTR* val);
        [propget]
        HRESULT language([out, retval] BSTR* val);
        [propget]
        HRESULT nowPlaying([out, retval] BSTR* val);
        [propget]
        HRESULT publisher([out, retval] BSTR* val);
        [propget]
        HRESULT encodedBy([out, retval] BSTR* val);
        [propget]
        HRESULT artworkURL([out, retval] BSTR* val);
        [propget]
        HRESULT trackID([out, retval] BSTR* val);
    }

    [
      odl,
      uuid(2D719729-5333-406C-BF12-8DE787FD65E3),
      helpstring("VLC Control"),
      dual,
      oleautomation
    ]
    interface IVLCControl2 : IDispatch
    {
        [id(DISPID_AutoLoop), propget, helpstring("Returns/sets a value that determines whether the playlist is looped")]
        HRESULT AutoLoop([out, retval] VARIANT_BOOL* autoloop);
        [id(DISPID_AutoLoop), propput, helpstring("Returns/sets a value that determines whether the playlist is looped")]
        HRESULT AutoLoop([in] VARIANT_BOOL autoloop);

        [id(DISPID_AutoPlay), propget, helpstring("Returns/sets a value that determines whether the playlist is played on startup")]
        HRESULT AutoPlay([out, retval] VARIANT_BOOL* autoplay);
        [id(DISPID_AutoPlay), propput, helpstring("Returns/Sets a value that determines whether the playlist is played on startup")]
        HRESULT AutoPlay([in] VARIANT_BOOL autoplay);

        [id(DISPID_BaseURL), propget, helpstring("Returns/sets the base URL for relative paths")]
        HRESULT BaseURL([out, retval] BSTR* url);
        [id(DISPID_BaseURL), propput, helpstring("Returns/sets the base URL for relative paths")]
        HRESULT BaseURL([in] BSTR url);

        [id(DISPID_StartTime), propget, helpstring("Returns/sets playback start time of URL.")]
        HRESULT StartTime([out, retval] long* seconds);
        [id(DISPID_StartTime), propput, helpstring("Returns/sets playback start time of URL.")]
        HRESULT StartTime([in] long seconds);

        [id(DISPID_MRL), propget, helpstring("Returns/sets the default MRL in playlist")]
        HRESULT MRL([out, retval] BSTR* mrl);
        [id(DISPID_MRL), propput, helpstring("Returns/sets the default MRL in playlist")]
        HRESULT MRL([in] BSTR mrl);

        [propget, helpstring("Returns VLC Version.")]
        HRESULT VersionInfo([out, retval] BSTR* version);

        [id(DISPID_Visible), propget, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
        HRESULT Visible([out, retval] VARIANT_BOOL* visible);
        [id(DISPID_Visible), propput, helpstring("Returns/sets a value that determines whether viewing area is visible or hidden.")]
        HRESULT Visible([in] VARIANT_BOOL visible);

        [id(DISPID_Volume), propget, helpstring("Returns/sets default audio volume.")]
        HRESULT Volume([out, retval] long* volume);
        [id(DISPID_Volume), propput, helpstring("Returns/sets default audio volume.")]
        HRESULT Volume([in] long volume);

        [id(DISPID_BackColor), propget, helpstring("Returns/sets background color.")]
        HRESULT BackColor([out, retval] OLE_COLOR* backcolor);
        [id(DISPID_BackColor), propput, helpstring("Returns/sets background color.")]
        HRESULT BackColor([in] OLE_COLOR backcolor);

        /*
         * caution: vlcobject.toolbar:bool does not yet exists in Firefox
         * plugin. Official usage is through "toolbar" property for now,
         * which is compatibile with Firefox.
         */
        [id(DISPID_Toolbar), propget, helpstring("Returns/sets visibility of the toolbar")]
        HRESULT Toolbar([out, retval] VARIANT_BOOL* visible);
        [id(DISPID_Toolbar), propput, helpstring("Returns/sets visibility of the toolbar")]
        HRESULT Toolbar([in] VARIANT_BOOL visible);

        [propget, helpstring("Returns the audio object.")]
        HRESULT audio([out, retval] IVLCAudio** obj);

        [propget, helpstring("Returns the input object.")]
        HRESULT input([out, retval] IVLCInput** obj);

        [propget, helpstring("Returns the playlist object.")]
        HRESULT playlist([out, retval] IVLCPlaylist** obj);

        [propget, helpstring("Returns the subtitle object.")]
        HRESULT subtitle([out, retval] IVLCSubtitle** obj);

        [propget, helpstring("Returns the video object.")]
        HRESULT video([out, retval] IVLCVideo** obj);

        [id(DISPID_FSEnabled), propget, helpstring("Returns/sets availability of fullscreen mode.")]
        HRESULT FullscreenEnabled([out, retval] VARIANT_BOOL* enabled);
        [id(DISPID_FSEnabled), propput, helpstring("Returns/sets availability of fullscreen mode.")]
        HRESULT FullscreenEnabled([in] VARIANT_BOOL enabled);

        [propget, helpstring("Returns the media description object.")]
        HRESULT mediaDescription([out, retval] IVLCMediaDescription** obj);
    };

    [
      uuid(E23FE9C6-778E-49D4-B537-38FCDE4887D8),
      helpstring("VLC control (deprecated)"),
      control
    ]
    coclass VLCPlugin
    {
        [default] interface IVLCControl;
        interface IVLCControl2;
        [default, source] dispinterface DVLCEvents;
    };

    [
      uuid(9BE31822-FDAD-461B-AD51-BE1D1C159921),
      helpstring("VLC control"),
      control
    ]
    coclass VLCPlugin2
    {
        [default] interface IVLCControl2;
        interface IVLCControl;
        [default, source] dispinterface DVLCEvents;
    };
};
