Back to index

enigmail  1.4.3
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
nsEnigMimeWriter Class Reference

#include <nsEnigMimeWriter.h>

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

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSIENIGMIMEWRITER 
nsEnigMimeWriter ()
virtual ~nsEnigMimeWriter ()
void init (in nsIOutputStream aStream, in boolean forceCRLF)
void write (in string buf, in unsigned long count)
void close ()

Static Public Member Functions

static NS_METHOD Create (nsISupports *aOuter, REFNSIID aIID, void **aResult)

Public Attributes

readonly attribute unsigned long bytesWritten

Protected Member Functions

nsresult WriteStream (const char *buf, PRUint32 count)

Protected Attributes

nsIOutputStream * mStream
EMBool mForceCRLF
EMBool mClosed
EMBool mLastCR
PRUint32 mByteCount

Detailed Description

Definition at line 47 of file nsEnigMimeWriter.h.


Constructor & Destructor Documentation

NS_DECL_ISUPPORTS NS_DECL_NSIREQUESTOBSERVER NS_DECL_NSISTREAMLISTENER NS_DECL_NSIENIGMIMEWRITER nsEnigMimeWriter::nsEnigMimeWriter ( )

Definition at line 97 of file nsEnigMimeWriter.cpp.

{
  nsresult rv;
#ifdef FORCE_PR_LOG
  nsCOMPtr<nsIThread> myThread;
  rv = ENIG_GET_THREAD(myThread);
  DEBUG_LOG(("nsEnigMimeWriter:: >>>>>>>>> DTOR(%p): myThread=%p\n",
         this, myThread.get()));
#endif
  mStream = nsnull;
}

Member Function Documentation

void nsIEnigMimeWriter::close ( ) [inherited]
static NS_METHOD nsEnigMimeWriter::Create ( nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
) [static]
void nsIEnigMimeWriter::init ( in nsIOutputStream  aStream,
in boolean  forceCRLF 
) [inherited]
void nsIEnigMimeWriter::write ( in string  buf,
in unsigned long  count 
) [inherited]
nsresult nsEnigMimeWriter::WriteStream ( const char *  buf,
PRUint32  count 
) [protected]

Definition at line 182 of file nsEnigMimeWriter.cpp.

{
  DEBUG_LOG(("nsEnigMimeWriter::WriteStream: %d\n", count));
  PRUint32 writeCount;

  if (!mStream)
    return NS_ERROR_NOT_INITIALIZED;

  while (count > 0) {
    nsresult rv = mStream->Write(buf, count, &writeCount);
    if (NS_FAILED(rv) || (writeCount != count))
      return NS_ERROR_FAILURE;

    mByteCount += writeCount;

    count -= writeCount;
    buf += writeCount;
  }

  return NS_OK;
}

Member Data Documentation

readonly attribute unsigned long nsIEnigMimeWriter::bytesWritten [inherited]

Definition at line 65 of file nsIEnigMimeWriter.idl.

PRUint32 nsEnigMimeWriter::mByteCount [protected]

Definition at line 72 of file nsEnigMimeWriter.h.

Definition at line 69 of file nsEnigMimeWriter.h.

Definition at line 67 of file nsEnigMimeWriter.h.

Definition at line 70 of file nsEnigMimeWriter.h.

nsIOutputStream* nsEnigMimeWriter::mStream [protected]

Definition at line 66 of file nsEnigMimeWriter.h.


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