Share via


IWMSCacheProxyServer.GetContentInformation (Visual Basic .NET)

banner art

Previous Next

IWMSCacheProxyServer.GetContentInformation (Visual Basic .NET)

The GetContentInformation method is called by the cache plug-in to retrieve content information.

Syntax

  

Parameters

bstrOriginUrl

[in] String containing the URL on the origin server that identifies the location of the content.

pPresentationContext

[in] IWMSContext object containing a presentation context.

pICacheProxy

[in] IWMSCacheProxy object identifying the plug-in. Event plug-ins can use the pointer to access the cache proxy plug-in when an event occurs.

pIProxyContext

[in] IWMSProxyContext object that enables the server to retrieve client credentials and the name and port number of the proxy server that handles the client request. This can be Nothing if the cache proxy plug-in does not specify an upstream proxy configuration.

pCallback

[in] IWMSCacheProxyServerCallback object containing the callback function. The server calls IWMSCacheProxyServerCallback.OnGetContentInformation to respond to the plug-in.

varContext

[in] Object 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.OnGetContentInformation.

Return Values

This method does not return a value.

If this method fails, it throws an exception.

Number Description
0x8007000E The server could not allocate memory.

Remarks

Cache proxy plug-ins generally call GetContentInformation when performing any of the following operations:

  • Rolling over to a different protocol
  • Establishing a cache-miss policy
  • Processing a prestuff request

In each case, the plug-in must get more information about the content before it can proceed. For example, to establish a cache-miss policy, the plug-in must determine whether the content is a broadcast, a playlist, or on-demand. Also, before prestuffing content, it must determine whether the content can be cached.

When the plug-in calls GetContentInformation, the server retrieves the appropriate information from the upstream server, and calls IWMSCacheProxyServerCallback.OnGetContentInformation to return a cache information context pointer to the plug-in. The context contains a pointer to an IWMSDataContainerVersion object that the plug-in can use to retrieve the following information:

  • Flags that indicate whether the content can be cached, proxied, or split
  • The size of the content, in bytes
  • Entity tags that can be used to differentiate content
  • A count of the entity tags
  • The content expiration date
  • The time at which the content was last modified

A plug-in typically does not have access to client credentials. Therefore, a call to GetContentInformation can fail and return E_ACCESSDENIED if the origin server requires authentication. In this case, the plug-in can instruct the server to play the content on demand by returning WMS_CACHE_QUERY_MISS_PLAY_ON_DEMAND when it calls IWMSCacheProxyCallback.OnQueryCacheMissPolicy. When the cache proxy server again fails the authentication challenge, it passes the authentication request through to the client, thereby allowing the client to pass its credentials upstream.

Requirements

Reference: Add a reference to Microsoft.WindowsMediaServices.

Namespace: Microsoft.WindowsMediaServices.Interop.

Assembly: Microsoft.WindowsMediaServices.dll.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; Windows Server 2008.

See Also

Previous Next