Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
nsAboutCache Class Reference

#include <nsAboutCache.h>

Inheritance diagram for nsAboutCache:
Inheritance graph
[legend]
Collaboration diagram for nsAboutCache:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIABOUTMODULE
NS_DECL_NSICACHEVISITOR 
nsAboutCache ()
virtual ~nsAboutCache ()
nsIChannel newChannel (in nsIURI aURI)
 Constructs a new channel for the about protocol module.
boolean visitDevice (in string deviceID, in nsICacheDeviceInfo deviceInfo)
 Called to provide information about a cache device.
boolean visitEntry (in string deviceID, in nsICacheEntryInfo entryInfo)
 Called to provide information about a cache entry.

Static Public Member Functions

static NS_METHOD Create (nsISupports *aOuter, REFNSIID aIID, void **aResult)

Protected Member Functions

nsresult ParseURI (nsIURI *uri, nsCString &deviceID)

Protected Attributes

nsCOMPtr< nsIOutputStreammStream
nsCString mDeviceID
nsCString mBuffer

Detailed Description

Definition at line 49 of file nsAboutCache.h.


Constructor & Destructor Documentation

NS_DECL_ISUPPORTS NS_DECL_NSIABOUTMODULE NS_DECL_NSICACHEVISITOR nsAboutCache::nsAboutCache ( ) [inline]

Definition at line 57 of file nsAboutCache.h.

{}

Here is the caller graph for this function:

virtual nsAboutCache::~nsAboutCache ( ) [inline, virtual]

Definition at line 58 of file nsAboutCache.h.

{}

Member Function Documentation

NS_METHOD nsAboutCache::Create ( nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
) [static]

Definition at line 346 of file nsAboutCache.cpp.

{
    nsAboutCache* about = new nsAboutCache();
    if (about == nsnull)
        return NS_ERROR_OUT_OF_MEMORY;
    NS_ADDREF(about);
    nsresult rv = about->QueryInterface(aIID, aResult);
    NS_RELEASE(about);
    return rv;
}

Here is the call graph for this function:

Constructs a new channel for the about protocol module.

Parameters:
aURIthe uri of the new channel
nsresult nsAboutCache::ParseURI ( nsIURI uri,
nsCString deviceID 
) [protected]

Definition at line 319 of file nsAboutCache.cpp.

{
    //
    // about:cache[?device=string]
    //
    nsresult rv;

    deviceID.Truncate();

    nsCAutoString path;
    rv = uri->GetPath(path);
    if (NS_FAILED(rv)) return rv;

    nsACString::const_iterator start, valueStart, end;
    path.BeginReading(start);
    path.EndReading(end);

    valueStart = end;
    if (!FindInReadable(NS_LITERAL_CSTRING("?device="), start, valueStart))
        return NS_OK;

    deviceID.Assign(Substring(valueStart, end));
    return NS_OK;
}

Here is the call graph for this function:

boolean nsICacheVisitor::visitDevice ( in string  deviceID,
in nsICacheDeviceInfo  deviceInfo 
) [inherited]

Called to provide information about a cache device.

Parameters:
deviceID- specifies the device being visited.
deviceInfo- specifies information about this device.
Returns:
true to start visiting all entries for this device.
false to advance to the next device.
boolean nsICacheVisitor::visitEntry ( in string  deviceID,
in nsICacheEntryInfo  entryInfo 
) [inherited]

Called to provide information about a cache entry.

Parameters:
deviceID- specifies the device being visited.
entryInfo- specifies information about this entry.
Returns:
true to visit the next entry on the current device, or if the end of the device has been reached, advance to the next device.
false to advance to the next device.

Member Data Documentation

Definition at line 68 of file nsAboutCache.h.

Definition at line 67 of file nsAboutCache.h.

Definition at line 66 of file nsAboutCache.h.


The documentation for this class was generated from the following files: