Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes
nsMsgSearchOfflineMail Class Reference

#include <nsMsgLocalSearch.h>

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

List of all members.

Public Member Functions

 nsMsgSearchOfflineMail (nsIMsgSearchScopeTerm *, nsISupportsArray *)
virtual ~nsMsgSearchOfflineMail ()
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIURLLISTENER
NS_IMETHOD 
ValidateTerms ()
NS_IMETHOD Search (PRBool *aDone)
NS_IMETHOD Abort ()
NS_IMETHOD AddResultElement (nsIMsgDBHdr *)
virtual nsresult OpenSummaryFile ()
void Search (out boolean done)
void SendUrl ()
void CurrentUrlDone (in long exitCode)
void AddHit (in nsMsgKey key)
void AddResultElement (in nsIMsgDBHdr aHdr)
void OpenResultElement (in nsMsgResultElement element)
void ModifyResultElement (in nsMsgResultElement element, in nsMsgSearchValue value)
nsIMsgFolder FindTargetFolder ([const ] in nsMsgResultElement element)
void getSearchCharsets (out wstring srcCharset, out wstring destCharset)
void OnStartRunningUrl (in nsIURI url)
void OnStopRunningUrl (in nsIURI url, in nsresult aExitCode)

Static Public Member Functions

static nsresult MatchTermsForFilter (nsIMsgDBHdr *msgToMatch, nsISupportsArray *termList, const char *defaultCharset, nsIMsgSearchScopeTerm *scope, nsIMsgDatabase *db, const char *headers, PRUint32 headerSize, nsMsgSearchBoolExpression **aExpressionTree, PRBool *pResult)
static nsresult MatchTermsForSearch (nsIMsgDBHdr *msgTomatch, nsISupportsArray *termList, const char *defaultCharset, nsIMsgSearchScopeTerm *scope, nsIMsgDatabase *db, nsMsgSearchBoolExpression **aExpressionTree, PRBool *pResult)
static nsresult ProcessSearchTerm (nsIMsgDBHdr *msgToMatch, nsIMsgSearchTerm *aTerm, const char *defaultCharset, nsIMsgSearchScopeTerm *scope, nsIMsgDatabase *db, const char *headers, PRUint32 headerSize, PRBool Filtering, PRBool *pResult)
static nsresult EncodeImap (char **ppEncoding, nsISupportsArray *searchTerms, const PRUnichar *srcCharset, const PRUnichar *destCharset, PRBool reallyDredd=PR_FALSE)
static nsresult EncodeImapValue (char *encoding, const char *value, PRBool useQuotes, PRBool reallyDredd)
static char * GetImapCharsetParam (const PRUnichar *destCharset)
static PRUnicharEscapeSearchUrl (const PRUnichar *nntpCommand)
static PRUnicharEscapeImapSearchProtocol (const PRUnichar *imapCommand)
static PRUnicharEscapeQuoteImapSearchProtocol (const PRUnichar *imapCommand)
static char * UnEscapeSearchUrl (const char *commandSpecificData)

Public Attributes

NS_DECL_ISUPPORTS
NS_DECL_NSIMSGSEARCHADAPTER
nsIMsgSearchScopeTerm
m_scope
nsCOMPtr< nsISupportsArraym_searchTerms
PRBool m_abortCalled
nsXPIDLString m_defaultCharset
PRBool m_forceAsciiSearch
readonly attribute string encoding

Static Public Attributes

static const char * m_kImapBefore = " SENTBEFORE "
static const char * m_kImapBody = " BODY "
static const char * m_kImapCC = " CC "
static const char * m_kImapFrom = " FROM "
static const char * m_kImapNot = " NOT"
static const char * m_kImapOr = " OR"
static const char * m_kImapSince = " SENTSINCE "
static const char * m_kImapSubject = " SUBJECT "
static const char * m_kImapTo = " TO "
static const char * m_kImapHeader = " HEADER"
static const char * m_kImapAnyText = " TEXT "
static const char * m_kImapKeyword = " KEYWORD "
static const char * m_kNntpKeywords = " KEYWORDS "
static const char * m_kImapSentOn = " SENTON "
static const char * m_kImapSeen = " SEEN "
static const char * m_kImapAnswered = " ANSWERED "
static const char * m_kImapNotSeen = " UNSEEN "
static const char * m_kImapNotAnswered = " UNANSWERED "
static const char * m_kImapCharset = " CHARSET "
static const char * m_kImapUnDeleted = " UNDELETED"
static const char * m_kImapSizeSmaller = " SMALLER "
static const char * m_kImapSizeLarger = " LARGER "
static const char * m_kImapNew = " NEW "
static const char * m_kImapNotNew = " OLD SEEN "
static const char * m_kImapFlagged = " FLAGGED "
static const char * m_kImapNotFlagged = " UNFLAGGED "

Protected Types

enum  _msg_TransformType { kOverwrite, kInsert, kSurround }
typedef enum
nsMsgSearchAdapter::_msg_TransformType 
msg_TransformType

Protected Member Functions

void CleanUpScope ()
char * TransformSpacesToStars (const char *, msg_TransformType transformType)
nsresult OpenNewsResultInUnknownGroup (nsMsgResultElement *)

Static Protected Member Functions

static nsresult MatchTerms (nsIMsgDBHdr *msgToMatch, nsISupportsArray *termList, const char *defaultCharset, nsIMsgSearchScopeTerm *scope, nsIMsgDatabase *db, const char *headers, PRUint32 headerSize, PRBool ForFilters, nsMsgSearchBoolExpression **aExpressionTree, PRBool *pResult)
static nsresult ConstructExpressionTree (nsISupportsArray *termList, PRUint32 termCount, PRUint32 &aStartPosInList, nsMsgSearchBoolExpression **aExpressionTree)
static nsresult EncodeImapTerm (nsIMsgSearchTerm *, PRBool reallyDredd, const PRUnichar *srcCharset, const PRUnichar *destCharset, char **ppOutTerm)

Protected Attributes

nsCOMPtr< nsIMsgDatabasem_db
nsCOMPtr< nsISimpleEnumeratorm_listContext

Detailed Description

Definition at line 54 of file nsMsgLocalSearch.h.


Member Typedef Documentation


Member Enumeration Documentation

enum nsMsgSearchAdapter::_msg_TransformType [protected, inherited]
Enumerator:
kOverwrite 
kInsert 
kSurround 

Definition at line 127 of file nsMsgSearchAdapter.h.

  {
         kOverwrite,    /* "John Doe" -> "John*Doe",   simple contains   */
         kInsert,       /* "John Doe" -> "John* Doe",  name completion   */
         kSurround      /* "John Doe" -> "John* *Doe", advanced contains */
  } msg_TransformType;

Constructor & Destructor Documentation

Definition at line 264 of file nsMsgLocalSearch.cpp.

                                                                                                        : nsMsgSearchAdapter (scope, termList)
{
}

Definition at line 268 of file nsMsgLocalSearch.cpp.

{
  // Database should have been closed when the scope term finished. 
  CleanUpScope();
  NS_ASSERTION(!m_db, "db not closed");
}

Here is the call graph for this function:


Member Function Documentation

Implements nsIMsgSearchAdapter.

Definition at line 740 of file nsMsgLocalSearch.cpp.

{
    // Let go of the DB when we're done with it so we don't kill the db cache
    if (m_db)
        m_db->Close(PR_TRUE /* commit in case we downloaded new headers */);
    m_db = nsnull;
    return nsMsgSearchAdapter::Abort ();
}

Definition at line 724 of file nsMsgLocalSearch.cpp.

{
    nsresult err = NS_OK;

    nsCOMPtr<nsIMsgSearchSession> searchSession;
    m_scope->GetSearchSession(getter_AddRefs(searchSession));
    if (searchSession)
    {
      nsCOMPtr <nsIMsgFolder> scopeFolder;
      err = m_scope->GetFolder(getter_AddRefs(scopeFolder));
      searchSession->AddSearchHit(pHeaders, scopeFolder);
    }
    return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 711 of file nsMsgLocalSearch.cpp.

{
  // Let go of the DB when we're done with it so we don't kill the db cache
  if (m_db)
  {
    m_listContext = nsnull; 
    m_db->Close(PR_FALSE);
  }
  
  m_db = nsnull;
  m_scope->SetInputStream(nsnull);
}

Here is the caller graph for this function:

nsresult nsMsgSearchOfflineMail::ConstructExpressionTree ( nsISupportsArray termList,
PRUint32  termCount,
PRUint32 aStartPosInList,
nsMsgSearchBoolExpression **  aExpressionTree 
) [static, protected]

Definition at line 366 of file nsMsgLocalSearch.cpp.

{
  nsMsgSearchBoolExpression * finalExpression = *aExpressionTree;

  if (!finalExpression)
    finalExpression = new nsMsgSearchBoolExpression(); 

  while (aStartPosInList < termCount)
  {
      nsCOMPtr<nsIMsgSearchTerm> pTerm;
      termList->QueryElementAt(aStartPosInList, NS_GET_IID(nsIMsgSearchTerm), (void **)getter_AddRefs(pTerm));
      NS_ASSERTION (pTerm, "couldn't get term to match");

      PRBool beginsGrouping;
      PRBool endsGrouping;
      pTerm->GetBeginsGrouping(&beginsGrouping);
      pTerm->GetEndsGrouping(&endsGrouping);

      if (beginsGrouping)
      {
          //temporarily turn off the grouping for our recursive call
          pTerm->SetBeginsGrouping(PR_FALSE); 
          nsMsgSearchBoolExpression * innerExpression = new nsMsgSearchBoolExpression(); 

          // the first search term in the grouping is the one that holds the operator for how this search term
          // should be joined with the expressions to it's left. 
          PRBool booleanAnd;
          pTerm->GetBooleanAnd(&booleanAnd);

          // now add this expression tree to our overall expression tree...
          finalExpression = nsMsgSearchBoolExpression::AddExpressionTree(finalExpression, innerExpression, booleanAnd);

          // recursively process this inner expression
          ConstructExpressionTree(termList, termCount, aStartPosInList, 
            &finalExpression->m_rightChild);

          // undo our damage
          pTerm->SetBeginsGrouping(PR_TRUE); 

      }
      else
      {
        finalExpression = nsMsgSearchBoolExpression::AddSearchTerm(finalExpression, pTerm, nsnull);    // add the term to the expression tree

        if (endsGrouping)
          break;
      }

      aStartPosInList++;
  } // while we still have terms to process in this group

  *aExpressionTree = finalExpression;

  return NS_OK; 
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIMsgSearchAdapter::CurrentUrlDone ( in long  exitCode) [inherited]
nsresult nsMsgSearchAdapter::EncodeImap ( char **  ppEncoding,
nsISupportsArray searchTerms,
const PRUnichar srcCharset,
const PRUnichar destCharset,
PRBool  reallyDredd = PR_FALSE 
) [static, inherited]

Definition at line 765 of file nsMsgSearchAdapter.cpp.

{
  // i've left the old code (before using CBoolExpression for debugging purposes to make sure that
  // the new code generates the same encoding string as the old code.....
  
  nsresult err = NS_OK;
  *ppOutEncoding = nsnull;
  
  PRUint32 termCount;
  searchTerms->Count(&termCount);
  PRUint32 i = 0;
  
  // create our expression
  nsMsgSearchBoolExpression * expression = new nsMsgSearchBoolExpression();
  if (!expression)
    return NS_ERROR_OUT_OF_MEMORY;
  
  for (i = 0; i < termCount && NS_SUCCEEDED(err); i++)
  {
    char *termEncoding;
    nsCOMPtr<nsIMsgSearchTerm> pTerm;
    searchTerms->QueryElementAt(i, NS_GET_IID(nsIMsgSearchTerm),
      (void **)getter_AddRefs(pTerm));
    err = EncodeImapTerm (pTerm, reallyDredd, srcCharset, destCharset, &termEncoding);
    if (NS_SUCCEEDED(err) && nsnull != termEncoding)
    {
      expression = nsMsgSearchBoolExpression::AddSearchTerm(expression, pTerm, termEncoding);
      delete [] termEncoding;
    }
  }
  
  if (NS_SUCCEEDED(err)) 
  {
    // Catenate the intermediate encodings together into a big string
    nsCAutoString encodingBuff;
    
    if (!reallyDredd)
      encodingBuff.Append(m_kImapUnDeleted);

    expression->GenerateEncodeStr(&encodingBuff);
    *ppOutEncoding = ToNewCString(encodingBuff);
  }
  
  delete expression;
  
  return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsMsgSearchAdapter::EncodeImapTerm ( nsIMsgSearchTerm term,
PRBool  reallyDredd,
const PRUnichar srcCharset,
const PRUnichar destCharset,
char **  ppOutTerm 
) [static, protected, inherited]

Definition at line 401 of file nsMsgSearchAdapter.cpp.

{
  nsresult err = NS_OK;
  PRBool useNot = PR_FALSE;
  PRBool useQuotes = PR_FALSE;
  PRBool ignoreValue = PR_FALSE;
  nsCAutoString arbitraryHeader;
  const char *whichMnemonic = nsnull;
  const char *orHeaderMnemonic = nsnull;
  
  *ppOutTerm = nsnull;
  
  nsCOMPtr <nsIMsgSearchValue> searchValue;
  nsresult rv = term->GetValue(getter_AddRefs(searchValue));
  
  if (NS_FAILED(rv))
    return rv;
  
  nsMsgSearchOpValue op;
  term->GetOp(&op);
  
  if (op == nsMsgSearchOp::DoesntContain || op == nsMsgSearchOp::Isnt)
    useNot = PR_TRUE;
  
  nsMsgSearchAttribValue attrib;
  term->GetAttrib(&attrib);
  
  switch (attrib)
  {
  case nsMsgSearchAttrib::ToOrCC:
    orHeaderMnemonic = m_kImapCC;
    // fall through to case nsMsgSearchAttrib::To:
  case nsMsgSearchAttrib::To:
    whichMnemonic = m_kImapTo;
    break;
  case nsMsgSearchAttrib::CC:
    whichMnemonic = m_kImapCC;
    break;
  case nsMsgSearchAttrib::Sender:
    whichMnemonic = m_kImapFrom;
    break;
  case nsMsgSearchAttrib::Subject:
    whichMnemonic = m_kImapSubject;
    break;
  case nsMsgSearchAttrib::Body:
    whichMnemonic = m_kImapBody;
    break;
  case nsMsgSearchAttrib::AgeInDays:  // added for searching online for age in days...
    // for AgeInDays, we are actually going to perform a search by date, so convert the operations for age
    // to the IMAP mnemonics that we would use for date!
    switch (op)
    {
    case nsMsgSearchOp::IsGreaterThan:
      whichMnemonic = m_kImapBefore;
      break;
    case nsMsgSearchOp::IsLessThan:
      whichMnemonic = m_kImapSince;
      break;
    case nsMsgSearchOp::Is:
      whichMnemonic = m_kImapSentOn;
      break;
    default:
      NS_ASSERTION(PR_FALSE, "invalid search operator");
      return NS_ERROR_INVALID_ARG;
    }
    break;
  case nsMsgSearchAttrib::Size:
    switch (op)
    {
    case nsMsgSearchOp::IsGreaterThan:
      whichMnemonic = m_kImapSizeLarger;
      break;
    case nsMsgSearchOp::IsLessThan:
      whichMnemonic = m_kImapSizeSmaller;
      break;
    default:
      NS_ASSERTION(PR_FALSE, "invalid search operator");
      return NS_ERROR_INVALID_ARG;
    }
    break;
    case nsMsgSearchAttrib::Date:
      switch (op)
      {
      case nsMsgSearchOp::IsBefore:
        whichMnemonic = m_kImapBefore;
        break;
      case nsMsgSearchOp::IsAfter:
        whichMnemonic = m_kImapSince;
        break;
      case nsMsgSearchOp::Isnt:  /* we've already added the "Not" so just process it like it was a date is search */
      case nsMsgSearchOp::Is:
        whichMnemonic = m_kImapSentOn;
        break;
      default:
        NS_ASSERTION(PR_FALSE, "invalid search operator");
        return NS_ERROR_INVALID_ARG;
      }
      break;
      case nsMsgSearchAttrib::AnyText:
        whichMnemonic = m_kImapAnyText;
        break;
      case nsMsgSearchAttrib::Keywords:
        whichMnemonic = m_kImapKeyword;
        break;
      case nsMsgSearchAttrib::MsgStatus:
        useNot = PR_FALSE; // bizarrely, NOT SEEN is wrong, but UNSEEN is right.
        ignoreValue = PR_TRUE; // the mnemonic is all we need
        PRUint32 status;
        searchValue->GetStatus(&status);
        
        switch (status)
        {
        case MSG_FLAG_READ:
          whichMnemonic = op == nsMsgSearchOp::Is ? m_kImapSeen : m_kImapNotSeen;
          break;
        case MSG_FLAG_REPLIED:
          whichMnemonic = op == nsMsgSearchOp::Is ? m_kImapAnswered : m_kImapNotAnswered;
          break;
        case MSG_FLAG_NEW:                         
          whichMnemonic = op == nsMsgSearchOp::Is ? m_kImapNew : m_kImapNotNew;
          break; 
        case MSG_FLAG_MARKED:
          whichMnemonic = op == nsMsgSearchOp::Is ? m_kImapFlagged : m_kImapNotFlagged;
          break;
        default:
          NS_ASSERTION(PR_FALSE, "invalid search operator");
          return NS_ERROR_INVALID_ARG;
        }
        break;
        default:
          if ( attrib > nsMsgSearchAttrib::OtherHeader && attrib < nsMsgSearchAttrib::kNumMsgSearchAttributes)
          {
            nsXPIDLCString arbitraryHeaderTerm;
            term->GetArbitraryHeader(getter_Copies(arbitraryHeaderTerm));
            if (!arbitraryHeaderTerm.IsEmpty())
            {
              arbitraryHeader.AssignLiteral(" \"");
              arbitraryHeader.Append(arbitraryHeaderTerm);
              arbitraryHeader.AppendLiteral("\" ");
              whichMnemonic = arbitraryHeader.get();
            }
            else
              return NS_ERROR_FAILURE;
          }
          else
          {
            NS_ASSERTION(PR_FALSE, "invalid search operator");
            return NS_ERROR_INVALID_ARG;
          }
        }
        
        char *value = "";
        char dateBuf[100];
        dateBuf[0] = '\0';
        
        PRBool valueWasAllocated = PR_FALSE;
        if (attrib == nsMsgSearchAttrib::Date)
        {
          // note that there used to be code here that encoded an RFC822 date for imap searches.
          // The IMAP RFC 2060 is misleading to the point that it looks like it requires an RFC822
          // date but really it expects dd-mmm-yyyy, like dredd, and refers to the RFC822 date only in that the
          // dd-mmm-yyyy date will match the RFC822 date within the message.
          
          PRTime adjustedDate;
          searchValue->GetDate(&adjustedDate);
          if (whichMnemonic == m_kImapSince)
          {
            // it looks like the IMAP server searches on Since includes the date in question...
            // our UI presents Is, IsGreater and IsLessThan. For the IsGreater case (m_kImapSince)
            // we need to adjust the date so we get greater than and not greater than or equal to which
            // is what the IMAP server wants to search on
            // won't work on Mac.
            // ack, is this right? is PRTime seconds or microseconds?
            PRInt64 microSecondsPerSecond, secondsInDay, microSecondsInDay;
            
            LL_I2L(microSecondsPerSecond, PR_USEC_PER_SEC);
            LL_UI2L(secondsInDay, 60 * 60 * 24);
            LL_MUL(microSecondsInDay, secondsInDay, microSecondsPerSecond);
            LL_ADD(adjustedDate, adjustedDate, microSecondsInDay); // bump up to the day after this one...
          }
          
          PRExplodedTime exploded;
          PR_ExplodeTime(adjustedDate, PR_LocalTimeParameters, &exploded);
          PR_FormatTimeUSEnglish(dateBuf, sizeof(dateBuf), "%d-%b-%Y", &exploded);
          //         strftime (dateBuf, sizeof(dateBuf), "%d-%b-%Y", localtime (/* &term->m_value.u.date */ &adjustedDate));
          value = dateBuf;
        }
        else
        {
          if (attrib == nsMsgSearchAttrib::AgeInDays)
          {
            // okay, take the current date, subtract off the age in days, then do an appropriate Date search on 
            // the resulting day.
            PRUint32 ageInDays;
            
            searchValue->GetAge(&ageInDays);
            
            PRTime now = PR_Now();
            PRTime matchDay;
            
            PRInt64 microSecondsPerSecond, secondsInDays, microSecondsInDay;
            
            LL_I2L(microSecondsPerSecond, PR_USEC_PER_SEC);
            LL_UI2L(secondsInDays, 60 * 60 * 24 * ageInDays);
            LL_MUL(microSecondsInDay, secondsInDays, microSecondsPerSecond);
            
            LL_SUB(matchDay, now, microSecondsInDay); // = now - term->m_value.u.age * 60 * 60 * 24; 
            PRExplodedTime exploded;
            PR_ExplodeTime(matchDay, PR_LocalTimeParameters, &exploded);
            PR_FormatTimeUSEnglish(dateBuf, sizeof(dateBuf), "%d-%b-%Y", &exploded);
            //                     strftime (dateBuf, sizeof(dateBuf), "%d-%b-%Y", localtime (&matchDay));
            value = dateBuf;
          }
          else if (attrib == nsMsgSearchAttrib::Size)
          {
            PRUint32 sizeValue;
            nsCAutoString searchTermValue;
            searchValue->GetSize(&sizeValue);

            // Multiply by 1024 to get into kb resolution
            sizeValue *= 1024;

            // Ensure that greater than is really greater than
            // in kb resolution.
            if (op == nsMsgSearchOp::IsGreaterThan)
              sizeValue += 1024;

            searchTermValue.AppendInt(sizeValue);

            value = nsCRT::strdup(searchTermValue.get());
            valueWasAllocated = PR_TRUE;
          }
          else
            
            if (IsStringAttribute(attrib))
            {
              PRUnichar *convertedValue; // = reallyDredd ? MSG_EscapeSearchUrl (term->m_value.u.string) : msg_EscapeImapSearchProtocol(term->m_value.u.string);
              nsXPIDLString searchTermValue;
              searchValue->GetStr(getter_Copies(searchTermValue));
              // Ugly switch for Korean mail/news charsets.
              // We want to do this here because here is where
              // we know what charset we want to use.
#ifdef DOING_CHARSET
              if (reallyDredd)
                dest_csid = INTL_DefaultNewsCharSetID(dest_csid);
              else
                dest_csid = INTL_DefaultMailCharSetID(dest_csid);
#endif
              
              // do all sorts of crazy escaping
              convertedValue = reallyDredd ? EscapeSearchUrl (searchTermValue) :
              EscapeImapSearchProtocol(searchTermValue);
              useQuotes = ((!reallyDredd || 
                          (nsDependentString(convertedValue).FindChar(PRUnichar(' ')) != -1)) &&
                 (attrib != nsMsgSearchAttrib::Keywords));
              // now convert to char* and escape quoted_specials
              nsCAutoString valueStr;
              nsresult rv = ConvertFromUnicode(NS_LossyConvertUTF16toASCII(destCharset).get(),
                nsDependentString(convertedValue), valueStr);
              if (NS_SUCCEEDED(rv))
              {
                const char *vptr = valueStr.get();
                // max escaped length is one extra character for every character in the cmd.
                nsAutoArrayPtr<char> newValue(new char[2*strlen(vptr) + 1]);
                if (newValue)
                {
                  char *p = newValue;
                  while (1)
                  {
                    char ch = *vptr++;
                    if (!ch)
                      break;
                    if ((useQuotes ? ch == '"' : 0) || ch == '\\')
                      *p++ = '\\';
                    *p++ = ch;
                  }
                  *p = '\0';
                  value = nsCRT::strdup(newValue); // realloc down to smaller size
                }
              }
              else
                value = nsCRT::strdup("");
              nsCRT::free(convertedValue);
              valueWasAllocated = PR_TRUE;
              
            }
        }
        
        // this should be rewritten to use nsCString
        int len = strlen(whichMnemonic) + strlen(value) + (useNot ? strlen(m_kImapNot) : 0) + 
          (useQuotes ? 2 : 0) + strlen(m_kImapHeader) + 
          (orHeaderMnemonic ? (strlen(m_kImapHeader) + strlen(m_kImapOr) + (useNot ? strlen(m_kImapNot) : 0) + 
          strlen(orHeaderMnemonic) + strlen(value) + 2 /*""*/) : 0) + 10; // add slough for imap string literals
        char *encoding = new char[len];
        if (encoding)
        {
          encoding[0] = '\0';
          // Remember: if ToOrCC and useNot then the expression becomes NOT To AND Not CC as opposed to (NOT TO) || (NOT CC)
          if (orHeaderMnemonic && !useNot)
            PL_strcat(encoding, m_kImapOr);
          if (useNot)
            PL_strcat (encoding, m_kImapNot);
          if (!arbitraryHeader.IsEmpty())
            PL_strcat (encoding, m_kImapHeader);
          PL_strcat (encoding, whichMnemonic);
          if (!ignoreValue)
            err = EncodeImapValue(encoding, value, useQuotes, reallyDredd);
          
          if (orHeaderMnemonic)
          {
            if (useNot)
              PL_strcat(encoding, m_kImapNot);
            
            PL_strcat (encoding, m_kImapHeader);
            
            PL_strcat (encoding, orHeaderMnemonic);
            if (!ignoreValue)
              err = EncodeImapValue(encoding, value, useQuotes, reallyDredd);
          }
          
          // kmcentee, don't let the encoding end with whitespace, 
          // this throws off later url STRCMP
          if (*encoding && *(encoding + strlen(encoding) - 1) == ' ')
            *(encoding + strlen(encoding) - 1) = '\0';
        }
        
        if (value && valueWasAllocated)
          PR_Free (value);
        
        *ppOutTerm = encoding;
        
        return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsMsgSearchAdapter::EncodeImapValue ( char *  encoding,
const char *  value,
PRBool  useQuotes,
PRBool  reallyDredd 
) [static, inherited]

Definition at line 735 of file nsMsgSearchAdapter.cpp.

{
  // By NNTP RFC, SEARCH HEADER SUBJECT "" is legal and means 'find messages without a subject header'
  if (!reallyDredd)
  {
    // By IMAP RFC, SEARCH HEADER SUBJECT "" is illegal and will generate an error from the server
    if (!value || !value[0])
      return NS_ERROR_NULL_POINTER;
  }
  
  if (!nsCRT::IsAscii(value))
  {
    nsCAutoString lengthStr;
    PL_strcat(encoding, "{");
    lengthStr.AppendInt((PRInt32) strlen(value));
    PL_strcat(encoding, lengthStr.get());
    PL_strcat(encoding, "}"CRLF);
    PL_strcat(encoding, value);
    return NS_OK;
  }
  if (useQuotes)
    PL_strcat(encoding, "\"");
  PL_strcat (encoding, value);
  if (useQuotes)
    PL_strcat(encoding, "\"");
  
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRUnichar * nsMsgSearchAdapter::EscapeImapSearchProtocol ( const PRUnichar imapCommand) [static, inherited]

Definition at line 226 of file nsMsgSearchAdapter.cpp.

{
       return nsCRT::strdup(imapCommand);
#if 0
       PRUnichar *result = nsnull;
       // max escaped length is one extra character for every character in the cmd.
    PRUnichar *scratchBuf =
        (PRUnichar*) PR_Malloc (sizeof(PRUnichar) * (2*nsCRT::strlen(imapCommand) + 1));
       if (scratchBuf)
       {
              PRUnichar *scratchPtr = scratchBuf;
              while (1)
              {
                     PRUnichar ch = *imapCommand++;
                     if (!ch)
                            break;
                     if (ch == (PRUnichar)'\\')
                     {
                            *scratchPtr++ = (PRUnichar)'\\';
                            *scratchPtr++ = (PRUnichar)'\\';
                     }
                     else
                            *scratchPtr++ = ch;
              }
              *scratchPtr = 0;
        result = nsCRT::strdup (scratchBuf); // realloc down to smaller size
        nsCRT::free (scratchBuf);
       }
       return result;
#endif
}

Here is the caller graph for this function:

Definition at line 265 of file nsMsgSearchAdapter.cpp.

{
       return nsCRT::strdup(imapCommand);
#if 0
       PRUnichar *result = nsnull;
       // max escaped length is one extra character for every character in the cmd.
    PRUnichar *scratchBuf =
        (PRUnichar*) PR_Malloc (sizeof(PRUnichar) * (2*nsCRT::strlen(imapCommand) + 1));
       if (scratchBuf)
       {
              PRUnichar *scratchPtr = scratchBuf;
              while (1)
              {
                     PRUnichar ch = *imapCommand++;
                     if (!ch)
                            break;
                     if (ch == '"')
                     {
                            *scratchPtr++ = '\\';
                            *scratchPtr++ = '"';
                     }
                     else
                            *scratchPtr++ = ch;
              }
              *scratchPtr = '\0';
    result = nsCRT::strdup (scratchBuf); // realloc down to smaller size
    nsCRT::free (scratchBuf);
       }
       return result;
#endif
}
PRUnichar * nsMsgSearchAdapter::EscapeSearchUrl ( const PRUnichar nntpCommand) [static, inherited]

Definition at line 185 of file nsMsgSearchAdapter.cpp.

{
       return nsCRT::strdup(nntpCommand);
#if 0
       PRUnichar *result = nsnull;
       // max escaped length is two extra characters for every character in the cmd.
  PRUnichar *scratchBuf = (PRUnichar*) PR_Malloc(sizeof(PRUnichar) * (3*nsCRT::strlen(nntpCommand) + 1));
       if (scratchBuf)
       {
              PRUnichar *scratchPtr = scratchBuf;
              while (PR_TRUE)
              {
                     PRUnichar ch = *nntpCommand++;
                     if (!ch)
                            break;
                     if (ch == '#' || ch == '?' || ch == '@' || ch == '\\')
                     {
                            *scratchPtr++ = '\\';
                nsTextFormatter::snprintf(scratchPtr, 2,
                                          NS_LITERAL_STRING("%2.2X").get(), ch);
                                   /* Reviewed 4.51 safe use of sprintf */
                            scratchPtr += 2;
                     }
                     else
                            *scratchPtr++ = ch;
              }
              *scratchPtr = '\0';
              result = nsCRT::strdup (scratchBuf); // realloc down to smaller size
        nsCRT::free (scratchBuf);
       }
       return result;
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

char * nsMsgSearchAdapter::GetImapCharsetParam ( const PRUnichar destCharset) [static, inherited]

Definition at line 168 of file nsMsgSearchAdapter.cpp.

{
       char *result = nsnull;

       // Specify a character set unless we happen to be US-ASCII.
  if (nsCRT::strcmp(destCharset, NS_LITERAL_STRING("us-ascii").get()))
           result = PR_smprintf("%s%s", nsMsgSearchAdapter::m_kImapCharset, NS_ConvertUCS2toUTF8(destCharset).get());

       return result;
}

Here is the caller graph for this function:

void nsIMsgSearchAdapter::getSearchCharsets ( out wstring  srcCharset,
out wstring  destCharset 
) [inherited]
nsresult nsMsgSearchOfflineMail::MatchTerms ( nsIMsgDBHdr msgToMatch,
nsISupportsArray termList,
const char *  defaultCharset,
nsIMsgSearchScopeTerm scope,
nsIMsgDatabase db,
const char *  headers,
PRUint32  headerSize,
PRBool  ForFilters,
nsMsgSearchBoolExpression **  aExpressionTree,
PRBool pResult 
) [static, protected]

Definition at line 605 of file nsMsgLocalSearch.cpp.

{
  NS_ENSURE_ARG(aExpressionTree);
  nsresult err;

  if (!*aExpressionTree)
  {
    PRUint32 initialPos = 0; 
    PRUint32 count;
    termList->Count(&count);
    err = ConstructExpressionTree(termList, count, initialPos, aExpressionTree);
    if (NS_FAILED(err))
      return err;
  }

  // evaluate the expression tree and return the result
  *pResult = (*aExpressionTree) 
    ?  (*aExpressionTree)->OfflineEvaluate(msgToMatch,
                 defaultCharset, scope, db, headers, headerSize, Filtering)
    :PR_TRUE; // vacuously true...

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsMsgSearchOfflineMail::MatchTermsForFilter ( nsIMsgDBHdr msgToMatch,
nsISupportsArray termList,
const char *  defaultCharset,
nsIMsgSearchScopeTerm scope,
nsIMsgDatabase db,
const char *  headers,
PRUint32  headerSize,
nsMsgSearchBoolExpression **  aExpressionTree,
PRBool pResult 
) [static]

Definition at line 339 of file nsMsgLocalSearch.cpp.

{
    return MatchTerms(msgToMatch, termList, defaultCharset, scope, db, headers, headerSize, PR_TRUE, aExpressionTree, pResult);
}

Here is the call graph for this function:

nsresult nsMsgSearchOfflineMail::MatchTermsForSearch ( nsIMsgDBHdr msgTomatch,
nsISupportsArray termList,
const char *  defaultCharset,
nsIMsgSearchScopeTerm scope,
nsIMsgDatabase db,
nsMsgSearchBoolExpression **  aExpressionTree,
PRBool pResult 
) [static]

Definition at line 354 of file nsMsgLocalSearch.cpp.

{

    return MatchTerms(msgToMatch, termList, defaultCharset, scope, db, nsnull, 0, PR_FALSE, aExpressionTree, pResult);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Here is the caller graph for this function:

void nsIUrlListener::OnStopRunningUrl ( in nsIURI  url,
in nsresult  aExitCode 
) [inherited]

Here is the caller graph for this function:

Here is the caller graph for this function:

Reimplemented in nsMsgSearchOfflineNews.

Definition at line 282 of file nsMsgLocalSearch.cpp.

{
    nsCOMPtr <nsIMsgDatabase> mailDB ;

    nsresult err = NS_OK;
    // do password protection of local cache thing.
#ifdef DOING_FOLDER_CACHE_PASSWORDS
    if (m_scope->m_folder && m_scope->m_folder->UserNeedsToAuthenticateForFolder(PR_FALSE) && m_scope->m_folder->GetMaster()->PromptForHostPassword(m_scope->m_frame->GetContext(), m_scope->m_folder) != 0)
    {
        m_scope->m_frame->StopRunning();
        return SearchError_ScopeDone;
    }
#endif
    nsCOMPtr <nsIDBFolderInfo>  folderInfo;
    nsCOMPtr <nsIMsgFolder> scopeFolder;
    err = m_scope->GetFolder(getter_AddRefs(scopeFolder));
    if (NS_SUCCEEDED(err) && scopeFolder)
    {
      err = scopeFolder->GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(m_db));
    }
    else
      return err; // not sure why m_folder wouldn't be set.

    switch (err)
    {
        case NS_OK:
            break;
        case NS_MSG_ERROR_FOLDER_SUMMARY_MISSING:
        case NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE:
          {
            nsCOMPtr<nsIMsgLocalMailFolder> localFolder = do_QueryInterface(scopeFolder, &err);
            if (NS_SUCCEEDED(err) && localFolder)
            {
              nsCOMPtr<nsIMsgSearchSession> searchSession;
              m_scope->GetSearchSession(getter_AddRefs(searchSession));
              if (searchSession)
              {
                nsCOMPtr <nsIMsgWindow> searchWindow;

                searchSession->GetWindow(getter_AddRefs(searchWindow));
                searchSession->PauseSearch();
                localFolder->ParseFolder(searchWindow, this);
              }
            }
          }
            break;
        default:
        {
          NS_ASSERTION(PR_FALSE, "unexpected error opening db");
        }
    }

    return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsMsgSearchOfflineMail::ProcessSearchTerm ( nsIMsgDBHdr msgToMatch,
nsIMsgSearchTerm aTerm,
const char *  defaultCharset,
nsIMsgSearchScopeTerm scope,
nsIMsgDatabase db,
const char *  headers,
PRUint32  headerSize,
PRBool  Filtering,
PRBool pResult 
) [static]

Definition at line 425 of file nsMsgLocalSearch.cpp.

{
    nsresult err = NS_OK;
    nsXPIDLCString  recipients;
    nsXPIDLCString  ccList;
    nsXPIDLCString  matchString;
    nsXPIDLCString  msgCharset;
    const char *charset;
    PRBool charsetOverride = PR_FALSE; /* XXX BUG 68706 */
    PRUint32 msgFlags;
    PRBool result;
    PRBool matchAll;

    NS_ENSURE_ARG_POINTER(pResult);

    aTerm->GetMatchAll(&matchAll);
    if (matchAll)
    {
      *pResult = PR_TRUE;
      return NS_OK;
    }
    *pResult = PR_FALSE;

    nsMsgSearchAttribValue attrib;
    aTerm->GetAttrib(&attrib);
    msgToMatch->GetCharset(getter_Copies(msgCharset));
    charset = (const char*)msgCharset;
    if (!charset || !*charset)
      charset = (const char*)defaultCharset;
    msgToMatch->GetFlags(&msgFlags);

    switch (attrib)
    {
      case nsMsgSearchAttrib::Sender:
        msgToMatch->GetAuthor(getter_Copies(matchString));
        err = aTerm->MatchRfc822String (matchString, charset, charsetOverride, &result);
        break;
      case nsMsgSearchAttrib::Subject:
      {
        msgToMatch->GetSubject(getter_Copies(matchString) /* , PR_TRUE */);
        if (msgFlags & MSG_FLAG_HAS_RE)
        { 
          // Make sure we pass along the "Re: " part of the subject if this is a reply.
          nsXPIDLCString reString;
          reString.Assign("Re: ");
          reString.Append(matchString);
          err = aTerm->MatchRfc2047String(reString, charset, charsetOverride, &result);
        }
        else
          err = aTerm->MatchRfc2047String (matchString, charset, charsetOverride, &result);
        break;
      }
      case nsMsgSearchAttrib::ToOrCC:
      {
        PRBool boolKeepGoing;
        aTerm->GetMatchAllBeforeDeciding(&boolKeepGoing);
        msgToMatch->GetRecipients(getter_Copies(recipients));
        err = aTerm->MatchRfc822String (recipients, charset, charsetOverride, &result);
        if (boolKeepGoing == result)
        {
          msgToMatch->GetCcList(getter_Copies(ccList));
          err = aTerm->MatchRfc822String (ccList, charset, charsetOverride, &result);
        }
        break;
      }
      case nsMsgSearchAttrib::Body:
       {
         nsMsgKey messageOffset;
         PRUint32 lineCount;
         msgToMatch->GetMessageOffset(&messageOffset);
         msgToMatch->GetLineCount(&lineCount);
         err = aTerm->MatchBody (scope, messageOffset, lineCount, charset, msgToMatch, db, &result);
         break;
       }
      case nsMsgSearchAttrib::Date:
      {
        PRTime date;
        msgToMatch->GetDate(&date);
        err = aTerm->MatchDate (date, &result);

        break;
      }
      case nsMsgSearchAttrib::HasAttachmentStatus:
      case nsMsgSearchAttrib::MsgStatus:
        err = aTerm->MatchStatus (msgFlags, &result);
        break;
      case nsMsgSearchAttrib::Priority:
      {
        nsMsgPriorityValue msgPriority;
        msgToMatch->GetPriority(&msgPriority);
        err = aTerm->MatchPriority (msgPriority, &result);
        break;
      }      
      case nsMsgSearchAttrib::Size:
      {
        PRUint32 messageSize;
        msgToMatch->GetMessageSize(&messageSize);
        err = aTerm->MatchSize (messageSize, &result);
        break;
      }
      case nsMsgSearchAttrib::To:
        msgToMatch->GetRecipients(getter_Copies(recipients));
        err = aTerm->MatchRfc822String(recipients, charset, charsetOverride, &result);
        break;
      case nsMsgSearchAttrib::CC:
        msgToMatch->GetCcList(getter_Copies(ccList));
        err = aTerm->MatchRfc822String (ccList, charset, charsetOverride, &result);
        break;
      case nsMsgSearchAttrib::AgeInDays:
      {
        PRTime date;
        msgToMatch->GetDate(&date);
        err = aTerm->MatchAge (date, &result);
        break;
       }
      case nsMsgSearchAttrib::Label:
      {
         nsMsgLabelValue label;
         msgToMatch->GetLabel(&label);
         err = aTerm->MatchLabel(label, &result);
         break;
      }    
      case nsMsgSearchAttrib::Keywords:
      {
          nsXPIDLCString keywords;
          nsMsgLabelValue label;
          msgToMatch->GetStringProperty("keywords", getter_Copies(keywords));
          msgToMatch->GetLabel(&label);
          if (label >= 1)
          {
            if (!keywords.IsEmpty())
              keywords.Append(' ');
            keywords.Append("$label");
            keywords.Append(label + '0');
          }
          err = aTerm->MatchKeyword(keywords.get(), &result);
          break;
      }
      case nsMsgSearchAttrib::JunkStatus:
      {
         nsXPIDLCString junkScoreStr;
         msgToMatch->GetStringProperty("junkscore", getter_Copies(junkScoreStr));
         err = aTerm->MatchJunkStatus(junkScoreStr, &result);
         break; 
      }
      default:
          // XXX todo
          // for the temporary return receipts filters, we use a custom header for Content-Type
          // but unlike the other custom headers, this one doesn't show up in the search / filter
          // UI.  we set the attrib to be nsMsgSearchAttrib::OtherHeader, where as for user
          // defined custom headers start at nsMsgSearchAttrib::OtherHeader + 1
          // Not sure if there is a better way to do this yet.  Maybe reserve the last
          // custom header for ::Content-Type?  But if we do, make sure that change
          // doesn't cause nsMsgFilter::GetTerm() to change, and start making us
          // ask IMAP servers for the Content-Type header on all messages.
          if ( attrib >= nsMsgSearchAttrib::OtherHeader && attrib < nsMsgSearchAttrib::kNumMsgSearchAttributes)
          {
            PRUint32 lineCount;
            msgToMatch->GetLineCount(&lineCount);
            nsMsgKey messageKey;
            msgToMatch->GetMessageOffset(&messageKey);
            err = aTerm->MatchArbitraryHeader (scope, messageKey, lineCount,charset, charsetOverride,
                                                msgToMatch, db, headers, headerSize, Filtering, &result);
          }
          else
            err = NS_ERROR_INVALID_ARG; // ### was SearchError_InvalidAttribute
    }

    *pResult = result;
    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 639 of file nsMsgLocalSearch.cpp.

{
  nsresult err = NS_OK;
  
  NS_ENSURE_ARG(aDone);
  nsresult dbErr = NS_OK;
  nsCOMPtr<nsIMsgDBHdr> msgDBHdr;
  nsMsgSearchBoolExpression *expressionTree = nsnull;
  
  const PRUint32 kTimeSliceInMS = 200;

  *aDone = PR_FALSE;
  // Try to open the DB lazily. This will set up a parser if one is required
  if (!m_db)
    err = OpenSummaryFile ();
  if (!m_db)  // must be reparsing.
    return err;
  
  // Reparsing is unnecessary or completed
  if (NS_SUCCEEDED(err))
  {
    if (!m_listContext)
      dbErr = m_db->EnumerateMessages (getter_AddRefs(m_listContext));
    if (NS_SUCCEEDED(dbErr) && m_listContext)
    {
      PRIntervalTime startTime = PR_IntervalNow();
      while (!*aDone)  // we'll break out of the loop after kTimeSliceInMS milliseconds
      {
        nsCOMPtr<nsISupports> currentItem;
      
        dbErr = m_listContext->GetNext(getter_AddRefs(currentItem));
        if(NS_SUCCEEDED(dbErr))
        {
          msgDBHdr = do_QueryInterface(currentItem, &dbErr);
        }
        if (NS_FAILED(dbErr))      
          *aDone = PR_TRUE; //###phil dbErr is dropped on the floor. just note that we did have an error so we'll clean up later
        else
        {
          PRBool match = PR_FALSE;
          nsXPIDLString nullCharset, folderCharset;
          GetSearchCharsets(getter_Copies(nullCharset), getter_Copies(folderCharset));
          NS_ConvertUCS2toUTF8 charset(folderCharset);
          // Is this message a hit?
          err = MatchTermsForSearch (msgDBHdr, m_searchTerms, charset.get(), m_scope, m_db, &expressionTree, &match);
          // Add search hits to the results list
          if (NS_SUCCEEDED(err) && match)
          {
            AddResultElement (msgDBHdr);
          }
          PRIntervalTime elapsedTime;
          LL_SUB(elapsedTime, PR_IntervalNow(), startTime);
          // check if more than kTimeSliceInMS milliseconds have elapsed in this time slice started
          if (PR_IntervalToMilliseconds(elapsedTime) > kTimeSliceInMS)
            break;
        }
      }
    }    
  }
  else
    *aDone = PR_TRUE; // we couldn't open up the DB. This is an unrecoverable error so mark the scope as done.
  
  delete expressionTree;

  // in the past an error here would cause an "infinite" search because the url would continue to run...
  // i.e. if we couldn't open the database, it returns an error code but the caller of this function says, oh,
  // we did not finish so continue...what we really want is to treat this current scope as done
  if (*aDone)
    CleanUpScope(); // Do clean up for end-of-scope processing
  return err;
}

Here is the call graph for this function:

char * nsMsgSearchAdapter::TransformSpacesToStars ( const char *  spaceString,
msg_TransformType  transformType 
) [protected, inherited]

Definition at line 814 of file nsMsgSearchAdapter.cpp.

{
       char *starString;
       
       if (transformType == kOverwrite)
       {
              if ((starString = nsCRT::strdup(spaceString)) != nsnull)
              {
                     char *star = starString;
                     while ((star = PL_strchr(star, ' ')) != nsnull)
                            *star = '*';
              }
       }
       else
       {
              int i, count;

              for (i = 0, count = 0; spaceString[i]; )
              {
                     if (spaceString[i++] == ' ')
                     {
                            count++;
                            while (spaceString[i] && spaceString[i] == ' ') i++;
                     }
              }

              if (transformType == kSurround)
                     count *= 2;

              if (count > 0)
              {
                     if ((starString = (char *)PR_Malloc(i + count + 1)) != nsnull)
                     {
                            int j;

                            for (i = 0, j = 0; spaceString[i]; )
                            {
                                   if (spaceString[i] == ' ')
                                   {
                                          starString[j++] = '*';
                                          starString[j++] = ' ';
                                          if (transformType == kSurround)
                                                 starString[j++] = '*';

                                          i++;
                                          while (spaceString[i] && spaceString[i] == ' ')
                                                 i++;
                                   }
                                   else
                                          starString[j++] = spaceString[i++];
                            }
                            starString[j] = 0;
                     }
              }
              else
                     starString = nsCRT::strdup(spaceString);
       }

       return starString;
}

Here is the call graph for this function:

char * nsMsgSearchAdapter::UnEscapeSearchUrl ( const char *  commandSpecificData) [static, inherited]

Definition at line 298 of file nsMsgSearchAdapter.cpp.

{
  char *result = (char*) PR_Malloc (strlen(commandSpecificData) + 1);
       if (result)
       {
              char *resultPtr = result;
              while (1)
              {
                     char ch = *commandSpecificData++;
                     if (!ch)
                            break;
                     if (ch == '\\')
                     {
                            char scratchBuf[3];
                            scratchBuf[0] = (char) *commandSpecificData++;
                            scratchBuf[1] = (char) *commandSpecificData++;
                            scratchBuf[2] = '\0';
                            unsigned int accum = 0;
                            sscanf (scratchBuf, "%X", &accum);
                            *resultPtr++ = (char) accum;
                     }
                     else
                            *resultPtr++ = ch;
              }
              *resultPtr = '\0';
       }
       return result;
}

Here is the call graph for this function:

Implements nsIMsgSearchAdapter.

Reimplemented in nsMsgSearchOfflineNews.

Definition at line 276 of file nsMsgLocalSearch.cpp.


Member Data Documentation

Definition at line 63 of file nsIMsgSearchAdapter.idl.

Definition at line 81 of file nsMsgSearchAdapter.h.

Definition at line 115 of file nsMsgLocalSearch.h.

Definition at line 82 of file nsMsgSearchAdapter.h.

Definition at line 83 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapAnswered = " ANSWERED " [static, inherited]

Definition at line 115 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapAnyText = " TEXT " [static, inherited]

Definition at line 110 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapBefore = " SENTBEFORE " [static, inherited]

Definition at line 100 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapBody = " BODY " [static, inherited]

Definition at line 101 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapCC = " CC " [static, inherited]

Definition at line 102 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapCharset = " CHARSET " [static, inherited]

Definition at line 118 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapFlagged = " FLAGGED " [static, inherited]

Definition at line 124 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapFrom = " FROM " [static, inherited]

Definition at line 103 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapHeader = " HEADER" [static, inherited]

Definition at line 109 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapKeyword = " KEYWORD " [static, inherited]

Definition at line 111 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapNew = " NEW " [static, inherited]

Definition at line 122 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapNot = " NOT" [static, inherited]

Definition at line 104 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapNotAnswered = " UNANSWERED " [static, inherited]

Definition at line 117 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapNotFlagged = " UNFLAGGED " [static, inherited]

Definition at line 125 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapNotNew = " OLD SEEN " [static, inherited]

Definition at line 123 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapNotSeen = " UNSEEN " [static, inherited]

Definition at line 116 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapOr = " OR" [static, inherited]

Definition at line 105 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapSeen = " SEEN " [static, inherited]

Definition at line 114 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapSentOn = " SENTON " [static, inherited]

Definition at line 113 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapSince = " SENTSINCE " [static, inherited]

Definition at line 106 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapSizeLarger = " LARGER " [static, inherited]

Definition at line 121 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapSizeSmaller = " SMALLER " [static, inherited]

Definition at line 120 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapSubject = " SUBJECT " [static, inherited]

Definition at line 107 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapTo = " TO " [static, inherited]

Definition at line 108 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kImapUnDeleted = " UNDELETED" [static, inherited]

Definition at line 119 of file nsMsgSearchAdapter.h.

const char * nsMsgSearchAdapter::m_kNntpKeywords = " KEYWORDS " [static, inherited]

Definition at line 112 of file nsMsgSearchAdapter.h.

Definition at line 116 of file nsMsgLocalSearch.h.

NS_DECL_ISUPPORTS NS_DECL_NSIMSGSEARCHADAPTER nsIMsgSearchScopeTerm* nsMsgSearchAdapter::m_scope [inherited]

Definition at line 78 of file nsMsgSearchAdapter.h.

Definition at line 79 of file nsMsgSearchAdapter.h.


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