1 /*****************************************************************************
2 * vlccontrol.h: ActiveX control for VLC
3 *****************************************************************************
4 * Copyright (C) 2005-2010 the VideoLAN team
6 * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
23 #ifndef _VLCCONTROL_H_
24 #define _VLCCONTROL_H_
26 #include "axvlc_idl.h"
28 class VLCControl
: public IVLCControl
32 VLCControl(VLCPlugin
*p_instance
):
33 _p_instance(p_instance
), _p_typeinfo(NULL
) { }
34 virtual ~VLCControl();
37 STDMETHODIMP
QueryInterface(REFIID riid
, void **ppv
)
41 if( (IID_IUnknown
== riid
)
42 || (IID_IDispatch
== riid
)
43 || (IID_IVLCControl
== riid
) )
46 *ppv
= reinterpret_cast<LPVOID
>(this);
49 return _p_instance
->pUnkOuter
->QueryInterface(riid
, ppv
);
52 STDMETHODIMP_(ULONG
) AddRef(void)
53 { return _p_instance
->pUnkOuter
->AddRef(); }
54 STDMETHODIMP_(ULONG
) Release(void)
55 { return _p_instance
->pUnkOuter
->Release(); }
58 STDMETHODIMP
GetTypeInfoCount(UINT
*);
59 STDMETHODIMP
GetTypeInfo(UINT
, LCID
, LPTYPEINFO
*);
60 STDMETHODIMP
GetIDsOfNames(REFIID
,LPOLESTR
*,UINT
,LCID
,DISPID
*);
61 STDMETHODIMP
Invoke(DISPID
,REFIID
,LCID
,WORD
,DISPPARAMS
*,VARIANT
*,EXCEPINFO
*,UINT
*);
63 // IVLCControl methods
64 STDMETHODIMP
play(void);
65 STDMETHODIMP
get_Visible(VARIANT_BOOL
*visible
);
66 STDMETHODIMP
put_Visible(VARIANT_BOOL visible
);
67 STDMETHODIMP
pause(void);
68 STDMETHODIMP
stop(void);
69 STDMETHODIMP
get_Playing(VARIANT_BOOL
*isPlaying
);
70 STDMETHODIMP
get_Position(float *position
);
71 STDMETHODIMP
put_Position(float position
);
72 STDMETHODIMP
get_Time(int *seconds
);
73 STDMETHODIMP
put_Time(int seconds
);
74 STDMETHODIMP
shuttle(int seconds
);
75 STDMETHODIMP
fullscreen();
76 STDMETHODIMP
get_Length(int *seconds
);
77 STDMETHODIMP
playFaster(void);
78 STDMETHODIMP
playSlower(void);
79 STDMETHODIMP
get_Volume(int *volume
);
80 STDMETHODIMP
put_Volume(int volume
);
81 STDMETHODIMP
toggleMute(void);
82 STDMETHODIMP
setVariable( BSTR name
, VARIANT value
);
83 STDMETHODIMP
getVariable( BSTR name
, VARIANT
*value
);
84 STDMETHODIMP
addTarget( BSTR uri
, VARIANT options
, enum VLCPlaylistMode mode
, int position
);
85 STDMETHODIMP
get_PlaylistIndex(int *index
);
86 STDMETHODIMP
get_PlaylistCount(int *count
);
87 STDMETHODIMP
playlistNext(void);
88 STDMETHODIMP
playlistPrev(void);
89 STDMETHODIMP
playlistClear(void);
90 STDMETHODIMP
get_VersionInfo(BSTR
*version
);
91 STDMETHODIMP
get_MRL(BSTR
*mrl
);
92 STDMETHODIMP
put_MRL(BSTR mrl
);
93 STDMETHODIMP
get_AutoLoop(VARIANT_BOOL
*autoloop
);
94 STDMETHODIMP
put_AutoLoop(VARIANT_BOOL autoloop
);
95 STDMETHODIMP
get_AutoPlay(VARIANT_BOOL
*autoplay
);
96 STDMETHODIMP
put_AutoPlay(VARIANT_BOOL autoplay
);
98 static HRESULT
CreateTargetOptions(int codePage
, VARIANT
*options
, char ***cOptions
, int *cOptionCount
);
99 static void FreeTargetOptions(char **cOptions
, int cOptionCount
);
103 HRESULT
getTypeInfo();
105 VLCPlugin
*_p_instance
;
106 ITypeInfo
*_p_typeinfo
;