Back to index

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

List of all members.

Public Member Functions

 Defines an entry point for a newly created thread.
 nsPump (nsIInputStream *in, nsIOutputStream *out)
void run ()

Protected Attributes

nsCOMPtr< nsIInputStreammIn
nsCOMPtr< nsIOutputStreammOut
PRUint32 mCount

Private Member Functions

 ~nsPump ()

Detailed Description

Definition at line 408 of file TestPipes.cpp.

Constructor & Destructor Documentation

nsPump::nsPump ( nsIInputStream in,
nsIOutputStream out 
) [inline]

Definition at line 437 of file TestPipes.cpp.

        : mIn(in), mOut(out), mCount(0) {
nsPump::~nsPump ( ) [inline, private]

Definition at line 443 of file TestPipes.cpp.


Member Function Documentation

void nsIRunnable::run ( ) [inherited]
NS_DECL_ISUPPORTS NS_IMETHOD nsPump::Run ( ) [inline, virtual]

Defines an entry point for a newly created thread.

Implements nsIRunnable.

Definition at line 413 of file TestPipes.cpp.

        nsresult rv;
        PRUint32 count;
        while (PR_TRUE) {
            nsAutoCMonitor mon(this);
            rv = mOut->WriteFrom(mIn, ~0U, &count);
            if (NS_FAILED(rv)) {
                printf("Write failed\n");
            if (count == 0) {
                printf("EOF count = %d\n", mCount);

            if (gTrace) {
                printf("Wrote: %d\n", count);
            mCount += count;
        return rv;

Member Data Documentation

PRUint32 nsPump::mCount [protected]

Definition at line 448 of file TestPipes.cpp.

Definition at line 446 of file TestPipes.cpp.

Definition at line 447 of file TestPipes.cpp.

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