Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions | Variables
NSReg.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _reginfo

Defines

#define REGERR_OK   (0)
#define REGERR_FAIL   (1)
#define REGERR_NOMORE   (2)
#define REGERR_NOFIND   (3)
#define REGERR_BADREAD   (4)
#define REGERR_BADLOCN   (5)
#define REGERR_PARAM   (6)
#define REGERR_BADMAGIC   (7)
#define REGERR_BADCHECK   (8)
#define REGERR_NOFILE   (9)
#define REGERR_MEMORY   (10)
#define REGERR_BUFTOOSMALL   (11)
#define REGERR_NAMETOOLONG   (12)
#define REGERR_REGVERSION   (13)
#define REGERR_DELETED   (14)
#define REGERR_BADTYPE   (15)
#define REGERR_NOPATH   (16)
#define REGERR_BADNAME   (17)
#define REGERR_READONLY   (18)
#define REGERR_BADUTF8   (19)
#define MAXREGPATHLEN   (2048)
#define MAXREGNAMELEN   (512)
#define MAXREGVALUELEN   (0x7FFF)
#define ROOTKEY_USERS   (0x01)
#define ROOTKEY_COMMON   (0x02)
#define ROOTKEY_CURRENT_USER   (0x03)
#define ROOTKEY_PRIVATE   (0x04)
#define REGENUM_NORMAL   (0x00)
#define REGENUM_CHILDREN   REGENUM_NORMAL
#define REGENUM_DESCEND   (0x01)
#define REGENUM_DEPTH_FIRST   (0x02)
#define REGTYPE_ENTRY   (0x0010)
#define REGTYPE_ENTRY_STRING_UTF   (REGTYPE_ENTRY + 1)
#define REGTYPE_ENTRY_INT32_ARRAY   (REGTYPE_ENTRY + 2)
#define REGTYPE_ENTRY_BYTES   (REGTYPE_ENTRY + 3)
#define REGTYPE_ENTRY_FILE   (REGTYPE_ENTRY + 4)
#define REG_DELETE_LIST_KEY   "Mozilla/XPInstall/Delete List"
#define REG_REPLACE_LIST_KEY   "Mozilla/XPInstall/Replace List"
#define REG_UNINSTALL_DIR   "Mozilla/XPInstall/Uninstall/"
#define REG_REPLACE_SRCFILE   "ReplacementFile"
#define REG_REPLACE_DESTFILE   "DestinationFile"
#define UNINSTALL_NAV_STR   "_"
#define UNIX_GLOBAL_FLAG   "MOZILLA_SHARED_REGISTRY"
#define VR_INTERFACE(type)   type

Typedefs

typedef void(* nr_RegPackCallbackFunc )(void *userData, int32 bytes, int32 totalBytes)
typedef int32 REGERR
typedef int32 RKEY
typedef uint32 REGENUM
typedef voidHREG
typedef struct _reginfo REGINFO

Functions

 VR_INTERFACE (void) NR_ShutdownRegistry(void)

Variables

PR_BEGIN_EXTERN_C int bufsize
HREGhReg
voiduserData
void nr_RegPackCallbackFunc fn
char * outbuf
char uint32 buflen
RKEY key
RKEY char * path
RKEY char RKEYnewKey
RKEY char * keyname
RKEY const char RKEYresult
RKEY REGENUMstate
RKEY REGENUM char * buffer
RKEY REGENUM char uint32 uint32 style
RKEY char * name
RKEY char REGINFOinfo
RKEY char void uint32size
RKEY char uint16 type

Class Documentation

struct _reginfo

Definition at line 52 of file NSReg.h.

Class Members
uint32 entryLength
uint16 entryType
uint16 size

Define Documentation

#define MAXREGNAMELEN   (512)

Definition at line 84 of file NSReg.h.

#define MAXREGPATHLEN   (2048)

Definition at line 82 of file NSReg.h.

#define MAXREGVALUELEN   (0x7FFF)

Definition at line 86 of file NSReg.h.

#define REG_DELETE_LIST_KEY   "Mozilla/XPInstall/Delete List"

Definition at line 107 of file NSReg.h.

#define REG_REPLACE_DESTFILE   "DestinationFile"

Definition at line 111 of file NSReg.h.

#define REG_REPLACE_LIST_KEY   "Mozilla/XPInstall/Replace List"

Definition at line 108 of file NSReg.h.

#define REG_REPLACE_SRCFILE   "ReplacementFile"

Definition at line 110 of file NSReg.h.

#define REG_UNINSTALL_DIR   "Mozilla/XPInstall/Uninstall/"

Definition at line 109 of file NSReg.h.

Definition at line 96 of file NSReg.h.

Definition at line 98 of file NSReg.h.

#define REGENUM_DESCEND   (0x01)

Definition at line 97 of file NSReg.h.

#define REGENUM_NORMAL   (0x00)

Definition at line 95 of file NSReg.h.

Definition at line 67 of file NSReg.h.

Definition at line 64 of file NSReg.h.

Definition at line 66 of file NSReg.h.

#define REGERR_BADNAME   (17)

Definition at line 76 of file NSReg.h.

Definition at line 63 of file NSReg.h.

#define REGERR_BADTYPE   (15)

Definition at line 74 of file NSReg.h.

#define REGERR_BADUTF8   (19)

Definition at line 78 of file NSReg.h.

Definition at line 70 of file NSReg.h.

#define REGERR_DELETED   (14)

Definition at line 73 of file NSReg.h.

#define REGERR_FAIL   (1)

Definition at line 60 of file NSReg.h.

#define REGERR_MEMORY   (10)

Definition at line 69 of file NSReg.h.

Definition at line 71 of file NSReg.h.

#define REGERR_NOFILE   (9)

Definition at line 68 of file NSReg.h.

#define REGERR_NOFIND   (3)

Definition at line 62 of file NSReg.h.

#define REGERR_NOMORE   (2)

Definition at line 61 of file NSReg.h.

#define REGERR_NOPATH   (16)

Definition at line 75 of file NSReg.h.

#define REGERR_OK   (0)

Definition at line 59 of file NSReg.h.

#define REGERR_PARAM   (6)

Definition at line 65 of file NSReg.h.

#define REGERR_READONLY   (18)

Definition at line 77 of file NSReg.h.

Definition at line 72 of file NSReg.h.

#define REGTYPE_ENTRY   (0x0010)

Definition at line 101 of file NSReg.h.

Definition at line 104 of file NSReg.h.

Definition at line 105 of file NSReg.h.

Definition at line 103 of file NSReg.h.

Definition at line 102 of file NSReg.h.

#define ROOTKEY_COMMON   (0x02)

Definition at line 90 of file NSReg.h.

Definition at line 91 of file NSReg.h.

#define ROOTKEY_PRIVATE   (0x04)

Definition at line 92 of file NSReg.h.

#define ROOTKEY_USERS   (0x01)

Definition at line 89 of file NSReg.h.

Definition at line 113 of file NSReg.h.

#define UNIX_GLOBAL_FLAG   "MOZILLA_SHARED_REGISTRY"

Definition at line 116 of file NSReg.h.

VR_INTERFACE (   type)    type

Definition at line 135 of file NSReg.h.


Typedef Documentation

typedef void* HREG

Definition at line 50 of file NSReg.h.

Definition at line 45 of file NSReg.h.

typedef uint32 REGENUM

Definition at line 49 of file NSReg.h.

typedef int32 REGERR

Definition at line 47 of file NSReg.h.

typedef struct _reginfo REGINFO
typedef int32 RKEY

Definition at line 48 of file NSReg.h.


Function Documentation

Definition at line 4118 of file reg.c.

{
    REGFILE* pReg;
    XP_Bool  bDestroyLocks = FALSE;

    /* people should track whether NR_StartupRegistry() was successful
     * and not call this if it fails... but they won't so we'll try to
     * handle that case gracefully.
     */
#ifndef STANDALONE_REGISTRY
    if ( reglist_lock == NULL ) 
        return;  /* was not started successfully */
#else
    if ( regStartCount == 0 )
        return;  /* was not started successfully */
#endif

    PR_Lock( reglist_lock );

    --regStartCount;
    if ( regStartCount == 0 )
    {
        /* shutdown for real. */

        /* close any forgotten open registries */
        while ( RegList != NULL ) 
        {
            pReg = RegList;
            if ( pReg->hdrDirty ) {
                nr_WriteHdr( pReg );
            }
            nr_CloseFile( &(pReg->fh) );
            nr_DeleteNode( pReg );
        }
    
        XP_FREEIF(user_name);
        XP_FREEIF(globalRegName);
        XP_FREEIF(verRegName);

        bDestroyLocks = TRUE;
    }

    PR_Unlock( reglist_lock );

#ifndef STANDALONE_REGISTRY    
    if ( bDestroyLocks ) 
    {
        PR_DestroyLock( reglist_lock );
        reglist_lock = NULL;

        PR_DestroyLock(vr_lock);
        vr_lock = NULL;
    }
#endif

}   /* NR_ShutdownRegistry */

Here is the call graph for this function:


Variable Documentation

Definition at line 425 of file NSReg.h.

char uint32 buflen

Definition at line 260 of file NSReg.h.

Definition at line 162 of file NSReg.h.

Definition at line 225 of file NSReg.h.

Definition at line 179 of file NSReg.h.

Definition at line 452 of file NSReg.h.

Definition at line 299 of file NSReg.h.

RKEY char * keyname

Definition at line 322 of file NSReg.h.

RKEY char* name

Definition at line 452 of file NSReg.h.

RKEY char RKEY * newKey

Definition at line 299 of file NSReg.h.

char* outbuf

Definition at line 260 of file NSReg.h.

RKEY const char * path

Definition at line 299 of file NSReg.h.

RKEY char RKEY* result

Definition at line 381 of file NSReg.h.

Definition at line 493 of file NSReg.h.

Definition at line 425 of file NSReg.h.

Definition at line 425 of file NSReg.h.

Definition at line 535 of file NSReg.h.

Definition at line 225 of file NSReg.h.