Back to index

enigmail  1.4.3
Defines | Functions
nsEnigMimeService.cpp File Reference
#include "enigmail.h"
#include "pgpmime.h"
#include "mimeenig.h"
#include "nsEnigModule.h"
#include "nsEnigMimeService.h"
#include "nspr.h"
#include "plstr.h"
#include "nsStringAPI.h"
#include "nsCOMPtr.h"
#include "nsIDOMNode.h"
#include "nsIDOMText.h"
#include "nsIThread.h"
#include "nsIComponentManager.h"
#include "nsIComponentRegistrar.h"
#include "mozilla/ModuleUtils.h"
#include "nsXULAppAPI.h"
#include "nsServiceManagerUtils.h"
#include "nsEnigContentHandler.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(gEnigMimeServiceLog,PR_LOG_ERROR,args)
#define WARNING_LOG(args)   PR_LOG(gEnigMimeServiceLog,PR_LOG_WARNING,args)
#define DEBUG_LOG(args)   PR_LOG(gEnigMimeServiceLog,PR_LOG_DEBUG,args)

Functions

 NS_IMPL_THREADSAFE_ISUPPORTS1 (nsEnigMimeService, nsIEnigMimeService) nsEnigMimeService
static void __ReplaceSubstring (nsAString &string, nsAString &replace, nsAString &with)
static void __ReplaceChar (nsAString &string, const PRUnichar replace, const PRUnichar with)

Define Documentation

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

Definition at line 67 of file nsEnigMimeService.cpp.

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

Definition at line 65 of file nsEnigMimeService.cpp.

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

Definition at line 38 of file nsEnigMimeService.cpp.

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

Definition at line 66 of file nsEnigMimeService.cpp.


Function Documentation

static void __ReplaceChar ( nsAString &  string,
const PRUnichar  replace,
const PRUnichar  with 
) [static]

Definition at line 179 of file nsEnigMimeService.cpp.

{
  PRInt32 i = string.FindChar (replace);
  while (i >= 0) {
    string.Replace (i, 1, &with, 1);
    i = string.FindChar (replace);
  }
}
static void __ReplaceSubstring ( nsAString &  string,
nsAString &  replace,
nsAString &  with 
) [static]

Definition at line 169 of file nsEnigMimeService.cpp.

{
  PRInt32 i = string.Find (replace);
  while (i >= 0) {
    string.Replace (i, replace.Length(), with);
    i = string.Find (replace);
  }
}

Definition at line 73 of file nsEnigMimeService.cpp.

  : mDummyHandler(PR_FALSE),
    mInitialized(PR_FALSE)
{
  nsresult rv;

  NS_INIT_ISUPPORTS();

#ifdef PR_LOGGING
  if (gEnigMimeServiceLog == nsnull) {
    gEnigMimeServiceLog = PR_NewLogModule("nsEnigMimeService");
  }
#endif

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

  mDummyHandler = PR_TRUE;
}