IWMSCacheProxyServer::CompareContentInformation
Previous | Next |
IWMSCacheProxyServer::CompareContentInformation
The CompareContentInformation method is called by the cache plug-in to determine whether content is up to date.
Syntax
HRESULT CompareContentInformation( BSTR bstrOriginUrl , IWMSContext* pContentInfo , IWMSContext* pPresentationContext , IWMSCacheProxy* pICacheProxy , IWMSProxyContext* pIProxyContext,IWMSCacheProxyServerCallback*pCallback,VARIANTvarContext);
Parameters
bstrOriginUrl
[in] BSTR containing the URL of the content on the origin server.
pContentInfo
[in] Pointer to an IWMSContext interface containing a content description context.
pPresentationContext
[ni] Pointer to an IWMSContext interface containing a presentation context.
pICacheProxy
[in] Pointer to the plug-in making the call.
pIProxyContext
[in, optional] Pointer to an IWMSProxyContext interface that enables the server to retrieve client credentials and the name and port number of the proxy server that handles the client request.
pCallback
[in, optional] Pointer to an IWMSCacheProxyServerCallback interface. The server calls IWMSCacheProxyServerCallback::OnCompareContentInformation to respond to the plug-in.
varContext
[in, optional] VARIANT containing a value defined by the plug-in. 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 IWMSCacheProxyServerCallback::OnCompareContentInformation.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
Return code | Number | Description |
E_INVALIDARG | 0x80070057 | The bstrOriginUrl, pICacheProxy, pCallback, pContentInfo, or pPresentationContext parameter is NULL. |
E_OUTOFMEMORY | 0x8007000E | The server could not allocate memory. |
Example Code
// Retrieve a pointer to a content description context for // a specific cache entry in the cache database. The database // and the GetContentInfo() function are user-defined. hr = m_pCacheEntry->GetContentInfo(&pContentInfo); // Retrieve the requested URL and preferred protocol from // local variables. HTTP and RTSP are common protocols. bstrUrl =.m_pszPreferredProtocol; bstrUrl.Append( L"://" ); bstrUrl.Append(m_bstrContent ); // Direct the cache proxy server to compare the cached // content to content on the origin server. hr = m_pICacheProxyServer->CompareContentInformation( bstrUrl, pContentInfo, m_pPresentationContext, this, (IWMSProxyContext*) this, this, varContext );
Requirements
Header: streamcache.h.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; Windows Server 2008.
See Also
- IWMSCacheProxyServer Interface
- IWMSCacheProxyServerCallback Interface
- IWMSCacheProxyServerCallback::OnCompareContentInformation
- IWMSContext Interface
- Presentation Context
Previous | Next |