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

dataobject.h

00001 /*****************************************************************************
00002  * persiststorage.h: ActiveX control for VLC
00003  *****************************************************************************
00004  * Copyright (C) 2005 VideoLAN
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 __DATAOBJECT_H__
00024 #define __DATAOBJECT_H__
00025 
00026 #include <objidl.h>
00027 #include <vector>
00028 
00029 class VLCDataObject : public IDataObject
00030 {
00031 
00032 public:
00033 
00034     VLCDataObject(VLCPlugin *p_instance);
00035     virtual ~VLCDataObject();
00036 
00037     // IUnknown methods
00038     STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
00039     {
00040         if( (NULL != ppv)
00041          && (IID_IUnknown == riid) 
00042          && (IID_IDataObject == riid) ) {
00043             AddRef();
00044             *ppv = reinterpret_cast<LPVOID>(this);
00045             return NOERROR;
00046         }
00047         return _p_instance->pUnkOuter->QueryInterface(riid, ppv);
00048     };
00049 
00050     STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); };
00051     STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); };
00052 
00053     // IDataObject methods
00054     STDMETHODIMP DAdvise(LPFORMATETC,DWORD,LPADVISESINK,LPDWORD);
00055     STDMETHODIMP DUnadvise(DWORD);
00056     STDMETHODIMP EnumDAdvise(IEnumSTATDATA**);
00057     STDMETHODIMP EnumFormatEtc(DWORD, IEnumFORMATETC**);
00058     STDMETHODIMP GetCanonicalFormatEtc(LPFORMATETC,LPFORMATETC);
00059     STDMETHODIMP GetData(LPFORMATETC,LPSTGMEDIUM);
00060     STDMETHODIMP GetDataHere(LPFORMATETC,LPSTGMEDIUM);
00061     STDMETHODIMP QueryGetData(LPFORMATETC);
00062     STDMETHODIMP SetData(LPFORMATETC,LPSTGMEDIUM,BOOL);
00063 
00064     void onClose(void);
00065 private:
00066 
00067     HRESULT getMetaFileData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium);
00068     HRESULT getEnhMetaFileData(LPFORMATETC pFormatEtc, LPSTGMEDIUM pMedium);
00069 
00070     VLCPlugin *_p_instance;
00071     std::vector<FORMATETC> _v_formatEtc;
00072     IDataAdviseHolder *_p_adviseHolder;
00073 };
00074 
00075 #endif
00076 

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