Back to index

lightning-sunbird  0.9+nobinonly
Defines | Functions
nsComm4xMail.cpp File Reference
#include "nsCOMPtr.h"
#include "nsReadableUtils.h"
#include "nsIServiceManager.h"
#include "nsMsgBaseCID.h"
#include "nsMsgI18N.h"
#include "nsComm4xMail.h"
#include "nsIImportService.h"
#include "nsIImportMailboxDescriptor.h"
#include "nsComm4xMailStringBundle.h"
#include "nsComm4xMailImport.h"
#include "nsUnicharUtils.h"
#include "Comm4xMailDebugLog.h"
#include "prmem.h"
#include "nsNativeCharsetUtils.h"

Go to the source code of this file.


#define kCopyBufferSize   8192
#define kMailReadBufferSize   16384


static PRBool nsStringEndsWith (nsString &name, const char *ending)
static PRBool nsShouldIgnoreFile (nsString &name)

Define Documentation

#define kCopyBufferSize   8192

Definition at line 53 of file nsComm4xMail.cpp.

Definition at line 54 of file nsComm4xMail.cpp.

Function Documentation

static PRBool nsShouldIgnoreFile ( nsString name) [static]

Definition at line 75 of file nsComm4xMail.cpp.

    PRUnichar firstChar=name.CharAt(0);
    if (firstChar == '.' || firstChar == '#' || name.CharAt(name.Length() - 1) == '~')
      return PR_TRUE;
    if (name.LowerCaseEqualsLiteral("rules.dat") || name.LowerCaseEqualsLiteral("rulesbackup.dat"))
        return PR_TRUE;
    // don't add summary files to the list of folders;
    // don't add popstate files to the list either, or rules (sort.dat). 
    if (nsStringEndsWith(name, ".snm") ||
        name.LowerCaseEqualsLiteral("popstate.dat") ||
        name.LowerCaseEqualsLiteral("sort.dat") ||
        name.LowerCaseEqualsLiteral("mailfilt.log") ||
        name.LowerCaseEqualsLiteral("filters.js") ||
        nsStringEndsWith(name, ".toc")||
        return PR_TRUE;
    return PR_FALSE;

Here is the call graph for this function:

Here is the caller graph for this function:

static PRBool nsStringEndsWith ( nsString name,
const char *  ending 
) [static]

Definition at line 58 of file nsComm4xMail.cpp.

    if (!ending) return PR_FALSE;

    PRInt32 len = name.Length();
    if (len == 0) return PR_FALSE;

    PRInt32 endingLen = strlen(ending);
    if (len > endingLen && name.RFind(ending, PR_TRUE) == len - endingLen) {
        return PR_TRUE;
    else {
        return PR_FALSE;

Here is the caller graph for this function: