Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes
nsRepeatService Class Reference

#include <nsRepeatService.h>

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

List of all members.

Public Member Functions

NS_DECL_NSITIMERCALLBACK void Start (nsITimerCallback *aCallback)
void Stop ()
virtual NS_DECL_ISUPPORTS ~nsRepeatService ()
void notify (in nsITimer timer)

Static Public Member Functions

static nsRepeatServiceGetInstance ()
static void Shutdown ()

Protected Member Functions

 nsRepeatService ()

Private Attributes

nsCOMPtr< nsITimerCallbackmCallback
nsCOMPtr< nsITimermRepeatTimer
PRBool mFirstCall

Static Private Attributes

static nsRepeatServicegInstance = nsnull

Detailed Description

Definition at line 49 of file nsRepeatService.h.


Constructor & Destructor Documentation

Definition at line 63 of file nsRepeatService.cpp.

{
  Stop();
}

Here is the call graph for this function:

Definition at line 58 of file nsRepeatService.cpp.

Here is the caller graph for this function:


Member Function Documentation

Definition at line 69 of file nsRepeatService.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nsITimerCallback::notify ( in nsITimer  timer) [inherited]
Parameters:
aTimerthe timer which has expired

Definition at line 79 of file nsRepeatService.cpp.

Definition at line 84 of file nsRepeatService.cpp.

{
  NS_PRECONDITION(aCallback != nsnull, "null ptr");
  if (! aCallback)
    return;

  mCallback = aCallback;
  nsresult rv;
  mRepeatTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);

  if (NS_OK == rv)  {
    mRepeatTimer->InitWithCallback(this, INITAL_REPEAT_DELAY, nsITimer::TYPE_ONE_SHOT);
  }

}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 100 of file nsRepeatService.cpp.

{
  //printf("Stopping repeat timer\n");
  if (mRepeatTimer) {
     mRepeatTimer->Cancel();
     mRepeatTimer = nsnull;
     mCallback = nsnull;
  }
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 71 of file nsRepeatService.h.

Definition at line 68 of file nsRepeatService.h.

Definition at line 70 of file nsRepeatService.h.

Definition at line 69 of file nsRepeatService.h.


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