]> git.sesse.net Git - vlc/blobdiff - activex/viewobject.h
Removes trailing spaces. Removes tabs.
[vlc] / activex / viewobject.h
index 6bca57dfe8aad12ea65479f7a1483e9502aeac81..0b860c2af60ff9c579b5c9b55feebbd243474570 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * persiststorage.h: ActiveX control for VLC
  *****************************************************************************
- * Copyright (C) 2005 VideoLAN
+ * Copyright (C) 2005 the VideoLAN team
  *
  * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
  *
@@ -17,7 +17,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #ifndef __VIEWOBJECT_H__
@@ -30,26 +30,28 @@ class VLCViewObject : public IViewObject2
 
 public:
 
-    VLCViewObject(VLCPlugin *p_instance) : _p_instance(p_instance) {};
+    VLCViewObject(VLCPlugin *p_instance) : _p_instance(p_instance),
+        _dwAspect(0), _advf(0), _pAdvSink(NULL) {};
     virtual ~VLCViewObject() {};
 
     // IUnknown methods
     STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
     {
-        if( (NULL != ppv)
-         && (IID_IUnknown == riid) 
-         && (IID_IPersist == riid) 
-         && (IID_IViewObject == riid) 
-         && (IID_IViewObject2 == riid) ) {
+        if( NULL == ppv )
+            return E_POINTER;
+        if( (IID_IUnknown == riid)
+         || (IID_IViewObject == riid)
+         || (IID_IViewObject2 == riid) )
+        {
             AddRef();
             *ppv = reinterpret_cast<LPVOID>(this);
             return NOERROR;
         }
-        return _p_instance->QueryInterface(riid, ppv);
+        return _p_instance->pUnkOuter->QueryInterface(riid, ppv);
     };
 
-    STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->AddRef(); };
-    STDMETHODIMP_(ULONG) Release(void) { return _p_instance->Release(); };
+    STDMETHODIMP_(ULONG) AddRef(void) { return _p_instance->pUnkOuter->AddRef(); };
+    STDMETHODIMP_(ULONG) Release(void) { return _p_instance->pUnkOuter->Release(); };
 
     // IViewObject methods
     STDMETHODIMP Draw(DWORD,LONG,PVOID,DVTARGETDEVICE*,HDC,HDC,LPCRECTL,LPCRECTL,BOOL(CALLBACK *)(DWORD),DWORD);
@@ -65,6 +67,11 @@ public:
 private:
 
     VLCPlugin *_p_instance;
+
+    // Advise Sink support
+    DWORD _dwAspect;
+    DWORD _advf;
+    LPADVISESINK _pAdvSink;
 };
 
 #endif