Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsMsgImapHdrXferInfo Class Reference

#include <nsImapProtocol.h>

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

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIIMAPHEADERXFERINFO 
nsMsgImapHdrXferInfo ()
virtual ~nsMsgImapHdrXferInfo ()
nsresult GetFreeHeaderInfo (nsIImapHeaderInfo **aResult)
void ResetAll ()
void ReleaseAll ()
void StartNewHdr (nsIImapHeaderInfo **newHdrInfo)
nsIImapHeaderInfoGetCurrentHdrInfo ()
void FinishCurrentHdr ()
nsIImapHeaderInfo getHeader (in long hdrIndex)

Public Attributes

nsCOMPtr< nsISupportsArraym_hdrInfos
PRInt32 m_nextFreeHdrInfo
readonly attribute long numHeaders

Detailed Description

Definition at line 121 of file nsImapProtocol.h.


Constructor & Destructor Documentation

Definition at line 134 of file nsImapProtocol.cpp.

Here is the call graph for this function:

Definition at line 140 of file nsImapProtocol.cpp.

{
}

Member Function Documentation

Definition at line 186 of file nsImapProtocol.cpp.

{
  // nothing to do?
}

Here is the caller graph for this function:

Definition at line 160 of file nsImapProtocol.cpp.

{
  if (m_nextFreeHdrInfo >= kNumHdrsToXfer)
  {
    *aResult = nsnull;
    return NS_ERROR_NULL_POINTER;
  }
  nsresult rv = m_hdrInfos->QueryElementAt(m_nextFreeHdrInfo++, NS_GET_IID(nsIImapHeaderInfo), (void **) aResult);
  if (!*aResult && m_nextFreeHdrInfo - 1 < kNumHdrsToXfer)
  {
      nsMsgImapLineDownloadCache *lineCache = new nsMsgImapLineDownloadCache();
      if (!lineCache)
        return NS_ERROR_OUT_OF_MEMORY;
      rv = lineCache->GrowBuffer(kInitLineHdrCacheSize);
      NS_ADDREF(*aResult = lineCache);
      m_hdrInfos->AppendElement(lineCache);
  }
  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 203 of file nsImapProtocol.cpp.

{
  m_hdrInfos->Clear();
  m_nextFreeHdrInfo = 0;
}

Here is the caller graph for this function:

Definition at line 191 of file nsImapProtocol.cpp.

{
  nsCOMPtr <nsIImapHeaderInfo> hdrInfo;
  for (PRInt32 i = 0; i < kNumHdrsToXfer; i++)
  {
    nsresult rv = GetHeader(i, getter_AddRefs(hdrInfo));
    if (NS_SUCCEEDED(rv) && hdrInfo)
      hdrInfo->ResetCache();
  }
  m_nextFreeHdrInfo = 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 180 of file nsImapProtocol.cpp.

{
  GetFreeHeaderInfo(newHdrInfo);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 138 of file nsImapProtocol.h.

Definition at line 139 of file nsImapProtocol.h.

Definition at line 52 of file nsIImapHeaderXferInfo.idl.


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