Back to index

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

#include <nsParseMailbox.h>

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

List of all members.

Public Member Functions

 nsParseNewMailState ()
virtual ~nsParseNewMailState ()
NS_DECL_ISUPPORTS_INHERITED
nsresult 
Init (nsIMsgFolder *rootFolder, nsIMsgFolder *downloadFolder, nsFileSpec &folder, nsIOFileStream *inboxFileStream, nsIMsgWindow *aMsgWindow, PRBool downloadingToTempFile)
virtual void DoneParsingFolder (nsresult status)
void DisableFilters ()
NS_DECL_NSIMSGFILTERHITNOTIFY
nsOutputFileStream
GetLogFile ()
virtual PRInt32 PublishMsgHeader (nsIMsgWindow *msgWindow)
void GetMsgWindow (nsIMsgWindow **aMsgWindow)
nsresult EndMsgDownload ()
nsresult AppendMsgFromFile (nsIOFileStream *fileStream, PRUint32 offset, PRUint32 length, nsFileSpec &destFileSpec)
virtual void ApplyFilters (PRBool *pMoved, nsIMsgWindow *msgWindow, PRUint32 msgOffset)
nsresult ApplyForwardAndReplyFilter (nsIMsgWindow *msgWindow)
void NotifyGlobalListeners (nsIMsgDBHdr *newHdr)
PRBool IsRunningUrl ()
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSISTREAMLISTENER
NS_DECL_NSIDBCHANGELISTENER
void 
SetDB (nsIMsgDatabase *mailDB)
virtual int ProcessMailboxInputStream (nsIURI *aURL, nsIInputStream *aIStream, PRUint32 aLength)
virtual void AbortNewHeader ()
virtual PRInt32 HandleLine (char *line, PRUint32 line_length)
void UpdateDBFolderInfo ()
void UpdateDBFolderInfo (nsIMsgDatabase *mailDB)
void UpdateStatusText (PRUint32 stringID)
virtual void UpdateProgressPercent ()
void Init (PRUint32 fileposition)
void onDataAvailable (in nsIRequest aRequest, in nsISupports aContext, in nsIInputStream aInputStream, in unsigned long aOffset, in unsigned long aCount)
 Called when the next chunk of data (corresponding to the request) may be read without blocking the calling thread.
void onStartRequest (in nsIRequest aRequest, in nsISupports aContext)
 Called to signify the beginning of an asynchronous request.
void onStopRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatusCode)
 Called to signify the end of an asynchronous request.
virtual PRInt32 ParseFolderLine (const char *line, PRUint32 lineLength)
virtual int StartNewEnvelope (const char *line, PRUint32 lineLength)
int ParseHeaders ()
int FinalizeHeaders ()
int ParseEnvelope (const char *line, PRUint32 line_size)
int InternSubject (struct message_header *header)
nsresult InternRfc822 (struct message_header *header, char **ret_name)
struct message_headerGetNextHeaderInAggregate (nsVoidArray &list)
void GetAggregateHeader (nsVoidArray &list, struct message_header *)
void ClearAggregateHeader (nsVoidArray &list)
void SetMailDB (in nsIMsgDatabase aDatabase)
void setDBFolderStream (in nsIOFileStream fileStream)
void Clear ()
void ParseAFolderLine (in string line, in unsigned long lineLength)
nsIMsgDBHdr GetNewMsgHdr ()
void FinishHeader ()
long GetAllHeaders (out string headers)
void onHdrChange (in nsIMsgDBHdr aHdrChanged, in unsigned long aOldFlags, in unsigned long aNewFlags, in nsIDBChangeListener aInstigator)
void onHdrDeleted (in nsIMsgDBHdr aHdrChanged, in nsMsgKey aParentKey, in long aFlags, in nsIDBChangeListener aInstigator)
void onHdrAdded (in nsIMsgDBHdr aHdrChanged, in nsMsgKey aParentKey, in long aFlags, in nsIDBChangeListener aInstigator)
void onParentChanged (in nsMsgKey aKeyChanged, in nsMsgKey oldParent, in nsMsgKey newParent, in nsIDBChangeListener aInstigator)
void onAnnouncerGoingAway (in nsIDBChangeAnnouncer instigator)
void onReadChanged (in nsIDBChangeListener aInstigator)
void onJunkScoreChanged (in nsIDBChangeListener aInstigator)
boolean applyFilterHit (in nsIMsgFilter filter, in nsIMsgWindow msgWindow)

Static Public Member Functions

static PRBool IsEnvelopeLine (const char *buf, PRInt32 buf_size)
static int msg_UnHex (char C)

Public Attributes

PRInt32 m_numNotNewMessages
nsCOMPtr< nsIMsgHeaderParserm_HeaderAddressParser
nsCOMPtr< nsIMsgDBHdrm_newMsgHdr
nsCOMPtr< nsIMsgDatabasem_mailDB
nsMailboxParseState m_state
PRUint32 m_position
PRUint32 m_envelope_pos
PRUint32 m_headerstartpos
nsByteArray m_headers
nsByteArray m_envelope
nsVoidArray m_toList
nsVoidArray m_ccList
PRTime m_receivedTime
PRUint16 m_body_lines
PRBool m_IgnoreXMozillaStatus
PRBool m_useReceivedDate
nsCStringArray m_customDBHeaders
struct message_headerm_customDBHeaderValues
attribute unsigned long envelopePos
readonly attribute string headers
attribute nsMailboxParseState state
const long ParseEnvelopeState = 0
const long ParseHeadersState = 1
const long ParseBodyState = 2

Protected Member Functions

virtual nsresult GetTrashFolder (nsIMsgFolder **pTrashFolder)
virtual nsresult MoveIncorporatedMessage (nsIMsgDBHdr *mailHdr, nsIMsgDatabase *sourceDB, nsIMsgFolder *destIFolder, nsIMsgFilter *filter, nsIMsgWindow *msgWindow)
virtual int MarkFilteredMessageRead (nsIMsgDBHdr *msgHdr)
void LogRuleHit (nsIMsgFilter *filter, nsIMsgDBHdr *msgHdr)
void FreeBuffers ()

Protected Attributes

nsCOMPtr< nsIMsgFilterListm_filterList
nsCOMPtr< nsIMsgFilterListm_deferredToServerFilterList
nsCOMPtr< nsIMsgFolderm_rootFolder
nsCOMPtr< nsIMsgWindowm_msgWindow
nsCOMPtr< nsIMsgFolderm_downloadFolder
nsCOMArray< nsIMsgFolderm_filterTargetFolders
nsCOMPtr
< nsIMsgFolderNotificationService
m_notificationService
nsImapMoveCoalescer * m_moveCoalescer
PRBool m_msgMovedByFilter
nsIOFileStreamm_inboxFileStream
nsFileSpec m_inboxFileSpec
PRBool m_disableFilters
PRBool m_downloadingToTempFile
PRUint32 m_ibuffer_fp
char * m_ibuffer
PRUint32 m_ibuffer_size
PRUint32 m_curHdrOffset
nsCStringArray m_forwardTo
nsCStringArray m_replyTemplateUri
nsCOMPtr< nsIMsgDBHdrm_msgToForwardOrReply
nsCOMPtr< nsIMsgStatusFeedbackm_statusFeedback
nsXPIDLString m_folderName
nsXPIDLCString m_inboxUri
nsByteArray m_inputStream
PRInt32 m_obuffer_size
char * m_obuffer
PRUint32 m_graph_progress_total
PRUint32 m_graph_progress_received
PRBool m_parsingDone
nsTime m_startTime
nsCOMPtr< nsIMsgStringServicemStringService

Detailed Description

Definition at line 236 of file nsParseMailbox.h.


Constructor & Destructor Documentation

Definition at line 1601 of file nsParseMailbox.cpp.

{
  if (m_mailDB)
    m_mailDB->Close(PR_TRUE);
#ifdef DOING_JSFILTERS
  JSFilter_cleanup();
#endif
}

Member Function Documentation

void nsMsgMailboxParser::AbortNewHeader ( ) [virtual, inherited]

Definition at line 393 of file nsParseMailbox.cpp.

nsresult nsParseNewMailState::AppendMsgFromFile ( nsIOFileStream fileStream,
PRUint32  offset,
PRUint32  length,
nsFileSpec destFileSpec 
)

Definition at line 2162 of file nsParseMailbox.cpp.

{
  fileStream->seek(PR_SEEK_SET, offset);

  nsIOFileStream *destFile = new nsIOFileStream(destFileSpec, PR_WRONLY | PR_CREATE_FILE);
  
  if (!destFile) 
  {
#ifdef DEBUG_bienvenu
    NS_ASSERTION(PR_FALSE, "out of memory");
#endif
    return  NS_MSG_ERROR_WRITING_MAIL_FOLDER;
  }
  
  destFile->seek(PR_SEEK_END, 0);
  PRInt32 newMsgPos = destFile->tell();
  
  if (!m_ibuffer)
    m_ibuffer_size = 10240;
  m_ibuffer_fp = 0;
  
  while (!m_ibuffer && (m_ibuffer_size >= 512))
  {
    m_ibuffer = (char *) PR_Malloc(m_ibuffer_size);
    if (m_ibuffer == nsnull)
      m_ibuffer_size /= 2;
  }
  NS_ASSERTION(m_ibuffer != nsnull, "couldn't get memory to move msg");
  while ((length > 0) && m_ibuffer)
  {
    PRUint32 nRead = m_inboxFileStream->read (m_ibuffer, length > m_ibuffer_size ? m_ibuffer_size  : length);
    if (nRead == 0)
      break;
    
    // we must monitor the number of bytes actually written to the file. (mscott)
    if (destFile->write(m_ibuffer, nRead) != (PRInt32) nRead) 
    {
      destFile->close();     
      
      // truncate  destination file in case message was partially written
      // ### how to do this with a stream?
      destFileSpec.Truncate(newMsgPos);
      delete destFile;
      return NS_MSG_ERROR_WRITING_MAIL_FOLDER;
    }
    
    length -= nRead;
  }
  
  NS_ASSERTION(length == 0, "didn't read all of original message in filter move");
  delete destFile;
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsParseNewMailState::ApplyFilters ( PRBool pMoved,
nsIMsgWindow msgWindow,
PRUint32  msgOffset 
) [virtual]

Definition at line 1762 of file nsParseMailbox.cpp.

{
  m_msgMovedByFilter = PR_FALSE;
  m_curHdrOffset = msgOffset;

  if (!m_disableFilters)
  {
    nsCOMPtr<nsIMsgDBHdr> msgHdr = m_newMsgHdr;
    nsCOMPtr<nsIMsgFolder> downloadFolder = m_downloadFolder;
    nsCOMPtr <nsIMsgFolder> rootMsgFolder = do_QueryInterface(m_rootFolder);
    if (rootMsgFolder)
    {
      PRUint32 numFolders;
      if (!downloadFolder)
        rootMsgFolder->GetFoldersWithFlag(MSG_FOLDER_FLAG_INBOX, 1, &numFolders, getter_AddRefs(downloadFolder));
      if (downloadFolder)
        downloadFolder->GetURI(getter_Copies(m_inboxUri));
      char * headers = m_headers.GetBuffer();
      PRUint32 headersSize = m_headers.GetBufferPos();
      nsresult matchTermStatus;
      // get nsILocalFile from m_inboxFileSpec
      nsCOMPtr <nsILocalFile> localFile;
      NS_FileSpecToIFile(&m_inboxFileSpec, getter_AddRefs(localFile));
      if (m_filterList)
        matchTermStatus = m_filterList->ApplyFiltersToHdr(nsMsgFilterType::InboxRule,
                    msgHdr, downloadFolder, m_mailDB, headers, headersSize, this, msgWindow, localFile);
      if (!m_msgMovedByFilter && m_deferredToServerFilterList)
      {
        matchTermStatus = m_deferredToServerFilterList->ApplyFiltersToHdr(nsMsgFilterType::InboxRule,
                    msgHdr, downloadFolder, m_mailDB, headers, headersSize, this, msgWindow, localFile);
      }
    }
  }
  if (pMoved)
    *pMoved = m_msgMovedByFilter;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2073 of file nsParseMailbox.cpp.

{
  nsresult rv = NS_OK;
  nsCOMPtr <nsIMsgIncomingServer> server;

  PRInt32 i;
  for (i = 0; i < m_forwardTo.Count(); i++)
  {
    if (!m_forwardTo[i]->IsEmpty())
    {
      nsAutoString forwardStr;
      forwardStr.AssignWithConversion(m_forwardTo[i]->get());

      rv = m_rootFolder->GetServer(getter_AddRefs(server));
      NS_ENSURE_SUCCESS(rv, rv);
      {
        nsCOMPtr <nsIMsgComposeService> compService = do_GetService (NS_MSGCOMPOSESERVICE_CONTRACTID) ;
        if (compService)
          rv = compService->ForwardMessage(forwardStr, m_msgToForwardOrReply, msgWindow, server);
      }
    }
  }
  m_forwardTo.Clear();

  for (i = 0; i < m_replyTemplateUri.Count(); i++)
  {
    if (!m_replyTemplateUri[i]->IsEmpty())
    {
      // copy this and truncate the original, so we don't accidentally re-use it on the next hdr.
      nsCAutoString replyTemplateUri(*m_replyTemplateUri[i]);
      rv = m_rootFolder->GetServer(getter_AddRefs(server));
      if (server && !replyTemplateUri.IsEmpty())
      {
        nsCOMPtr <nsIMsgComposeService> compService = do_GetService (NS_MSGCOMPOSESERVICE_CONTRACTID) ;
        if (compService)
          rv = compService->ReplyWithTemplate(m_msgToForwardOrReply, replyTemplateUri.get(), msgWindow, server);
      }
    }
  }
  m_replyTemplateUri.Clear();
  m_msgToForwardOrReply = nsnull;
  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 850 of file nsParseMailbox.cpp.

{
  // Reset the aggregate headers. Free only the message_header struct since 
  // we don't own the value pointer
  
  for (int i = 0; i < list.Count(); i++)
    PR_Free ((struct message_header*) list.ElementAt(i));
  list.Clear();
}

Here is the caller graph for this function:

Definition at line 249 of file nsParseMailbox.h.

Reimplemented from nsMsgMailboxParser.

Definition at line 1620 of file nsParseMailbox.cpp.

{
  PRBool moved = PR_FALSE;
  /* End of file.  Flush out any partial line remaining in the buffer. */
  if (m_ibuffer_fp > 0) 
  {
    ParseFolderLine(m_ibuffer, m_ibuffer_fp);
    m_ibuffer_fp = 0;
  }
  PublishMsgHeader(nsnull);
  if (!moved && m_mailDB)   // finished parsing, so flush db folder info 
    UpdateDBFolderInfo();
  
    /* We're done reading the folder - we don't need these things
        any more. */
  PR_FREEIF (m_ibuffer);
  m_ibuffer_size = 0;
  PR_FREEIF (m_obuffer);
  m_obuffer_size = 0;
}

Here is the call graph for this function:

Definition at line 2128 of file nsParseMailbox.cpp.

{
  if (m_moveCoalescer)
    m_moveCoalescer->PlaybackMoves();

  // need to do this for all folders that had messages filtered into them
  PRUint32 serverCount = m_filterTargetFolders.Count();
  nsresult rv;
  nsCOMPtr<nsIMsgMailSession> session = 
           do_GetService(NS_MSGMAILSESSION_CONTRACTID, &rv); 
  if (NS_SUCCEEDED(rv) && session) // don't use NS_ENSURE_SUCCESS here - we need to release semaphore below
  {
    for (PRUint32 index = 0; index < serverCount; index++)
    {
      PRBool folderOpen;
      session->IsFolderOpenInWindow(m_filterTargetFolders[index], &folderOpen);
      if (!folderOpen)
      {
        PRUint32 folderFlags;
        m_filterTargetFolders[index]->GetFlags(&folderFlags);
        if (! (folderFlags & (MSG_FOLDER_FLAG_TRASH | MSG_FOLDER_FLAG_INBOX)))
        {
          PRBool filtersRun;
          m_filterTargetFolders[index]->CallFilterPlugins(nsnull, &filtersRun);
          if (!filtersRun)
            m_filterTargetFolders[index]->SetMsgDatabase(nsnull);
        }
      }
    }
  }
  m_filterTargetFolders.Clear();
  return rv;
}

Here is the call graph for this function:

Definition at line 1186 of file nsParseMailbox.cpp.

{
  int status = 0;
  struct message_header *sender;
  struct message_header *recipient;
  struct message_header *subject;
  struct message_header *id;
  struct message_header *inReplyTo;
  struct message_header *replyTo;
  struct message_header *references;
  struct message_header *date;
  struct message_header *statush;
  struct message_header *mozstatus;
  struct message_header *mozstatus2;
  struct message_header *priority;
  struct message_header *keywords;
  struct message_header *account_key;
  struct message_header *ccList;
  struct message_header *mdn_dnt;
  struct message_header md5_header;
  struct message_header *content_type;
  char md5_data [50];
  
  const char *s;
  PRUint32 flags = 0;
  PRUint32 delta = 0;
  nsMsgPriorityValue priorityFlags = nsMsgPriority::notSet;
  PRUint32 labelFlags = 0;
  
  if (!m_mailDB)            // if we don't have a valid db, skip the header.
    return 0;
  
  struct message_header to;
  GetAggregateHeader (m_toList, &to);
  struct message_header cc;
  GetAggregateHeader (m_ccList, &cc);
  
  sender     = (m_from.length          ? &m_from :
  m_sender.length        ? &m_sender :
  m_envelope_from.length ? &m_envelope_from :
  0);
  recipient  = (to.length         ? &to :
  cc.length         ? &cc :
  m_newsgroups.length ? &m_newsgroups :
  sender);
  ccList         = (cc.length ? &cc : 0);
  subject    = (m_subject.length    ? &m_subject    : 0);
  id         = (m_message_id.length ? &m_message_id : 0);
  references = (m_references.length ? &m_references : 0);
  statush    = (m_status.length     ? &m_status     : 0);
  mozstatus  = (m_mozstatus.length  ? &m_mozstatus  : 0);
  mozstatus2 = (m_mozstatus2.length  ? &m_mozstatus2  : 0);
  date       = (m_date.length       ? &m_date :
  m_envelope_date.length ? &m_envelope_date :
  0);
  priority   = (m_priority.length   ? &m_priority   : 0);
  keywords   =  (m_keywords.length   ? &m_keywords  : 0);
  mdn_dnt        = (m_mdn_dnt.length        ? &m_mdn_dnt         : 0);
  inReplyTo = (m_in_reply_to.length ? &m_in_reply_to : 0);
  replyTo = (m_replyTo.length ? &m_replyTo : 0);
  content_type = (m_content_type.length ? &m_content_type : 0);
  account_key = (m_account_key.length ? &m_account_key :0);
  
  if (mozstatus) 
  {
    if (strlen(mozstatus->value) == 4) 
    {
      int i;
      for (i=0,s=mozstatus->value ; i<4 ; i++,s++) 
      {
        flags = (flags << 4) | msg_UnHex(*s);
      }
      // strip off and remember priority bits.
      flags &= ~MSG_FLAG_RUNTIME_ONLY;
      priorityFlags = (nsMsgPriorityValue) ((flags & MSG_FLAG_PRIORITIES) >> 13);
      flags &= ~MSG_FLAG_PRIORITIES;
    }
    delta = (m_headerstartpos +
      (mozstatus->value - m_headers.GetBuffer()) -
      (2 + X_MOZILLA_STATUS_LEN)          /* 2 extra bytes for ": ". */
      ) - m_envelope_pos;
  }
  
  if (mozstatus2)
  {
    PRUint32 flags2 = 0;
    sscanf(mozstatus2->value, " %x ", &flags2);
    flags |= flags2;
  }
  
  if (!(flags & MSG_FLAG_EXPUNGED))       // message was deleted, don't bother creating a hdr.
  {
    nsresult ret = m_mailDB->CreateNewHdr(m_envelope_pos, getter_AddRefs(m_newMsgHdr));
    if (NS_SUCCEEDED(ret) && m_newMsgHdr)
    {
      PRUint32 origFlags;
      (void)m_newMsgHdr->GetFlags(&origFlags);
      if (origFlags & MSG_FLAG_HAS_RE)
        flags |= MSG_FLAG_HAS_RE;
      else
        flags &= ~MSG_FLAG_HAS_RE;
      
      flags &= ~MSG_FLAG_OFFLINE; // don't keep MSG_FLAG_OFFLINE for local msgs
      if (mdn_dnt && !(origFlags & MSG_FLAG_READ) &&
          !(origFlags & MSG_FLAG_MDN_REPORT_SENT) &&
          !(flags & MSG_FLAG_MDN_REPORT_SENT))
        flags |= MSG_FLAG_MDN_REPORT_NEEDED;
      
      m_newMsgHdr->SetFlags(flags);
      if (priorityFlags != nsMsgPriority::notSet)
        m_newMsgHdr->SetPriority(priorityFlags);
  
      // if we have a reply to header, and it's different from the from: header,
      // set the "replyTo" attribute on the msg hdr.
      if (replyTo && (!sender || replyTo->length != sender->length || strncmp(replyTo->value, sender->value, sender->length)))
        m_newMsgHdr->SetStringProperty("replyTo", replyTo->value);
      // convert the flag values (0xE000000) to label values (0-5)
      if (mozstatus2) // only do this if we have a mozstatus2 header
      {
        labelFlags = ((flags & MSG_FLAG_LABELS) >> 25);
        m_newMsgHdr->SetLabel(labelFlags);
      }
      if (delta < 0xffff) 
      {              /* Only use if fits in 16 bits. */
        m_newMsgHdr->SetStatusOffset((PRUint16) delta);
        if (!m_IgnoreXMozillaStatus) {    // imap doesn't care about X-MozillaStatus
          PRUint32 offset;
          (void)m_newMsgHdr->GetStatusOffset(&offset);
          NS_ASSERTION(offset < 10000, "invalid status offset"); /* ### Debugging hack */
        }
      }
      if (sender)
        m_newMsgHdr->SetAuthor(sender->value);
      if (recipient == &m_newsgroups)
      {
      /* In the case where the recipient is a newsgroup, truncate the string
      at the first comma.  This is used only for presenting the thread list,
      and newsgroup lines tend to be long and non-shared, and tend to bloat
      the string table.  So, by only showing the first newsgroup, we can
      reduce memory and file usage at the expense of only showing the one
      group in the summary list, and only being able to sort on the first
        group rather than the whole list.  It's worth it. */
        char * ch;
        NS_ASSERTION (recipient->length == (PRUint16) strlen(recipient->value), "invalid recipient");
        ch = PL_strchr(recipient->value, ',');
        if (ch)
        {
          /* generate a new string that terminates before the , */
          nsCAutoString firstGroup;
          firstGroup.Assign(recipient->value, ch - recipient->value);
          m_newMsgHdr->SetRecipients(firstGroup.get());
        }
        m_newMsgHdr->SetRecipients(recipient->value);
      }
      else if (recipient)
      {
        // note that we're now setting the whole recipient list,
        // not just the pretty name of the first recipient.
        PRUint32 numAddresses;
        char  *names;
        char  *addresses;
        
        ret = m_HeaderAddressParser->ParseHeaderAddresses (nsnull, recipient->value, &names, &addresses, &numAddresses);
        if (ret == NS_OK)
        {
          m_newMsgHdr->SetRecipientsArray(names, addresses, numAddresses);
          PR_Free(addresses);
          PR_Free(names);
        }
        else {       // hmm, should we just use the original string?
          m_newMsgHdr->SetRecipients(recipient->value);
        }
      }
      if (ccList)
      {
        PRUint32 numAddresses;
        char  *names;
        char  *addresses;
        
        ret = m_HeaderAddressParser->ParseHeaderAddresses (nsnull, ccList->value, &names, &addresses, &numAddresses);
        if (ret == NS_OK)
        {
          m_newMsgHdr->SetCCListArray(names, addresses, numAddresses);
          PR_Free(addresses);
          PR_Free(names);
        }
        else  // hmm, should we just use the original string?
          m_newMsgHdr->SetCcList(ccList->value);
      }
      status = InternSubject (subject);
      if (status >= 0)
      {
        if (! id)
        {
          // what to do about this? we used to do a hash of all the headers...
          nsCAutoString hash;
          const char *md5_bin = "dummy message id";
          nsresult rv;
          nsCOMPtr<nsICryptoHash> hasher = do_CreateInstance("@mozilla.org/security/hash;1", &rv);
          if (NS_SUCCEEDED(rv))
          {
            if (NS_SUCCEEDED(hasher->Init(nsICryptoHash::MD5)) && 
              NS_SUCCEEDED(hasher->Update((const PRUint8*) m_headers.GetBuffer(), m_headers.GetSize())) &&
              NS_SUCCEEDED(hasher->Finish(PR_FALSE, hash)))
                  md5_bin = hash.get();
          }
          PR_snprintf (md5_data, sizeof(md5_data),
            "<md5:"
            "%02X%02X%02X%02X%02X%02X%02X%02X"
            "%02X%02X%02X%02X%02X%02X%02X%02X"
            ">",
            md5_bin[0], md5_bin[1], md5_bin[2], md5_bin[3],
            md5_bin[4], md5_bin[5], md5_bin[6], md5_bin[7],
            md5_bin[8], md5_bin[9], md5_bin[10],md5_bin[11],
            md5_bin[12],md5_bin[13],md5_bin[14],md5_bin[15]);
          md5_header.value = md5_data;
          md5_header.length = strlen(md5_data);
          id = &md5_header;
        }
        
        /* Take off <> around message ID. */
        if (id->value[0] == '<')
          id->value++, id->length--;

        if (id->value[id->length-1] == '>') {
          /* generate a new null-terminated string without the final > */
          nsCAutoString rawMsgId;
          rawMsgId.Assign(id->value, id->length - 1);
          m_newMsgHdr->SetMessageId(rawMsgId.get());
        } else {
          m_newMsgHdr->SetMessageId(id->value);
        }

        if (!mozstatus && statush)
        {
          /* Parse a little bit of the Berkeley Mail status header. */
          for (s = statush->value; *s; s++) {
            PRUint32 msgFlags = 0;
            (void)m_newMsgHdr->GetFlags(&msgFlags);
            switch (*s)
            {
            case 'R': case 'r':
              m_newMsgHdr->SetFlags(msgFlags | MSG_FLAG_READ);
              break;
            case 'D': case 'd':
              /* msg->flags |= MSG_FLAG_EXPUNGED;  ### Is this reasonable? */
              break;
            case 'N': case 'n':
            case 'U': case 'u':
              m_newMsgHdr->SetFlags(msgFlags & ~MSG_FLAG_READ);
              break;
            }
          }
        }
  
        if (account_key != nsnull)
          m_newMsgHdr->SetAccountKey(account_key->value);
        // use in-reply-to header as references, if there's no references header
        if (references != nsnull)
          m_newMsgHdr->SetReferences(references->value);
        else if (inReplyTo != nsnull)
          m_newMsgHdr->SetReferences(inReplyTo->value);
        
        if (!LL_IS_ZERO(m_receivedTime) && (!date || m_useReceivedDate))
          m_newMsgHdr->SetDate(m_receivedTime);
        else
        {
          // if there's no date, or it's mal-formed, use now as the time.
          // PR_ParseTimeString won't touch resultTime unless it succeeds.
          // (this doesn't affect local messages, because we use the envelope
          // date if there's no Date: header, but it would affect IMAP msgs
          // w/o a Date: hdr or Received: headers)
          PRTime resultTime = PR_Now();
          if (date)
            PR_ParseTimeString (date->value, PR_FALSE, &resultTime);
          m_newMsgHdr->SetDate(resultTime);
        }

        if (priority)
          m_newMsgHdr->SetPriorityString(priority->value);
        else if (priorityFlags == nsMsgPriority::notSet)
          m_newMsgHdr->SetPriority(nsMsgPriority::none);
        if (keywords)
          m_newMsgHdr->SetStringProperty("keywords", keywords->value);
        for (PRInt32 i = 0; i < m_customDBHeaders.Count(); i++)
        {
          if (m_customDBHeaderValues[i].length)
            m_newMsgHdr->SetStringProperty((m_customDBHeaders[i])->get(), m_customDBHeaderValues[i].value);
        }
        if (content_type)
        {
          char *substring = PL_strstr(content_type->value, "charset");
          if (substring)
          {
            char *charset = PL_strchr (substring, '=');
            if (charset)
            {
              charset++;
              /* strip leading whitespace and double-quote */
              while (*charset && (IS_SPACE (*charset) || '\"' == *charset))
                charset++;
              /* strip trailing whitespace and double-quote */
              char *end = charset;
              while (*end && !IS_SPACE (*end) && '\"' != *end && ';' != *end)
                end++;
              if (*charset)
              {
                if (*end != '\0') {
                  // if we're not at the very end of the line, we need
                  // to generate a new string without the trailing crud
                  nsCAutoString rawCharSet;
                  rawCharSet.Assign(charset, end - charset);
                  m_newMsgHdr->SetCharset(rawCharSet.get());
                } else {
                  m_newMsgHdr->SetCharset(charset);
                }
              }
            }
          }
          substring = PL_strcasestr(content_type->value, "multipart/mixed");
          if (substring)
          {
            PRUint32 newFlags;
            m_newMsgHdr->OrFlags(MSG_FLAG_ATTACHMENT, &newFlags);
          }
        }
      }
    } 
    else
    {
      NS_ASSERTION(PR_FALSE, "error creating message header");
      status = NS_ERROR_OUT_OF_MEMORY;    
    }
  }
  else
    status = 0;

  //### why is this stuff const?
  char *tmp = (char*) to.value;
  PR_Free(tmp);
  tmp = (char*) cc.value;
  PR_Free(tmp);

  return status;
}

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 nsMsgMailboxParser::FreeBuffers ( ) [protected, inherited]

Definition at line 337 of file nsParseMailbox.cpp.

{
       /* We're done reading the folder - we don't need these things
        any more. */
       PR_FREEIF (m_obuffer);
       m_obuffer_size = 0;
}

Here is the caller graph for this function:

void nsParseMailMessageState::GetAggregateHeader ( nsVoidArray list,
struct message_header outHeader 
) [inherited]

Definition at line 806 of file nsParseMailbox.cpp.

{
  // When parsing a message with multiple To or CC header lines, we're storing each line in a 
  // list, where the list represents the "aggregate" total of all the header. Here we combine
  // all the lines together, as though they were really all found on the same line
  
  struct message_header *header = nsnull;
  int length = 0;
  int i;
  
  // Count up the bytes required to allocate the aggregated header
  for (i = 0; i < list.Count(); i++)
  {
    header = (struct message_header*) list.ElementAt(i);
    length += (header->length + 1); //+ for ","
    NS_ASSERTION(header->length == (PRInt32)strlen(header->value), "header corrupted");
  }
  
  if (length > 0)
  {
    char *value = (char*) PR_MALLOC (length + 1); //+1 for null term
    if (value)
    {
      // Catenate all the To lines together, separated by commas
      value[0] = '\0';
      int size = list.Count();
      for (i = 0; i < size; i++)
      {
        header = (struct message_header*) list.ElementAt(i);
        PL_strcat (value, header->value);
        if (i + 1 < size)
          PL_strcat (value, ",");
      }
      outHeader->length = length;
      outHeader->value = value;
    }
  }
  else
  {
    outHeader->length = 0;
    outHeader->value = nsnull;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_DECL_NSIMSGFILTERHITNOTIFY nsOutputFileStream* nsParseNewMailState::GetLogFile ( )

Definition at line 1612 of file nsParseMailbox.cpp.

{
  NS_IF_ADDREF(*aMsgWindow = m_msgWindow);
}

Definition at line 795 of file nsParseMailbox.cpp.

{
  // When parsing a message with multiple To or CC header lines, we're storing each line in a 
  // list, where the list represents the "aggregate" total of all the header. Here we get a new
  // line for the list
  
  struct message_header *header = (struct message_header*) PR_Calloc (1, sizeof(struct message_header));
  list.AppendElement (header);
  return header;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsParseNewMailState::GetTrashFolder ( nsIMsgFolder **  pTrashFolder) [protected, virtual]

Definition at line 1739 of file nsParseMailbox.cpp.

{
  nsresult rv=NS_ERROR_UNEXPECTED;
  if (!pTrashFolder)
    return NS_ERROR_NULL_POINTER;
  
  if(m_downloadFolder)
  {
    nsCOMPtr <nsIMsgIncomingServer> incomingServer;
    m_downloadFolder->GetServer(getter_AddRefs(incomingServer));
    nsCOMPtr <nsIMsgFolder> rootMsgFolder;
    incomingServer->GetRootMsgFolder(getter_AddRefs(rootMsgFolder));
    if (rootMsgFolder)
    {
      PRUint32 numFolders;
      rv = rootMsgFolder->GetFoldersWithFlag(MSG_FOLDER_FLAG_TRASH, 1, &numFolders, pTrashFolder);
      if (*pTrashFolder)
        NS_ADDREF(*pTrashFolder);
    }
  }
  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRInt32 nsMsgMailboxParser::HandleLine ( char *  line,
PRUint32  line_length 
) [virtual, inherited]

Definition at line 399 of file nsParseMailbox.cpp.

{
       int status = 0;

       /* If this is the very first line of a non-empty folder, make sure it's an envelope */
       if (m_graph_progress_received == 0)
       {
              /* This is the first block from the file.  Check to see if this
                 looks like a mail file. */
              const char *s = line;
              const char *end = s + lineLength;
              while (s < end && IS_SPACE(*s))
                     s++;
              if ((end - s) < 20 || !IsEnvelopeLine(s, end - s))
              {
//                   char buf[500];
//                   PR_snprintf (buf, sizeof(buf),
//                                         XP_GetString(MK_MSG_NON_MAIL_FILE_READ_QUESTION),
//                                         folder_name);
//                   else if (!FE_Confirm (m_context, buf))
//                          return NS_MSG_NOT_A_MAIL_FOLDER; /* #### NOT_A_MAIL_FILE */
              }
       }
//     m_graph_progress_received += lineLength;

       // mailbox parser needs to do special stuff when it finds an envelope
       // after parsing a message body. So do that.
       if (line[0] == 'F' && IsEnvelopeLine(line, lineLength))
       {
              // **** This used to be
              // PR_ASSERT (m_parseMsgState->m_state == nsMailboxParseBodyState);
              // **** I am not sure this is a right thing to do. This happens when
              // going online, downloading a message while playing back append
              // draft/template offline operation. We are mixing
        // nsMailboxParseBodyState &&
              // nsMailboxParseHeadersState. David I need your help here too. **** jt

              NS_ASSERTION (m_state == nsIMsgParseMailMsgState::ParseBodyState ||
                               m_state == nsIMsgParseMailMsgState::ParseHeadersState, "invalid parse state"); /* else folder corrupted */
              PublishMsgHeader(nsnull);
              Clear();
              status = StartNewEnvelope(line, lineLength);
              NS_ASSERTION(status >= 0, " error starting envelope parsing mailbox");
              // at the start of each new message, update the progress bar
              UpdateProgressPercent();
              if (status < 0)
                     return status;
       }
       // otherwise, the message parser can handle it completely.
       else if (m_mailDB != nsnull)       // if no DB, do we need to parse at all?
              return ParseFolderLine(line, lineLength);
        else
          return NS_ERROR_NULL_POINTER; // need to error out if we don't have a db.

       return 0;

}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsParseMailMessageState::Init ( PRUint32  fileposition) [inherited]
nsresult nsParseNewMailState::Init ( nsIMsgFolder rootFolder,
nsIMsgFolder downloadFolder,
nsFileSpec folder,
nsIOFileStream inboxFileStream,
nsIMsgWindow aMsgWindow,
PRBool  downloadingToTempFile 
)

Definition at line 1546 of file nsParseMailbox.cpp.

{
  nsresult rv;
  m_position = folder.GetFileSize();
  m_rootFolder = serverFolder;
  m_inboxFileSpec = folder;
  m_inboxFileStream = inboxFileStream;
  m_msgWindow = aMsgWindow;
  m_downloadFolder = downloadFolder;
  m_downloadingToTempFile = downloadingToTempFile;

  // the new mail parser isn't going to get the stream input, it seems, so we can't use
  // the OnStartRequest mechanism the mailbox parser uses. So, let's open the db right now.
  nsCOMPtr<nsIMsgDBService> msgDBService = do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
  if (msgDBService)
  {
    nsCOMPtr <nsIFileSpec> dbFileSpec;
    NS_NewFileSpecWithSpec(folder, getter_AddRefs(dbFileSpec));
    rv = msgDBService->OpenFolderDB(downloadFolder, PR_TRUE, PR_FALSE, (nsIMsgDatabase **) getter_AddRefs(m_mailDB));
  }
  //   rv = nsMailDatabase::Open(folder, PR_TRUE, &m_mailDB, PR_FALSE);
  if (NS_FAILED(rv)) 
    return rv;
  
  nsCOMPtr <nsIMsgFolder> rootMsgFolder = do_QueryInterface(serverFolder, &rv);
  NS_ENSURE_SUCCESS(rv, rv);
  
  nsCOMPtr<nsIMsgIncomingServer> server;
  rv = rootMsgFolder->GetServer(getter_AddRefs(server));
  if (NS_SUCCEEDED(rv)) 
  {
    rv = server->GetFilterList(aMsgWindow, getter_AddRefs(m_filterList));
  
    if (m_filterList) 
    {
      rv = server->ConfigureTemporaryFilters(m_filterList);
    }
    // check if this server defers to another server, in which case
    // we'll use that server's filters as well.
    nsCOMPtr <nsIMsgFolder> deferredToRootFolder;
    server->GetRootMsgFolder(getter_AddRefs(deferredToRootFolder));
    if (rootMsgFolder != deferredToRootFolder)
    {
      nsCOMPtr <nsIMsgIncomingServer> deferredToServer;
      deferredToRootFolder->GetServer(getter_AddRefs(deferredToServer));
      if (deferredToServer)
        deferredToServer->GetFilterList(aMsgWindow, getter_AddRefs(m_deferredToServerFilterList));
    }
  }
  m_disableFilters = PR_FALSE;
  return NS_OK; 
}

Here is the call graph for this function:

nsresult nsParseMailMessageState::InternRfc822 ( struct message_header header,
char **  ret_name 
) [inherited]

Definition at line 1161 of file nsParseMailbox.cpp.

{
  char *s;
  nsresult ret=NS_OK;
  
  if (!header || header->length == 0)
    return NS_OK;
  
  NS_ASSERTION (header->length == (short) strlen (header->value), "invalid message_header");
  NS_ASSERTION (ret_name != nsnull, "null ret_name");
  
  if (m_HeaderAddressParser)
  {
    ret = m_HeaderAddressParser->ExtractHeaderAddressName (nsnull, header->value, &s);
    if (! s)
      return NS_ERROR_OUT_OF_MEMORY;
    
    *ret_name = s;
  }
  return ret;
}
int nsParseMailMessageState::InternSubject ( struct message_header header) [inherited]

Definition at line 1110 of file nsParseMailbox.cpp.

{
  char *key;
  PRUint32 L;
  
  if (!header || header->length == 0)
  {
    m_newMsgHdr->SetSubject("");
    return 0;
  }
  
  NS_ASSERTION (header->length == (short) strlen(header->value), "subject corrupt while parsing message");
  
  key = (char *) header->value;  /* #### const evilness */
  
  L = header->length;
  
  
  PRUint32 flags;
  (void)m_newMsgHdr->GetFlags(&flags);
  /* strip "Re: " */
  /* We trust the X-Mozilla-Status line to be the smartest in almost
        all things.  One exception, however, is the HAS_RE flag.  Since
         we just parsed the subject header anyway, we expect that parsing
         to be smartest.  (After all, what if someone just went in and
        edited the subject line by hand?) */
  nsXPIDLCString modifiedSubject;
  if (NS_MsgStripRE((const char **) &key, &L, getter_Copies(modifiedSubject)))
    flags |= MSG_FLAG_HAS_RE;
  else
    flags &= ~MSG_FLAG_HAS_RE;
  m_newMsgHdr->SetFlags(flags); // this *does not* update the mozilla-status header in the local folder
  
  //  if (!*key) return 0; /* To catch a subject of "Re:" */
  
  // Condense the subject text into as few MIME-2 encoded words as possible.
#ifdef WE_CONDENSE_MIME_STRINGS
  char *condensedKey = msg_condense_mime2_string(modifiedSubject.IsEmpty() ? key : modifiedSubject.get());
#else
  char *condensedKey = nsnull;
#endif
  m_newMsgHdr->SetSubject(condensedKey ? condensedKey : 
  (modifiedSubject.IsEmpty() ? key : modifiedSubject.get()));
  PR_FREEIF(condensedKey);
  
  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool nsParseMailMessageState::IsEnvelopeLine ( const char *  buf,
PRInt32  buf_size 
) [static, inherited]

Definition at line 660 of file nsParseMailbox.cpp.

{
#ifdef STRICT_ENVELOPE
  /* The required format is
          From jwz  Fri Jul  1 09:13:09 1994
        But we should also allow at least:
          From jwz  Fri, Jul 01 09:13:09 1994
          From jwz  Fri Jul  1 09:13:09 1994 PST
          From jwz  Fri Jul  1 09:13:09 1994 (+0700)

        We can't easily call XP_ParseTimeString() because the string is not
        null terminated (ok, we could copy it after a quick check...) but
        XP_ParseTimeString() may be too lenient for our purposes.

        DANGER!!  The released version of 2.0b1 was (on some systems,
        some Unix, some NT, possibly others) writing out envelope lines
        like "From - 10/13/95 11:22:33" which STRICT_ENVELOPE will reject!
   */
  const char *date, *end;

  if (buf_size < 29) return PR_FALSE;
  if (*buf != 'F') return PR_FALSE;
  if (strncmp(buf, "From ", 5)) return PR_FALSE;

  end = buf + buf_size;
  date = buf + 5;

  /* Skip horizontal whitespace between "From " and user name. */
  while ((*date == ' ' || *date == '\t') && date < end)
       date++;

  /* If at the end, it doesn't match. */
  if (IS_SPACE(*date) || date == end)
       return PR_FALSE;

  /* Skip over user name. */
  while (!IS_SPACE(*date) && date < end)
       date++;

  /* Skip horizontal whitespace between user name and date. */
  while ((*date == ' ' || *date == '\t') && date < end)
       date++;

  /* Don't want this to be localized. */
# define TMP_ISALPHA(x) (((x) >= 'A' && (x) <= 'Z') || \
                                           ((x) >= 'a' && (x) <= 'z'))

  /* take off day-of-the-week. */
  if (date >= end - 3)
       return PR_FALSE;
  if (!TMP_ISALPHA(date[0]) || !TMP_ISALPHA(date[1]) || !TMP_ISALPHA(date[2]))
       return PR_FALSE;
  date += 3;
  /* Skip horizontal whitespace (and commas) between dotw and month. */
  if (*date != ' ' && *date != '\t' && *date != ',')
       return PR_FALSE;
  while ((*date == ' ' || *date == '\t' || *date == ',') && date < end)
       date++;

  /* take off month. */
  if (date >= end - 3)
       return PR_FALSE;
  if (!TMP_ISALPHA(date[0]) || !TMP_ISALPHA(date[1]) || !TMP_ISALPHA(date[2]))
       return PR_FALSE;
  date += 3;
  /* Skip horizontal whitespace between month and dotm. */
  if (date == end || (*date != ' ' && *date != '\t'))
       return PR_FALSE;
  while ((*date == ' ' || *date == '\t') && date < end)
       date++;

  /* Skip over digits and whitespace. */
  while (((*date >= '0' && *date <= '9') || *date == ' ' || *date == '\t') &&
               date < end)
       date++;
  /* Next character should be a colon. */
  if (date >= end || *date != ':')
       return PR_FALSE;

  /* Ok, that ought to be enough... */

# undef TMP_ISALPHA

#else  /* !STRICT_ENVELOPE */

  if (buf_size < 5) return PR_FALSE;
  if (*buf != 'F') return PR_FALSE;
  if (strncmp(buf, "From ", 5)) return PR_FALSE;

#endif /* !STRICT_ENVELOPE */

  return PR_TRUE;
}

Here is the caller graph for this function:

PRBool nsMsgMailboxParser::IsRunningUrl ( ) [inline, inherited]

Definition at line 182 of file nsParseMailbox.h.

{ return m_urlInProgress;} // returns true if we are currently running a url and false otherwise...
void nsParseNewMailState::LogRuleHit ( nsIMsgFilter filter,
nsIMsgDBHdr msgHdr 
) [protected]
int nsParseNewMailState::MarkFilteredMessageRead ( nsIMsgDBHdr msgHdr) [protected, virtual]

Definition at line 2118 of file nsParseMailbox.cpp.

{
  PRUint32 newFlags;
  if (m_mailDB)
    m_mailDB->MarkHdrRead(msgHdr, PR_TRUE, nsnull);
  else
    msgHdr->OrFlags(MSG_FLAG_READ, &newFlags);
  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsParseNewMailState::MoveIncorporatedMessage ( nsIMsgDBHdr mailHdr,
nsIMsgDatabase sourceDB,
nsIMsgFolder destIFolder,
nsIMsgFilter filter,
nsIMsgWindow msgWindow 
) [protected, virtual]

Definition at line 2218 of file nsParseMailbox.cpp.

{
  nsresult err = 0;
  
  // check if the destination is a real folder (by checking for null parent)
  // and if it can file messages (e.g., servers or news folders can't file messages).
  // Or read only imap folders...
  PRBool canFileMessages = PR_TRUE;
  nsCOMPtr<nsIMsgFolder> parentFolder;
  destIFolder->GetParent(getter_AddRefs(parentFolder));
  if (parentFolder)
    destIFolder->GetCanFileMessages(&canFileMessages);
  if (!parentFolder || !canFileMessages)
  {
    if (filter)
    {
      filter->SetEnabled(PR_FALSE);
      // we need to explicitly save the filter file.
      if (m_filterList)
        m_filterList->SaveToDefaultFile();
      destIFolder->ThrowAlertMsg("filterDisabled", msgWindow);
    }
    return NS_MSG_NOT_A_MAIL_FOLDER;
  }
  
  nsCOMPtr <nsIMsgLocalMailFolder> destLocalFolder = do_QueryInterface(destIFolder);
  if (destLocalFolder)
  {
    PRBool destFolderTooBig;
    destLocalFolder->WarnIfLocalFileTooBig(msgWindow, &destFolderTooBig);
    if (destFolderTooBig)
      return NS_MSG_ERROR_WRITING_MAIL_FOLDER;
  }
  nsCOMPtr <nsIFileSpec> destIFolderSpec;

  nsFileSpec destFolderSpec;
  destIFolder->GetPath(getter_AddRefs(destIFolderSpec));
  err = destIFolderSpec->GetFileSpec(&destFolderSpec);
  
  if (NS_FAILED(err))
    return err;
  
  nsCOMPtr <nsISupports> myISupports = do_QueryInterface(NS_STATIC_CAST(nsIMsgParseMailMsgState*, this));
  
  //   NS_RELEASE(myThis);
  // Make sure no one else is writing into this folder
  if (destIFolder && (err = destIFolder->AcquireSemaphore (myISupports)) != 0)
  {
    destIFolder->ThrowAlertMsg("filterFolderDeniedLocked", msgWindow);
    return err;
  }
  
  NS_ASSERTION(m_inboxFileStream != 0, "no input file stream");
  if (m_inboxFileStream == 0)
  {
#ifdef DEBUG_bienvenu
    NS_ASSERTION(PR_FALSE, "couldn't get source file in move filter");
#endif
    if (destIFolder)
      destIFolder->ReleaseSemaphore (myISupports);
    
    return NS_MSG_FOLDER_UNREADABLE;      // ### dmb
  }
  
  m_inboxFileStream->seek(PR_SEEK_SET, m_curHdrOffset);
  PRUint32 newMsgPos = destFolderSpec.GetFileSize();
  
  nsCOMPtr<nsIMsgLocalMailFolder> localFolder = do_QueryInterface(destIFolder);
  nsCOMPtr<nsIMsgDatabase> destMailDB;
  
  if (!localFolder)
    return NS_MSG_POP_FILTER_TARGET_ERROR;
  
  nsresult rv = localFolder->GetDatabaseWOReparse(getter_AddRefs(destMailDB));
  NS_ASSERTION(destMailDB, "failed to open mail db parsing folder");
  // don't force upgrade in place - open the db here before we start writing to the 
  // destination file because XP_Stat can return file size including bytes written...

  PRUint32 messageLength;
  mailHdr->GetMessageSize(&messageLength);
  rv = AppendMsgFromFile(m_inboxFileStream, m_curHdrOffset, messageLength, destFolderSpec);

  if (NS_FAILED(rv))
  {
    if (destMailDB)
      destMailDB->Close(PR_TRUE);

    if (destIFolder)
    {
      destIFolder->ReleaseSemaphore(myISupports);
      destIFolder->ThrowAlertMsg("filterFolderWriteFailed", msgWindow);
    }
    return NS_MSG_ERROR_WRITING_MAIL_FOLDER;
  }
    
  PRBool movedMsgIsNew = PR_FALSE;
  // if we have made it this far then the message has successfully been written to the new folder
  // now add the header to the destMailDB.
  if (NS_SUCCEEDED(rv) && destMailDB)
  {
    nsCOMPtr <nsIMsgDBHdr> newHdr;
    
    nsresult msgErr = destMailDB->CopyHdrFromExistingHdr(newMsgPos, mailHdr, PR_FALSE, getter_AddRefs(newHdr));
    if (NS_SUCCEEDED(msgErr) && newHdr)
    {
      PRUint32 newFlags;
      // set new byte offset, since the offset in the old file is certainly wrong
      newHdr->SetMessageKey (newMsgPos); 
      newHdr->GetFlags(&newFlags);
      if (! (newFlags & MSG_FLAG_READ))
      {
        nsXPIDLCString junkScoreStr;
        (void) newHdr->GetStringProperty("junkscore", getter_Copies(junkScoreStr));
        if (atoi(junkScoreStr.get()) < 50)
        {
          newHdr->OrFlags(MSG_FLAG_NEW, &newFlags);
          destMailDB->AddToNewList(newMsgPos);
          movedMsgIsNew = PR_TRUE;
        }
      }
      destMailDB->AddNewHdrToDB(newHdr, PR_TRUE);
      NotifyGlobalListeners(newHdr);
      m_msgToForwardOrReply = newHdr;
    }
  }
  else
  {
    if (destMailDB)
      destMailDB = nsnull;
  }
  if (movedMsgIsNew)
    destIFolder->SetHasNewMessages(PR_TRUE);
  if (m_filterTargetFolders.IndexOf(destIFolder) == kNotFound)
    m_filterTargetFolders.AppendObject(destIFolder);
  m_inboxFileStream->close();

  nsresult truncRet = m_inboxFileSpec.Truncate(m_curHdrOffset);
  NS_ASSERTION(NS_SUCCEEDED(truncRet), "unable to truncate file");
  if (NS_FAILED(truncRet))
   destIFolder->ThrowAlertMsg("filterFolderTruncateFailed", msgWindow);
  else
    // tell parser that we've truncated the Inbox
    nsParseMailMessageState::Init(m_curHdrOffset);

  //  need to re-open the inbox file stream.
  m_inboxFileStream->Open(m_inboxFileSpec, (PR_RDWR | PR_CREATE_FILE));
  if (m_inboxFileStream)
    m_inboxFileStream->seek(m_inboxFileSpec.GetFileSize());
  
  if (destIFolder)
    destIFolder->ReleaseSemaphore (myISupports);
  
  
  (void) localFolder->RefreshSizeOnDisk();
  if (destIFolder)
    destIFolder->SetFlag(MSG_FOLDER_FLAG_GOT_NEW);
  
  if (destMailDB != nsnull)
  {
    // update the folder size so we won't reparse.
    UpdateDBFolderInfo(destMailDB);
    if (destIFolder != nsnull)
      destIFolder->UpdateSummaryTotals(PR_TRUE);
    
    destMailDB->Commit(nsMsgDBCommitType::kLargeCommit);
  }  
  return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int nsParseMailMessageState::msg_UnHex ( char  C) [inline, static, inherited]

Definition at line 167 of file nsParseMailbox.h.

{
       return ((C >= '0' && C <= '9') ? C - '0' :
              ((C >= 'A' && C <= 'F') ? C - 'A' + 10 :
               ((C >= 'a' && C <= 'f') ? C - 'a' + 10 : 0)));
}

Here is the caller graph for this function:

Definition at line 1731 of file nsParseMailbox.cpp.

{
  if (!m_notificationService)
    m_notificationService = do_GetService("@mozilla.org/messenger/msgnotificationservice;1");
  if (m_notificationService)
    m_notificationService->NotifyItemAdded(newHdr);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIStreamListener::onDataAvailable ( in nsIRequest  aRequest,
in nsISupports  aContext,
in nsIInputStream  aInputStream,
in unsigned long  aOffset,
in unsigned long  aCount 
) [inherited]

Called when the next chunk of data (corresponding to the request) may be read without blocking the calling thread.

The onDataAvailable impl must read exactly |aCount| bytes of data before returning.

Parameters:
aRequestrequest corresponding to the source of the data
aContextuser defined context
aInputStreaminput stream containing the data chunk
aOffsetNumber of bytes that were sent in previous onDataAvailable calls for this request. In other words, the sum of all previous count parameters. If that number is greater than or equal to 2^32, this parameter will be PR_UINT32_MAX (2^32 - 1).
aCountnumber of bytes available in the stream

NOTE: The aInputStream parameter must implement readSegments.

An exception thrown from onDataAvailable has the side-effect of causing the request to be canceled.

void nsIDBChangeListener::onHdrAdded ( in nsIMsgDBHdr  aHdrChanged,
in nsMsgKey  aParentKey,
in long  aFlags,
in nsIDBChangeListener  aInstigator 
) [inherited]
void nsIDBChangeListener::onHdrChange ( in nsIMsgDBHdr  aHdrChanged,
in unsigned long  aOldFlags,
in unsigned long  aNewFlags,
in nsIDBChangeListener  aInstigator 
) [inherited]
void nsIDBChangeListener::onHdrDeleted ( in nsIMsgDBHdr  aHdrChanged,
in nsMsgKey  aParentKey,
in long  aFlags,
in nsIDBChangeListener  aInstigator 
) [inherited]
void nsIDBChangeListener::onParentChanged ( in nsMsgKey  aKeyChanged,
in nsMsgKey  oldParent,
in nsMsgKey  newParent,
in nsIDBChangeListener  aInstigator 
) [inherited]
void nsIRequestObserver::onStartRequest ( in nsIRequest  aRequest,
in nsISupports  aContext 
) [inherited]

Called to signify the beginning of an asynchronous request.

Parameters:
aRequestrequest being observed
aContextuser defined context

An exception thrown from onStartRequest has the side-effect of causing the request to be canceled.

Here is the caller graph for this function:

void nsIRequestObserver::onStopRequest ( in nsIRequest  aRequest,
in nsISupports  aContext,
in nsresult  aStatusCode 
) [inherited]

Called to signify the end of an asynchronous request.

This call is always preceded by a call to onStartRequest.

Parameters:
aRequestrequest being observed
aContextuser defined context
aStatusCodereason for stopping (NS_OK if completed successfully)

An exception thrown from onStopRequest is generally ignored.

Here is the caller graph for this function:

void nsIMsgParseMailMsgState::ParseAFolderLine ( in string  line,
in unsigned long  lineLength 
) [inherited]
int nsParseMailMessageState::ParseEnvelope ( const char *  line,
PRUint32  line_size 
) [inherited]

Definition at line 1066 of file nsParseMailbox.cpp.

{
  const char *end;
  char *s;
  
  m_envelope.AppendBuffer(line, line_size);
  end = m_envelope.GetBuffer() + line_size;
  s = m_envelope.GetBuffer() + 5;
  
  while (s < end && IS_SPACE (*s))
    s++;
  m_envelope_from.value = s;
  while (s < end && !IS_SPACE (*s))
    s++;
  m_envelope_from.length = s - m_envelope_from.value;
  
  while (s < end && IS_SPACE (*s))
    s++;
  m_envelope_date.value = s;
  m_envelope_date.length = (PRUint16) (line_size - (s - m_envelope.GetBuffer()));
  while (IS_SPACE (m_envelope_date.value [m_envelope_date.length - 1]))
    m_envelope_date.length--;
  
  /* #### short-circuit const */
  ((char *) m_envelope_from.value) [m_envelope_from.length] = 0;
  ((char *) m_envelope_date.value) [m_envelope_date.length] = 0;
  
  return 0;
}

Here is the caller graph for this function:

PRInt32 nsParseMailMessageState::ParseFolderLine ( const char *  line,
PRUint32  lineLength 
) [virtual, inherited]

Definition at line 605 of file nsParseMailbox.cpp.

{
  int status = 0;
  
  if (m_state == nsIMsgParseMailMsgState::ParseHeadersState)
  {
    if (EMPTY_MESSAGE_LINE(line))
    {
      /* End of headers.  Now parse them. */
      status = ParseHeaders();
      NS_ASSERTION(status >= 0, "error parsing headers parsing mailbox");
      if (status < 0)
        return status;
      
      status = FinalizeHeaders();
      NS_ASSERTION(status >= 0, "error finalizing headers parsing mailbox");
      if (status < 0)
        return status;
      m_state = nsIMsgParseMailMsgState::ParseBodyState;
    }
    else
    {
      /* Otherwise, this line belongs to a header.  So append it to the
         header data, and stay in MBOX `MIME_PARSE_HEADERS' state.
      */
      m_headers.AppendBuffer(line, lineLength);
    }
  }
  else if ( m_state == nsIMsgParseMailMsgState::ParseBodyState)
  {
    m_body_lines++;
  }
  
  m_position += lineLength;
  
  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 872 of file nsParseMailbox.cpp.

{
  char *buf = m_headers.GetBuffer();
  char *buf_end = buf + m_headers.GetBufferPos();
  while (buf < buf_end)
  {
    char *colon = PL_strchr (buf, ':');
    char *end;
    char *value = 0;
    struct message_header *header = 0;
    struct message_header receivedBy;
    
    if (! colon)
      break;
    
    end = colon;
    while (end > buf && (*end == ' ' || *end == '\t'))
      end--;
    
    switch (buf [0])
    {
    case 'C': case 'c':
      if (!nsCRT::strncasecmp ("CC", buf, end - buf))
        header = GetNextHeaderInAggregate(m_ccList);
      else if (!nsCRT::strncasecmp ("Content-Type", buf, end - buf))
        header = &m_content_type;
      break;
    case 'D': case 'd':
      if (!nsCRT::strncasecmp ("Date", buf, end - buf))
        header = &m_date;
      else if (!nsCRT::strncasecmp("Disposition-Notification-To", buf, end - buf))
        header = &m_mdn_dnt;
      break;
    case 'F': case 'f':
      if (!nsCRT::strncasecmp ("From", buf, end - buf))
        header = &m_from;
      break;
    case 'I' : case 'i':
      if (!nsCRT::strncasecmp ("In-Reply-To", buf, end - buf))
        header = &m_in_reply_to;
      break;
    case 'M': case 'm':
      if (!nsCRT::strncasecmp ("Message-ID", buf, end - buf))
        header = &m_message_id;
      break;
    case 'N': case 'n':
      if (!nsCRT::strncasecmp ("Newsgroups", buf, end - buf))
        header = &m_newsgroups;
      break;
    case 'O': case 'o':
      if (!nsCRT::strncasecmp ("Original-Recipient", buf, end - buf))
        header = &m_mdn_original_recipient;
      break;
    case 'R': case 'r':
      if (!nsCRT::strncasecmp ("References", buf, end - buf))
        header = &m_references;
      else if (!nsCRT::strncasecmp ("Return-Path", buf, end - buf))
        header = &m_return_path;
      // treat conventional Return-Receipt-To as MDN
      // Disposition-Notification-To
      else if (!nsCRT::strncasecmp ("Return-Receipt-To", buf, end - buf))
        header = &m_mdn_dnt;
      else if (!nsCRT::strncasecmp("Reply-To", buf, end - buf))
        header = &m_replyTo;
      else if (!PL_strncasecmp("Received", buf, end - buf))
      {
        header = &receivedBy;
        header->length = 0;
      }
      break;
    case 'S': case 's':
      if (!nsCRT::strncasecmp ("Subject", buf, end - buf))
        header = &m_subject;
      else if (!nsCRT::strncasecmp ("Sender", buf, end - buf))
        header = &m_sender;
      else if (!nsCRT::strncasecmp ("Status", buf, end - buf))
        header = &m_status;
      break;
    case 'T': case 't':
      if (!nsCRT::strncasecmp ("To", buf, end - buf))
        header = GetNextHeaderInAggregate(m_toList);
      break;
    case 'X':
      if (X_MOZILLA_STATUS2_LEN == end - buf &&
        !nsCRT::strncasecmp(X_MOZILLA_STATUS2, buf, end - buf) &&
        !m_IgnoreXMozillaStatus && !m_mozstatus2.length)
        header = &m_mozstatus2;
      else if ( X_MOZILLA_STATUS_LEN == end - buf &&
        !nsCRT::strncasecmp(X_MOZILLA_STATUS, buf, end - buf) && !m_IgnoreXMozillaStatus
        && !m_mozstatus.length)
        header = &m_mozstatus;
      else if (!nsCRT::strncasecmp(HEADER_X_MOZILLA_ACCOUNT_KEY, buf, end - buf)
        && !m_account_key.length)
        header = &m_account_key;
      // we could very well care what the priority header was when we 
      // remember its value. If so, need to remember it here. Also, 
      // different priority headers can appear in the same message, 
      // but we only rememeber the last one that we see.
      else if (!nsCRT::strncasecmp("X-Priority", buf, end - buf)
        || !nsCRT::strncasecmp("Priority", buf, end - buf))
        header = &m_priority;
      else if (!nsCRT::strncasecmp(HEADER_X_MOZILLA_KEYWORDS, buf, end - buf)
        && !m_keywords.length)
        header = &m_keywords;
      break;
    }
    if (!header && m_customDBHeaders.Count())
    {
      nsDependentCSubstring headerStr(buf, end);

      ToLowerCase(headerStr);
      PRInt32 customHeaderIndex = m_customDBHeaders.IndexOf(headerStr);
      if (customHeaderIndex != kNotFound)
        header = & m_customDBHeaderValues[customHeaderIndex];
    }
    
    buf = colon + 1;
    while (*buf == ' ' || *buf == '\t')
      buf++;
    
    value = buf;
    if (header)
      header->value = value;
    else
    {
    }
    
SEARCH_NEWLINE:
    while (*buf != 0 && *buf != nsCRT::CR && *buf != nsCRT::LF)
      buf++;
    
    if (buf+1 >= buf_end)
      ;
    /* If "\r\n " or "\r\n\t" is next, that doesn't terminate the header. */
    else if (buf+2 < buf_end &&
                        (buf[0] == nsCRT::CR  && buf[1] == nsCRT::LF) &&
                           (buf[2] == ' ' || buf[2] == '\t'))
    {
      buf += 3;
      goto SEARCH_NEWLINE;
    }
    /* If "\r " or "\r\t" or "\n " or "\n\t" is next, that doesn't terminate
    the header either. */
    else if ((buf[0] == nsCRT::CR  || buf[0] == nsCRT::LF) &&
                        (buf[1] == ' ' || buf[1] == '\t'))
    {
      buf += 2;
      goto SEARCH_NEWLINE;
    }
    
    if (header)
      header->length = buf - header->value;
    
    if (*buf == nsCRT::CR || *buf == nsCRT::LF)
    {
      char *last = buf;
      if (*buf == nsCRT::CR && buf[1] == nsCRT::LF)
        buf++;
      buf++;
      *last = 0;     /* short-circuit const, and null-terminate header. */
    }
    
    if (header)
    {
      /* More const short-circuitry... */
      /* strip leading whitespace */
      while (IS_SPACE (*header->value))
        header->value++, header->length--;
      /* strip trailing whitespace */
      while (header->length > 0 &&
        IS_SPACE (header->value [header->length - 1]))
        ((char *) header->value) [--header->length] = 0;
      if (header == &receivedBy && LL_IS_ZERO(m_receivedTime))
      {
        // parse Received: header for date.
        // We trust the first header as that is closest to recipient,
        // and less likely to be spoofed.
        nsCAutoString receivedHdr(header->value, header->length);
        PRInt32 lastSemicolon = receivedHdr.RFindChar(';');
        if (lastSemicolon != kNotFound)
        {
          nsCAutoString receivedDate;
          receivedHdr.Right(receivedDate, receivedHdr.Length() - lastSemicolon - 1);
          receivedDate.Trim(" \t\b\r\n");
          PRTime resultTime;
          if (PR_ParseTimeString (receivedDate.get(), PR_FALSE, &resultTime) == PR_SUCCESS)
            m_receivedTime = resultTime;
        }
      }
    }
  }
  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int nsMsgMailboxParser::ProcessMailboxInputStream ( nsIURI aURL,
nsIInputStream aIStream,
PRUint32  aLength 
) [virtual, inherited]

Definition at line 297 of file nsParseMailbox.cpp.

{
       nsresult ret = NS_OK;

       PRUint32 bytesRead = 0;

       if (NS_SUCCEEDED(m_inputStream.GrowBuffer(aLength)))
       {
              // OK, this sucks, but we're going to have to copy into our
              // own byte buffer, and then pass that to the line buffering code,
              // which means a couple buffer copies.
              ret = aIStream->Read(m_inputStream.GetBuffer(), aLength, &bytesRead);
              if (NS_SUCCEEDED(ret))
                     ret = BufferInput(m_inputStream.GetBuffer(), bytesRead);
       }
       if (m_graph_progress_total > 0)
       {
              if (NS_SUCCEEDED(ret))
                m_graph_progress_received += bytesRead;
       }
       return (ret);
}

Reimplemented from nsMsgMailboxParser.

Definition at line 1641 of file nsParseMailbox.cpp.

{
  PRBool moved = PR_FALSE;
  FinishHeader();
  
  if (m_newMsgHdr)
  {
    if (!m_disableFilters)
    {
      // flush the inbox because filters will read from disk
      m_inboxFileStream->flush();
      PRUint32 msgOffset;
      (void) m_newMsgHdr->GetMessageOffset(&msgOffset);
      m_curHdrOffset = msgOffset;

      nsCOMPtr<nsIMsgIncomingServer> server;
      nsresult rv = m_rootFolder->GetServer(getter_AddRefs(server));
      NS_ENSURE_SUCCESS(rv, 0);
      PRInt32 duplicateAction;
      server->GetIncomingDuplicateAction(&duplicateAction);
      if (duplicateAction != nsIMsgIncomingServer::keepDups)
      {
        PRBool isDup;
        server->IsNewHdrDuplicate(m_newMsgHdr, &isDup);
        if (isDup)
        {
          // we want to do something similar to applying filter hits.
          // if a dup is marked read, it shouldn't trigger biff.
          // Same for deleting it or moving it to trash.
          switch (duplicateAction)
          {
            case nsIMsgIncomingServer::deleteDups:
              {
                m_inboxFileStream->close();

                nsresult truncRet = m_inboxFileSpec.Truncate(msgOffset);
                NS_ASSERTION(NS_SUCCEEDED(truncRet), "unable to truncate file");
                if (NS_FAILED(truncRet))
                  m_rootFolder->ThrowAlertMsg("dupDeleteFolderTruncateFailed", msgWindow);

                //  need to re-open the inbox file stream.
                m_inboxFileStream->Open(m_inboxFileSpec, (PR_RDWR | PR_CREATE_FILE));
                if (m_inboxFileStream)
                  m_inboxFileStream->seek(m_inboxFileSpec.GetFileSize());
  
                m_mailDB->RemoveHeaderMdbRow(m_newMsgHdr);
              }
              break;
            case nsIMsgIncomingServer::moveDupsToTrash:
              {
                nsCOMPtr <nsIMsgFolder> trash;
                GetTrashFolder(getter_AddRefs(trash));
                if (trash)
                  MoveIncorporatedMessage(m_newMsgHdr, m_mailDB, trash,
                                                          nsnull, msgWindow);
              }
              break;
            case nsIMsgIncomingServer::markDupsRead:
              MarkFilteredMessageRead(m_newMsgHdr);
              break;
          }
          PRInt32 numNewMessages;
          m_downloadFolder->GetNumNewMessages(PR_FALSE, &numNewMessages);
          m_downloadFolder->SetNumNewMessages(numNewMessages - 1);

          m_newMsgHdr = nsnull;
          return 0;
        }
      }

      ApplyFilters(&moved, msgWindow, msgOffset);
    }
    if (!moved)
    {
      if (m_mailDB)
      {
        PRUint32 newFlags, oldFlags;
        m_newMsgHdr->GetFlags(&oldFlags);
        if (!(oldFlags & MSG_FLAG_READ)) // don't mark read messages as new.
          m_newMsgHdr->OrFlags(MSG_FLAG_NEW, &newFlags);
        
        m_mailDB->AddNewHdrToDB(m_newMsgHdr, PR_TRUE);
        NotifyGlobalListeners(m_newMsgHdr);
      }
    } // if it was moved by imap filter, m_parseMsgState->m_newMsgHdr == nsnull
    m_newMsgHdr = nsnull;
  }
  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_DECL_ISUPPORTS_INHERITED NS_DECL_NSIREQUESTOBSERVER NS_DECL_NSISTREAMLISTENER NS_DECL_NSIDBCHANGELISTENER void nsMsgMailboxParser::SetDB ( nsIMsgDatabase mailDB) [inline, inherited]

Definition at line 192 of file nsParseMailbox.h.

{m_mailDB = mailDB; }

Here is the caller graph for this function:

int nsParseMailMessageState::StartNewEnvelope ( const char *  line,
PRUint32  lineLength 
) [virtual, inherited]

Definition at line 861 of file nsParseMailbox.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 345 of file nsParseMailbox.cpp.

Here is the caller graph for this function:

Definition at line 351 of file nsParseMailbox.cpp.

{
  mailDB->SetSummaryValid(PR_TRUE);
}

Definition at line 285 of file nsParseMailbox.cpp.

{
  if (m_statusFeedback && m_graph_progress_total != 0)
  {
    // prevent overflow by dividing both by 100
    PRUint32 progressTotal = m_graph_progress_total / 100;
    PRUint32 progressReceived = m_graph_progress_received / 100;
    if (progressTotal > 0)
      m_statusFeedback->ShowProgress((100 *(progressReceived))  / progressTotal);   
  }
}

Here is the caller graph for this function:

Definition at line 256 of file nsParseMailbox.cpp.

{
       if (m_statusFeedback)
       {
        nsresult rv;
        if (!mStringService) // if we haven't gotten the serivce yet...
            mStringService = do_GetService(NS_MSG_MAILBOXSTRINGSERVICE_CONTRACTID);
    
        nsXPIDLString finalString;
              if (stringID == LOCAL_STATUS_SELECTING_MAILBOX)
              {
            nsCOMPtr<nsIStringBundle> bundle;
            rv = mStringService->GetBundle(getter_AddRefs(bundle));
            NS_ASSERTION(NS_SUCCEEDED(rv), "GetBundle failed");
            if (NS_FAILED(rv)) return;

            const PRUnichar * stringArray[] = { m_folderName.get() };
            rv = bundle->FormatStringFromID(stringID, stringArray, 1,
                                                   getter_Copies(finalString));
              }
              else
            mStringService->GetStringByID(stringID,
                                          getter_Copies(finalString));

        m_statusFeedback->ShowStatusString(finalString);

    }
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 54 of file nsIMsgParseMailMsgState.idl.

Definition at line 64 of file nsIMsgParseMailMsgState.idl.

Definition at line 152 of file nsParseMailbox.h.

Definition at line 136 of file nsParseMailbox.h.

Definition at line 299 of file nsParseMailbox.h.

nsCStringArray nsParseMailMessageState::m_customDBHeaders [inherited]

Definition at line 159 of file nsParseMailbox.h.

Definition at line 160 of file nsParseMailbox.h.

Definition at line 280 of file nsParseMailbox.h.

Definition at line 292 of file nsParseMailbox.h.

Definition at line 283 of file nsParseMailbox.h.

Definition at line 293 of file nsParseMailbox.h.

nsByteArray nsParseMailMessageState::m_envelope [inherited]

Definition at line 118 of file nsParseMailbox.h.

Definition at line 113 of file nsParseMailbox.h.

Definition at line 279 of file nsParseMailbox.h.

Definition at line 284 of file nsParseMailbox.h.

Definition at line 217 of file nsParseMailbox.h.

nsCStringArray nsParseNewMailState::m_forwardTo [protected]

Definition at line 305 of file nsParseMailbox.h.

Definition at line 223 of file nsParseMailbox.h.

Definition at line 222 of file nsParseMailbox.h.

Definition at line 106 of file nsParseMailbox.h.

nsByteArray nsParseMailMessageState::m_headers [inherited]

Definition at line 116 of file nsParseMailbox.h.

Definition at line 114 of file nsParseMailbox.h.

char* nsParseNewMailState::m_ibuffer [protected]

Definition at line 295 of file nsParseMailbox.h.

Definition at line 294 of file nsParseMailbox.h.

Definition at line 296 of file nsParseMailbox.h.

Definition at line 154 of file nsParseMailbox.h.

Definition at line 291 of file nsParseMailbox.h.

Definition at line 290 of file nsParseMailbox.h.

Definition at line 218 of file nsParseMailbox.h.

nsByteArray nsMsgMailboxParser::m_inputStream [protected, inherited]

Definition at line 219 of file nsParseMailbox.h.

Definition at line 109 of file nsParseMailbox.h.

nsImapMoveCoalescer* nsParseNewMailState::m_moveCoalescer [protected]

Definition at line 287 of file nsParseMailbox.h.

Definition at line 289 of file nsParseMailbox.h.

Definition at line 307 of file nsParseMailbox.h.

Definition at line 282 of file nsParseMailbox.h.

Definition at line 108 of file nsParseMailbox.h.

Definition at line 285 of file nsParseMailbox.h.

Definition at line 268 of file nsParseMailbox.h.

char* nsMsgMailboxParser::m_obuffer [protected, inherited]

Definition at line 221 of file nsParseMailbox.h.

Definition at line 220 of file nsParseMailbox.h.

PRBool nsMsgMailboxParser::m_parsingDone [protected, inherited]

Definition at line 224 of file nsParseMailbox.h.

Definition at line 112 of file nsParseMailbox.h.

Definition at line 151 of file nsParseMailbox.h.

nsCStringArray nsParseNewMailState::m_replyTemplateUri [protected]

Definition at line 306 of file nsParseMailbox.h.

Definition at line 281 of file nsParseMailbox.h.

nsTime nsMsgMailboxParser::m_startTime [protected, inherited]

Definition at line 225 of file nsParseMailbox.h.

Definition at line 111 of file nsParseMailbox.h.

Definition at line 211 of file nsParseMailbox.h.

Definition at line 135 of file nsParseMailbox.h.

Definition at line 155 of file nsParseMailbox.h.

Definition at line 162 of file nsParseMailbox.h.

Definition at line 69 of file nsIMsgParseMailMsgState.idl.

Definition at line 67 of file nsIMsgParseMailMsgState.idl.

Definition at line 68 of file nsIMsgParseMailMsgState.idl.

Definition at line 65 of file nsIMsgParseMailMsgState.idl.


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