зеркало из https://github.com/mozilla/gecko-dev.git
Bug 663036 part.2 Implement GetComplex() and SetComplex() in Preferences r=roc
This commit is contained in:
Родитель
5ad968ec2f
Коммит
82aeafcc35
|
@ -174,6 +174,9 @@ public:
|
|||
static nsresult GetLocalizedCString(const char* aPref, nsACString* aResult);
|
||||
static nsresult GetLocalizedString(const char* aPref, nsAString* aResult);
|
||||
|
||||
static nsresult GetComplex(const char* aPref, const nsIID &aType,
|
||||
void** aResult);
|
||||
|
||||
/**
|
||||
* Sets various type pref values.
|
||||
*/
|
||||
|
@ -188,6 +191,9 @@ public:
|
|||
static nsresult SetString(const char* aPref, const PRUnichar* aValue);
|
||||
static nsresult SetString(const char* aPref, const nsAString &aValue);
|
||||
|
||||
static nsresult SetComplex(const char* aPref, const nsIID &aType,
|
||||
nsISupports* aValue);
|
||||
|
||||
/**
|
||||
* Clears user set pref.
|
||||
*/
|
||||
|
|
|
@ -1252,6 +1252,14 @@ Preferences::GetLocalizedString(const char* aPref, nsAString* aResult)
|
|||
return rv;
|
||||
}
|
||||
|
||||
// static
|
||||
nsresult
|
||||
Preferences::GetComplex(const char* aPref, const nsIID &aType, void** aResult)
|
||||
{
|
||||
NS_ENSURE_TRUE(InitStaticMembers(), NS_ERROR_NOT_AVAILABLE);
|
||||
return sPreferences->mRootBranch->GetComplexValue(aPref, aType, aResult);
|
||||
}
|
||||
|
||||
// static
|
||||
nsresult
|
||||
Preferences::SetCString(const char* aPref, const char* aValue)
|
||||
|
@ -1299,6 +1307,15 @@ Preferences::SetInt(const char* aPref, PRInt32 aValue)
|
|||
return sPreferences->mRootBranch->SetIntPref(aPref, aValue);
|
||||
}
|
||||
|
||||
// static
|
||||
nsresult
|
||||
Preferences::SetComplex(const char* aPref, const nsIID &aType,
|
||||
nsISupports* aValue)
|
||||
{
|
||||
NS_ENSURE_TRUE(InitStaticMembers(), NS_ERROR_NOT_AVAILABLE);
|
||||
return sPreferences->mRootBranch->SetComplexValue(aPref, aType, aValue);
|
||||
}
|
||||
|
||||
// static
|
||||
nsresult
|
||||
Preferences::ClearUser(const char* aPref)
|
||||
|
|
Загрузка…
Ссылка в новой задаче