Back to index

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

#include <nsTopProgressNotifier.h>

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

List of all members.

Public Member Functions

 nsTopProgressListener ()
virtual ~nsTopProgressListener ()
long RegisterListener (nsIXPIListener *newListener)
void UnregisterListener (long id)
void SetActiveListener (nsIXPIListener *aListener)
void onInstallStart (in wstring URL)
void onInstallDone (in wstring URL, in long status)
void onPackageNameSet (in wstring URL, in wstring UIPackageName, in wstring version)
void onItemScheduled (in wstring message)
void onFinalizeProgress (in wstring message, in long itemNum, in long totNum)
void onLogComment (in wstring comment)

Private Attributes

nsVoidArraymListeners
PRLockmLock
nsCOMPtr< nsIXPIListenermActive

Detailed Description

Definition at line 49 of file nsTopProgressNotifier.h.


Constructor & Destructor Documentation

Definition at line 44 of file nsTopProgressNotifier.cpp.

Here is the call graph for this function:

Definition at line 51 of file nsTopProgressNotifier.cpp.

{
    if (mLock) PR_Lock(mLock);

    if (mListeners)
    {
        PRInt32 i=0;
        for (; i < mListeners->Count(); i++)
        {
            nsIXPIListener* element = (nsIXPIListener*)mListeners->ElementAt(i);
            NS_IF_RELEASE(element);
        }

        mListeners->Clear();
        delete (mListeners);
    }

    if (mLock)
    {
        PR_Unlock(mLock);
        PR_DestroyLock(mLock);
    }
}

Here is the call graph for this function:


Member Function Documentation

void nsIXPIListener::onFinalizeProgress ( in wstring  message,
in long  itemNum,
in long  totNum 
) [inherited]
void nsIXPIListener::onInstallDone ( in wstring  URL,
in long  status 
) [inherited]
void nsIXPIListener::onInstallStart ( in wstring  URL) [inherited]
void nsIXPIListener::onItemScheduled ( in wstring  message) [inherited]
void nsIXPIListener::onLogComment ( in wstring  comment) [inherited]
void nsIXPIListener::onPackageNameSet ( in wstring  URL,
in wstring  UIPackageName,
in wstring  version 
) [inherited]

Definition at line 80 of file nsTopProgressNotifier.cpp.

{
    if (mLock) PR_Lock(mLock);
    NS_IF_ADDREF( newListener );
    long retval = mListeners->AppendElement( newListener );
    if (mLock) PR_Unlock(mLock);
    return retval;
}

Here is the caller graph for this function:

Definition at line 58 of file nsTopProgressNotifier.h.

Here is the caller graph for this function:

Definition at line 91 of file nsTopProgressNotifier.cpp.

{
    if (mLock) PR_Lock(mLock);
    if (id < mListeners->Count())
    {
        nsIXPIListener *item = (nsIXPIListener*)mListeners->ElementAt(id);
        mListeners->ReplaceElementAt(nsnull, id);
        NS_IF_RELEASE(item);
    }
    if (mLock) PR_Unlock(mLock);
}

Member Data Documentation

Definition at line 69 of file nsTopProgressNotifier.h.

Definition at line 67 of file nsTopProgressNotifier.h.

Definition at line 68 of file nsTopProgressNotifier.h.


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