DOM API string changes...
git-svn-id: svn://10.0.0.236/branches/DOMAPISTRING_20000811_BRANCH@76161 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2429,9 +2429,9 @@ public:
|
||||
virtual ~DOMMimeTypeImpl() {
|
||||
}
|
||||
|
||||
NS_METHOD GetDescription(nsString& aDescription)
|
||||
NS_METHOD GetDescription(nsAWritableString& aDescription)
|
||||
{
|
||||
aDescription = mDescription;
|
||||
aDescription.Assign(mDescription);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -2442,15 +2442,15 @@ public:
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD GetSuffixes(nsString& aSuffixes)
|
||||
NS_METHOD GetSuffixes(nsAWritableString& aSuffixes)
|
||||
{
|
||||
aSuffixes = mSuffixes;
|
||||
aSuffixes.Assign(mSuffixes);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD GetType(nsString& aType)
|
||||
NS_METHOD GetType(nsAWritableString& aType)
|
||||
{
|
||||
aType = mType;
|
||||
aType.Assign(mType);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -2474,21 +2474,21 @@ public:
|
||||
virtual ~DOMPluginImpl() {
|
||||
}
|
||||
|
||||
NS_METHOD GetDescription(nsString& aDescription)
|
||||
NS_METHOD GetDescription(nsAWritableString& aDescription)
|
||||
{
|
||||
aDescription.AssignWithConversion(mPluginTag.mDescription);
|
||||
aDescription.Assign(NS_ConvertASCIItoUCS2(mPluginTag.mDescription));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD GetFilename(nsString& aFilename)
|
||||
NS_METHOD GetFilename(nsAWritableString& aFilename)
|
||||
{
|
||||
aFilename.AssignWithConversion(mPluginTag.mFileName);
|
||||
aFilename.Assign(NS_ConvertASCIItoUCS2(mPluginTag.mFileName));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD GetName(nsString& aName)
|
||||
NS_METHOD GetName(nsAWritableString& aName)
|
||||
{
|
||||
aName.AssignWithConversion(mPluginTag.mName);
|
||||
aName.Assign(NS_ConvertASCIItoUCS2(mPluginTag.mName));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -2506,10 +2506,10 @@ public:
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD NamedItem(const nsString& aName, nsIDOMMimeType** aReturn)
|
||||
NS_METHOD NamedItem(const nsAReadableString& aName, nsIDOMMimeType** aReturn)
|
||||
{
|
||||
for (int index = mPluginTag.mVariants - 1; index >= 0; --index) {
|
||||
if (aName.EqualsWithConversion(mPluginTag.mMimeTypeArray[index]))
|
||||
if (aName.Equals(NS_ConvertASCIItoUCS2(mPluginTag.mMimeTypeArray[index])))
|
||||
return Item(index, aReturn);
|
||||
}
|
||||
return NS_OK;
|
||||
|
||||
@@ -2429,9 +2429,9 @@ public:
|
||||
virtual ~DOMMimeTypeImpl() {
|
||||
}
|
||||
|
||||
NS_METHOD GetDescription(nsString& aDescription)
|
||||
NS_METHOD GetDescription(nsAWritableString& aDescription)
|
||||
{
|
||||
aDescription = mDescription;
|
||||
aDescription.Assign(mDescription);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -2442,15 +2442,15 @@ public:
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD GetSuffixes(nsString& aSuffixes)
|
||||
NS_METHOD GetSuffixes(nsAWritableString& aSuffixes)
|
||||
{
|
||||
aSuffixes = mSuffixes;
|
||||
aSuffixes.Assign(mSuffixes);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD GetType(nsString& aType)
|
||||
NS_METHOD GetType(nsAWritableString& aType)
|
||||
{
|
||||
aType = mType;
|
||||
aType.Assign(mType);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -2474,21 +2474,21 @@ public:
|
||||
virtual ~DOMPluginImpl() {
|
||||
}
|
||||
|
||||
NS_METHOD GetDescription(nsString& aDescription)
|
||||
NS_METHOD GetDescription(nsAWritableString& aDescription)
|
||||
{
|
||||
aDescription.AssignWithConversion(mPluginTag.mDescription);
|
||||
aDescription.Assign(NS_ConvertASCIItoUCS2(mPluginTag.mDescription));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD GetFilename(nsString& aFilename)
|
||||
NS_METHOD GetFilename(nsAWritableString& aFilename)
|
||||
{
|
||||
aFilename.AssignWithConversion(mPluginTag.mFileName);
|
||||
aFilename.Assign(NS_ConvertASCIItoUCS2(mPluginTag.mFileName));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD GetName(nsString& aName)
|
||||
NS_METHOD GetName(nsAWritableString& aName)
|
||||
{
|
||||
aName.AssignWithConversion(mPluginTag.mName);
|
||||
aName.Assign(NS_ConvertASCIItoUCS2(mPluginTag.mName));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -2506,10 +2506,10 @@ public:
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD NamedItem(const nsString& aName, nsIDOMMimeType** aReturn)
|
||||
NS_METHOD NamedItem(const nsAReadableString& aName, nsIDOMMimeType** aReturn)
|
||||
{
|
||||
for (int index = mPluginTag.mVariants - 1; index >= 0; --index) {
|
||||
if (aName.EqualsWithConversion(mPluginTag.mMimeTypeArray[index]))
|
||||
if (aName.Equals(NS_ConvertASCIItoUCS2(mPluginTag.mMimeTypeArray[index])))
|
||||
return Item(index, aReturn);
|
||||
}
|
||||
return NS_OK;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "nsILoadGroup.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsIIOService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIChannel.h"
|
||||
@@ -67,11 +68,11 @@ NS_NewURI(nsIURI* *result,
|
||||
|
||||
inline nsresult
|
||||
NS_NewURI(nsIURI* *result,
|
||||
const nsString& spec,
|
||||
const nsAReadableString& spec,
|
||||
nsIURI* baseURI = nsnull,
|
||||
nsIIOService* ioService = nsnull) // pass in nsIIOService to optimize callers
|
||||
{
|
||||
char* specStr = spec.ToNewUTF8String(); // this forces a single byte char*
|
||||
char* specStr = ToNewUTF8String(spec); // this forces a single byte char*
|
||||
if (specStr == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
nsresult rv = NS_NewURI(result, specStr, baseURI, ioService);
|
||||
@@ -202,13 +203,13 @@ NS_MakeAbsoluteURI(char* *result,
|
||||
}
|
||||
|
||||
inline nsresult
|
||||
NS_MakeAbsoluteURI(nsString& result,
|
||||
const nsString& spec,
|
||||
NS_MakeAbsoluteURI(nsAWritableString& result,
|
||||
const nsAReadableString& spec,
|
||||
nsIURI* baseURI = nsnull,
|
||||
nsIIOService* ioService = nsnull) // pass in nsIIOService to optimize callers
|
||||
{
|
||||
char* resultStr;
|
||||
char* specStr = spec.ToNewUTF8String();
|
||||
char* specStr = ToNewUTF8String(spec);
|
||||
if (!specStr) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "nsIStreamConverter.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsString2.h"
|
||||
#include "nsString.h"
|
||||
#include "nsILocale.h"
|
||||
#include "nsIDateTimeFormat.h"
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
#include "nsIBinaryInputStream.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIByteArrayInputStream.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#ifdef DEBUG
|
||||
#include "pure.h"
|
||||
#endif
|
||||
@@ -141,4 +142,10 @@ void XXXNeverCalled()
|
||||
nsLinebreakConverter::eLinebreakAny, nsLinebreakConverter::eLinebreakContent);
|
||||
NS_NewLocalFile(NULL, PR_FALSE, NULL);
|
||||
NS_NewByteArrayInputStream (NULL, NULL, 0);
|
||||
nsAutoString str1;
|
||||
nsCAutoString str2;
|
||||
ToNewUnicode(str1);
|
||||
ToNewUnicode(str2);
|
||||
ToNewCString(str1);
|
||||
ToNewCString(str2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user