Add stub methods for getting/setting data size, and getting the transport for a cache entry descriptor. Update for change to Substring parameters.

This commit is contained in:
gordon%netscape.com 2001-02-26 14:45:45 +00:00
parent 55f28b0eba
commit 974bd79339
2 changed files with 21 additions and 2 deletions

View File

@ -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)

View File

@ -51,6 +51,7 @@ public:
((char*)qp - offsetof(nsCacheEntryDescriptor, mListLink));
}
nsCacheEntry * CacheEntry(void) { return mCacheEntry; }
protected: