Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions | Variables
nsMsgDBView.cpp File Reference
#include "msgCore.h"
#include "nsReadableUtils.h"
#include "nsIMsgCustomColumnHandler.h"
#include "nsMsgDBView.h"
#include "nsISupports.h"
#include "nsIMsgFolder.h"
#include "nsIDBFolderInfo.h"
#include "nsIMsgDatabase.h"
#include "MailNewsTypes2.h"
#include "nsMsgUtils.h"
#include "nsXPIDLString.h"
#include "nsQuickSort.h"
#include "nsIMsgImapMailFolder.h"
#include "nsImapCore.h"
#include "nsMsgFolderFlags.h"
#include "nsIMsgLocalMailFolder.h"
#include "nsIDOMElement.h"
#include "nsDateTimeFormatCID.h"
#include "nsMsgMimeCID.h"
#include "nsIPrefService.h"
#include "nsIPrefBranch.h"
#include "nsIPrefBranch2.h"
#include "nsIPrefLocalizedString.h"
#include "nsIMsgSearchSession.h"
#include "nsIMsgCopyService.h"
#include "nsMsgBaseCID.h"
#include "nsISpamSettings.h"
#include "nsIMsgAccountManager.h"
#include "nsITreeColumns.h"
#include "nsTextFormatter.h"

Go to the source code of this file.

Classes

struct  IdDWord
struct  IdKey
struct  IdKeyPtr

Defines

#define MSG_STATUS_MASK   (MSG_FLAG_REPLIED | MSG_FLAG_FORWARDED)

Functions

static NS_DEFINE_CID (kDateTimeFormatCID, NS_DATETIMEFORMAT_CID)
int PR_CALLBACK CompareViewIndices (const void *v1, const void *v2, void *)
int PR_CALLBACK FnSortIdKey (const void *pItem1, const void *pItem2, void *privateData)
int PR_CALLBACK FnSortIdKeyPtr (const void *pItem1, const void *pItem2, void *privateData)
int PR_CALLBACK FnSortIdDWord (const void *pItem1, const void *pItem2, void *privateData)
static void getDateFormatPref (nsIPrefBranch *_prefBranch, const char *_prefLocalName, nsDateFormatSelector &_format)

Variables

const int kMaxSubjectKey = 160
const int kMaxLocationKey = 160
const int kMaxAuthorKey = 160
const int kMaxRecipientKey = 80

Define Documentation

Definition at line 3302 of file nsMsgDBView.cpp.


Function Documentation

int PR_CALLBACK CompareViewIndices ( const void v1,
const void v2,
void  
)

Definition at line 1998 of file nsMsgDBView.cpp.

{
       nsMsgViewIndex i1 = *(nsMsgViewIndex*) v1;
       nsMsgViewIndex i2 = *(nsMsgViewIndex*) v2;
       return i1 - i2;
}

Here is the caller graph for this function:

int PR_CALLBACK FnSortIdDWord ( const void pItem1,
const void pItem2,
void privateData 
)

Definition at line 3210 of file nsMsgDBView.cpp.

{
    IdDWord** p1 = (IdDWord**)pItem1;
    IdDWord** p2 = (IdDWord**)pItem2;

    if ((*p1)->dword > (*p2)->dword)
        return(1);
    else if ((*p1)->dword < (*p2)->dword)
        return(-1);
    else if ((*p1)->id >= (*p2)->id)
        return(1);
    else
        return(-1);
}

Here is the caller graph for this function:

int PR_CALLBACK FnSortIdKey ( const void pItem1,
const void pItem2,
void privateData 
)

Definition at line 3166 of file nsMsgDBView.cpp.

{
    PRInt32 retVal = 0;
    nsresult rv;

    IdKey** p1 = (IdKey**)pItem1;
    IdKey** p2 = (IdKey**)pItem2;

    nsIMsgDatabase *db = (nsIMsgDatabase *)privateData;

    rv = db->CompareCollationKeys((*p1)->key, (*p1)->dword, (*p2)->key, (*p2)->dword, &retVal);
    NS_ASSERTION(NS_SUCCEEDED(rv),"compare failed");

    if (retVal != 0)
        return(retVal);
    if ((*p1)->id >= (*p2)->id)
        return(1);
    else
        return(-1);
}
int PR_CALLBACK FnSortIdKeyPtr ( const void pItem1,
const void pItem2,
void privateData 
)

Definition at line 3188 of file nsMsgDBView.cpp.

{
    PRInt32 retVal = 0;
    nsresult rv;

    IdKeyPtr** p1 = (IdKeyPtr**)pItem1;
    IdKeyPtr** p2 = (IdKeyPtr**)pItem2;

    nsIMsgDatabase *db = (nsIMsgDatabase *)privateData;

    rv = db->CompareCollationKeys((*p1)->key, (*p1)->dword, (*p2)->key, (*p2)->dword, &retVal);
    NS_ASSERTION(NS_SUCCEEDED(rv),"compare failed");

    if (retVal != 0)
        return(retVal);
    if ((*p1)->id >= (*p2)->id)
        return(1);
    else
        return(-1);
}

Here is the caller graph for this function:

static void getDateFormatPref ( nsIPrefBranch _prefBranch,
const char *  _prefLocalName,
nsDateFormatSelector _format 
) [static]

Definition at line 6012 of file nsMsgDBView.cpp.

{
  // read
  PRInt32 nFormatSetting( 0 );
  nsresult result = _prefBranch->GetIntPref( _prefLocalName, &nFormatSetting );
  if ( NS_SUCCEEDED( result ) )
  {
    // translate
    nsDateFormatSelector res( nFormatSetting );
    // transfer if valid
    if ( ( res >= kDateFormatNone ) && ( res <= kDateFormatWeekday ) )
      _format = res;
  }
}

Here is the caller graph for this function:

static NS_DEFINE_CID ( kDateTimeFormatCID  ,
NS_DATETIMEFORMAT_CID   
) [static]

Variable Documentation

Definition at line 3232 of file nsMsgDBView.cpp.

Definition at line 3231 of file nsMsgDBView.cpp.

Definition at line 3233 of file nsMsgDBView.cpp.

Definition at line 3230 of file nsMsgDBView.cpp.