Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes
nsCookieEntry Class Reference

#include <nsCookieService.h>

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

List of all members.

Public Types

enum  { ALLOW_MEMMOVE = PR_TRUE }
typedef const char * KeyType
typedef const char * KeyTypePointer

Public Member Functions

 nsCookieEntry (KeyTypePointer aHost)
 nsCookieEntry (const nsCookieEntry &toCopy)
 ~nsCookieEntry ()
KeyType GetKey () const
KeyTypePointer GetKeyPointer () const
PRBool KeyEquals (KeyTypePointer aKey) const
const nsDependentCString Host () const
nsCookie *& Head ()
KeyTypePointer HostPtr () const

Static Public Member Functions

static KeyTypePointer KeyToPointer (KeyType aKey)
static PLDHashNumber HashKey (KeyTypePointer aKey)

Public Attributes

PLDHashNumber keyHash

Private Attributes

nsCookiemHead

Detailed Description

Definition at line 69 of file nsCookieService.h.


Member Typedef Documentation

Definition at line 73 of file nsCookieService.h.

Definition at line 74 of file nsCookieService.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
ALLOW_MEMMOVE 

Definition at line 130 of file nsCookieService.h.


Constructor & Destructor Documentation

Definition at line 77 of file nsCookieService.h.

     : mHead(nsnull)
    {
    }

Definition at line 82 of file nsCookieService.h.

    {
      // if we end up here, things will break. nsTHashtable shouldn't
      // allow this, since we set ALLOW_MEMMOVE to true.
      NS_NOTREACHED("nsCookieEntry copy constructor is forbidden!");
    }

Definition at line 89 of file nsCookieService.h.

    {
      // walk the linked list, and de-link everything by releasing & nulling.
      // this allows the parent host entry to be deleted by the hashtable.
      // note: we know mHead cannot be null here - we always set mHead to a
      // valid nsCookie (if it were null, the hashtable wouldn't be able to find
      // this entry, because the key string is provided by mHead).
      nsCookie *current = mHead, *next;
      do {
        next = current->Next();
        NS_RELEASE(current);
      } while ((current = next));
    }

Here is the call graph for this function:


Member Function Documentation

KeyType nsCookieEntry::GetKey ( ) const [inline]

Definition at line 103 of file nsCookieService.h.

    {
      return HostPtr();
    }

Here is the call graph for this function:

Definition at line 108 of file nsCookieService.h.

    {
      return HostPtr();
    }

Here is the call graph for this function:

static PLDHashNumber nsCookieEntry::HashKey ( KeyTypePointer  aKey) [inline, static]

Definition at line 123 of file nsCookieService.h.

    {
      // PL_DHashStringKey doesn't use the table parameter, so we can safely
      // pass nsnull
      return PL_DHashStringKey(nsnull, aKey);
    }

Here is the call graph for this function:

nsCookie*& nsCookieEntry::Head ( ) [inline]

Definition at line 136 of file nsCookieService.h.

{ return mHead; }

Here is the caller graph for this function:

Definition at line 133 of file nsCookieService.h.

{ return mHead->Host(); }

Here is the call graph for this function:

Definition at line 138 of file nsCookieService.h.

    {
      return mHead->Host().get();
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 113 of file nsCookieService.h.

    {
      return !strcmp(HostPtr(), aKey);
    }

Here is the call graph for this function:

static KeyTypePointer nsCookieEntry::KeyToPointer ( KeyType  aKey) [inline, static]

Definition at line 118 of file nsCookieService.h.

    {
      return aKey;
    }

Member Data Documentation

Definition at line 113 of file pldhash.h.

Definition at line 144 of file nsCookieService.h.


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