IWMSCacheProxyServerCallback::OnDownloadContentProgress
Previous | Next |
IWMSCacheProxyServerCallback::OnDownloadContentProgress
The OnDownloadContentProgress method is called by the server to respond when a cache plug-in calls IWMSCacheProxyServer::DownLoadContent. The OnDownloadContentProgress method is called every time content is downloaded. Therefore, it is called every time an entry in a playlist has been downloaded. However, it is not guaranteed to be called in the order of the entries.
Syntax
HRESULT OnDownloadContentProgress( HRESULT hr , WMS_RECORD_PROGRESS_OPCODE opCode , IWMSContext* pArchiveContext , VARIANT varContext );
Parameters
hr
[in] HRESULT indicating whether the call to IWMSCacheProxyServer::DownloadContent succeeded.
opCode
[in] Member of the WMS_RECORD_PROGRESS_OPCODE enumeration type indicating the state of the download. This must be one of the following values.
Value | Description |
WMS_RECORD_PROGRESS_ARCHIVE_STARTED | The requested content is being saved. |
WMS_RECORD_PROGRESS_ARCHIVE_FINISHED | The archiving process has been completed. |
pArchiveContext
[in] Pointer to a IWMSContext object containing a pointer to an INSSBuffer object that contains the serialized metadata for the media item being downloaded. The metadata must be persisted by the plug-in. For more information, see Downloading Content.
varContext
[in] VARIANT containing a value defined by the plug-in when it called IWMSCacheProxyServer::DownLoadContent. For example, your plug-in can use this parameter to persist state information. The server does not alter this value and passes it back when calling OnDownloadContentProgress.
Return Values
If the method succeeds, the plug-in must return S_OK. To report an error, the plug-in can return any HRESULT other than S_OK. If the plug-in uses the IWMSEventLog interface to log error information directly to the Windows Event Viewer, it is recommended that it return NS_E_PLUGIN_ERROR_REPORTED. Typically, the server attempts to make plug-in error information available to the server object model, the Windows Event Viewer, and the troubleshooting list in the details pane of the Windows Media Services MMC. However, if the plug-in uses the IWMSEventLog interface to send custom error information to the Windows Event Viewer, returning NS_E_PLUGIN_ERROR_REPORTED stops the server from also logging to the event viewer. For more information about retrieving plug-in error information, see Identifying Plug-in Errors.
Requirements
Header: streamcache.h.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; Windows Server 2008.
See Also
Previous | Next |