Back to index

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

List of all members.

Public Member Functions

 txStylesheetSink (txStylesheetCompiler *aCompiler, nsIParser *aParser)
virtual ~txStylesheetSink ()
NS_DECL_ISUPPORTS
NS_DECL_NSIEXPATSINK
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSICHANNELEVENTSINK
NS_DECL_NSIINTERFACEREQUESTOR
NS_IMETHOD 
WillBuildModel (void)
 This method gets called when the parser begins the process of building the content model via the content sink.
NS_IMETHOD DidBuildModel ()
 This method gets called when the parser concludes the process of building the content model via the content sink.
NS_IMETHOD WillInterrupt (void)
 This method gets called when the parser gets i/o blocked, and wants to notify the sink that it may be a while before more data is available.
NS_IMETHOD WillResume (void)
 This method gets called when the parser i/o gets unblocked, and we're about to start dumping content again to the sink.
NS_IMETHOD SetParser (nsIParser *aParser)
 This method gets called by the parser so that the content sink can retain a reference to the parser.
virtual void FlushPendingNotifications (mozFlushType aType)
 Flush content so that the content model is in sync with the state of the sink.
NS_IMETHOD SetDocumentCharset (nsACString &aCharset)
 Set the document character set.
virtual nsISupports * GetTarget ()
 Returns the target object (often a document object) into which the content built by this content sink is being added, if any (IOW, may return null).
void HandleStartElement (in wstring aName,[array, size_is(aAttsCount)] in wstring aAtts, in unsigned long aAttsCount, in long aIndex, in unsigned long aLineNumber)
 Called to handle the opening tag of an element.
void HandleEndElement (in wstring aName)
 Called to handle the closing tag of an element.
void HandleComment (in wstring aCommentText)
 Called to handle a comment.
void HandleCDataSection ([size_is(aLength)] in wstring aData, in unsigned long aLength)
 Called to handle a CDATA section.
void HandleDoctypeDecl (in AString aSubset, in AString aName, in AString aSystemId, in AString aPublicId, in nsISupports aCatalogData)
 Called to handle the doctype declaration.
void HandleCharacterData ([size_is(aLength)] in wstring aData, in unsigned long aLength)
 Called to handle character data.
void HandleProcessingInstruction (in wstring aTarget, in wstring aData)
 Called to handle a processing instruction.
void HandleXMLDeclaration (in wstring aVersion, in wstring aEncoding, in long aStandalone)
 Handle the XML Declaration.
void ReportError (in wstring aErrorText, in wstring aSourceText)
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.
void onChannelRedirect (in nsIChannel oldChannel, in nsIChannel newChannel, in unsigned long flags)
 Called when a redirect occurs.
void getInterface (in nsIIDRef uuid,[iid_is(uuid), retval] out nsQIResult result)
 Retrieves the specified interface pointer.

Public Attributes

const unsigned long REDIRECT_TEMPORARY = 1 << 0
 This is a temporary redirect.
const unsigned long REDIRECT_PERMANENT = 1 << 1
 This is a permanent redirect.
const unsigned long REDIRECT_INTERNAL = 1 << 2
 This is an internal redirect, i.e.

Protected Member Functions

 txStylesheetSink ()

Private Attributes

nsRefPtr< txStylesheetCompilermCompiler
nsCOMPtr< nsIStreamListenermListener
PRPackedBool mCheckedForXML

Detailed Description

Definition at line 91 of file txMozillaStylesheetCompiler.cpp.


Constructor & Destructor Documentation

Definition at line 128 of file txMozillaStylesheetCompiler.cpp.

Here is the call graph for this function:

Definition at line 136 of file txMozillaStylesheetCompiler.cpp.

{
}

Member Function Documentation

This method gets called when the parser concludes the process of building the content model via the content sink.

5/7/98 gess

Implements nsIContentSink.

Definition at line 243 of file txMozillaStylesheetCompiler.cpp.

{  
    return mCompiler->doneLoading();
}
virtual void txStylesheetSink::FlushPendingNotifications ( mozFlushType  aType) [inline, virtual]

Flush content so that the content model is in sync with the state of the sink.

Parameters:
aTypethe type of flush to perform

Implements nsIContentSink.

Definition at line 114 of file txMozillaStylesheetCompiler.cpp.

{ }
void nsIInterfaceRequestor::getInterface ( in nsIIDRef  uuid,
[iid_is(uuid), retval] out nsQIResult  result 
) [inherited]

Retrieves the specified interface pointer.

Parameters:
uuidThe IID of the interface being requested.
result[out] The interface pointer to be filled in if the interface is accessible.
Returns:
NS_OK - interface was successfully returned. NS_NOINTERFACE - interface not accessible. NS_ERROR* - method failure.
virtual nsISupports* txStylesheetSink::GetTarget ( ) [inline, virtual]

Returns the target object (often a document object) into which the content built by this content sink is being added, if any (IOW, may return null).

Implements nsIContentSink.

Definition at line 116 of file txMozillaStylesheetCompiler.cpp.

{ return nsnull; }
void nsIExpatSink::HandleCDataSection ( [size_is(aLength)] in wstring  aData,
in unsigned long  aLength 
) [inherited]

Called to handle a CDATA section.

Parameters:
aDatathe text in the CDATA section. This is null-terminated.
aLengththe length of the aData string
void nsIExpatSink::HandleCharacterData ( [size_is(aLength)] in wstring  aData,
in unsigned long  aLength 
) [inherited]

Called to handle character data.

Note that this does NOT get called for the contents of CDATA sections.

Parameters:
aDatathe data to handle. aData is NOT NULL-TERMINATED.
aLengththe length of the aData string
void nsIExpatSink::HandleComment ( in wstring  aCommentText) [inherited]

Called to handle a comment.

Parameters:
aCommentTextthe text of the comment (not including the "<!--" and "-->")
void nsIExpatSink::HandleDoctypeDecl ( in AString  aSubset,
in AString  aName,
in AString  aSystemId,
in AString  aPublicId,
in nsISupports  aCatalogData 
) [inherited]

Called to handle the doctype declaration.

void nsIExpatSink::HandleEndElement ( in wstring  aName) [inherited]

Called to handle the closing tag of an element.

Parameters:
aNamethe fully qualified tagname of the element
void nsIExpatSink::HandleProcessingInstruction ( in wstring  aTarget,
in wstring  aData 
) [inherited]

Called to handle a processing instruction.

Parameters:
aTargetthe PI target (e.g. xml-stylesheet)
aDataall the rest of the data in the PI
void nsIExpatSink::HandleStartElement ( in wstring  aName,
[array, size_is(aAttsCount)] in wstring  aAtts,
in unsigned long  aAttsCount,
in long  aIndex,
in unsigned long  aLineNumber 
) [inherited]

Called to handle the opening tag of an element.

Parameters:
aNamethe fully qualified tagname of the element
aAttsthe array of attribute names and values. There are aAttsCount/2 names and aAttsCount/2 values, so the total number of elements in the array is aAttsCount. The names and values alternate. Thus, if we number attributes starting with 0, aAtts[2*k] is the name of the k-th attribute and aAtts[2*k+1] is the value of that attribute Both explicitly specified attributes and attributes that are defined to have default values in a DTD are present in aAtts.
aAttsCountthe number of elements in aAtts.
aIndexIf the element has an attribute of type ID, then aAtts[aIndex] is the name of that attribute. Otherwise, aIndex is -1
aLineNumberthe line number of the start tag in the data stream.
void nsIExpatSink::HandleXMLDeclaration ( in wstring  aVersion,
in wstring  aEncoding,
in long  aStandalone 
) [inherited]

Handle the XML Declaration.

Parameters:
aVersionThe version string, can be null if not specified.
aEncodingThe encoding string, can be null if not specified.
aStandalone-1, 0, or 1 indicating respectively that there was no standalone parameter in the declaration, that it was given as no, or that it was given as yes.
void nsIChannelEventSink::onChannelRedirect ( in nsIChannel  oldChannel,
in nsIChannel  newChannel,
in unsigned long  flags 
) [inherited]

Called when a redirect occurs.

This may happen due to an HTTP 3xx status code.

Parameters:
oldChannelThe channel that's being redirected.
newChannelThe new channel. This channel is not opened yet.
flagsFlags indicating the type of redirect. A bitmask consisting of flags from above. One of REDIRECT_TEMPORARY and REDIRECT_PERMANENT will always be set.
Exceptions:
<any>Throwing an exception will cancel the load. No network request for the new channel will be made.
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:

void nsIExpatSink::ReportError ( in wstring  aErrorText,
in wstring  aSourceText 
) [inherited]
NS_IMETHOD txStylesheetSink::SetDocumentCharset ( nsACString &  aCharset) [inline, virtual]

Set the document character set.

This should be passed on to the document itself.

Implements nsIContentSink.

Definition at line 115 of file txMozillaStylesheetCompiler.cpp.

{ return NS_OK; }
NS_IMETHOD txStylesheetSink::SetParser ( nsIParser aParser) [inline, virtual]

This method gets called by the parser so that the content sink can retain a reference to the parser.

The expectation is that the content sink will drop the reference when it gets the DidBuildModel notification i.e. when parsing is done.

Implements nsIContentSink.

Definition at line 113 of file txMozillaStylesheetCompiler.cpp.

{ return NS_OK; }
NS_DECL_ISUPPORTS NS_DECL_NSIEXPATSINK NS_DECL_NSISTREAMLISTENER NS_DECL_NSIREQUESTOBSERVER NS_DECL_NSICHANNELEVENTSINK NS_DECL_NSIINTERFACEREQUESTOR NS_IMETHOD txStylesheetSink::WillBuildModel ( void  ) [inline, virtual]

This method gets called when the parser begins the process of building the content model via the content sink.

5/7/98 gess

Implements nsIContentSink.

Definition at line 109 of file txMozillaStylesheetCompiler.cpp.

{ return NS_OK; }

This method gets called when the parser gets i/o blocked, and wants to notify the sink that it may be a while before more data is available.

5/7/98 gess

Implements nsIContentSink.

Definition at line 111 of file txMozillaStylesheetCompiler.cpp.

{ return NS_OK; }
NS_IMETHOD txStylesheetSink::WillResume ( void  ) [inline, virtual]

This method gets called when the parser i/o gets unblocked, and we're about to start dumping content again to the sink.

5/7/98 gess

Implements nsIContentSink.

Definition at line 112 of file txMozillaStylesheetCompiler.cpp.

{ return NS_OK; }

Member Data Documentation

Definition at line 121 of file txMozillaStylesheetCompiler.cpp.

Definition at line 119 of file txMozillaStylesheetCompiler.cpp.

Definition at line 120 of file txMozillaStylesheetCompiler.cpp.

const unsigned long nsIChannelEventSink::REDIRECT_INTERNAL = 1 << 2 [inherited]

This is an internal redirect, i.e.

it was not initiated by the remote server, but is specific to the channel implementation.

The new URI may be identical to the old one.

Definition at line 81 of file nsIChannelEventSink.idl.

const unsigned long nsIChannelEventSink::REDIRECT_PERMANENT = 1 << 1 [inherited]

This is a permanent redirect.

New requests for this resource should use the URI of the new channel (This might be an HTTP 301 reponse). If this flag is not set, this is a temporary redirect.

The new URI may be identical to the old one.

Definition at line 73 of file nsIChannelEventSink.idl.

const unsigned long nsIChannelEventSink::REDIRECT_TEMPORARY = 1 << 0 [inherited]

This is a temporary redirect.

New requests for this resource should continue to use the URI of the old channel.

The new URI may be identical to the old one.

Definition at line 64 of file nsIChannelEventSink.idl.


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