зеркало из https://github.com/mozilla/gecko-dev.git
nsIRegistry scriptability update, r=dveditz,dp,alecf a=leaf,chofmann
This commit is contained in:
Родитель
f28337480b
Коммит
7a5b9d5e55
|
@ -204,7 +204,7 @@ nsresult nsCharsetConverterManager::CreateMapping()
|
||||||
nsresult res = NS_OK;
|
nsresult res = NS_OK;
|
||||||
nsIRegistry * registry = NULL;
|
nsIRegistry * registry = NULL;
|
||||||
nsIEnumerator * components = NULL;
|
nsIEnumerator * components = NULL;
|
||||||
nsIRegistry::Key uconvKey, key;
|
nsRegistryKey uconvKey, key;
|
||||||
|
|
||||||
// XXX hack; make these dynamic
|
// XXX hack; make these dynamic
|
||||||
mEncSize = mDecSize = 0;
|
mEncSize = mDecSize = 0;
|
||||||
|
|
|
@ -279,7 +279,7 @@ void nsCharsetMenu::CreateDefaultCharsetList(CharsetInfo *** aArray,
|
||||||
nsresult res = NS_OK;
|
nsresult res = NS_OK;
|
||||||
nsIEnumerator * components = NULL;
|
nsIEnumerator * components = NULL;
|
||||||
nsIRegistry * registry = NULL;
|
nsIRegistry * registry = NULL;
|
||||||
nsIRegistry::Key uconvKey, key;
|
nsRegistryKey uconvKey, key;
|
||||||
|
|
||||||
// get the registry
|
// get the registry
|
||||||
res = nsServiceManager::GetService(NS_REGISTRY_PROGID,
|
res = nsServiceManager::GetService(NS_REGISTRY_PROGID,
|
||||||
|
|
|
@ -231,7 +231,7 @@ extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports * aServMgr,
|
||||||
PRUint32 i;
|
PRUint32 i;
|
||||||
nsIComponentManager * compMgr = NULL;
|
nsIComponentManager * compMgr = NULL;
|
||||||
nsIRegistry * registry = NULL;
|
nsIRegistry * registry = NULL;
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
char buff[1024];
|
char buff[1024];
|
||||||
|
|
||||||
// get the service manager
|
// get the service manager
|
||||||
|
|
|
@ -266,7 +266,7 @@ extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports * aServMgr,
|
||||||
PRUint32 i;
|
PRUint32 i;
|
||||||
nsIComponentManager * compMgr = NULL;
|
nsIComponentManager * compMgr = NULL;
|
||||||
nsIRegistry * registry = NULL;
|
nsIRegistry * registry = NULL;
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
char buff[1024];
|
char buff[1024];
|
||||||
|
|
||||||
// get the service manager
|
// get the service manager
|
||||||
|
|
|
@ -198,7 +198,7 @@ extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports * aServMgr,
|
||||||
PRUint32 i;
|
PRUint32 i;
|
||||||
nsIComponentManager * compMgr = NULL;
|
nsIComponentManager * compMgr = NULL;
|
||||||
nsIRegistry * registry = NULL;
|
nsIRegistry * registry = NULL;
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
char buff[1024];
|
char buff[1024];
|
||||||
|
|
||||||
// get the service manager
|
// get the service manager
|
||||||
|
|
|
@ -897,7 +897,7 @@ extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports * aServMgr,
|
||||||
PRUint32 i;
|
PRUint32 i;
|
||||||
nsIComponentManager * compMgr = NULL;
|
nsIComponentManager * compMgr = NULL;
|
||||||
nsIRegistry * registry = NULL;
|
nsIRegistry * registry = NULL;
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
char buff[1024];
|
char buff[1024];
|
||||||
|
|
||||||
// get the service manager
|
// get the service manager
|
||||||
|
|
|
@ -187,7 +187,7 @@ extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports * aServMgr,
|
||||||
PRUint32 i;
|
PRUint32 i;
|
||||||
nsIComponentManager * compMgr = NULL;
|
nsIComponentManager * compMgr = NULL;
|
||||||
nsIRegistry * registry = NULL;
|
nsIRegistry * registry = NULL;
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
char buff[1024];
|
char buff[1024];
|
||||||
|
|
||||||
// get the service manager
|
// get the service manager
|
||||||
|
|
|
@ -266,7 +266,7 @@ extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports * aServMgr,
|
||||||
PRUint32 i;
|
PRUint32 i;
|
||||||
nsIComponentManager * compMgr = NULL;
|
nsIComponentManager * compMgr = NULL;
|
||||||
nsIRegistry * registry = NULL;
|
nsIRegistry * registry = NULL;
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
char buff[1024];
|
char buff[1024];
|
||||||
|
|
||||||
// get the service manager
|
// get the service manager
|
||||||
|
|
|
@ -346,7 +346,7 @@ mozJSComponentLoader::SetRegistryInfo(const char *registryLocation,
|
||||||
return NS_OK; // silent failure
|
return NS_OK; // silent failure
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
rv = mRegistry->GetSubtreeRaw(mXPCOMKey, registryLocation,
|
rv = mRegistry->GetSubtreeRaw(mXPCOMKey, registryLocation,
|
||||||
&key);
|
&key);
|
||||||
|
|
||||||
|
@ -383,7 +383,7 @@ mozJSComponentLoader::HasChanged(const char *registryLocation,
|
||||||
if (!mRegistry)
|
if (!mRegistry)
|
||||||
return PR_TRUE;
|
return PR_TRUE;
|
||||||
|
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
if (NS_FAILED(mRegistry->GetSubtreeRaw(mXPCOMKey, registryLocation, &key)))
|
if (NS_FAILED(mRegistry->GetSubtreeRaw(mXPCOMKey, registryLocation, &key)))
|
||||||
return PR_TRUE;
|
return PR_TRUE;
|
||||||
|
|
||||||
|
@ -559,8 +559,7 @@ mozJSComponentLoader::GlobalForLocation(const char *aLocation,
|
||||||
NS_FAILED(ReallyInit()))
|
NS_FAILED(ReallyInit()))
|
||||||
return nsnull;
|
return nsnull;
|
||||||
|
|
||||||
JSObject *obj = JS_NewObject(mContext, &gGlobalClass, mSuperGlobal,
|
JSObject *obj = JS_NewObject(mContext, &gGlobalClass, mSuperGlobal, NULL);
|
||||||
mSuperGlobal);
|
|
||||||
if (!obj)
|
if (!obj)
|
||||||
return nsnull;
|
return nsnull;
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ public:
|
||||||
|
|
||||||
PLHashTable *mModules;
|
PLHashTable *mModules;
|
||||||
PLHashTable *mGlobals;
|
PLHashTable *mGlobals;
|
||||||
nsIRegistry::Key mXPCOMKey;
|
nsRegistryKey mXPCOMKey;
|
||||||
|
|
||||||
PRBool mInitialized;
|
PRBool mInitialized;
|
||||||
};
|
};
|
||||||
|
|
|
@ -395,7 +395,7 @@ NSRegisterSelf(nsISupports* aServMgr, const char* path)
|
||||||
NS_IAPPSHELLCOMPONENT_KEY,
|
NS_IAPPSHELLCOMPONENT_KEY,
|
||||||
cid ? cid : "unknown" );
|
cid ? cid : "unknown" );
|
||||||
nsCRT::free(cid);
|
nsCRT::free(cid);
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
rv = registry->AddSubtree( nsIRegistry::Common,
|
rv = registry->AddSubtree( nsIRegistry::Common,
|
||||||
buffer,
|
buffer,
|
||||||
&key );
|
&key );
|
||||||
|
|
|
@ -170,9 +170,9 @@ NSGetFactory(nsISupports* aServMgr,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
nsresult GetImportModulesRegKey( nsIRegistry *reg, nsIRegistry::Key *pKey)
|
nsresult GetImportModulesRegKey( nsIRegistry *reg, nsRegistryKey *pKey)
|
||||||
{
|
{
|
||||||
nsIRegistry::Key nScapeKey;
|
nsRegistryKey nScapeKey;
|
||||||
|
|
||||||
nsresult rv = reg->GetSubtree( nsIRegistry::Common, "Netscape", &nScapeKey);
|
nsresult rv = reg->GetSubtree( nsIRegistry::Common, "Netscape", &nScapeKey);
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
|
@ -181,7 +181,7 @@ nsresult GetImportModulesRegKey( nsIRegistry *reg, nsIRegistry::Key *pKey)
|
||||||
if (NS_FAILED( rv))
|
if (NS_FAILED( rv))
|
||||||
return( rv);
|
return( rv);
|
||||||
|
|
||||||
nsIRegistry::Key iKey;
|
nsRegistryKey iKey;
|
||||||
rv = reg->GetSubtree( nScapeKey, "Import", &iKey);
|
rv = reg->GetSubtree( nScapeKey, "Import", &iKey);
|
||||||
if (NS_FAILED( rv)) {
|
if (NS_FAILED( rv)) {
|
||||||
rv = reg->AddSubtree( nScapeKey, "Import", &iKey);
|
rv = reg->AddSubtree( nScapeKey, "Import", &iKey);
|
||||||
|
@ -240,7 +240,7 @@ NSRegisterSelf(nsISupports* aServMgr , const char* aPath)
|
||||||
return( rv);
|
return( rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIRegistry::Key importKey;
|
nsRegistryKey importKey;
|
||||||
|
|
||||||
rv = GetImportModulesRegKey( reg, &importKey);
|
rv = GetImportModulesRegKey( reg, &importKey);
|
||||||
if (NS_FAILED( rv)) {
|
if (NS_FAILED( rv)) {
|
||||||
|
@ -248,7 +248,7 @@ NSRegisterSelf(nsISupports* aServMgr , const char* aPath)
|
||||||
return( rv);
|
return( rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
rv = reg->AddSubtree( importKey, "Outlook Express", &key);
|
rv = reg->AddSubtree( importKey, "Outlook Express", &key);
|
||||||
if (NS_FAILED(rv)) return( rv);
|
if (NS_FAILED(rv)) return( rv);
|
||||||
|
|
||||||
|
|
|
@ -93,8 +93,8 @@ public:
|
||||||
private:
|
private:
|
||||||
nsresult LoadModuleInfo( char *pClsId, const char *pSupports);
|
nsresult LoadModuleInfo( char *pClsId, const char *pSupports);
|
||||||
nsresult DoDiscover( void);
|
nsresult DoDiscover( void);
|
||||||
nsresult GetImportRegKey( nsIRegistry *reg, nsIRegistry::Key *pKey);
|
nsresult GetImportRegKey( nsIRegistry *reg, nsRegistryKey *pKey);
|
||||||
nsresult GetImportModulesRegKey( nsIRegistry *reg, nsIRegistry::Key *pKey);
|
nsresult GetImportModulesRegKey( nsIRegistry *reg, nsRegistryKey *pKey);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
nsImportModuleList * m_pModules;
|
nsImportModuleList * m_pModules;
|
||||||
|
@ -385,9 +385,9 @@ NS_IMETHODIMP nsImportService::GetModule( const char *filter, PRInt32 index, nsI
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
nsresult nsImportService::GetImportRegKey( nsIRegistry *reg, nsIRegistry::Key *pKey)
|
nsresult nsImportService::GetImportRegKey( nsIRegistry *reg, nsRegistryKey *pKey)
|
||||||
{
|
{
|
||||||
nsIRegistry::Key nScapeKey;
|
nsRegistryKey nScapeKey;
|
||||||
|
|
||||||
nsresult rv = reg->GetSubtree( nsIRegistry::Common, "Netscape", &nScapeKey);
|
nsresult rv = reg->GetSubtree( nsIRegistry::Common, "Netscape", &nScapeKey);
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
|
@ -404,9 +404,9 @@ nsresult nsImportService::GetImportRegKey( nsIRegistry *reg, nsIRegistry::Key *p
|
||||||
return( rv);
|
return( rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult nsImportService::GetImportModulesRegKey( nsIRegistry *reg, nsIRegistry::Key *pKey)
|
nsresult nsImportService::GetImportModulesRegKey( nsIRegistry *reg, nsRegistryKey *pKey)
|
||||||
{
|
{
|
||||||
nsIRegistry::Key iKey;
|
nsRegistryKey iKey;
|
||||||
nsresult rv = GetImportRegKey( reg, &iKey);
|
nsresult rv = GetImportRegKey( reg, &iKey);
|
||||||
if (NS_FAILED( rv))
|
if (NS_FAILED( rv))
|
||||||
return( rv);
|
return( rv);
|
||||||
|
@ -437,7 +437,7 @@ nsresult nsImportService::DoDiscover( void)
|
||||||
rv = reg->OpenDefault();
|
rv = reg->OpenDefault();
|
||||||
if (NS_FAILED(rv)) return( rv);
|
if (NS_FAILED(rv)) return( rv);
|
||||||
|
|
||||||
nsIRegistry::Key modulesKey;
|
nsRegistryKey modulesKey;
|
||||||
rv = GetImportModulesRegKey( reg, &modulesKey);
|
rv = GetImportModulesRegKey( reg, &modulesKey);
|
||||||
if (NS_FAILED(rv)) return( rv);
|
if (NS_FAILED(rv)) return( rv);
|
||||||
|
|
||||||
|
@ -464,7 +464,7 @@ nsresult nsImportService::DoDiscover( void)
|
||||||
pNodeName = nsnull;
|
pNodeName = nsnull;
|
||||||
rv = node->GetName( &pNodeName);
|
rv = node->GetName( &pNodeName);
|
||||||
if (NS_SUCCEEDED( rv) && (pNodeName != nsnull)) {
|
if (NS_SUCCEEDED( rv) && (pNodeName != nsnull)) {
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
rv = reg->GetSubtree( modulesKey, pNodeName, &key);
|
rv = reg->GetSubtree( modulesKey, pNodeName, &key);
|
||||||
PR_Free( pNodeName);
|
PR_Free( pNodeName);
|
||||||
if (NS_SUCCEEDED( rv)) {
|
if (NS_SUCCEEDED( rv)) {
|
||||||
|
|
|
@ -192,7 +192,7 @@ NSRegisterSelf(nsISupports* aServMgr, const char* path)
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
{
|
{
|
||||||
// set the key
|
// set the key
|
||||||
nsIRegistry::Key key, key1;
|
nsRegistryKey key, key1;
|
||||||
rv = NS_OK;
|
rv = NS_OK;
|
||||||
if (NS_FAILED(registry->GetSubtree(nsIRegistry::Common, NS_IMIME_MISC_STATUS_KEY, &key)))
|
if (NS_FAILED(registry->GetSubtree(nsIRegistry::Common, NS_IMIME_MISC_STATUS_KEY, &key)))
|
||||||
rv = registry->AddSubtree(nsIRegistry::Common, NS_IMIME_MISC_STATUS_KEY, &key);
|
rv = registry->AddSubtree(nsIRegistry::Common, NS_IMIME_MISC_STATUS_KEY, &key);
|
||||||
|
|
|
@ -1207,7 +1207,7 @@ nsMimeXULEmitter::BuildListOfStatusProviders()
|
||||||
|
|
||||||
// enumerate the registry subkeys
|
// enumerate the registry subkeys
|
||||||
nsIRegistry *registry = nsnull;
|
nsIRegistry *registry = nsnull;
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
nsIEnumerator *components = nsnull;
|
nsIEnumerator *components = nsnull;
|
||||||
miscStatusType *newInfo = nsnull;
|
miscStatusType *newInfo = nsnull;
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ NSRegisterSelf(nsISupports* aServMgr , const char* aPath)
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
// set the key
|
// set the key
|
||||||
nsIRegistry::Key key, key1;
|
nsRegistryKey key, key1;
|
||||||
|
|
||||||
// root key addition
|
// root key addition
|
||||||
rv = registry->AddSubtree(nsIRegistry::Common, NS_ISTREAMCONVERTER_KEY, &key);
|
rv = registry->AddSubtree(nsIRegistry::Common, NS_ISTREAMCONVERTER_KEY, &key);
|
||||||
|
|
|
@ -96,7 +96,7 @@ nsStreamConverterService::BuildGraph() {
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
// enumerate the registry subkeys
|
// enumerate the registry subkeys
|
||||||
nsIRegistry *registry = nsnull;
|
nsIRegistry *registry = nsnull;
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
nsIEnumerator *components = nsnull;
|
nsIEnumerator *components = nsnull;
|
||||||
rv = nsServiceManager::GetService(NS_REGISTRY_PROGID,
|
rv = nsServiceManager::GetService(NS_REGISTRY_PROGID,
|
||||||
NS_GET_IID(nsIRegistry),
|
NS_GET_IID(nsIRegistry),
|
||||||
|
|
|
@ -214,7 +214,7 @@ main(int argc, char* argv[])
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
// set the key
|
// set the key
|
||||||
nsIRegistry::Key key, key1;
|
nsRegistryKey key, key1;
|
||||||
|
|
||||||
rv = registry->AddSubtree(nsIRegistry::Common, NS_ISTREAMCONVERTER_KEY, &key);
|
rv = registry->AddSubtree(nsIRegistry::Common, NS_ISTREAMCONVERTER_KEY, &key);
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
|
@ -274,7 +274,7 @@ main(int argc, char* argv[])
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
// set the key
|
// set the key
|
||||||
nsIRegistry::Key key, key1;
|
nsRegistryKey key, key1;
|
||||||
|
|
||||||
rv = registry->AddSubtree(nsIRegistry::Common, NS_ISTREAMCONVERTER_KEY, &key);
|
rv = registry->AddSubtree(nsIRegistry::Common, NS_ISTREAMCONVERTER_KEY, &key);
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
|
@ -242,7 +242,7 @@ NS_IMETHODIMP nsProfile::Startup(const char *filename)
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
// Add the root Profiles node in the registry
|
// Add the root Profiles node in the registry
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
rv = m_reg->AddSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
rv = m_reg->AddSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
@ -554,14 +554,14 @@ NS_IMETHODIMP nsProfile::GetProfileDir(const char *profileName, nsFileSpec* prof
|
||||||
rv = OpenRegistry();
|
rv = OpenRegistry();
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
|
|
||||||
// Get handle to subtree REGISTRY_PROFILE_SUBTREE_STRING
|
// Get handle to subtree REGISTRY_PROFILE_SUBTREE_STRING
|
||||||
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
{
|
{
|
||||||
nsIRegistry::Key newKey;
|
nsRegistryKey newKey;
|
||||||
|
|
||||||
// Get handle to <profileName> passed
|
// Get handle to <profileName> passed
|
||||||
rv = m_reg->GetSubtree(key, profileName, &newKey);
|
rv = m_reg->GetSubtree(key, profileName, &newKey);
|
||||||
|
@ -671,7 +671,7 @@ NS_IMETHODIMP nsProfile::GetProfileCount(PRInt32 *numProfiles)
|
||||||
|
|
||||||
// Enumerate all subkeys (immediately) under the given node.
|
// Enumerate all subkeys (immediately) under the given node.
|
||||||
nsCOMPtr<nsIEnumerator> enumKeys;
|
nsCOMPtr<nsIEnumerator> enumKeys;
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
|
|
||||||
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
||||||
|
|
||||||
|
@ -709,7 +709,7 @@ NS_IMETHODIMP nsProfile::GetProfileCount(PRInt32 *numProfiles)
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv) && (profile))
|
if (NS_SUCCEEDED(rv) && (profile))
|
||||||
{
|
{
|
||||||
nsIRegistry::Key profKey;
|
nsRegistryKey profKey;
|
||||||
|
|
||||||
rv = m_reg->GetSubtree(key, profile, &profKey);
|
rv = m_reg->GetSubtree(key, profile, &profKey);
|
||||||
|
|
||||||
|
@ -763,7 +763,7 @@ NS_IMETHODIMP nsProfile::GetSingleProfile(char **profileName)
|
||||||
|
|
||||||
// Enumerate all subkeys (immediately) under the given node.
|
// Enumerate all subkeys (immediately) under the given node.
|
||||||
nsCOMPtr<nsIEnumerator> enumKeys;
|
nsCOMPtr<nsIEnumerator> enumKeys;
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
|
|
||||||
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
||||||
|
|
||||||
|
@ -791,7 +791,7 @@ NS_IMETHODIMP nsProfile::GetSingleProfile(char **profileName)
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
{
|
{
|
||||||
nsXPIDLCString isMigrated;
|
nsXPIDLCString isMigrated;
|
||||||
nsIRegistry::Key profKey;
|
nsRegistryKey profKey;
|
||||||
|
|
||||||
// Get node name.
|
// Get node name.
|
||||||
rv = node->GetName(profileName );
|
rv = node->GetName(profileName );
|
||||||
|
@ -894,7 +894,7 @@ nsProfile::GetCurrentProfile(char **profileName)
|
||||||
rv = OpenRegistry();
|
rv = OpenRegistry();
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
|
|
||||||
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
||||||
|
|
||||||
|
@ -1000,13 +1000,13 @@ NS_IMETHODIMP nsProfile::SetProfileDir(const char *profileName, nsFileSpec& prof
|
||||||
rv = OpenRegistry();
|
rv = OpenRegistry();
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
|
|
||||||
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
{
|
{
|
||||||
nsIRegistry::Key newKey;
|
nsRegistryKey newKey;
|
||||||
|
|
||||||
rv = m_reg->AddSubtree(key, profileName, &newKey);
|
rv = m_reg->AddSubtree(key, profileName, &newKey);
|
||||||
|
|
||||||
|
@ -1380,7 +1380,7 @@ NS_IMETHODIMP nsProfile::RenameProfile(const char* oldName, const char* newName)
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
{
|
{
|
||||||
nsIRegistry::Key profileRootKey;
|
nsRegistryKey profileRootKey;
|
||||||
|
|
||||||
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &profileRootKey);
|
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &profileRootKey);
|
||||||
|
|
||||||
|
@ -1399,7 +1399,7 @@ NS_IMETHODIMP nsProfile::RenameProfile(const char* oldName, const char* newName)
|
||||||
nsresult nsProfile::CopyRegKey(const char *oldProfile, const char *newProfile)
|
nsresult nsProfile::CopyRegKey(const char *oldProfile, const char *newProfile)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIEnumerator> enumKeys;
|
nsCOMPtr<nsIEnumerator> enumKeys;
|
||||||
nsIRegistry::Key sourceKey, destKey, profileRootKey;
|
nsRegistryKey sourceKey, destKey, profileRootKey;
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
rv = OpenRegistry();
|
rv = OpenRegistry();
|
||||||
|
@ -1478,7 +1478,7 @@ NS_IMETHODIMP nsProfile::DeleteProfile(const char* profileName, const char* canD
|
||||||
GetProfileDir(profileName, &profileDirSpec);
|
GetProfileDir(profileName, &profileDirSpec);
|
||||||
|
|
||||||
|
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
|
|
||||||
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
@ -1554,7 +1554,7 @@ void nsProfile::GetAllProfiles()
|
||||||
|
|
||||||
// Enumerate all subkeys (immediately) under the given node.
|
// Enumerate all subkeys (immediately) under the given node.
|
||||||
nsCOMPtr<nsIEnumerator> enumKeys;
|
nsCOMPtr<nsIEnumerator> enumKeys;
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
|
|
||||||
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
||||||
|
|
||||||
|
@ -1591,7 +1591,7 @@ void nsProfile::GetAllProfiles()
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv) && (profile))
|
if (NS_SUCCEEDED(rv) && (profile))
|
||||||
{
|
{
|
||||||
nsIRegistry::Key profKey;
|
nsRegistryKey profKey;
|
||||||
|
|
||||||
rv = m_reg->GetSubtree(key, profile, &profKey);
|
rv = m_reg->GetSubtree(key, profile, &profKey);
|
||||||
|
|
||||||
|
@ -1683,7 +1683,7 @@ NS_IMETHODIMP nsProfile::StartCommunicator(const char* profileName)
|
||||||
|
|
||||||
// First, set the profile to be the current profile.
|
// First, set the profile to be the current profile.
|
||||||
// So that FileLocation services grabs right directory when it needs to.
|
// So that FileLocation services grabs right directory when it needs to.
|
||||||
nsIRegistry::Key profileRootKey;
|
nsRegistryKey profileRootKey;
|
||||||
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &profileRootKey);
|
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &profileRootKey);
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
|
@ -1797,7 +1797,7 @@ NS_IMETHODIMP nsProfile::MigrateProfileInfo()
|
||||||
printf("oldProflie = %s\n", profile);
|
printf("oldProflie = %s\n", profile);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
|
|
||||||
rv = oldReg->GetSubtree(nsIRegistry::Users, profile, &key);
|
rv = oldReg->GetSubtree(nsIRegistry::Users, profile, &key);
|
||||||
|
|
||||||
|
@ -1876,12 +1876,12 @@ NS_IMETHODIMP nsProfile::UpdateMozProfileRegistry()
|
||||||
|
|
||||||
for (PRInt32 idx = 0; idx < mNumOldProfiles; idx++)
|
for (PRInt32 idx = 0; idx < mNumOldProfiles; idx++)
|
||||||
{
|
{
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
{
|
{
|
||||||
nsIRegistry::Key newKey;
|
nsRegistryKey newKey;
|
||||||
|
|
||||||
rv = m_reg->SetString(key, REGISTRY_NEED_MIGRATION_STRING, REGISTRY_TRUE_STRING);
|
rv = m_reg->SetString(key, REGISTRY_NEED_MIGRATION_STRING, REGISTRY_TRUE_STRING);
|
||||||
|
|
||||||
|
@ -2019,13 +2019,13 @@ NS_IMETHODIMP nsProfile::MigrateProfile(const char* profileName)
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
//unmark migrate flag
|
//unmark migrate flag
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
|
|
||||||
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
{
|
{
|
||||||
nsIRegistry::Key newKey;
|
nsRegistryKey newKey;
|
||||||
rv = m_reg->GetSubtree(key, profileName, &newKey);
|
rv = m_reg->GetSubtree(key, profileName, &newKey);
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
|
@ -2192,13 +2192,13 @@ NS_IMETHODIMP nsProfile::ProcessPREGInfo(const char* data)
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
{
|
{
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
|
|
||||||
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
{
|
{
|
||||||
nsIRegistry::Key newKey;
|
nsRegistryKey newKey;
|
||||||
|
|
||||||
if (userProfileName.mLength > 0)
|
if (userProfileName.mLength > 0)
|
||||||
{
|
{
|
||||||
|
@ -2257,7 +2257,7 @@ NS_IMETHODIMP nsProfile::IsPregCookieSet(char **pregSet)
|
||||||
rv = OpenRegistry();
|
rv = OpenRegistry();
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
|
|
||||||
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
||||||
|
|
||||||
|
@ -2281,13 +2281,13 @@ NS_IMETHODIMP nsProfile::ProfileExists(const char *profileName)
|
||||||
rv = OpenRegistry();
|
rv = OpenRegistry();
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
|
|
||||||
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
{
|
{
|
||||||
nsIRegistry::Key newKey;
|
nsRegistryKey newKey;
|
||||||
|
|
||||||
// Get handle to <profileName> passed
|
// Get handle to <profileName> passed
|
||||||
rv = m_reg->GetSubtree(key, profileName, &newKey);
|
rv = m_reg->GetSubtree(key, profileName, &newKey);
|
||||||
|
@ -2318,7 +2318,7 @@ NS_IMETHODIMP nsProfile::Get4xProfileCount(PRInt32 *numProfiles)
|
||||||
|
|
||||||
// Enumerate all subkeys (immediately) under the given node.
|
// Enumerate all subkeys (immediately) under the given node.
|
||||||
nsCOMPtr<nsIEnumerator> enumKeys;
|
nsCOMPtr<nsIEnumerator> enumKeys;
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
|
|
||||||
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
rv = m_reg->GetSubtree(nsIRegistry::Common, REGISTRY_PROFILE_SUBTREE_STRING, &key);
|
||||||
|
|
||||||
|
@ -2356,7 +2356,7 @@ NS_IMETHODIMP nsProfile::Get4xProfileCount(PRInt32 *numProfiles)
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv) && (profile))
|
if (NS_SUCCEEDED(rv) && (profile))
|
||||||
{
|
{
|
||||||
nsIRegistry::Key profKey;
|
nsRegistryKey profKey;
|
||||||
|
|
||||||
rv = m_reg->GetSubtree(key, profile, &profKey);
|
rv = m_reg->GetSubtree(key, profile, &profKey);
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#include "prmem.h"
|
#include "prmem.h"
|
||||||
#include "plstr.h"
|
#include "plstr.h"
|
||||||
|
|
||||||
static void display( nsIRegistry *reg, nsIRegistry::Key root, const char *name );
|
static void display( nsIRegistry *reg, nsRegistryKey root, const char *name );
|
||||||
static void displayValues( nsIRegistry *reg, nsIRegistry::Key root );
|
static void displayValues( nsIRegistry *reg, nsRegistryKey root );
|
||||||
static void printString( const char *value, int indent );
|
static void printString( const char *value, int indent );
|
||||||
|
|
||||||
int main( int argc, char *argv[] ) {
|
int main( int argc, char *argv[] ) {
|
||||||
|
@ -115,7 +115,7 @@ int main( int argc, char *argv[] ) {
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
void display( nsIRegistry *reg, nsIRegistry::Key root, const char *rootName ) {
|
void display( nsIRegistry *reg, nsRegistryKey root, const char *rootName ) {
|
||||||
// Print out key name.
|
// Print out key name.
|
||||||
printf( "%s\n", rootName );
|
printf( "%s\n", rootName );
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ void display( nsIRegistry *reg, nsIRegistry::Key root, const char *rootName ) {
|
||||||
PL_strcat( fullName, " - " );
|
PL_strcat( fullName, " - " );
|
||||||
PL_strcat( fullName, name );
|
PL_strcat( fullName, name );
|
||||||
// Display contents under this subkey.
|
// Display contents under this subkey.
|
||||||
nsIRegistry::Key key;
|
nsRegistryKey key;
|
||||||
rv = reg->GetSubtreeRaw( root, name, &key );
|
rv = reg->GetSubtreeRaw( root, name, &key );
|
||||||
if ( rv == NS_OK ) {
|
if ( rv == NS_OK ) {
|
||||||
display( reg, key, fullName );
|
display( reg, key, fullName );
|
||||||
|
@ -200,7 +200,7 @@ void display( nsIRegistry *reg, nsIRegistry::Key root, const char *rootName ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void displayValues( nsIRegistry *reg, nsIRegistry::Key root ) {
|
static void displayValues( nsIRegistry *reg, nsRegistryKey root ) {
|
||||||
// Emumerate values at this registry location.
|
// Emumerate values at this registry location.
|
||||||
nsIEnumerator *values;
|
nsIEnumerator *values;
|
||||||
nsresult rv = reg->EnumerateValues( root, &values );
|
nsresult rv = reg->EnumerateValues( root, &values );
|
||||||
|
|
Загрузка…
Ссылка в новой задаче