Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

vlccontrol.h

00001 /*****************************************************************************
00002  * vlccontrol.h: ActiveX control for VLC
00003  *****************************************************************************
00004  * Copyright (C) 2005 the VideoLAN team
00005  *
00006  * Authors: Damien Fouilleul <[email protected]>
00007  *
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
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     // IUnknown methods
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     // IDispatch methods
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     // IVLCControl methods
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 

Generated on Tue Dec 20 10:14:18 2005 for vlc-0.8.4a by  doxygen 1.4.2