Back to index

enigmail  1.4.3
Defines | Functions | Variables
nsEnigMsgCompose.cpp File Reference
#include "enigmail.h"
#include "nsStringAPI.h"
#include "nsIMsgCompFields.h"
#include "nsIMsgWindow.h"
#include "nsMsgBaseCID.h"
#include "nsMsgCompCID.h"
#include "nsIMsgMailSession.h"
#include "nsIEnigMsgCompFields.h"
#include "nsEnigMsgCompose.h"
#include "nspr.h"
#include "nsCOMPtr.h"
#include "nsIPrompt.h"
#include "nsNetUtil.h"
#include "nsIThread.h"
#include "nsIFactory.h"
#include "msgCore.h"
#include "nsComposeStrings.h"

Go to the source code of this file.

Defines

#define FORCE_PR_LOG   /* Allow logging even in release build */
#define ERROR_LOG(args)   PR_LOG(gEnigMsgComposeLog,PR_LOG_ERROR,args)
#define WARNING_LOG(args)   PR_LOG(gEnigMsgComposeLog,PR_LOG_WARNING,args)
#define DEBUG_LOG(args)   PR_LOG(gEnigMsgComposeLog,PR_LOG_DEBUG,args)
#define NS_MSGCOMPOSESECURE_CID
#define MAX_HEADER_BYTES   16000
#define MAX_SIGNATURE_BYTES   16000

Functions

static NS_DEFINE_CID (kMsgComposeSecureCID, NS_MSGCOMPOSESECURE_CID)
 NS_IMPL_THREADSAFE_ISUPPORTS3 (nsEnigMsgCompose, nsIMsgComposeSecure, nsIRequestObserver, nsIStreamListener) nsEnigMsgCompose
static nsresult EnigMsgCompose_write (const char *buf, PRInt32 size, void *closure)

Variables

static const PRUint32 kCharMax = 1024

Define Documentation

#define DEBUG_LOG (   args)    PR_LOG(gEnigMsgComposeLog,PR_LOG_DEBUG,args)

Definition at line 65 of file nsEnigMsgCompose.cpp.

#define ERROR_LOG (   args)    PR_LOG(gEnigMsgComposeLog,PR_LOG_ERROR,args)

Definition at line 63 of file nsEnigMsgCompose.cpp.

#define FORCE_PR_LOG   /* Allow logging even in release build */

Definition at line 38 of file nsEnigMsgCompose.cpp.

#define MAX_HEADER_BYTES   16000

Definition at line 74 of file nsEnigMsgCompose.cpp.

Definition at line 75 of file nsEnigMsgCompose.cpp.

Value:
{ /* dd753201-9a23-4e08-957f-b3616bf7e012 */       \
   0xdd753201, 0x9a23, 0x4e08,                     \
  {0x95, 0x7f, 0xb3, 0x61, 0x6b, 0xf7, 0xe0, 0x12 }}

Definition at line 67 of file nsEnigMsgCompose.cpp.

#define WARNING_LOG (   args)    PR_LOG(gEnigMsgComposeLog,PR_LOG_WARNING,args)

Definition at line 64 of file nsEnigMsgCompose.cpp.


Function Documentation

static nsresult EnigMsgCompose_write ( const char *  buf,
PRInt32  size,
void *  closure 
) [static]

Definition at line 847 of file nsEnigMsgCompose.cpp.

{
  DEBUG_LOG(("nsEnigMsgCompose::EnigMsgCompose_write: (%p) %d\n", closure, size));

  if (!closure)
    return NS_ERROR_FAILURE;

  nsIEnigMimeWriter* enigMimeWriter = (nsIEnigMimeWriter *) closure;

  return enigMimeWriter->Write(buf, size);
}
static NS_DEFINE_CID ( kMsgComposeSecureCID  ,
NS_MSGCOMPOSESECURE_CID   
) [static]
NS_IMPL_THREADSAFE_ISUPPORTS3 ( nsEnigMsgCompose  ,
nsIMsgComposeSecure  ,
nsIRequestObserver  ,
nsIStreamListener   
)

Definition at line 123 of file nsEnigMsgCompose.cpp.

  : mInitialized(PR_FALSE),
    mUseSMIME(PR_FALSE),
    mIsDraft(PR_FALSE),
    mRequestStopped(PR_FALSE),

    mLinebreak(PR_TRUE),
    mSpace(0),
    mMatchFrom(0),

    mInputLen(0),
    mOutputLen(0),

    mSendFlags(0),
    mUIFlags(0),

    mMultipartSigned(PR_FALSE),
    mStripWhitespace(PR_FALSE),

    mSenderEmailAddr(""),
    mRecipients(""),
    mBccAddr(""),
    mHashAlgorithm("sha1"),

    mBoundary(""),

    mStream(0),

    mEncoderData(nsnull),

    mMsgComposeSecure(nsnull),
    mMimeListener(nsnull),

    mWriter(nsnull),
    mPipeTrans(nsnull)
{
  nsresult rv;

  NS_INIT_ISUPPORTS();

#ifdef PR_LOGGING
  if (gEnigMsgComposeLog == nsnull) {
    gEnigMsgComposeLog = PR_NewLogModule("nsEnigMsgCompose");
  }
#endif

  // Remember to use original CID, not CONTRACTID, to avoid infinite looping!
  mMsgComposeSecure = do_CreateInstance(kMsgComposeSecureCID, &rv);

#ifdef FORCE_PR_LOG
  nsCOMPtr<nsIThread> myThread;
  rv = ENIG_GET_THREAD(myThread);
  DEBUG_LOG(("nsEnigMsgCompose:: <<<<<<<<< CTOR(%p): myThread=%p\n",
         this, myThread.get()));
#endif
}

Variable Documentation

const PRUint32 kCharMax = 1024 [static]

Definition at line 77 of file nsEnigMsgCompose.cpp.