home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 October / Chip_2002-10_cd1.bin / zkuste / vbasic / Data / Utils / WMP71SDK.exe / CWMPEventDispatch.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-07-31  |  3.2 KB  |  107 lines

  1. // CWMPEventDispatch.h : Declaration of the event dispatcher
  2. //
  3. // Copyright (C) 2000-2001 Microsoft Corporation
  4. // All rights reserved.
  5. //
  6.  
  7. #include "stdafx.h"
  8. #include "wmpids.h"
  9. #include "wmp.h"
  10.  
  11. class CWMPEventDispatch:
  12.     public CComObjectRootEx<CComSingleThreadModel>,
  13.     public _WMPOCXEvents
  14.     {
  15. public:
  16.  
  17.     BEGIN_COM_MAP(CWMPEventDispatch)
  18.         COM_INTERFACE_ENTRY(_WMPOCXEvents)
  19.         COM_INTERFACE_ENTRY(IDispatch)
  20.     END_COM_MAP()
  21.  
  22.     // IDispatch methods
  23.  
  24.     STDMETHOD(GetIDsOfNames)( REFIID riid, 
  25.                               OLECHAR FAR *FAR *rgszNames,
  26.                               unsigned int cNames, 
  27.                               LCID lcid, 
  28.                               DISPID FAR *rgDispId )
  29.     { return( E_NOTIMPL ); }
  30.  
  31.     STDMETHOD(GetTypeInfo)( unsigned int iTInfo, 
  32.                             LCID lcid, 
  33.                             ITypeInfo FAR *FAR *ppTInfo )
  34.     { return( E_NOTIMPL ); }
  35.  
  36.     STDMETHOD(GetTypeInfoCount)( unsigned int FAR *pctinfo )
  37.     {
  38.         return( E_NOTIMPL );
  39.     }
  40.  
  41.     STDMETHOD(Invoke)( DISPID  dispIdMember,      
  42.                        REFIID  riid,              
  43.                        LCID  lcid,                
  44.                        WORD  wFlags,              
  45.                        DISPPARAMS FAR*  pDispParams,  
  46.                        VARIANT FAR*  pVarResult,  
  47.                        EXCEPINFO FAR*  pExcepInfo,  
  48.                        unsigned int FAR*  puArgErr );
  49.  
  50.     // WMP Event methods
  51.  
  52.     // Sent when the control changes OpenState
  53.     void OpenStateChange(long NewState);
  54.  
  55.     // Sent when the status string changes
  56.     void StatusChange();
  57.  
  58.     // Sent when the control changes PlayState
  59.     void PlayStateChange(long NewState);
  60.  
  61.     // Sent when a synchronized command or URL is received
  62.     void ScriptCommand(BSTR scType,BSTR Param);
  63.  
  64.     // Sent when the control is disconnected from the server
  65.     void Disconnect(long Result );
  66.  
  67.     // Sent when the control begins or ends buffering
  68.     void Buffering(VARIANT_BOOL Start);
  69.  
  70.     // Sent when the control has an error condition
  71.     void Error();
  72.  
  73.     // Sent when the media object has an error condition
  74.     void MediaError(IDispatch * pMediaObject);
  75.  
  76.     // Indicates that the current position of the movie has changed
  77.     void PositionChange(double oldPosition,double newPosition);
  78.  
  79.     // Sent when a marker is reached
  80.     void MarkerHit(long MarkerNum );
  81.  
  82.     // Indicates that the unit used to express duration and position has changed
  83.     void DurationUnitChange(long NewDurationUnit);
  84.  
  85.     // Indicates that the CD ROM media has changed
  86.     void CdromMediaChange(long CdromNum);
  87.  
  88.     // Sent when a playlist changes
  89.     void PlaylistChange(IDispatch * Playlist,WMPPlaylistChangeEventType change);
  90.  
  91.     // Sent when the current playlist changes
  92.     void CurrentPlaylistChange(WMPPlaylistChangeEventType change );
  93.  
  94.     // Sent when a current playlist item becomes available
  95.     void CurrentPlaylistItemAvailable(BSTR bstrItemName);
  96.  
  97.     // Sent when a media object changes
  98.     void MediaChange(IDispatch * Item);
  99.  
  100.     // Sent when a current media item becomes available
  101.     void CurrentMediaItemAvailable(BSTR bstrItemName);
  102.  
  103.     // Sent when the item selection on the current playlist changes
  104.     void CurrentItemChange(IDispatch *pdispMedia);
  105. };
  106.  
  107. typedef CComObject<CWMPEventDispatch> CComWMPEventDispatch;