Commit edbddef5 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Add nsICacheInfoChannel stub implementation.

parent a0a6fad6
......@@ -35,6 +35,7 @@ typedef struct {
nsIHttpChannel nsIHttpChannel_iface;
nsIUploadChannel nsIUploadChannel_iface;
nsIHttpChannelInternal nsIHttpChannelInternal_iface;
nsICacheInfoChannel nsICacheInfoChannel_iface;
LONG ref;
......
......@@ -730,6 +730,23 @@ interface nsIFormPOSTActionChannel : nsIUploadChannel
[
object,
uuid(72c34415-c6eb-48af-851f-772fa9ee5972),
local
]
interface nsICacheInfoChannel : nsISupports
{
nsresult GetCacheTokenExpirationTime(uint32_t *aCacheTokenExpirationTime);
nsresult GetCacheTokenCachedCharset(nsACString *aCacheTokenCachedCharset);
nsresult SetCacheTokenCachedCharset(const nsACString *aCacheTokenCachedCharset);
nsresult IsFromCache(bool *_retval);
nsresult GetCacheKey(nsISupports **aCacheKey);
nsresult SetCacheKey(nsISupports *aCacheKey);
nsresult GetAllowStaleCacheContent(bool *aAllowStaleCacheContent);
nsresult SetAllowStaleCacheContent(bool aAllowStaleCacheContent);
}
[
object,
uuid(8d171460-a716-41f1-92be-8c659db39b45),
local
]
......
......@@ -521,6 +521,9 @@ static nsresult NSAPI nsChannel_QueryInterface(nsIHttpChannel *iface, nsIIDRef r
}else if(IsEqualGUID(&IID_nsIHttpChannelInternal, riid)) {
TRACE("(%p)->(IID_nsIHttpChannelInternal %p)\n", This, result);
*result = is_http_channel(This) ? &This->nsIHttpChannelInternal_iface : NULL;
}else if(IsEqualGUID(&IID_nsICacheInfoChannel, riid)) {
TRACE("(%p)->(IID_nsICacheInfoChannel %p)\n", This, result);
*result = is_http_channel(This) ? &This->nsICacheInfoChannel_iface : NULL;
}else {
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), result);
*result = NULL;
......@@ -2138,6 +2141,100 @@ static const nsIHttpChannelInternalVtbl nsHttpChannelInternalVtbl = {
nsHttpChannelInternal_SetBlockAuthPrompt
};
static inline nsChannel *impl_from_nsICacheInfoChannel(nsICacheInfoChannel *iface)
{
return CONTAINING_RECORD(iface, nsChannel, nsICacheInfoChannel_iface);
}
static nsresult NSAPI nsCacheInfoChannel_QueryInterface(nsICacheInfoChannel *iface, nsIIDRef riid,
void **result)
{
nsChannel *This = impl_from_nsICacheInfoChannel(iface);
return nsIHttpChannel_QueryInterface(&This->nsIHttpChannel_iface, riid, result);
}
static nsrefcnt NSAPI nsCacheInfoChannel_AddRef(nsICacheInfoChannel *iface)
{
nsChannel *This = impl_from_nsICacheInfoChannel(iface);
return nsIHttpChannel_AddRef(&This->nsIHttpChannel_iface);
}
static nsrefcnt NSAPI nsCacheInfoChannel_Release(nsICacheInfoChannel *iface)
{
nsChannel *This = impl_from_nsICacheInfoChannel(iface);
return nsIHttpChannel_Release(&This->nsIHttpChannel_iface);
}
static nsresult NSAPI nsCacheInfoChannel_GetCacheTokenExpirationTime(nsICacheInfoChannel *iface, UINT32 *p)
{
nsChannel *This = impl_from_nsICacheInfoChannel(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static nsresult NSAPI nsCacheInfoChannel_GetCacheTokenCachedCharset(nsICacheInfoChannel *iface, nsACString *p)
{
nsChannel *This = impl_from_nsICacheInfoChannel(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static nsresult NSAPI nsCacheInfoChannel_SetCacheTokenCachedCharset(nsICacheInfoChannel *iface, const nsACString *p)
{
nsChannel *This = impl_from_nsICacheInfoChannel(iface);
FIXME("(%p)->(%p)\n", This, debugstr_nsacstr(p));
return E_NOTIMPL;
}
static nsresult NSAPI nsCacheInfoChannel_IsFromCache(nsICacheInfoChannel *iface, cpp_bool *p)
{
nsChannel *This = impl_from_nsICacheInfoChannel(iface);
FIXME("(%p)->(%p)\n", This, p);
*p = FALSE;
return NS_OK;
}
static nsresult NSAPI nsCacheInfoChannel_GetCacheKey(nsICacheInfoChannel *iface, nsISupports **p)
{
nsChannel *This = impl_from_nsICacheInfoChannel(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static nsresult NSAPI nsCacheInfoChannel_SetCacheKey(nsICacheInfoChannel *iface, nsISupports *key)
{
nsChannel *This = impl_from_nsICacheInfoChannel(iface);
FIXME("(%p)->(%p)\n", This, key);
return E_NOTIMPL;
}
static nsresult NSAPI nsCacheInfoChannel_GetAllowStaleCacheContent(nsICacheInfoChannel *iface, cpp_bool *p)
{
nsChannel *This = impl_from_nsICacheInfoChannel(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
}
static nsresult NSAPI nsCacheInfoChannel_SetAllowStaleCacheContent(nsICacheInfoChannel *iface, cpp_bool allow)
{
nsChannel *This = impl_from_nsICacheInfoChannel(iface);
FIXME("(%p)->(%x)\n", This, allow);
return E_NOTIMPL;
}
static const nsICacheInfoChannelVtbl nsCacheInfoChannelVtbl = {
nsCacheInfoChannel_QueryInterface,
nsCacheInfoChannel_AddRef,
nsCacheInfoChannel_Release,
nsCacheInfoChannel_GetCacheTokenExpirationTime,
nsCacheInfoChannel_GetCacheTokenCachedCharset,
nsCacheInfoChannel_SetCacheTokenCachedCharset,
nsCacheInfoChannel_IsFromCache,
nsCacheInfoChannel_GetCacheKey,
nsCacheInfoChannel_SetCacheKey,
nsCacheInfoChannel_GetAllowStaleCacheContent,
nsCacheInfoChannel_SetAllowStaleCacheContent
};
static void invalidate_uri(nsWineURI *This)
{
......@@ -3382,6 +3479,7 @@ static nsresult create_nschannel(nsWineURI *uri, nsChannel **ret)
channel->nsIHttpChannel_iface.lpVtbl = &nsChannelVtbl;
channel->nsIUploadChannel_iface.lpVtbl = &nsUploadChannelVtbl;
channel->nsIHttpChannelInternal_iface.lpVtbl = &nsHttpChannelInternalVtbl;
channel->nsICacheInfoChannel_iface.lpVtbl = &nsCacheInfoChannelVtbl;
channel->ref = 1;
channel->request_method = METHOD_GET;
list_init(&channel->response_headers);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment