Added nsIRegistry::Flush (bug 16283, required for 16600), r=shaver
git-svn-id: svn://10.0.0.236/trunk@50960 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
04d5d271eb
commit
9d59534945
@ -35,6 +35,7 @@ interface nsIRegistry : nsISupports
|
||||
void openWellKnownRegistry(in long regid);
|
||||
void openDefault();
|
||||
void close();
|
||||
void flush();
|
||||
boolean isOpen();
|
||||
|
||||
string getString(in nsRegistryKey baseKey, in string path);
|
||||
|
||||
@ -475,6 +475,19 @@ NS_IMETHODIMP nsRegistry::Close() {
|
||||
return regerr2nsresult( err );
|
||||
}
|
||||
|
||||
/*----------------------------- nsRegistry::Flush ------------------------------
|
||||
| Flushes the registry via NR_RegFlush. |
|
||||
------------------------------------------------------------------------------*/
|
||||
NS_IMETHODIMP nsRegistry::Flush() {
|
||||
REGERR err = REGERR_FAIL;
|
||||
if( mReg ) {
|
||||
PR_Lock(mregLock);
|
||||
err = NR_RegFlush( mReg );
|
||||
PR_Unlock(mregLock);
|
||||
}
|
||||
return regerr2nsresult( err );
|
||||
}
|
||||
|
||||
/*----------------------------- nsRegistry::IsOpen -----------------------------
|
||||
| Tests the mReg handle and returns whether the registry is open or not. |
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
@ -35,6 +35,7 @@ interface nsIRegistry : nsISupports
|
||||
void openWellKnownRegistry(in long regid);
|
||||
void openDefault();
|
||||
void close();
|
||||
void flush();
|
||||
boolean isOpen();
|
||||
|
||||
string getString(in nsRegistryKey baseKey, in string path);
|
||||
|
||||
@ -475,6 +475,19 @@ NS_IMETHODIMP nsRegistry::Close() {
|
||||
return regerr2nsresult( err );
|
||||
}
|
||||
|
||||
/*----------------------------- nsRegistry::Flush ------------------------------
|
||||
| Flushes the registry via NR_RegFlush. |
|
||||
------------------------------------------------------------------------------*/
|
||||
NS_IMETHODIMP nsRegistry::Flush() {
|
||||
REGERR err = REGERR_FAIL;
|
||||
if( mReg ) {
|
||||
PR_Lock(mregLock);
|
||||
err = NR_RegFlush( mReg );
|
||||
PR_Unlock(mregLock);
|
||||
}
|
||||
return regerr2nsresult( err );
|
||||
}
|
||||
|
||||
/*----------------------------- nsRegistry::IsOpen -----------------------------
|
||||
| Tests the mReg handle and returns whether the registry is open or not. |
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user