Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes
SendLaterListener Class Reference
Inheritance diagram for SendLaterListener:
Inheritance graph
[legend]
Collaboration diagram for SendLaterListener:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SendLaterListener (nsIMessenger *)
virtual ~SendLaterListener (void)
NS_DECL_ISUPPORTS NS_IMETHOD OnStartSending (PRUint32 aTotalMessageCount)
NS_IMETHOD OnProgress (PRUint32 aCurrentMessage, PRUint32 aTotalMessage)
NS_IMETHOD OnStatus (const PRUnichar *aMsg)
NS_IMETHOD OnStopSending (nsresult aStatus, const PRUnichar *aMsg, PRUint32 aTotalTried, PRUint32 aSuccessful)
void OnStartSending (in PRUint32 aTotalMessageCount)
 Notify the observer that the operation of sending all unset messages has started.
void OnProgress (in PRUint32 aCurrentMessage, in PRUint32 aTotalMessage)
 Notify the observer that progress as occurred for send operation.
void OnStatus (in wstring aMsg)
 Notify the observer with a status message for the send later operation.
void OnStopSending (in nsresult aStatus, in wstring aMsg, in PRUint32 aTotalTried, in PRUint32 aSuccessful)
 Notify the observer that the message has been sent.

Protected Attributes

nsWeakPtr m_messenger

Detailed Description

Definition at line 1713 of file nsMessenger.cpp.


Constructor & Destructor Documentation

Definition at line 1739 of file nsMessenger.cpp.

{
  m_messenger = do_GetWeakReference(aMessenger);
}

Here is the call graph for this function:

Definition at line 1744 of file nsMessenger.cpp.

{
  nsCOMPtr <nsIMessenger> messenger = do_QueryReferent(m_messenger);
  // best to be defensive about this, in case OnStopSending doesn't get called.
  if (messenger)
    messenger->SetSendingUnsentMsgs(PR_FALSE);
  m_messenger = nsnull;
}

Here is the call graph for this function:


Member Function Documentation

void nsIMsgSendLaterListener::OnProgress ( in PRUint32  aCurrentMessage,
in PRUint32  aTotalMessage 
) [inherited]

Notify the observer that progress as occurred for send operation.

Here is the caller graph for this function:

nsresult SendLaterListener::OnProgress ( PRUint32  aCurrentMessage,
PRUint32  aTotalMessage 
)

Definition at line 1764 of file nsMessenger.cpp.

{
  return NS_OK;
}
void nsIMsgSendLaterListener::OnStartSending ( in PRUint32  aTotalMessageCount) [inherited]

Notify the observer that the operation of sending all unset messages has started.

Here is the caller graph for this function:

Definition at line 1754 of file nsMessenger.cpp.

{
  // this never gets called :-(
  nsCOMPtr <nsIMessenger> messenger = do_QueryReferent(m_messenger);
  if (messenger)
    messenger->SetSendingUnsentMsgs(PR_TRUE);
  return NS_OK;
}

Here is the call graph for this function:

void nsIMsgSendLaterListener::OnStatus ( in wstring  aMsg) [inherited]

Notify the observer with a status message for the send later operation.

Here is the caller graph for this function:

Definition at line 1770 of file nsMessenger.cpp.

{
  return NS_OK;
}
void nsIMsgSendLaterListener::OnStopSending ( in nsresult  aStatus,
in wstring  aMsg,
in PRUint32  aTotalTried,
in PRUint32  aSuccessful 
) [inherited]

Notify the observer that the message has been sent.

This method is called once when the networking library has finished processing the message.

This method is called regardless of whether the the operation was successful. aMsgID The message id for the mail message status Status code for the message send. msg A text string describing the error. returnFileSpec The returned file spec for save to file operations.

Here is the caller graph for this function:

nsresult SendLaterListener::OnStopSending ( nsresult  aStatus,
const PRUnichar aMsg,
PRUint32  aTotalTried,
PRUint32  aSuccessful 
)

Definition at line 1776 of file nsMessenger.cpp.

{
#ifdef NS_DEBUG
  if (NS_SUCCEEDED(aStatus))
    printf("SendLaterListener::OnStopSending: Tried to send %d messages. %d successful.\n",
            aTotalTried, aSuccessful);
#endif

  nsCOMPtr <nsIMessenger> messenger = do_QueryReferent(m_messenger);
  if (messenger)
    messenger->SetSendingUnsentMsgs(PR_FALSE);
  return NS_OK;
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 1734 of file nsMessenger.cpp.


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