Back to index

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

#include <nsMsgCopyService.h>

Collaboration diagram for nsCopyRequest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsCopyRequest ()
 ~nsCopyRequest ()
nsresult Init (nsCopyRequestType type, nsISupports *aSupport, nsIMsgFolder *dstFolder, PRBool bVal, PRUint32 newMsgFlags, nsIMsgCopyServiceListener *listener, nsIMsgWindow *msgWindow, PRBool allowUndo)
nsCopySourceAddNewCopySource (nsIMsgFolder *srcFolder)

Public Attributes

nsCOMPtr< nsISupports > m_srcSupport
nsCOMPtr< nsIMsgFolderm_dstFolder
nsCOMPtr< nsIMsgWindowm_msgWindow
nsCOMPtr
< nsIMsgCopyServiceListener
m_listener
nsCOMPtr< nsITransactionManagerm_txnMgr
nsCopyRequestType m_requestType
PRBool m_isMoveOrDraftOrTemplate
PRBool m_allowUndo
PRBool m_processed
PRUint32 m_newMsgFlags
nsString m_dstFolderName
nsVoidArray m_copySourceArray

Detailed Description

Definition at line 70 of file nsMsgCopyService.h.


Constructor & Destructor Documentation

Definition at line 94 of file nsMsgCopyService.cpp.

{
  MOZ_COUNT_DTOR(nsCopyRequest);

  PRInt32 j;
  nsCopySource* ncs;
  
  j = m_copySourceArray.Count();
  while(j-- > 0)
  {
      ncs = (nsCopySource*) m_copySourceArray.ElementAt(j);
      delete ncs;
  }
}

Member Function Documentation

Definition at line 147 of file nsMsgCopyService.cpp.

{
  nsCopySource* newSrc = new nsCopySource(srcFolder);
  if (newSrc)
  {
      m_copySourceArray.AppendElement((void*) newSrc);
      if (srcFolder == m_dstFolder)
        newSrc->m_processed = PR_TRUE;
  }
  return newSrc;
}
nsresult nsCopyRequest::Init ( nsCopyRequestType  type,
nsISupports *  aSupport,
nsIMsgFolder dstFolder,
PRBool  bVal,
PRUint32  newMsgFlags,
nsIMsgCopyServiceListener listener,
nsIMsgWindow msgWindow,
PRBool  allowUndo 
)

Definition at line 110 of file nsMsgCopyService.cpp.

{
  nsresult rv = NS_OK;
  m_requestType = type;
  m_srcSupport = aSupport;
  m_dstFolder = dstFolder;
  m_isMoveOrDraftOrTemplate = bVal;
  m_allowUndo = allowUndo;
  m_newMsgFlags = newMsgFlags;
  if (listener)
      m_listener = listener;
  if (msgWindow)
  {
    m_msgWindow = msgWindow;
    if (m_allowUndo)
                     msgWindow->GetTransactionManager(getter_AddRefs(m_txnMgr));
       }
  if (type == nsCopyFoldersType)
  {
    // To support multiple copy folder operations to the same destination, we 
    // need to save the leaf name of the src file spec so that FindRequest() is
    // able to find the right request when copy finishes.
    nsCOMPtr<nsIMsgFolder> srcFolder = do_QueryInterface(aSupport, &rv);
    NS_ENSURE_SUCCESS(rv, rv);
    nsXPIDLString folderName;
    rv = srcFolder->GetName(getter_Copies(folderName));
    NS_ENSURE_SUCCESS(rv, rv);
    m_dstFolderName = folderName;
  }
  
  return rv;
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 90 of file nsMsgCopyService.h.

Definition at line 94 of file nsMsgCopyService.h.

Definition at line 84 of file nsMsgCopyService.h.

Definition at line 93 of file nsMsgCopyService.h.

Definition at line 89 of file nsMsgCopyService.h.

Definition at line 86 of file nsMsgCopyService.h.

Definition at line 85 of file nsMsgCopyService.h.

Definition at line 92 of file nsMsgCopyService.h.

Definition at line 91 of file nsMsgCopyService.h.

Definition at line 88 of file nsMsgCopyService.h.

Definition at line 83 of file nsMsgCopyService.h.

Definition at line 87 of file nsMsgCopyService.h.


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