Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes | Static Private Attributes
RelatedLinksStreamListener Class Reference
Inheritance diagram for RelatedLinksStreamListener:
Inheritance graph
[legend]
Collaboration diagram for RelatedLinksStreamListener:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS RelatedLinksStreamListener (nsIRDFDataSource *ds)
virtual ~RelatedLinksStreamListener ()
NS_METHOD Init ()
nsresult Unescape (nsString &text)
void onDataAvailable (in nsIRequest aRequest, in nsISupports aContext, in nsIInputStream aInputStream, in unsigned long aOffset, in unsigned long aCount)
 Called when the next chunk of data (corresponding to the request) may be read without blocking the calling thread.
void onStartRequest (in nsIRequest aRequest, in nsISupports aContext)
 Called to signify the beginning of an asynchronous request.
void onStopRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatusCode)
 Called to signify the end of an asynchronous request.

Private Attributes

nsCOMPtr< nsIRDFDataSourcemDataSource
nsVoidArray mParentArray
nsAutoString mBuffer

Static Private Attributes

static PRInt32 gRefCnt
static nsIRDFServicegRDFService
static nsIRDFResourcekNC_Child
static nsIRDFResourcekNC_Name
static nsIRDFResourcekNC_URL
static nsIRDFResourcekNC_loading
static nsIRDFResourcekNC_RelatedLinksRoot
static nsIRDFResourcekNC_BookmarkSeparator
static nsIRDFResourcekNC_RelatedLinksTopic
static nsIRDFResourcekRDF_type
static nsCOMPtr
< nsIUnicodeDecoder
mUnicodeDecoder

Detailed Description

Definition at line 97 of file nsRelatedLinksHandler.cpp.


Constructor & Destructor Documentation

Definition at line 178 of file nsRelatedLinksHandler.cpp.

        : mDataSource(aDataSource)
{
}

Member Function Documentation

Definition at line 206 of file nsRelatedLinksHandler.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIStreamListener::onDataAvailable ( in nsIRequest  aRequest,
in nsISupports  aContext,
in nsIInputStream  aInputStream,
in unsigned long  aOffset,
in unsigned long  aCount 
) [inherited]

Called when the next chunk of data (corresponding to the request) may be read without blocking the calling thread.

The onDataAvailable impl must read exactly |aCount| bytes of data before returning.

Parameters:
aRequestrequest corresponding to the source of the data
aContextuser defined context
aInputStreaminput stream containing the data chunk
aOffsetNumber of bytes that were sent in previous onDataAvailable calls for this request. In other words, the sum of all previous count parameters. If that number is greater than or equal to 2^32, this parameter will be PR_UINT32_MAX (2^32 - 1).
aCountnumber of bytes available in the stream

NOTE: The aInputStream parameter must implement readSegments.

An exception thrown from onDataAvailable has the side-effect of causing the request to be canceled.

void nsIRequestObserver::onStartRequest ( in nsIRequest  aRequest,
in nsISupports  aContext 
) [inherited]

Called to signify the beginning of an asynchronous request.

Parameters:
aRequestrequest being observed
aContextuser defined context

An exception thrown from onStartRequest has the side-effect of causing the request to be canceled.

Here is the caller graph for this function:

void nsIRequestObserver::onStopRequest ( in nsIRequest  aRequest,
in nsISupports  aContext,
in nsresult  aStatusCode 
) [inherited]

Called to signify the end of an asynchronous request.

This call is always preceded by a call to onStartRequest.

Parameters:
aRequestrequest being observed
aContextuser defined context
aStatusCodereason for stopping (NS_OK if completed successfully)

An exception thrown from onStopRequest is generally ignored.

Here is the caller graph for this function:

Definition at line 552 of file nsRelatedLinksHandler.cpp.

{
       // convert some HTML-escaped (such as "&lt;") values back

       PRInt32              offset=0;

       while((offset = text.FindChar((PRUnichar('&')), offset)) >= 0)
       {
              if (Substring(text, offset, 4).LowerCaseEqualsLiteral("&lt;"))
              {
                     text.Cut(offset, 4);
                     text.Insert(PRUnichar('<'), offset);
              }
              else if (Substring(text, offset, 4).LowerCaseEqualsLiteral("&gt;"))
              {
                     text.Cut(offset, 4);
                     text.Insert(PRUnichar('>'), offset);
              }
              else if (Substring(text, offset, 5).LowerCaseEqualsLiteral("&amp;"))
              {
                     text.Cut(offset, 5);
                     text.Insert(PRUnichar('&'), offset);
              }
              else if (Substring(text, offset, 6).LowerCaseEqualsLiteral("&quot;"))
              {
                     text.Cut(offset, 6);
                     text.Insert(PRUnichar('\"'), offset);
              }

              ++offset;
       }
       return(NS_OK);
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 105 of file nsRelatedLinksHandler.cpp.

Definition at line 104 of file nsRelatedLinksHandler.cpp.

Definition at line 111 of file nsRelatedLinksHandler.cpp.

Definition at line 106 of file nsRelatedLinksHandler.cpp.

Definition at line 109 of file nsRelatedLinksHandler.cpp.

Definition at line 107 of file nsRelatedLinksHandler.cpp.

Definition at line 110 of file nsRelatedLinksHandler.cpp.

Definition at line 112 of file nsRelatedLinksHandler.cpp.

Definition at line 108 of file nsRelatedLinksHandler.cpp.

Definition at line 113 of file nsRelatedLinksHandler.cpp.

Definition at line 116 of file nsRelatedLinksHandler.cpp.

Definition at line 100 of file nsRelatedLinksHandler.cpp.

Definition at line 101 of file nsRelatedLinksHandler.cpp.

Definition at line 114 of file nsRelatedLinksHandler.cpp.


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