1 /*****************************************************************************
\r
2 * vlccontrol.h: ActiveX control for VLC
\r
3 *****************************************************************************
\r
4 * Copyright (C) 2005 VideoLAN
\r
6 * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
\r
8 * This program is free software; you can redistribute it and/or modify
\r
9 * it under the terms of the GNU General Public License as published by
\r
10 * the Free Software Foundation; either version 2 of the License, or
\r
11 * (at your option) any later version.
\r
13 * This program is distributed in the hope that it will be useful,
\r
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
16 * GNU General Public License for more details.
\r
18 * You should have received a copy of the GNU General Public License
\r
19 * along with this program; if not, write to the Free Software
\r
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
\r
21 *****************************************************************************/
\r
23 #ifndef _VLCCONTROL_H_
\r
24 #define _VLCCONTROL_H_
\r
27 #include "axvlc_idl.h"
\r
29 class VLCControl : public IVLCControl
\r
34 VLCControl(VLCPlugin *p_instance) : _p_instance(p_instance), _p_typeinfo(NULL) {};
\r
35 virtual ~VLCControl();
\r
38 STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
\r
41 && (IID_IUnknown == riid)
\r
42 && (IID_IDispatch == riid)
\r
43 && (IID_IVLCControl == riid) ) {
\r
45 *ppv = dynamic_cast<LPVOID>(this);
\r
48 return _p_instance->QueryInterface(riid, ppv);
\r
51 STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); };
\r
52 STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); };
\r
54 // IDispatch methods
\r
55 STDMETHODIMP GetTypeInfoCount(UINT*);
\r
56 STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*);
\r
57 STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*);
\r
58 STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*);
\r
60 // IVLCControl methods
\r
61 STDMETHODIMP get_Value(VARIANT *pvarValue);
\r
62 STDMETHODIMP put_Value(VARIANT pvarValue);
\r
63 STDMETHODIMP play(void);
\r
64 STDMETHODIMP get_Visible(VARIANT_BOOL *visible);
\r
65 STDMETHODIMP put_Visible(VARIANT_BOOL visible);
\r
66 STDMETHODIMP pause(void);
\r
67 STDMETHODIMP stop(void);
\r
68 STDMETHODIMP get_Playing(VARIANT_BOOL *isPlaying);
\r
69 STDMETHODIMP put_Playing(VARIANT_BOOL isPlaying);
\r
70 STDMETHODIMP get_Position(float *position);
\r
71 STDMETHODIMP put_Position(float position);
\r
72 STDMETHODIMP get_Time(int *seconds);
\r
73 STDMETHODIMP put_Time(int seconds);
\r
74 STDMETHODIMP shuttle(int seconds);
\r
75 STDMETHODIMP fullscreen();
\r
76 STDMETHODIMP get_Length(int *seconds);
\r
77 STDMETHODIMP playFaster(void);
\r
78 STDMETHODIMP playSlower(void);
\r
79 STDMETHODIMP get_Volume(int *volume);
\r
80 STDMETHODIMP put_Volume(int volume);
\r
81 STDMETHODIMP toggleMute(void);
\r
82 STDMETHODIMP addTarget( BSTR uri, VARIANT options, enum VLCPlaylistMode mode, int position);
\r
83 STDMETHODIMP get_PlaylistIndex(int *index);
\r
84 STDMETHODIMP get_PlaylistCount(int *count);
\r
85 STDMETHODIMP playlistNext(void);
\r
86 STDMETHODIMP playlistPrev(void);
\r
87 STDMETHODIMP playlistClear(void);
\r
88 STDMETHODIMP get_VersionInfo(BSTR *version);
\r
92 HRESULT getTypeInfo();
\r
94 VLCPlugin *_p_instance;
\r
95 ITypeInfo *_p_typeinfo;
\r