From 314bc3bb0ae4b0fbd4eaa4c81693e00c414ab3c6 Mon Sep 17 00:00:00 2001 From: "gordon%netscape.com" Date: Mon, 26 Feb 2001 14:45:45 +0000 Subject: [PATCH] Add stub methods for getting/setting data size, and getting the transport for a cache entry descriptor. Update for change to Substring parameters. git-svn-id: svn://10.0.0.236/trunk@87981 18797224-902f-48f8-a5cc-f745e15eee43 --- .../cache/src/nsCacheEntryDescriptor.cpp | 22 +++++++++++++++++-- .../cache/src/nsCacheEntryDescriptor.h | 1 + 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/mozilla/netwerk/cache/src/nsCacheEntryDescriptor.cpp b/mozilla/netwerk/cache/src/nsCacheEntryDescriptor.cpp index f9547093a1b..2c355585c75 100644 --- a/mozilla/netwerk/cache/src/nsCacheEntryDescriptor.cpp +++ b/mozilla/netwerk/cache/src/nsCacheEntryDescriptor.cpp @@ -21,6 +21,7 @@ * Gordon Sheridan, 22-February-2001 */ +#include "nsCacheService.h" #include "nsCacheEntryDescriptor.h" #include "nsCacheEntry.h" #include "nsReadableUtils.h" @@ -37,7 +38,8 @@ nsCacheEntryDescriptor::nsCacheEntryDescriptor(nsCacheEntry * entry, nsCacheEntryDescriptor::~nsCacheEntryDescriptor() { - /* destructor code */ + // tell nsCacheService we're going away + nsCacheService::GlobalInstance()->CloseDescriptor(this); } @@ -79,7 +81,7 @@ nsCacheEntryDescriptor::GetKey(char ** result) if (FindCharInReadable(':', start, end)) { ++start; // advance past clientID ':' delimiter - *result = ToNewCString( Substring(*key, start, end)); + *result = ToNewCString( Substring(start, end)); if (!*result) rv = NS_ERROR_OUT_OF_MEMORY; } else { NS_ASSERTION(PR_FALSE, "FindCharInRead failed to find ':'"); @@ -142,6 +144,22 @@ NS_IMETHODIMP nsCacheEntryDescriptor::IsStreamBased(PRBool *streamBased) return NS_OK; } + +NS_IMETHODIMP nsCacheEntryDescriptor::GetDataSize(PRUint32 *aDataSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsCacheEntryDescriptor::SetDataSize(PRUint32 aDataSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +NS_IMETHODIMP nsCacheEntryDescriptor::GetTransport(nsITransport * *aTransport) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + + /* attribute nsISupports cacheElement; */ NS_IMETHODIMP nsCacheEntryDescriptor::GetCacheElement(nsISupports * *cacheElement) diff --git a/mozilla/netwerk/cache/src/nsCacheEntryDescriptor.h b/mozilla/netwerk/cache/src/nsCacheEntryDescriptor.h index 4c85f71336d..2412379973f 100644 --- a/mozilla/netwerk/cache/src/nsCacheEntryDescriptor.h +++ b/mozilla/netwerk/cache/src/nsCacheEntryDescriptor.h @@ -51,6 +51,7 @@ public: ((char*)qp - offsetof(nsCacheEntryDescriptor, mListLink)); } + nsCacheEntry * CacheEntry(void) { return mCacheEntry; } protected: