Back to index

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

#include <nsSmartCardMonitor.h>

Collaboration diagram for SmartCardThreadList:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SmartCardThreadList ()
 ~SmartCardThreadList ()
void Remove (SECMODModule *module)
nsresult Add (SmartCardMonitoringThread *thread)

Private Attributes

SmartCardThreadEntryhead

Detailed Description

Definition at line 50 of file nsSmartCardMonitor.h.


Constructor & Destructor Documentation

Definition at line 91 of file nsSmartCardMonitor.cpp.

                                         : head(0)
{
}

Definition at line 95 of file nsSmartCardMonitor.cpp.

{
  // the head is self linking and unlinking, the following
  // loop removes all entries on the list.
  // it will also stop the thread if it happens to be running
  while (head) {
    delete head;
  }
}

Member Function Documentation

Definition at line 120 of file nsSmartCardMonitor.cpp.

{
  SmartCardThreadEntry *current = new SmartCardThreadEntry(thread, head, nsnull,
                                                           &head);
  if (current) {  
     // OK to forget current here, it's on the list
    return thread->Start();
  }
  return NS_ERROR_OUT_OF_MEMORY;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void SmartCardThreadList::Remove ( SECMODModule *  module)

Definition at line 106 of file nsSmartCardMonitor.cpp.

{
  SmartCardThreadEntry *current;
  for (current = head; current; current=current->next) {
    if (current->thread->GetModule() == aModule) {
      // NOTE: automatically stops the thread and dequeues it from the list
      delete current;
      return;
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 57 of file nsSmartCardMonitor.h.


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