00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _VLCCONTROL_H_
00024 #define _VLCCONTROL_H_
00025
00026 #include <oaidl.h>
00027 #include "axvlc_idl.h"
00028
00029 class VLCControl : public IVLCControl
00030 {
00031
00032 public:
00033
00034 VLCControl(VLCPlugin *p_instance) : _p_instance(p_instance), _p_typeinfo(NULL) {};
00035 virtual ~VLCControl();
00036
00037
00038 STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
00039 {
00040 if( (NULL != ppv)
00041 && (IID_IUnknown == riid)
00042 && (IID_IDispatch == riid)
00043 && (IID_IVLCControl == riid) ) {
00044 AddRef();
00045 *ppv = reinterpret_cast<LPVOID>(this);
00046 return NOERROR;
00047 }
00048 return _p_instance->pUnkOuter->QueryInterface(riid, ppv);
00049 };
00050
00051 STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); };
00052 STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); };
00053
00054
00055 STDMETHODIMP GetTypeInfoCount(UINT*);
00056 STDMETHODIMP GetTypeInfo(UINT, LCID, LPTYPEINFO*);
00057 STDMETHODIMP GetIDsOfNames(REFIID,LPOLESTR*,UINT,LCID,DISPID*);
00058 STDMETHODIMP Invoke(DISPID,REFIID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,UINT*);
00059
00060
00061 STDMETHODIMP play(void);
00062 STDMETHODIMP get_Visible(VARIANT_BOOL *visible);
00063 STDMETHODIMP put_Visible(VARIANT_BOOL visible);
00064 STDMETHODIMP pause(void);
00065 STDMETHODIMP stop(void);
00066 STDMETHODIMP get_Playing(VARIANT_BOOL *isPlaying);
00067 STDMETHODIMP get_Position(float *position);
00068 STDMETHODIMP put_Position(float position);
00069 STDMETHODIMP get_Time(int *seconds);
00070 STDMETHODIMP put_Time(int seconds);
00071 STDMETHODIMP shuttle(int seconds);
00072 STDMETHODIMP fullscreen();
00073 STDMETHODIMP get_Length(int *seconds);
00074 STDMETHODIMP playFaster(void);
00075 STDMETHODIMP playSlower(void);
00076 STDMETHODIMP get_Volume(int *volume);
00077 STDMETHODIMP put_Volume(int volume);
00078 STDMETHODIMP toggleMute(void);
00079 STDMETHODIMP setVariable( BSTR name, VARIANT value);
00080 STDMETHODIMP getVariable( BSTR name, VARIANT *value);
00081 STDMETHODIMP addTarget( BSTR uri, VARIANT options, enum VLCPlaylistMode mode, int position);
00082 STDMETHODIMP get_PlaylistIndex(int *index);
00083 STDMETHODIMP get_PlaylistCount(int *count);
00084 STDMETHODIMP playlistNext(void);
00085 STDMETHODIMP playlistPrev(void);
00086 STDMETHODIMP playlistClear(void);
00087 STDMETHODIMP get_VersionInfo(BSTR *version);
00088 STDMETHODIMP get_MRL(BSTR *mrl);
00089 STDMETHODIMP put_MRL(BSTR mrl);
00090 STDMETHODIMP get_AutoLoop(VARIANT_BOOL *autoloop);
00091 STDMETHODIMP put_AutoLoop(VARIANT_BOOL autoloop);
00092 STDMETHODIMP get_AutoPlay(VARIANT_BOOL *autoplay);
00093 STDMETHODIMP put_AutoPlay(VARIANT_BOOL autoplay);
00094
00095 private:
00096
00097 HRESULT getTypeInfo();
00098
00099 VLCPlugin *_p_instance;
00100 ITypeInfo *_p_typeinfo;
00101
00102 };
00103
00104 #endif
00105