Back to index

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

#include <nsUrlListenerManager.h>

Inheritance diagram for nsUrlListenerManager:
Inheritance graph
Collaboration diagram for nsUrlListenerManager:
Collaboration graph

List of all members.

Public Member Functions

nsUrlListenerManager ()
virtual ~nsUrlListenerManager ()
void RegisterListener (in nsIUrlListener aUrlListener)
void UnRegisterListener (in nsIUrlListener aUrlListener)
void OnStartRunningUrl (in nsIMsgMailNewsUrl aUrl)
void OnStopRunningUrl (in nsIMsgMailNewsUrl aUrl, in nsresult aExitCode)

Protected Member Functions

nsresult BroadcastChange (nsIURI *aUrl, nsUrlNotifyType notification, nsresult aErrorCode)
void ReleaseListeners ()

Protected Attributes

nsCOMPtr< nsISupportsArraym_listeners

Detailed Description

Definition at line 61 of file nsUrlListenerManager.h.

Constructor & Destructor Documentation

Definition at line 42 of file nsUrlListenerManager.cpp.

       // create a new isupports array to store our listeners in...

Here is the call graph for this function:

Definition at line 49 of file nsUrlListenerManager.cpp.

Here is the call graph for this function:

Member Function Documentation

nsresult nsUrlListenerManager::BroadcastChange ( nsIURI aUrl,
nsUrlNotifyType  notification,
nsresult  aErrorCode 
) [protected]

Definition at line 85 of file nsUrlListenerManager.cpp.

       NS_PRECONDITION(aUrl, "we shouldn't get OnStartRunningUrl for the url listener manager without a url...");
       nsresult rv = NS_OK;

       if (m_listeners && aUrl)
              // enumerate over all url listeners...(Start at the end and work our way down)
              nsCOMPtr<nsIUrlListener> listener;
    nsCOMPtr<nsISupports> aSupports;
              PRUint32 index;
              for (; index > 0; index--)
      m_listeners->GetElementAt(index-1, getter_AddRefs(aSupports)); 
                     listener = do_QueryInterface(aSupports);

                     if (listener)
                            if (notification == nsUrlNotifyStartRunning)
                            else if (notification == nsUrlNotifyStopRunning)
                                   listener->OnStopRunningUrl(aUrl, aErrorCode);

              } // for each listener
       } // if m_listeners && aUrl

       return rv;

Here is the call graph for this function:

Definition at line 54 of file nsUrlListenerManager.cpp.

              PRUint32 count;
        nsresult rv = m_listeners->Count(&count);
        NS_ASSERTION(NS_SUCCEEDED(rv), "m_listeners->Count() failed");
        if (NS_FAILED(rv)) return;
              for (int i = count - 1; i >= 0; i--)

Here is the caller graph for this function:

Member Data Documentation

Definition at line 85 of file nsUrlListenerManager.h.

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