Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIStreamTransportService Interface Reference

This service read/writes a stream on a background thread. More...

import "nsIStreamTransportService.idl";

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

List of all members.

Public Member Functions

nsITransport createInputTransport (in nsIInputStream aStream, in long long aStartOffset, in long long aReadLimit, in boolean aCloseWhenDone)
 CreateInputTransport.
nsITransport createOutputTransport (in nsIOutputStream aStream, in long long aStartOffset, in long long aWriteLimit, in boolean aCloseWhenDone)
 CreateOutputTransport.

Detailed Description

This service read/writes a stream on a background thread.

Use this service to transform any blocking stream (e.g., file stream) into a fully asynchronous stream that can be read/written without blocking the main thread.

Definition at line 52 of file nsIStreamTransportService.idl.


Member Function Documentation

nsITransport nsIStreamTransportService::createInputTransport ( in nsIInputStream  aStream,
in long long  aStartOffset,
in long long  aReadLimit,
in boolean  aCloseWhenDone 
)

CreateInputTransport.

Parameters:
aStreamThe input stream that will be read on a background thread. This stream must implement "blocking" stream semantics.
aStartOffsetThe input stream will be read starting from this offset. Pass -1 to read from the current stream offset. NOTE: this parameter is ignored if the stream does not support nsISeekableStream.
aReadLimitThis parameter limits the number of bytes that will be read from the input stream. Pass -1 to read everything.
aCloseWhenDoneSpecify this flag to have the input stream closed once its contents have been completely read.
Returns:
nsITransport instance.
nsITransport nsIStreamTransportService::createOutputTransport ( in nsIOutputStream  aStream,
in long long  aStartOffset,
in long long  aWriteLimit,
in boolean  aCloseWhenDone 
)

CreateOutputTransport.

Parameters:
aStreamThe output stream that will be written to on a background thread. This stream must implement "blocking" stream semantics.
aStartOffsetThe output stream will be written starting at this offset. Pass -1 to write to the current stream offset. NOTE: this parameter is ignored if the stream does not support nsISeekableStream.
aWriteLimitThis parameter limits the number of bytes that will be written to the output stream. Pass -1 for unlimited writing.
aCloseWhenDoneSpecify this flag to have the output stream closed once its contents have been completely written.
Returns:
nsITransport instance.

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