Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIFeedProcessor Interface Reference

An nsIFeedProcessor parses feeds, triggering callbacks based on their contents. More...

import "nsIFeedProcessor.idl";

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

List of all members.

Public Member Functions

void parseFromStream (in nsIInputStream stream, in nsIURI uri)
 Parse a feed from an nsIInputStream.
void parseFromString (in AString str, in nsIURI uri)
 Parse a feed from a string.
void parseAsync (in nsIRequestObserver requestObserver, in nsIURI uri)
 Parse a feed asynchronously.
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.

Public Attributes

attribute nsIFeedResultListener listener
 The listener that will respond to feed events.

Detailed Description

An nsIFeedProcessor parses feeds, triggering callbacks based on their contents.

Definition at line 48 of file nsIFeedProcessor.idl.


Member Function Documentation

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:

Parse a feed asynchronously.

The caller must then call the nsIFeedProcessor's nsIStreamListener methods to drive the parse. Do not call the other parse methods during an asynchronous parse.

Parameters:
requestObserverThe observer to notify on start/stop. This argument can be null.
uriThe base URI.

Parse a feed from an nsIInputStream.

Parameters:
streamThe input stream.
uriThe base URI.
void nsIFeedProcessor::parseFromString ( in AString  str,
in nsIURI  uri 
)

Parse a feed from a string.

Parameters:
strThe string to parse.
uriThe base URI.

Member Data Documentation

The listener that will respond to feed events.

Definition at line 53 of file nsIFeedProcessor.idl.


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