New interface method.

This commit is contained in:
cata%netscape.com 2000-04-22 17:49:55 +00:00
parent eedb5ba9d2
commit 15dea921fa
2 changed files with 15 additions and 0 deletions

View File

@ -92,6 +92,11 @@ interface nsICharsetConverterManager2 : nsISupports
*/
nsIAtom GetCharsetAtom([const] in wstring charset);
/**
* Friendlier version.
*/
nsIAtom GetCharsetAtom2([const] in string charset);
/**
* Get the human-readable name for the given charset.
*/

View File

@ -161,6 +161,7 @@ public:
NS_IMETHOD GetCharsetDetectorList(nsISupportsArray ** aResult);
NS_IMETHOD GetCharsetAtom(const PRUnichar * aCharset, nsIAtom ** aResult);
NS_IMETHOD GetCharsetAtom2(const char * aCharset, nsIAtom ** aResult);
NS_IMETHOD GetCharsetTitle(const nsIAtom * aCharset, PRUnichar ** aResult);
NS_IMETHOD GetCharsetTitle2(const nsIAtom * aCharset, nsString * aResult);
NS_IMETHOD GetCharsetData(const nsIAtom * aCharset, const PRUnichar * aProp,
@ -1037,6 +1038,15 @@ NS_IMETHODIMP nsCharsetConverterManager::GetCharsetAtom(
return NS_OK;
}
NS_IMETHODIMP nsCharsetConverterManager::GetCharsetAtom2(
const char * aCharset,
nsIAtom ** aResult)
{
nsAutoString str;
str.AssignWithConversion(aCharset);
return GetCharsetAtom(str.GetUnicode(), aResult);
}
NS_IMETHODIMP nsCharsetConverterManager::GetCharsetTitle(
const nsIAtom * aCharset,
PRUnichar ** aResult)