mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-30 10:12:59 +00:00
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:
parent
55f28b0eba
commit
974bd79339
22
netwerk/cache/src/nsCacheEntryDescriptor.cpp
vendored
22
netwerk/cache/src/nsCacheEntryDescriptor.cpp
vendored
@ -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)
|
||||
|
1
netwerk/cache/src/nsCacheEntryDescriptor.h
vendored
1
netwerk/cache/src/nsCacheEntryDescriptor.h
vendored
@ -51,6 +51,7 @@ public:
|
||||
((char*)qp - offsetof(nsCacheEntryDescriptor, mListLink));
|
||||
}
|
||||
|
||||
nsCacheEntry * CacheEntry(void) { return mCacheEntry; }
|
||||
|
||||
protected:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user