Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Member Functions | Protected Attributes
nsRegSubtreeEnumerator Struct Reference
Inheritance diagram for nsRegSubtreeEnumerator:
Inheritance graph
[legend]
Collaboration diagram for nsRegSubtreeEnumerator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIENUMERATOR
NS_DECL_NSIREGISTRYENUMERATOR 
nsRegSubtreeEnumerator (HREG hReg, RKEY rKey, PRBool all)
virtual ~nsRegSubtreeEnumerator ()
void currentItemInPlaceUTF8 (out nsRegistryKey key,[shared, retval] out string item)
void first ()
 First will reset the list.
void next ()
 Next will advance the list.
nsISupports currentItem ()
 CurrentItem will return the CurrentItem item it will fail if the list is empty.
void isDone ()
 return if the collection is at the end.

Protected Member Functions

NS_IMETHOD advance ()

Protected Attributes

HREG mReg
RKEY mKey
char mName [MAXREGPATHLEN]
REGENUM mEnum
REGENUM mNext
PRUint32 mStyle
PRBool mDone

Detailed Description

Definition at line 141 of file nsRegistry.cpp.


Constructor & Destructor Documentation

Definition at line 1578 of file nsRegistry.cpp.

    : mReg( hReg ), mKey( rKey ), mEnum( 0 ), mNext( 0 ),
      mStyle( all ? REGENUM_DESCEND : REGENUM_CHILDREN ), mDone( PR_FALSE ) {

    mName[0] = '\0';

#ifdef EXTRA_THREADSAFE
    // Create a registry lock
    mregLock = PR_NewLock();
#endif
    return;
}

Here is the call graph for this function:

Definition at line 1591 of file nsRegistry.cpp.

{
#ifdef EXTRA_THREADSAFE
    if (mregLock) {
        PR_DestroyLock(mregLock);
    }
#endif
}

Here is the call graph for this function:


Member Function Documentation

Reimplemented in nsRegValueEnumerator.

Definition at line 1647 of file nsRegistry.cpp.

                                              {
    REGERR err = REGERR_OK;
    PR_Lock(mregLock);
    err = NR_RegEnumSubkeys( mReg, mKey, &mNext, mName, sizeof mName, mStyle );
    // See if we ran off end.
    if( err == REGERR_NOMORE ) {
        // Remember we've run off end.
        mDone = PR_TRUE;
    }
    PR_Unlock(mregLock);
    // Convert result.
    nsresult rv = regerr2nsresult( err );
    return rv;
}

Here is the call graph for this function:

nsISupports nsIEnumerator::currentItem ( ) [inherited]

CurrentItem will return the CurrentItem item it will fail if the list is empty.

void nsIRegistryEnumerator::currentItemInPlaceUTF8 ( out nsRegistryKey  key,
[shared, retval] out string  item 
) [inherited]
void nsIEnumerator::first ( ) [inherited]

First will reset the list.

will return NS_FAILED if no items

void nsIEnumerator::isDone ( ) [inherited]

return if the collection is at the end.

that is the beginning following a call to Prev and it is the end of the list following a call to next

void nsIEnumerator::next ( ) [inherited]

Next will advance the list.

will return failed if already at end


Member Data Documentation

Definition at line 164 of file nsRegistry.cpp.

Definition at line 161 of file nsRegistry.cpp.

Definition at line 159 of file nsRegistry.cpp.

Definition at line 160 of file nsRegistry.cpp.

Definition at line 162 of file nsRegistry.cpp.

Definition at line 158 of file nsRegistry.cpp.

Definition at line 163 of file nsRegistry.cpp.


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