expose whether the registry is already open or not, which enables the profile
manager to avoid opening and closing the registry ~20 times at startup. git-svn-id: svn://10.0.0.236/trunk@47736 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
96ec5ef98f
commit
1653f8692f
@ -55,6 +55,7 @@ struct nsRegistry : public nsIRegistry {
|
||||
NS_IMETHOD OpenWellKnownRegistry( uint32 regid );
|
||||
NS_IMETHOD OpenDefault();
|
||||
NS_IMETHOD Close();
|
||||
NS_IMETHOD IsOpen( PRBool *result );
|
||||
|
||||
NS_IMETHOD GetString( Key baseKey, const char *path, char **result );
|
||||
NS_IMETHOD SetString( Key baseKey, const char *path, const char *value );
|
||||
@ -492,6 +493,15 @@ NS_IMETHODIMP nsRegistry::Close() {
|
||||
return regerr2nsresult( err );
|
||||
}
|
||||
|
||||
/*----------------------------- nsRegistry::IsOpen -----------------------------
|
||||
| Tests the mReg handle and returns whether the registry is open or not. |
|
||||
------------------------------------------------------------------------------*/
|
||||
NS_IMETHODIMP nsRegistry::IsOpen( PRBool *result ) {
|
||||
*result = ( mReg != 0 );
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------- nsRegistry::GetString ----------------------------
|
||||
| First, look for the entry using GetValueInfo. If found, and it's a string, |
|
||||
| allocate space for it and fetch the value. |
|
||||
|
||||
@ -168,6 +168,7 @@ struct nsIRegistry : public nsISupports {
|
||||
NS_IMETHOD OpenWellKnownRegistry( uint32 regid ) = 0;
|
||||
NS_IMETHOD OpenDefault() = 0;
|
||||
NS_IMETHOD Close() = 0;
|
||||
NS_IMETHOD IsOpen( PRBool *result ) = 0;
|
||||
|
||||
/*----------------------- Reading/Writing Values ---------------------------
|
||||
| These functions read/write the registry values at a given node. |
|
||||
|
||||
@ -55,6 +55,7 @@ struct nsRegistry : public nsIRegistry {
|
||||
NS_IMETHOD OpenWellKnownRegistry( uint32 regid );
|
||||
NS_IMETHOD OpenDefault();
|
||||
NS_IMETHOD Close();
|
||||
NS_IMETHOD IsOpen( PRBool *result );
|
||||
|
||||
NS_IMETHOD GetString( Key baseKey, const char *path, char **result );
|
||||
NS_IMETHOD SetString( Key baseKey, const char *path, const char *value );
|
||||
@ -492,6 +493,15 @@ NS_IMETHODIMP nsRegistry::Close() {
|
||||
return regerr2nsresult( err );
|
||||
}
|
||||
|
||||
/*----------------------------- nsRegistry::IsOpen -----------------------------
|
||||
| Tests the mReg handle and returns whether the registry is open or not. |
|
||||
------------------------------------------------------------------------------*/
|
||||
NS_IMETHODIMP nsRegistry::IsOpen( PRBool *result ) {
|
||||
*result = ( mReg != 0 );
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------- nsRegistry::GetString ----------------------------
|
||||
| First, look for the entry using GetValueInfo. If found, and it's a string, |
|
||||
| allocate space for it and fetch the value. |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user