svvitch
digital signage player
D:/vs_workspace/switch_sf/src/svvitch/FlashSink.h
Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include "flash.h"
00004 #include <Poco/format.h>
00005 #include <Poco/Logger.h>
00006 
00007 
00008 //------------------------------------------------------------------------
00009 // FlashSink - Receives flash events   
00010 //------------------------------------------------------------------------
00015 class FlashSink: public ShockwaveFlashObjects::_IShockwaveFlashEvents {
00016 
00017 private:
00018     int _ref;
00019     LPCONNECTIONPOINT _cp;  
00020     DWORD _cookie;
00021     //FlashPlayer*          m_pFlashPlayer;
00022 
00023 public:
00024     FlashSink();
00025 
00026     virtual ‾FlashSink();
00027 
00028     //----------------------------------------------------------------------------
00029     // Flash Control Events are handled using IDispatch. After flash control is 
00030     // created we retrieve a IConnectionPointContainer and try to find 
00031     // ShockwaveFlashObjects::_IShockwaveFlashEvents connection point which is 
00032     // defined with UUID "d27cdb6d-ae6d-11cf-96b8-444553540000" in this file.
00033     // If successful, the connection point ID is returned in m_dwCookie variable.
00034     // The cookie value is used to identify this connection point so we can 
00035     // properly shut it down later.
00036     //----------------------------------------------------------------------------
00037     HRESULT Init(ShockwaveFlashObjects::IShockwaveFlash* flash);
00038 
00039     //----------------------------------------------------------------------------
00040     // Shutdown the connection point.
00041     //----------------------------------------------------------------------------
00042     HRESULT Shutdown();
00043  
00044     //----------------------------------------------------------------------------
00045     // QueryInterface.
00046     // Overriding common COM interface method.
00047     //----------------------------------------------------------------------------
00048     HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID* ppv);
00049 
00050     //----------------------------------------------------------------------------
00051     // AddRef.
00052     // Overriding common COM interface method.
00053     //----------------------------------------------------------------------------
00054     ULONG STDMETHODCALLTYPE AddRef();
00055 
00056     //----------------------------------------------------------------------------
00057     // Release.
00058     // Overriding common COM interface method.
00059     //----------------------------------------------------------------------------
00060     ULONG STDMETHODCALLTYPE Release();
00061 
00062     // IDispatch method
00063     virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT* pctinfo);
00064 
00065     virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo);
00066 
00067     virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid,DISPID* rgDispId);
00068 
00069     virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, ::DISPPARAMS __RPC_FAR *pDispParams, VARIANT __RPC_FAR *pVarResult, ::EXCEPINFO __RPC_FAR *pExcepInfo, UINT __RPC_FAR *puArgErr);
00070 
00071     HRESULT OnReadyStateChange (long newState);
00072     
00073     HRESULT OnProgress(long percentDone);
00074 
00075     HRESULT FSCommand(_bstr_t command, _bstr_t args);
00076 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines