Back to index

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

import "mozITXTToHTMLConv.idl";

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

List of all members.

Public Member Functions

wstring scanTXT (in wstring text, in unsigned long whattodo)
wstring scanHTML (in wstring text, in unsigned long whattodo)
 Adds additional formatting to user edited text, that the user was too lazy or "unknowledged" (DELETEME: is that a word?) to make.
unsigned long citeLevelTXT (in wstring line, out unsigned long logLineStart)
void findURLInPlaintext (in wstring text, in long aLength, in long aPos, out long aStartPos, out long aEndPos)
nsIInputStream convert (in nsIInputStream aFromStream, in string aFromType, in string aToType, in nsISupports aCtxt)
 SYNCRONOUS VERSION Converts a stream of one type, to a stream of another type.
void asyncConvertData (in string aFromType, in string aToType, in nsIStreamListener aListener, in nsISupports aCtxt)
 ASYNCRONOUS VERSION Converts data arriving via the converter's nsIStreamListener::OnDataAvailable() method from one type to another, pushing the converted data out to the caller via aListener::OnDataAvailable().
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

const unsigned long kEntities = 0
const unsigned long kURLs = 1 << 1
const unsigned long kGlyphSubstitution = 1 << 2
const unsigned long kStructPhrase = 1 << 3

Detailed Description

Definition at line 61 of file mozITXTToHTMLConv.idl.


Member Function Documentation

void nsIStreamConverter::asyncConvertData ( in string  aFromType,
in string  aToType,
in nsIStreamListener  aListener,
in nsISupports  aCtxt 
) [inherited]

ASYNCRONOUS VERSION Converts data arriving via the converter's nsIStreamListener::OnDataAvailable() method from one type to another, pushing the converted data out to the caller via aListener::OnDataAvailable().

Use this method when you want to proxy (and convert) nsIStreamListener callbacks asynchronously.

Parameters:
aFromTypeThe MIME type of the original/raw data.
aToTypeThe MIME type of the converted data.
aListenerThe listener who receives the converted data.
aCtxtEither an opaque context, or a converter specific context (implementation specific).
unsigned long mozITXTToHTMLConv::citeLevelTXT ( in wstring  line,
out unsigned long  logLineStart 
)
Parameters:
line,:line in original msg, possibly starting starting with txt quote tags like ">"
logLineStart,:pos in line, where the real content (logical line) begins, i.e. pos after all txt quote tags. E.g. position of "t" in "> > text". Initial value must be 0, unless line is not real line.
Returns:
Cite Level, i.e. number of txt quote tags found, i.e. number of nested quotes.
nsIInputStream nsIStreamConverter::convert ( in nsIInputStream  aFromStream,
in string  aFromType,
in string  aToType,
in nsISupports  aCtxt 
) [inherited]

SYNCRONOUS VERSION Converts a stream of one type, to a stream of another type.

Use this method when you have a stream you want to convert.

Parameters:
aFromStreamThe stream representing the original/raw data.
aFromTypeThe MIME type of aFromStream.
aToTypeThe MIME type of the returned stream.
aCtxtEither an opaque context, or a converter specific context (implementation specific).
Returns:
The converted stream. NOTE: The returned stream may not already be converted. An efficient stream converter implementation will converter data on demand rather than buffering the converted data until it is used.
void mozITXTToHTMLConv::findURLInPlaintext ( in wstring  text,
in long  aLength,
in long  aPos,
out long  aStartPos,
out long  aEndPos 
)
Parameters:
awide string to scan for the presence of a URL.
aLength--> the length of the buffer to be scanned
aPos--> the position in the buffer to start scanning for a url

aStartPos --> index into the start of a url (-1 if no url found) aEndPos --> index of the last character in the url (-1 if no url found)

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:

wstring mozITXTToHTMLConv::scanHTML ( in wstring  text,
in unsigned long  whattodo 
)

Adds additional formatting to user edited text, that the user was too lazy or "unknowledged" (DELETEME: is that a word?) to make.

Note: Don't use kGlyphSubstitution with this function. This option generates tags, that are unuseable for UAs other than Mozilla. This would be a data loss bug.

Parameters:
text,:HTML source to scan. May be a line, paragraph (recommended) or just a substring.

Must be correct HTML. "<", ">" and "&" must be escaped, other chars must be pure unicode.

Note: ScanTXT(a, o) + ScanTXT(b, o) may be != Scan(a + b, o)

Parameters:
whattodo,:Bitfield describing the modes of operation
Returns:
Additional HTML tags are inserted where appropriate.
wstring mozITXTToHTMLConv::scanTXT ( in wstring  text,
in unsigned long  whattodo 
)
Parameters:
text,:plain text to scan. May be a line, paragraph (recommended) or just a substring.

Must be non-escaped, pure unicode.

Note: ScanTXT(a, o) + ScanTXT(b, o) may be != Scan(a + b, o)

Parameters:
whattodo,:Bitfield describing the modes of operation
Returns:
"<", ">" and "&" are escaped and HTML tags are inserted where appropriate.

Member Data Documentation

Definition at line 62 of file mozITXTToHTMLConv.idl.

Definition at line 64 of file mozITXTToHTMLConv.idl.

Definition at line 65 of file mozITXTToHTMLConv.idl.

const unsigned long mozITXTToHTMLConv::kURLs = 1 << 1

Definition at line 63 of file mozITXTToHTMLConv.idl.


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