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

oleobject.h

00001 /*****************************************************************************
00002  * oleobject.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 __OLEOBJECT_H__
00024 #define __OLEOBJECT_H__
00025 
00026 class VLCOleObject : public IOleObject
00027 {
00028 
00029 public:
00030 
00031     VLCOleObject(VLCPlugin *p_instance);
00032     virtual ~VLCOleObject();
00033 
00034     // IUnknown methods
00035     STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
00036     {
00037         if( (NULL != ppv)
00038          && (IID_IUnknown == riid)
00039          && (IID_IOleObject == riid) ) 
00040         {
00041             AddRef();
00042             *ppv = reinterpret_cast<LPVOID>(this);
00043             return NOERROR;
00044         }
00045         return _p_instance->pUnkOuter->QueryInterface(riid, ppv);
00046     };
00047 
00048     STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); };
00049     STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); };
00050 
00051     // IOleObject methods
00052     STDMETHODIMP Advise(IAdviseSink *, LPDWORD);
00053     STDMETHODIMP Close(DWORD);
00054     STDMETHODIMP DoVerb(LONG, LPMSG, LPOLECLIENTSITE, LONG, HWND, LPCRECT);
00055     STDMETHODIMP EnumAdvise(IEnumSTATDATA **);
00056     STDMETHODIMP EnumVerbs(IEnumOleVerb **);
00057     STDMETHODIMP GetClientSite(LPOLECLIENTSITE *);
00058     STDMETHODIMP GetClipboardData(DWORD, LPDATAOBJECT *);
00059     STDMETHODIMP GetExtent(DWORD, SIZEL *);
00060     STDMETHODIMP GetMiscStatus(DWORD, DWORD *);
00061     STDMETHODIMP GetMoniker(DWORD, DWORD, LPMONIKER *);
00062     STDMETHODIMP GetUserClassID(CLSID *);
00063     STDMETHODIMP GetUserType(DWORD, LPOLESTR *);
00064     STDMETHODIMP InitFromData(IDataObject *, BOOL, DWORD);
00065     STDMETHODIMP IsUpToDate(void);
00066     STDMETHODIMP SetClientSite(LPOLECLIENTSITE);
00067     STDMETHODIMP SetColorScheme(LOGPALETTE *);
00068     STDMETHODIMP SetExtent(DWORD, SIZEL *);
00069     STDMETHODIMP SetHostNames(LPCOLESTR, LPCOLESTR) ;
00070     STDMETHODIMP SetMoniker(DWORD, LPMONIKER);
00071     STDMETHODIMP Unadvise(DWORD);
00072     STDMETHODIMP Update(void);
00073 
00074 private:
00075 
00076     HRESULT doInPlaceActivate(LPMSG lpMsg, LPOLECLIENTSITE pActiveSite, HWND hwndParent, LPCRECT lprcPosRect);
00077     HRESULT doUIActivate(LPMSG lpMsg, LPOLECLIENTSITE pActiveSite, HWND hwndParent, LPCRECT lprcPosRect);
00078 
00079     IOleAdviseHolder *_p_advise_holder;
00080     IOleClientSite *_p_clientsite;
00081 
00082     VLCPlugin *_p_instance;
00083 };
00084 
00085 #endif
00086 

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