bug 157624 - prep for freezing nsISupports* primitives by renaming the string classes appropriately

nsISupportsString  -> nsISupportsCString
nsISupportsWString -> nsISupportsString
r=dougt, sr=jag
This commit is contained in:
alecf%netscape.com 2002-08-06 00:53:19 +00:00
Родитель 3c7f281420
Коммит 3703f3c61b
150 изменённых файлов: 491 добавлений и 3656 удалений

Просмотреть файл

@ -291,7 +291,7 @@ nsContentAreaDragDrop::ExtractURLFromData(const nsACString & inFlavor, nsISuppor
if ( inFlavor.Equals(kUnicodeMime) ) {
// the data is regular unicode, just go with what we get. It may be a url, it
// may not be. *shrug*
nsCOMPtr<nsISupportsWString> stringData(do_QueryInterface(inDataWrapper));
nsCOMPtr<nsISupportsString> stringData(do_QueryInterface(inDataWrapper));
if ( stringData ) {
nsXPIDLString data;
stringData->GetData(getter_Copies(data));
@ -301,7 +301,7 @@ nsContentAreaDragDrop::ExtractURLFromData(const nsACString & inFlavor, nsISuppor
else if ( inFlavor.Equals(kURLMime) ) {
// the data is an internet shortcut of the form <url>\n<title>. Strip
// out the url piece and return that.
nsCOMPtr<nsISupportsWString> stringData(do_QueryInterface(inDataWrapper));
nsCOMPtr<nsISupportsString> stringData(do_QueryInterface(inDataWrapper));
if ( stringData ) {
nsXPIDLString data;
stringData->GetData(getter_Copies(data));
@ -912,7 +912,7 @@ nsContentAreaDragDrop::CreateTransferable(const nsAString & inURLString, const n
nsAutoString dragData ( inURLString );
dragData += NS_LITERAL_STRING("\n");
dragData += inTitleString;
nsCOMPtr<nsISupportsWString> urlPrimitive(do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID));
nsCOMPtr<nsISupportsString> urlPrimitive(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
if ( !urlPrimitive )
return NS_ERROR_FAILURE;
urlPrimitive->SetData(dragData.get());
@ -920,7 +920,7 @@ nsContentAreaDragDrop::CreateTransferable(const nsAString & inURLString, const n
}
// add the full html
nsCOMPtr<nsISupportsWString> htmlPrimitive(do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID));
nsCOMPtr<nsISupportsString> htmlPrimitive(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
if ( !htmlPrimitive )
return NS_ERROR_FAILURE;
htmlPrimitive->SetData(PromiseFlatString(inHTMLString).get());
@ -929,7 +929,7 @@ nsContentAreaDragDrop::CreateTransferable(const nsAString & inURLString, const n
// add the plain (unicode) text. we use the url for text/unicode data if an anchor
// is being dragged, rather than the title text of the link or the alt text for
// an anchor image.
nsCOMPtr<nsISupportsWString> textPrimitive(do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID));
nsCOMPtr<nsISupportsString> textPrimitive(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
if ( !textPrimitive )
return NS_ERROR_FAILURE;
textPrimitive->SetData(PromiseFlatString(inIsAnchor ? inURLString : inTitleString).get());

Просмотреть файл

@ -78,7 +78,7 @@ nsContentPolicy::nsContentPolicy()
*/
nsCOMPtr<nsISupports> item;
while (NS_SUCCEEDED(catEnum->GetNext(getter_AddRefs(item)))) {
nsCOMPtr<nsISupportsString> string = do_QueryInterface(item, &rv);
nsCOMPtr<nsISupportsCString> string = do_QueryInterface(item, &rv);
if (NS_FAILED(rv))
continue;

Просмотреть файл

@ -195,14 +195,14 @@ nsresult nsCopySupport::HTMLCopy(nsISelection *aSel, nsIDocument *aDoc, PRInt16
}
// get wStrings to hold clip data
nsCOMPtr<nsISupportsWString> dataWrapper, contextWrapper, infoWrapper;
dataWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID);
nsCOMPtr<nsISupportsString> dataWrapper, contextWrapper, infoWrapper;
dataWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(dataWrapper, NS_ERROR_FAILURE);
if (bIsHTMLCopy)
{
contextWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID);
contextWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(contextWrapper, NS_ERROR_FAILURE);
infoWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID);
infoWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(infoWrapper, NS_ERROR_FAILURE);
}

Просмотреть файл

@ -6257,7 +6257,7 @@ DocumentViewerImpl::CheckForPrinters(nsIPrintOptions* aPrintOptions,
aPrintSettings->GetPrinterName(&defPrinterName);
if (!defPrinterName || (defPrinterName && !*defPrinterName)) {
if (defPrinterName) nsMemory::Free(defPrinterName);
nsCOMPtr<nsISupportsWString> wStr = do_QueryInterface(supps);
nsCOMPtr<nsISupportsString> wStr = do_QueryInterface(supps);
if (wStr) {
PRUnichar* defPrinterName;
wStr->ToString(&defPrinterName);

Просмотреть файл

@ -1133,10 +1133,10 @@ nsDOMClassInfo::RegisterExternalClasses()
nsCOMPtr<nsISupports> entry;
while (NS_SUCCEEDED(e->GetNext(getter_AddRefs(entry)))) {
nsCOMPtr<nsISupportsString> category(do_QueryInterface(entry));
nsCOMPtr<nsISupportsCString> category(do_QueryInterface(entry));
if (!category) {
NS_WARNING("Category entry not an nsISupportsString!");
NS_WARNING("Category entry not an nsISupportsCString!");
continue;
}

Просмотреть файл

@ -176,10 +176,10 @@ nsScriptNameSpaceManager::FillHash(nsICategoryManager *aCategoryManager,
nsCOMPtr<nsISupports> entry;
while (NS_SUCCEEDED(e->GetNext(getter_AddRefs(entry)))) {
nsCOMPtr<nsISupportsString> category(do_QueryInterface(entry));
nsCOMPtr<nsISupportsCString> category(do_QueryInterface(entry));
if (!category) {
NS_WARNING("Category entry not an nsISupportsString!");
NS_WARNING("Category entry not an nsISupportsCString!");
continue;
}
@ -302,10 +302,10 @@ nsScriptNameSpaceManager::RegisterExternalInterfaces(PRBool aAsProto)
PRBool found_old, dom_prefix;
while (NS_SUCCEEDED(enumerator->GetNext(getter_AddRefs(entry)))) {
nsCOMPtr<nsISupportsString> category(do_QueryInterface(entry));
nsCOMPtr<nsISupportsCString> category(do_QueryInterface(entry));
if (!category) {
NS_WARNING("Category entry not an nsISupportsString!");
NS_WARNING("Category entry not an nsISupportsCString!");
continue;
}

Просмотреть файл

@ -176,10 +176,10 @@ nsScriptNameSpaceManager::FillHash(nsICategoryManager *aCategoryManager,
nsCOMPtr<nsISupports> entry;
while (NS_SUCCEEDED(e->GetNext(getter_AddRefs(entry)))) {
nsCOMPtr<nsISupportsString> category(do_QueryInterface(entry));
nsCOMPtr<nsISupportsCString> category(do_QueryInterface(entry));
if (!category) {
NS_WARNING("Category entry not an nsISupportsString!");
NS_WARNING("Category entry not an nsISupportsCString!");
continue;
}
@ -302,10 +302,10 @@ nsScriptNameSpaceManager::RegisterExternalInterfaces(PRBool aAsProto)
PRBool found_old, dom_prefix;
while (NS_SUCCEEDED(enumerator->GetNext(getter_AddRefs(entry)))) {
nsCOMPtr<nsISupportsString> category(do_QueryInterface(entry));
nsCOMPtr<nsISupportsCString> category(do_QueryInterface(entry));
if (!category) {
NS_WARNING("Category entry not an nsISupportsString!");
NS_WARNING("Category entry not an nsISupportsCString!");
continue;
}

Просмотреть файл

@ -805,7 +805,7 @@ NS_IMETHODIMP nsHTMLEditor::InsertFromTransferable(nsITransferable *transferable
#endif
if (flavor.Equals(NS_LITERAL_STRING(kHTMLMime)))
{
nsCOMPtr<nsISupportsWString> textDataObj ( do_QueryInterface(genericDataObj) );
nsCOMPtr<nsISupportsString> textDataObj ( do_QueryInterface(genericDataObj) );
if (textDataObj && len > 0)
{
PRUnichar* text = nsnull;
@ -821,7 +821,7 @@ NS_IMETHODIMP nsHTMLEditor::InsertFromTransferable(nsITransferable *transferable
}
else if (flavor.Equals(NS_LITERAL_STRING(kUnicodeMime)))
{
nsCOMPtr<nsISupportsWString> textDataObj ( do_QueryInterface(genericDataObj) );
nsCOMPtr<nsISupportsString> textDataObj ( do_QueryInterface(genericDataObj) );
if (textDataObj && len > 0)
{
PRUnichar* text = nsnull;
@ -943,7 +943,7 @@ NS_IMETHODIMP nsHTMLEditor::InsertFromDrop(nsIDOMEvent* aDropEvent)
nsAutoString contextStr, infoStr;
nsCOMPtr<nsISupports> contextDataObj, infoDataObj;
PRUint32 contextLen, infoLen;
nsCOMPtr<nsISupportsWString> textDataObj;
nsCOMPtr<nsISupportsString> textDataObj;
nsCOMPtr<nsITransferable> contextTrans = do_CreateInstance(kCTransferableCID);
NS_ENSURE_TRUE(contextTrans, NS_ERROR_NULL_POINTER);
@ -1264,9 +1264,9 @@ NS_IMETHODIMP nsHTMLEditor::DoDrag(nsIDOMEvent *aDragEvent)
// if we have an empty string, we're done; otherwise continue
if ( !buffer.IsEmpty() )
{
nsCOMPtr<nsISupportsWString> dataWrapper, contextWrapper, infoWrapper;
nsCOMPtr<nsISupportsString> dataWrapper, contextWrapper, infoWrapper;
dataWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID);
dataWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(dataWrapper, NS_ERROR_FAILURE);
rv = dataWrapper->SetData( NS_CONST_CAST(PRUnichar*, buffer.get()) );
if (NS_FAILED(rv)) return rv;
@ -1285,9 +1285,9 @@ NS_IMETHODIMP nsHTMLEditor::DoDrag(nsIDOMEvent *aDragEvent)
}
else
{
contextWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID);
contextWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(contextWrapper, NS_ERROR_FAILURE);
infoWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID);
infoWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(infoWrapper, NS_ERROR_FAILURE);
contextWrapper->SetData ( NS_CONST_CAST(PRUnichar*,parents.get()) );
@ -1367,7 +1367,7 @@ NS_IMETHODIMP nsHTMLEditor::Paste(PRInt32 aSelectionType)
nsAutoString contextStr, infoStr;
nsCOMPtr<nsISupports> contextDataObj, infoDataObj;
PRUint32 contextLen, infoLen;
nsCOMPtr<nsISupportsWString> textDataObj;
nsCOMPtr<nsISupportsString> textDataObj;
nsCOMPtr<nsITransferable> contextTrans = do_CreateInstance(kCTransferableCID);
NS_ENSURE_TRUE(contextTrans, NS_ERROR_NULL_POINTER);
@ -1437,9 +1437,9 @@ NS_IMETHODIMP nsHTMLEditor::CanPaste(PRInt32 aSelectionType, PRBool *aCanPaste)
// add the flavors for all editors
for (const char* const* flavor = textEditorFlavors; *flavor; flavor++)
{
nsCOMPtr<nsISupportsString> flavorString;
nsComponentManager::CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, nsnull,
NS_GET_IID(nsISupportsString), getter_AddRefs(flavorString));
nsCOMPtr<nsISupportsCString> flavorString;
nsComponentManager::CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID, nsnull,
NS_GET_IID(nsISupportsCString), getter_AddRefs(flavorString));
if (flavorString)
{
flavorString->SetData(*flavor);
@ -1454,9 +1454,9 @@ NS_IMETHODIMP nsHTMLEditor::CanPaste(PRInt32 aSelectionType, PRBool *aCanPaste)
*htmlFlavor;
htmlFlavor++)
{
nsCOMPtr<nsISupportsString> flavorString;
nsComponentManager::CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, nsnull,
NS_GET_IID(nsISupportsString), getter_AddRefs(flavorString));
nsCOMPtr<nsISupportsCString> flavorString;
nsComponentManager::CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID, nsnull,
NS_GET_IID(nsISupportsCString), getter_AddRefs(flavorString));
if (flavorString)
{
flavorString->SetData(*htmlFlavor);
@ -1578,7 +1578,7 @@ NS_IMETHODIMP nsHTMLEditor::PasteAsPlaintextQuotation(PRInt32 aSelectionType)
nsAutoString stuffToPaste;
if (flavor.Equals(NS_LITERAL_STRING(kUnicodeMime)))
{
nsCOMPtr<nsISupportsWString> textDataObj ( do_QueryInterface(genericDataObj) );
nsCOMPtr<nsISupportsString> textDataObj ( do_QueryInterface(genericDataObj) );
if (textDataObj && len > 0)
{
PRUnichar* text = nsnull;

Просмотреть файл

@ -165,7 +165,7 @@ NS_IMETHODIMP nsPlaintextEditor::InsertTextFromTransferable(nsITransferable *tra
flavor.AssignWithConversion( bestFlavor ); // just so we can use flavor.Equals()
if (flavor.Equals(NS_LITERAL_STRING(kUnicodeMime)))
{
nsCOMPtr<nsISupportsWString> textDataObj ( do_QueryInterface(genericDataObj) );
nsCOMPtr<nsISupportsString> textDataObj ( do_QueryInterface(genericDataObj) );
if (textDataObj && len > 0)
{
PRUnichar* text = nsnull;
@ -493,7 +493,7 @@ NS_IMETHODIMP nsPlaintextEditor::DoDrag(nsIDOMEvent *aDragEvent)
// if we have an empty string, we're done; otherwise continue
if ( !buffer.IsEmpty() )
{
nsCOMPtr<nsISupportsWString> dataWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID);
nsCOMPtr<nsISupportsString> dataWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(dataWrapper, NS_ERROR_FAILURE);
rv = dataWrapper->SetData( NS_CONST_CAST(PRUnichar*, buffer.get()) );
@ -601,9 +601,9 @@ NS_IMETHODIMP nsPlaintextEditor::CanPaste(PRInt32 aSelectionType, PRBool *aCanPa
// add the flavors for text editors
for (const char* const* flavor = textEditorFlavors; *flavor; flavor++)
{
nsCOMPtr<nsISupportsString> flavorString;
nsComponentManager::CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, nsnull,
NS_GET_IID(nsISupportsString), getter_AddRefs(flavorString));
nsCOMPtr<nsISupportsCString> flavorString;
nsComponentManager::CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID, nsnull,
NS_GET_IID(nsISupportsCString), getter_AddRefs(flavorString));
if (flavorString)
{
flavorString->SetData(*flavor);

Просмотреть файл

@ -1624,7 +1624,7 @@ nsPlaintextEditor::PasteAsQuotation(PRInt32 aSelectionType)
nsAutoString stuffToPaste;
if (flavor.Equals(NS_LITERAL_STRING(kUnicodeMime)))
{
nsCOMPtr<nsISupportsWString> textDataObj ( do_QueryInterface(genericDataObj) );
nsCOMPtr<nsISupportsString> textDataObj ( do_QueryInterface(genericDataObj) );
if (textDataObj && len > 0)
{
PRUnichar* text = nsnull;

Просмотреть файл

@ -2280,7 +2280,7 @@ function EditorSetDefaultPrefsAndDoctype()
try
{
prefAuthorString = gPrefs.getComplexValue("editor.author",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
}
catch (ex) {}
if ( prefAuthorString && prefAuthorString != 0)

Просмотреть файл

@ -260,10 +260,10 @@ function SetUnicharPref(aPrefName, aPrefValue)
if (prefs)
{
try {
var str = Components.classes["@mozilla.org/supports-wstring;1"]
.createInstance(Components.interfaces.nsISupportsWString);
var str = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsString);
str.data = aPrefValue;
prefs.setComplexValue(aPrefName, Components.interfaces.nsISupportsWString, str);
prefs.setComplexValue(aPrefName, Components.interfaces.nsISupportsString, str);
}
catch(e) {}
}
@ -275,7 +275,7 @@ function GetUnicharPref(aPrefName, aDefVal)
if (prefs)
{
try {
return prefs.getComplexValue(aPrefName, Components.interfaces.nsISupportsWString).data;
return prefs.getComplexValue(aPrefName, Components.interfaces.nsISupportsString).data;
}
catch(e) {}
}

Просмотреть файл

@ -764,7 +764,7 @@ function GetPublishStringPref(prefBranch, name)
if (prefBranch && name)
{
try {
return prefBranch.getComplexValue(name, Components.interfaces.nsISupportsWString).data;
return prefBranch.getComplexValue(name, Components.interfaces.nsISupportsString).data;
} catch (e) {}
}
return "";
@ -775,10 +775,10 @@ function SetPublishStringPref(prefBranch, name, value)
if (prefBranch && name)
{
try {
var str = Components.classes["@mozilla.org/supports-wstring;1"]
.createInstance(Components.interfaces.nsISupportsWString);
var str = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsString);
str.data = value;
prefBranch.setComplexValue(name, Components.interfaces.nsISupportsWString, str);
prefBranch.setComplexValue(name, Components.interfaces.nsISupportsString, str);
} catch (e) {}
}
}

Просмотреть файл

@ -72,7 +72,7 @@ NS_IMETHODIMP nsAppStartupNotifier::Observe(nsISupports *aSubject, const char *a
nsCOMPtr<nsISupports> entry;
while (NS_SUCCEEDED(enumerator->GetNext(getter_AddRefs(entry)))) {
nsCOMPtr<nsISupportsString> category = do_QueryInterface(entry, &rv);
nsCOMPtr<nsISupportsCString> category = do_QueryInterface(entry, &rv);
if (NS_SUCCEEDED(rv)) {
nsXPIDLCString categoryEntry;

Просмотреть файл

@ -126,7 +126,7 @@ nsGroupsEnumerator::GetNext(nsISupports **_retval)
char *thisGroupName = mGroupNames[mIndex];
nsCOMPtr<nsISupportsString> supportsString = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);
nsCOMPtr<nsISupportsCString> supportsString = do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
supportsString->SetData(thisGroupName);
@ -222,7 +222,7 @@ nsNamedGroupEnumerator::GetNext(nsISupports **_retval)
PRUnichar *thisGroupName = (PRUnichar *)mGroupArray->ElementAt(mIndex);
nsresult rv;
nsCOMPtr<nsISupportsWString> supportsString = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv);
nsCOMPtr<nsISupportsString> supportsString = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);
if (NS_FAILED(rv)) return rv;
supportsString->SetData(thisGroupName);

Просмотреть файл

@ -1736,8 +1736,8 @@ nsWindowWatcher::AddSupportsTojsvals(nsISupports *aArg,
argPrimitive->GetType(&type);
switch(type) {
case nsISupportsPrimitive::TYPE_STRING : {
nsCOMPtr<nsISupportsString> p(do_QueryInterface(argPrimitive));
case nsISupportsPrimitive::TYPE_CSTRING : {
nsCOMPtr<nsISupportsCString> p(do_QueryInterface(argPrimitive));
NS_ENSURE_TRUE(p, NS_ERROR_UNEXPECTED);
char *data;
@ -1751,8 +1751,8 @@ nsWindowWatcher::AddSupportsTojsvals(nsISupports *aArg,
break;
}
case nsISupportsPrimitive::TYPE_WSTRING : {
nsCOMPtr<nsISupportsWString> p(do_QueryInterface(argPrimitive));
case nsISupportsPrimitive::TYPE_STRING : {
nsCOMPtr<nsISupportsString> p(do_QueryInterface(argPrimitive));
NS_ENSURE_TRUE(p, NS_ERROR_UNEXPECTED);
PRUnichar *data;

Просмотреть файл

@ -154,7 +154,7 @@ function constructFontList(fontList)
while (fontEnumerator.hasMoreElements())
{
var fontName = fontEnumerator.getNext();
fontName = fontName.QueryInterface(Components.interfaces.nsISupportsWString);
fontName = fontName.QueryInterface(Components.interfaces.nsISupportsString);
var fontNameStr = fontName.toString();
if (fontEnumerator.hasMoreElements())
tempres = tempres + fontNameStr + ", ";

Просмотреть файл

@ -307,8 +307,8 @@
<parameter name="aFlavor"/>
<body><![CDATA[
if (aFlavor == "text/unicode") {
var iid = Components.interfaces.nsISupportsWString;
var cid = "@mozilla.org/supports-wstring;1";
var iid = Components.interfaces.nsISupportsString;
var cid = "@mozilla.org/supports-string;1";
data = Components.classes[cid].createInstance(iid);
data.data = aObject;

Просмотреть файл

@ -87,10 +87,10 @@ var PrefUtils =
var type = this.mPrefs.getPrefType(aName);
try {
if (type == nsIPrefBranch.PREF_STRING) {
var str = Components.classes["@mozilla.org/supports-wstring;1"]
.createInstance(Components.interfaces.nsISupportsWString);
var str = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsString);
str.data = aValue;
this.mPrefs.setComplexValue(aName, Components.interfaces.nsISupportsWString, str);
this.mPrefs.setComplexValue(aName, Components.interfaces.nsISupportsString, str);
} else if (type == nsIPrefBranch.PREF_BOOL) {
this.mPrefs.setBoolPref(aName, aValue);
} else if (type == nsIPrefBranch.PREF_INT) {
@ -108,7 +108,7 @@ var PrefUtils =
var type = this.mPrefs.getPrefType(aName);
try {
if (type == nsIPrefBranch.PREF_STRING) {
return this.mPrefs.getComplexValue(aName, Components.interfaces.nsISupportsWString).data;
return this.mPrefs.getComplexValue(aName, Components.interfaces.nsISupportsString).data;
} else if (type == nsIPrefBranch.PREF_BOOL) {
return this.mPrefs.getBoolPref(aName);
} else if (type == nsIPrefBranch.PREF_INT) {

Просмотреть файл

@ -76,7 +76,7 @@ var DNDUtils =
{
var obj = {};
if (typeof(aValue) == "string") {
obj.data = XPCU.createInstance("@mozilla.org/supports-wstring;1", "nsISupportsWString");
obj.data = XPCU.createInstance("@mozilla.org/supports-string;1", "nsISupportsString");
obj.data.data = aValue;
obj.size = aValue.length*2;
} else if (false) {

Просмотреть файл

@ -326,7 +326,7 @@ inTreeBuilder.prototype =
var data = {};
trans.getAnyTransferData ({}, data, {});
var string = XPCU.QI(data.value, "nsISupportsWString");
var string = XPCU.QI(data.value, "nsISupportsString");
this.insertColumn(this.mColumnInsertIndex,
{

Просмотреть файл

@ -211,7 +211,7 @@ ColumnsDialog.prototype =
onDragDropIn: function(aEvent)
{
var data = DNDUtils.getData("TreeBuilder/column-remove", 0);
var string = XPCU.QI(data, "nsISupportsWString");
var string = XPCU.QI(data, "nsISupportsString");
this.addItem(string.data);
},

Просмотреть файл

@ -20,7 +20,7 @@ import new
from xpcom import xpt, COMException, nsError
# Suck in stuff from _xpcom we use regularly to prevent a module lookup
from xpcom._xpcom import IID_nsISupports, IID_nsIClassInfo, IID_nsISupportsString, IID_nsISupportsWeakReference, \
from xpcom._xpcom import IID_nsISupports, IID_nsIClassInfo, IID_nsISupportsCString, IID_nsISupportsWeakReference, \
IID_nsIWeakReference, XPTI_GetInterfaceInfoManager, NS_GetGlobalComponentManager, XPTC_InvokeByIndex
# Attribute names we may be __getattr__'d for, but know we don't want to delegate
@ -159,7 +159,7 @@ class _XPCOMBase:
# See if the object support strings.
def __str__(self):
try:
self._comobj_.QueryInterface(IID_nsISupportsString, 0)
self._comobj_.QueryInterface(IID_nsISupportsCString, 0)
return str(self._comobj_)
except COMException:
return self.__repr__()

Просмотреть файл

@ -40,7 +40,7 @@ object, thereby allowing explicit control over the type of variant created.</p>
term collectively the <i>nsISupports Primitives Interfaces</i>.&nbsp; These
are a set of interfaces a component can support to allow automatic conversion to
and from many basic types.&nbsp; For example, an interface can define that it
supports the <i>nsISupportsString</i> interface, and this could be used by any
supports the <i>nsISupportsCString</i> interface, and this could be used by any
program that wishes to get a string representation of the object.&nbsp; If an
interface wishes to expose itself as a &quot;boolean value&quot;, it may choose
to support the <i>nsISupportsPRBool</i> interface.</p>
@ -48,8 +48,8 @@ to support the <i>nsISupportsPRBool</i> interface.</p>
calling), you can use
the builtin functions <i>str()</i>, <i>int()</i>, <i>long()</i> etc., on the
object<i>.</i>&nbsp; In the
case of <i>str()</i>, if the object does not support the <i>nsISupportsString</i>
or <i>nsISupportsWString</i> interfaces, the default string <i>str()</i> for the
case of <i>str()</i>, if the object does not support the <i>nsISupportsCString</i>
or <i>nsISupportsString</i> interfaces, the default string <i>str()</i> for the
object will be returned (i.e., what is normally returned for most XPCOM objects -
support for these interface is not very common!).&nbsp; In the case of the numeric functions, a <i>ValueError</i>
exception will be raised if the objects do not support any interface that can be
@ -71,8 +71,8 @@ of these interfaces:</p>
</li>
<li>If your class does not define support for these interfaces, the framework
will use standard Python class semantics to implement them - i.e., if your
class provides a <i>__str__</i> method, it will be used to implement <i>nsISupportsString</i>
and <i>nsISupportsWString</i>, if you provide <i>__int__</i>, <i>__long__</i>,
class provides a <i>__str__</i> method, it will be used to implement <i>nsISupportsCString</i>
and <i>nsISupportsString</i>, if you provide <i>__int__</i>, <i>__long__</i>,
<i>__float__</i> etc., methods, they will be used to implement the numeric
interfaces.&nbsp; If your class defines no such special methods, then the <i>
QueryInterface()</i> for those interfaces fails (rather than the QI succeeding
@ -83,7 +83,7 @@ of these interfaces:</p>
possible.&nbsp; Consider Python code that does a <i>str()</i> on an&nbsp; XPCOM
interface, and where the XPCOM interface itself is implemented in Python and
provides a <i>__str__</i> method.&nbsp; The <i>str()</i> on the original
interface queries for the <i>nsISupportsString</i> interface.&nbsp; The
interface queries for the <i>nsISupportsCString</i> interface.&nbsp; The
Python implemented object responds to this interface and delegates to the <i>__str__</i>
method. At the end of all this, <i>str()</i> returns the same result
as if the objects were native Python objects with no XPCOM layer in between.</p>

Просмотреть файл

@ -294,8 +294,8 @@ class DefaultPolicy:
return self._doHandleException(name, exc_info)
_supports_primitives_data_ = [
("nsISupportsCString", "__str__", str),
("nsISupportsString", "__str__", str),
("nsISupportsWString", "__str__", str),
("nsISupportsPRUint64", "__long__", long),
("nsISupportsPRInt64", "__long__", long),
("nsISupportsPRUint32", "__int__", int),

Просмотреть файл

@ -143,7 +143,7 @@ PyXPCOM_TypeObject::Py_str(PyObject *self)
char *val = NULL;
Py_BEGIN_ALLOW_THREADS;
{ // scope to kill pointer while thread-lock released.
nsCOMPtr<nsISupportsString> ss( do_QueryInterface(pis->m_obj, &rv ));
nsCOMPtr<nsISupportsCString> ss( do_QueryInterface(pis->m_obj, &rv ));
if (NS_SUCCEEDED(rv))
rv = ss->ToString(&val);
} // end-scope

Просмотреть файл

@ -579,7 +579,7 @@ init_xpcom() {
Py_XDECREF(obFuncPtr);
REGISTER_IID(nsISupports);
REGISTER_IID(nsISupportsString);
REGISTER_IID(nsISupportsCString);
REGISTER_IID(nsIModule);
REGISTER_IID(nsIFactory);
REGISTER_IID(nsIWeakReference);

Просмотреть файл

@ -17,7 +17,7 @@
# Test our support for the interfaces defined in nsISupportsPrimitives.idl
#
# The framework supports nsISupportsString and nsISupportsWString, but
# The framework supports nsISupportsCString and nsISupportsString, but
# only if our class doesnt provide explicit support.
from xpcom import components
@ -32,7 +32,7 @@ class ImplicitSupportsString:
return "<MyImplicitStrObject>"
class ExplicitSupportsString:
_com_interfaces_ = [components.interfaces.nsISupports, components.interfaces.nsISupportsString]
_com_interfaces_ = [components.interfaces.nsISupports, components.interfaces.nsISupportsCString]
# __str__ will be ignored by XPCOM, as we have _explicit_ support.
def __str__(self):
return "<MyImplicitStrObject>"

Просмотреть файл

@ -18,9 +18,9 @@
/*
* XPCOM XML-RPC Client, interface definition.
* Version: $Revision: 1.4 $
* Version: $Revision: 1.5 $
*
* $Id: nsIXmlRpcClient.idl,v 1.4 2002-02-12 23:57:08 samuel%sieb.net Exp $
* $Id: nsIXmlRpcClient.idl,v 1.5 2002-08-06 00:52:08 alecf%netscape.com Exp $
*/
#include "nsISupports.idl"
@ -69,7 +69,7 @@ interface nsIXmlRpcClient: nsISupports {
* nsISupportsPRUint8, nsISupportsPRUint16,
* nsISupportsPRInt16, nsISupportsPRInt32: <i4>
* nsISupportsPRBool: <boolean>
* nsISupportsChar, nsISupportsString: <string>
* nsISupportsChar, nsISupportsCString: <string>
* nsISupportsFloat, nsISupportsDouble: <double>
* nsISupportsPRTime: <dateTime.iso8601>
* nsIInputStream: <base64>
@ -82,10 +82,10 @@ interface nsIXmlRpcClient: nsISupports {
* Return value will be converted as follows:
* <i4> or <int>: nsISupportsPRInt32
* <boolean>: nsISupportsPRBool
* <string>: nsISupportsString
* <string>: nsISupportsCString
* <double>: nsISupportsDouble
* <dateTime.iso8601>: nsISupportsPRTime
* <base64>: nsISupportsString
* <base64>: nsISupportsCString
* <array>: nsISupportsArray
* <struct>: nsIDictionary
*
@ -144,7 +144,7 @@ interface nsIXmlRpcClient: nsISupports {
[iid_is(uuid),retval] out nsQIResult result);
const unsigned long INT = 1; // nsISupportsPRInt32
const unsigned long BOOLEAN = 2; // nsISupportsPRBool
const unsigned long STRING = 3; // nsISupportsString
const unsigned long STRING = 3; // nsISupportsCString
const unsigned long DOUBLE = 4; // nsISupportsDouble
const unsigned long DATETIME = 5; // nsISupportsPRTime
const unsigned long ARRAY = 6; // nsISupportsArray

Просмотреть файл

@ -20,9 +20,9 @@
/*
* nsXmlRpcClient XPCOM component
* Version: $Revision: 1.26 $
* Version: $Revision: 1.27 $
*
* $Id: nsXmlRpcClient.js,v 1.26 2002-06-16 06:17:54 samuel%sieb.net Exp $
* $Id: nsXmlRpcClient.js,v 1.27 2002-08-06 00:52:09 alecf%netscape.com Exp $
*/
/*
@ -360,9 +360,9 @@ nsXmlRpcClient.prototype = {
'nsISupportsPRBool');
case this.STRING:
uuid.value = Components.interfaces.nsISupportsString
uuid.value = Components.interfaces.nsISupportsCString
return createInstance(SUPPORTSID + 'string;1',
'nsISupportsString');
'nsISupportsCString');
case this.DOUBLE:
uuid.value = Components.interfaces.nsISupportsDouble
@ -585,7 +585,7 @@ nsXmlRpcClient.prototype = {
} catch(e) {}
try {
obj.QueryInterface(Components.interfaces.nsISupportsString);
obj.QueryInterface(Components.interfaces.nsISupportsCString);
return 'String';
} catch(e) {}

Просмотреть файл

@ -30,7 +30,7 @@ function callAsync() {
var Listener = {
onResult: function(client, ctxt, result) {
result = result.QueryInterface(Components.interfaces.nsISupportsString);
result = result.QueryInterface(Components.interfaces.nsISupportsCString);
document.getElementById('statename').setAttribute('value', result.data);
},

Просмотреть файл

@ -194,7 +194,7 @@ interface nsIXMLHttpRequest : nsISupports {
* returns only after the response has been received.
*
* @param body Either an instance of nsIDOMDocument, nsIInputStream
* or a string (nsISupportsWString in the native calling
* or a string (nsISupportsString in the native calling
* case). This is used to populate the body of the
* HTTP request if the HTTP request method is "POST".
* If the parameter is a nsIDOMDocument, it is serialized.

Просмотреть файл

@ -1057,8 +1057,8 @@ nsXMLHttpRequest::Send(nsIVariant *aBody)
if (NS_FAILED(rv))
return NS_ERROR_FAILURE;
} else {
// nsISupportsWString?
nsCOMPtr<nsISupportsWString> wstr(do_QueryInterface(supports));
// nsISupportsString?
nsCOMPtr<nsISupportsString> wstr(do_QueryInterface(supports));
if (wstr) {
wstr->GetData(getter_Copies(serial));
} else {

Просмотреть файл

@ -15,7 +15,7 @@ pre {
}
</style>
<script type="text/javascript">
const WSTRING_CONTRACTID = "@mozilla.org/supports-wstring;1";
const WSTRING_CONTRACTID = "@mozilla.org/supports-string;1";
// You can only create the text string if you can bybass security, like in chrome
var sendPlainTextData = false;
@ -59,7 +59,7 @@ p.open("POST", "http://green/cgi-bin/this.handler.does.not.exist.xgfrsjfrsgdfr.c
if (!sendPlainTextData) {
p.send(x);
} else {
var mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsWString);
var mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsString);
mystr.data = "Heikki's data";
p.send(mystr);
}

Просмотреть файл

@ -15,7 +15,7 @@ pre {
}
</style>
<script type="text/javascript">
const WSTRING_CONTRACTID = "@mozilla.org/supports-wstring;1";
const WSTRING_CONTRACTID = "@mozilla.org/supports-string;1";
// You can only create the text string if you can bybass security, like in chrome
var sendPlainTextData = false;
@ -59,7 +59,7 @@ p.open("POST", "http://green/cgi-bin/echo_xml.cgi");
if (!sendPlainTextData) {
p.send(x);
} else {
var mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsWString);
var mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsString);
mystr.data = "Heikki's data";
p.send(mystr);
}

Просмотреть файл

@ -3,7 +3,7 @@
<h1>Posting test</h1>
<script>
<![CDATA[
const WSTRING_CONTRACTID = "@mozilla.org/supports-wstring;1";
const WSTRING_CONTRACTID = "@mozilla.org/supports-string;1";
var sendPlainTextData = false; // you can only create the text string if you can bybass security
@ -38,7 +38,7 @@ p.open("POST", "http://green/cgi-bin/echo_xml.cgi");
if (!sendPlainTextData) {
p.send(x);
} else {
var mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsWString);
var mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsString);
mystr.data = "Heikki's data";
p.send(mystr);
}

Просмотреть файл

@ -104,8 +104,8 @@ if (!sendPlainTextData) {
} else {
var mystr;
try {
var WSTRING_CONTRACTID = "@mozilla.org/supports-wstring;1";
mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsWString);
var WSTRING_CONTRACTID = "@mozilla.org/supports-string;1";
mystr = Components.classes[WSTRING_CONTRACTID].createInstance(Components.interfaces.nsISupportsString);
mystr.data = "Heikki's data";
} catch (e) {
mystr = "Heikki's data";

Просмотреть файл

@ -790,7 +790,7 @@ NS_IMETHODIMP mozXMLTerminal::Paste()
nsMemory::Free(temCStr);
if (flavor.EqualsWithConversion(kHTMLMime) || flavor.EqualsWithConversion(kUnicodeMime)) {
nsCOMPtr<nsISupportsWString> textDataObj ( do_QueryInterface(genericDataObj) );
nsCOMPtr<nsISupportsString> textDataObj ( do_QueryInterface(genericDataObj) );
if (textDataObj && objLen > 0) {
PRUnichar* text = nsnull;
textDataObj->ToString ( &text );

Просмотреть файл

@ -128,10 +128,10 @@ nsFontListEnumerator::GetNext(nsISupports **aFont)
return NS_ERROR_UNEXPECTED;
}
PRUnichar *fontName = mFonts[mIndex++];
nsCOMPtr<nsISupportsWString> fontNameWrapper;
nsCOMPtr<nsISupportsString> fontNameWrapper;
nsresult rv;
rv = nsComponentManager::CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, nsnull,
NS_GET_IID(nsISupportsWString), getter_AddRefs(fontNameWrapper));
rv = nsComponentManager::CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, nsnull,
NS_GET_IID(nsISupportsString), getter_AddRefs(fontNameWrapper));
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_TRUE(fontNameWrapper, NS_ERROR_OUT_OF_MEMORY);
fontNameWrapper->SetData(NS_CONST_CAST(PRUnichar*, fontName));

Просмотреть файл

@ -206,11 +206,11 @@ NS_IMETHODIMP nsPrinterListEnumerator::GetNext(nsISupports **aPrinter)
}
PRUnichar *printerName = mPrinters[mIndex++];
nsCOMPtr<nsISupportsWString> printerNameWrapper;
nsCOMPtr<nsISupportsString> printerNameWrapper;
nsresult rv;
rv = nsComponentManager::CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, nsnull,
NS_GET_IID(nsISupportsWString), getter_AddRefs(printerNameWrapper));
rv = nsComponentManager::CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, nsnull,
NS_GET_IID(nsISupportsString), getter_AddRefs(printerNameWrapper));
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_TRUE(printerNameWrapper, NS_ERROR_OUT_OF_MEMORY);
printerNameWrapper->SetData(NS_CONST_CAST(PRUnichar*, printerName));

Просмотреть файл

@ -503,7 +503,7 @@ nsExtensibleStringBundle::Init(const char * aCategory,
if (NS_FAILED(rv))
continue;
nsCOMPtr<nsISupportsString> supStr = do_QueryInterface(supports, &rv);
nsCOMPtr<nsISupportsCString> supStr = do_QueryInterface(supports, &rv);
if (NS_FAILED(rv))
continue;

Просмотреть файл

@ -297,7 +297,7 @@ nsCharsetConverterManager::GetList(const nsACString& aCategory,
if (NS_FAILED(enumerator->GetNext(getter_AddRefs(supports))))
continue;
nsCOMPtr<nsISupportsString> supStr = do_QueryInterface(supports);
nsCOMPtr<nsISupportsCString> supStr = do_QueryInterface(supports);
if (!supStr)
continue;

Просмотреть файл

@ -389,7 +389,7 @@ nsXPCComponents_Classes::NewEnumerate(nsIXPConnectWrappedNative *wrapper,
if(NS_SUCCEEDED(e->HasMoreElements(&hasMore)) && hasMore &&
NS_SUCCEEDED(e->GetNext(getter_AddRefs(isup))) && isup)
{
nsCOMPtr<nsISupportsString> holder(do_QueryInterface(isup));
nsCOMPtr<nsISupportsCString> holder(do_QueryInterface(isup));
if(holder)
{
char* name;

Просмотреть файл

@ -33,8 +33,8 @@ var same = Object;
// 6) function to use for comparing strings (null means use default compare)
var data = [
["supports-id" ,"nsISupportsID" ,iface_test,i_str ,eqfn , null],
["supports-string" ,"nsISupportsString" ,"foo" ,same ,null , null],
["supports-wstring" ,"nsISupportsWString" ,"bar" ,same ,null , null],
["supports-cstring" ,"nsISupportsCString" ,"foo" ,same ,null , null],
["supports-string" ,"nsISupportsString" ,"bar" ,same ,null , null],
["supports-PRBool" ,"nsISupportsPRBool" ,true ,same ,null , null],
["supports-PRBool" ,"nsISupportsPRBool" ,false ,same ,null , null],
["supports-PRUint8" ,"nsISupportsPRUint8" ,7 ,same ,null , null],

Просмотреть файл

@ -70,8 +70,8 @@ var same = Object;
var data = [
["supports-id" ,"nsISupportsID" ,iface_test,i_str ,eqfn , null],
["supports-string" ,"nsISupportsString" ,"foo" ,same ,null , null],
["supports-wstring" ,"nsISupportsWString" ,"bar" ,same ,null , null],
["supports-cstring" ,"nsISupportsCString" ,"foo" ,same ,null , null],
["supports-string" ,"nsISupportsString" ,"bar" ,same ,null , null],
["supports-PRBool" ,"nsISupportsPRBool" ,true ,same ,null , null],
["supports-PRBool" ,"nsISupportsPRBool" ,false ,same ,null , null],
["supports-PRUint8" ,"nsISupportsPRUint8" ,7 ,same ,null , null],

Просмотреть файл

@ -100,7 +100,7 @@ nsAutoCopyService::Listen(nsISelection *aDomSelection)
/*
* What we do now:
* On every selection change, we copy to the clipboard anew, creating a
* HTML buffer, a transferable, an nsISupportsWString and
* HTML buffer, a transferable, an nsISupportsString and
* a huge mess every time. This is basically what nsPresShell::DoCopy does
* to move the selection into the clipboard for Edit->Copy.
*

Просмотреть файл

@ -6257,7 +6257,7 @@ DocumentViewerImpl::CheckForPrinters(nsIPrintOptions* aPrintOptions,
aPrintSettings->GetPrinterName(&defPrinterName);
if (!defPrinterName || (defPrinterName && !*defPrinterName)) {
if (defPrinterName) nsMemory::Free(defPrinterName);
nsCOMPtr<nsISupportsWString> wStr = do_QueryInterface(supps);
nsCOMPtr<nsISupportsString> wStr = do_QueryInterface(supps);
if (wStr) {
PRUnichar* defPrinterName;
wStr->ToString(&defPrinterName);

Просмотреть файл

@ -69,8 +69,8 @@ nsPresState::GetStateProperty(const nsAString& aName,
const nsPromiseFlatString& flatString = PromiseFlatString(aName);
nsStringKey key(flatString);
nsCOMPtr<nsISupportsString> supportsStr =
dont_AddRef(NS_STATIC_CAST(nsISupportsString*,
nsCOMPtr<nsISupportsCString> supportsStr =
dont_AddRef(NS_STATIC_CAST(nsISupportsCString*,
mPropertyTable->Get(&key)));
if (supportsStr) {
@ -96,7 +96,7 @@ nsPresState::SetStateProperty(const nsAString& aName, const nsAString& aValue)
const nsPromiseFlatString& flatString = PromiseFlatString(aName);
nsStringKey key(flatString);
nsCOMPtr<nsISupportsString> supportsStr(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
nsCOMPtr<nsISupportsCString> supportsStr(do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID));
NS_ENSURE_TRUE(supportsStr, NS_ERROR_OUT_OF_MEMORY);
supportsStr->SetData(NS_ConvertUCS2toUTF8(aValue).get());

Просмотреть файл

@ -100,7 +100,7 @@ nsAutoCopyService::Listen(nsISelection *aDomSelection)
/*
* What we do now:
* On every selection change, we copy to the clipboard anew, creating a
* HTML buffer, a transferable, an nsISupportsWString and
* HTML buffer, a transferable, an nsISupportsString and
* a huge mess every time. This is basically what nsPresShell::DoCopy does
* to move the selection into the clipboard for Edit->Copy.
*

Просмотреть файл

@ -195,14 +195,14 @@ nsresult nsCopySupport::HTMLCopy(nsISelection *aSel, nsIDocument *aDoc, PRInt16
}
// get wStrings to hold clip data
nsCOMPtr<nsISupportsWString> dataWrapper, contextWrapper, infoWrapper;
dataWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID);
nsCOMPtr<nsISupportsString> dataWrapper, contextWrapper, infoWrapper;
dataWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(dataWrapper, NS_ERROR_FAILURE);
if (bIsHTMLCopy)
{
contextWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID);
contextWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(contextWrapper, NS_ERROR_FAILURE);
infoWrapper = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID);
infoWrapper = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
NS_ENSURE_TRUE(infoWrapper, NS_ERROR_FAILURE);
}

Просмотреть файл

@ -69,8 +69,8 @@ nsPresState::GetStateProperty(const nsAString& aName,
const nsPromiseFlatString& flatString = PromiseFlatString(aName);
nsStringKey key(flatString);
nsCOMPtr<nsISupportsString> supportsStr =
dont_AddRef(NS_STATIC_CAST(nsISupportsString*,
nsCOMPtr<nsISupportsCString> supportsStr =
dont_AddRef(NS_STATIC_CAST(nsISupportsCString*,
mPropertyTable->Get(&key)));
if (supportsStr) {
@ -96,7 +96,7 @@ nsPresState::SetStateProperty(const nsAString& aName, const nsAString& aValue)
const nsPromiseFlatString& flatString = PromiseFlatString(aName);
nsStringKey key(flatString);
nsCOMPtr<nsISupportsString> supportsStr(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
nsCOMPtr<nsISupportsCString> supportsStr(do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID));
NS_ENSURE_TRUE(supportsStr, NS_ERROR_OUT_OF_MEMORY);
supportsStr->SetData(NS_ConvertUCS2toUTF8(aValue).get());

Просмотреть файл

@ -49,7 +49,7 @@ function fillSettings()
try {
var prefValue =
gPrefInt.getComplexValue(gCurrentDirectoryString + ".description",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
} catch(ex) {
prefValue="";
}
@ -57,7 +57,7 @@ function fillSettings()
document.getElementById("description").value = prefValue;
ldapUrl.spec = gPrefInt.getComplexValue(gCurrentDirectoryString +".uri",
Components.interfaces.
nsISupportsWString).data;
nsISupportsString).data;
document.getElementById("hostname").value = ldapUrl.host;
document.getElementById("port").value = ldapUrl.port;
@ -91,7 +91,7 @@ function fillSettings()
try {
prefValue =
gPrefInt.getComplexValue(gCurrentDirectoryString + ".auth.dn",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
} catch(ex) {
prefValue="";
}
@ -180,7 +180,7 @@ function createUniqueServername()
temp = "";
try{
temp = gPrefInt.getComplexValue(gPrefstring+gPref_string_desc+".description",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
} catch(e){}
if (temp)
gPref_string_desc += str[0];
@ -252,11 +252,11 @@ function onAccept()
}
pref_string_title = gPref_string_desc + "." + "description";
var str = Components.classes["@mozilla.org/supports-wstring;1"]
.createInstance(Components.interfaces.nsISupportsWString);
var str = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsString);
str.data = pref_string_content;
gPrefInt.setComplexValue(pref_string_title,
Components.interfaces.nsISupportsWString, str);
Components.interfaces.nsISupportsString, str);
ldapUrl.host = hostname;
pref_string_content = gLdapService.
@ -282,11 +282,11 @@ function onAccept()
ldapUrl.options |= ldapUrl.OPT_SECURE;
pref_string_title = gPref_string_desc + ".uri";
var uri = Components.classes["@mozilla.org/supports-wstring;1"]
.createInstance(Components.interfaces.nsISupportsWString);
var uri = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsString);
uri.data = ldapUrl.spec;
gPrefInt.setComplexValue(pref_string_title,
Components.interfaces.nsISupportsWString, uri);
Components.interfaces.nsISupportsString, uri);
pref_string_content = results;
pref_string_title = gPref_string_desc + ".maxHits";
@ -300,11 +300,11 @@ function onAccept()
}
pref_string_title = gPref_string_desc + ".auth.dn";
var dnWString = Components.classes["@mozilla.org/supports-wstring;1"]
.createInstance(Components.interfaces.nsISupportsWString);
var dnWString = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsString);
dnWString.data = dn;
gPrefInt.setComplexValue(pref_string_title,
Components.interfaces.nsISupportsWString,
Components.interfaces.nsISupportsString,
dnWString);
// We don't actually allow the password to be saved in the preferences;

Просмотреть файл

@ -89,7 +89,7 @@ function setupDirectoriesList()
document.getElementById("identity.directoryServer").getAttribute('value');
try {
var directoryServerString = gPrefInt.getComplexValue(directoryServer + ".description",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
}
catch(ex) {}
if (directoryServerFlag || !directoryServerString) {
@ -163,7 +163,7 @@ function LoadDirectories(popup)
if ((position != 0) && (dirType == 1)) {
try{
description = gPrefInt.getComplexValue(arrayOfDirectories[i]+".description",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
}
catch(ex){
description="";
@ -199,7 +199,7 @@ function LoadDirectories(popup)
try {
directoryDescription = gPrefInt.
getComplexValue(directoriesList.value + ".description",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
}
catch (ex) {}
}
@ -227,7 +227,7 @@ function LoadDirectories(popup)
try {
directoryDescription = gPrefInt.
getComplexValue(directoriesList.value + ".description",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
}
catch (ex) {}
}
@ -266,7 +266,7 @@ function LoadDirectories(popup)
pref_string_title = directoryServer + ".description";
try {
description = gPrefInt.getComplexValue(pref_string_title,
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
}
catch (ex) {
description = "";

Просмотреть файл

@ -545,7 +545,7 @@ function DropOnAddressListTree(event)
var bestFlavor = new Object();
var len = new Object();
trans.getAnyTransferData ( bestFlavor, dataObj, len );
if ( dataObj ) dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsWString);
if ( dataObj ) dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString);
if ( !dataObj ) continue;
// pull the URL out of the data object

Просмотреть файл

@ -365,7 +365,7 @@ function DropOnBucketPane(event)
var len = new Object();
trans.getAnyTransferData ( bestFlavor, dataObj, len );
if ( dataObj )
dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsWString);
dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString);
if ( !dataObj )
continue;

Просмотреть файл

@ -320,12 +320,12 @@ nsAbLDAPAutoCompFormatter::FormatException(PRInt32 aState,
// pass the alert message in as the param; if that fails, proceed anyway
//
nsCOMPtr<nsISupportsWString> alert(do_CreateInstance(
NS_SUPPORTS_WSTRING_CONTRACTID,
nsCOMPtr<nsISupportsString> alert(do_CreateInstance(
NS_SUPPORTS_STRING_CONTRACTID,
&rv));
if (NS_FAILED(rv)) {
NS_WARNING("nsAbLDAPAutoCompFormatter::FormatException(): "
"could not create nsISupportsWString");
"could not create nsISupportsString");
} else {
rv = alert->SetData(alertMsg.get());
if (NS_FAILED(rv)) {

Просмотреть файл

@ -149,13 +149,13 @@ nsresult nsAbLDAPDirectory::InitiateConnection ()
// get the login information, if there is any
//
nsCOMPtr<nsISupportsWString> login;
nsCOMPtr<nsISupportsString> login;
rv = prefs->GetComplexValue(
PromiseFlatCString(
Substring(mURINoQuery, kLDAPDirectoryRootLen,
mURINoQuery.Length() - kLDAPDirectoryRootLen)
+ NS_LITERAL_CSTRING(".auth.dn")).get(),
NS_GET_IID(nsISupportsWString), getter_AddRefs(login));
NS_GET_IID(nsISupportsString), getter_AddRefs(login));
if (NS_SUCCEEDED(rv)) {
rv = login->ToString(getter_Copies(mLogin));
if (NS_FAILED(rv)) {

Просмотреть файл

@ -1206,7 +1206,7 @@ NS_IMETHODIMP nsAbView::GetSelectedAddresses(nsISupportsArray **_retval)
NS_ENSURE_SUCCESS(rv,rv);
if (!primaryEmail.IsEmpty()) {
nsCOMPtr<nsISupportsString> supportsEmail(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
nsCOMPtr<nsISupportsCString> supportsEmail(do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID));
supportsEmail->SetDataWithLength(primaryEmail.Length(), ToNewCString(primaryEmail));
addresses->AppendElement(supportsEmail);
}
@ -1217,7 +1217,7 @@ NS_IMETHODIMP nsAbView::GetSelectedAddresses(nsISupportsArray **_retval)
NS_ENSURE_SUCCESS(rv,rv);
if (!primaryEmail.IsEmpty()) {
nsCOMPtr<nsISupportsString> supportsEmail(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
nsCOMPtr<nsISupportsCString> supportsEmail(do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID));
supportsEmail->SetDataWithLength(primaryEmail.Length(), ToNewCString(primaryEmail));
addresses->AppendElement(supportsEmail);
}

Просмотреть файл

@ -80,7 +80,7 @@ function nsLDAPPrefsService() {
if ((position != 0) && (dirType == 1)) {
try{
description = gPrefInt.getComplexValue(arrayOfDirectories[i]+".description",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
}
catch(ex){
description = null;
@ -219,7 +219,7 @@ function () {
ldapUrl.host = host;
try{
dn = gPrefInt.getComplexValue(pref_string + ".searchBase",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
}
catch (ex) {
dn = null;
@ -248,10 +248,10 @@ function () {
ldapUrl.port = port;
ldapUrl.scope = 2;
var uri = Components.classes["@mozilla.org/supports-wstring;1"]
.createInstance(Components.interfaces.nsISupportsWString);
var uri = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsString);
uri.data = ldapUrl.spec;
gPrefInt.setComplexValue(pref_string + ".uri", Components.interfaces.nsISupportsWString, uri);
gPrefInt.setComplexValue(pref_string + ".uri", Components.interfaces.nsISupportsString, uri);
/* is this server selected for autocompletion?
if yes, convert the preference to mozilla format.

Просмотреть файл

@ -223,7 +223,7 @@ function NewMessageToSelectedAddresses(type, format, identity) {
if (composeFields) {
var addressList = "";
for (var i = 0; i < addresses.Count(); i++) {
addressList = addressList + (i > 0 ? ",":"") + addresses.GetElementAt(i).QueryInterface(Components.interfaces.nsISupportsString).data;
addressList = addressList + (i > 0 ? ",":"") + addresses.GetElementAt(i).QueryInterface(Components.interfaces.nsISupportsCString).data;
}
composeFields.to = addressList;
params.composeFields = composeFields;

Просмотреть файл

@ -91,7 +91,7 @@ function CanDropOnFolderTree(index)
continue; //no data so continue;
}
if (dataObj)
dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsWString);
dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString);
if (! dataObj)
continue;
@ -235,7 +235,7 @@ function DropOnFolderTree(row, orientation)
var len = new Object();
trans.getAnyTransferData(bestFlavor, dataObj, len);
if (dataObj)
dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsWString);
dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString);
if (! dataObj)
continue;
@ -420,7 +420,7 @@ function BeginDragTree(event, tree, selArray, flavor)
if (!trans)
return false;
var genTextData = Components.classes["@mozilla.org/supports-wstring;1"].createInstance(Components.interfaces.nsISupportsWString);
var genTextData = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
if (!genTextData)
return false;

Просмотреть файл

@ -112,7 +112,7 @@ NS_IMETHODIMP nsMessengerBootstrap::OpenMessengerWindowWithUri(const char *windo
// create scriptable versions of our strings that we can store in our nsISupportsArray....
if (aFolderURI)
{
nsCOMPtr<nsISupportsString> scriptableFolderURI (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID));
nsCOMPtr<nsISupportsCString> scriptableFolderURI (do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID));
NS_ENSURE_TRUE(scriptableFolderURI, NS_ERROR_FAILURE);
scriptableFolderURI->SetData(aFolderURI);

Просмотреть файл

@ -655,7 +655,7 @@ nsMsgAccountManagerDataSource::appendGenericSettingsResources(nsIMsgIncomingServ
rv = catman->EnumerateCategory(MAILNEWS_ACCOUNTMANAGER_EXTENSIONS, getter_AddRefs(e));
if(NS_SUCCEEDED(rv) && e) {
while (PR_TRUE) {
nsCOMPtr<nsISupportsString> catEntry;
nsCOMPtr<nsISupportsCString> catEntry;
rv = e->GetNext(getter_AddRefs(catEntry));
if (NS_FAILED(rv) || !catEntry)
break;

Просмотреть файл

@ -885,7 +885,7 @@ function setupLdapAutocompleteSession()
try {
serverURL.spec = sPrefs.getComplexValue(autocompleteDirectory +".uri",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
} catch (ex) {
dump("ERROR: " + ex + "\n");
}
@ -897,7 +897,7 @@ function setupLdapAutocompleteSession()
try {
login = sPrefs.getComplexValue(
autocompleteDirectory + ".auth.dn",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
} catch (ex) {
// if we don't have this pref, no big deal
}
@ -952,7 +952,7 @@ function setupLdapAutocompleteSession()
ldapFormatter.nameFormat =
sPrefs.getComplexValue(autocompleteDirectory +
".autoComplete.nameFormat",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
} catch (ex) {
// if this pref isn't there, no big deal. just let
// nsAbLDAPAutoCompFormatter use its default.
@ -964,7 +964,7 @@ function setupLdapAutocompleteSession()
ldapFormatter.addressFormat =
sPrefs.getComplexValue(autocompleteDirectory +
".autoComplete.addressFormat",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
} catch (ex) {
// if this pref isn't there, no big deal. just let
// nsAbLDAPAutoCompFormatter use its default.
@ -988,7 +988,7 @@ function setupLdapAutocompleteSession()
//
ldapFormatter.commentFormat = sPrefs.getComplexValue(
autocompleteDirectory + ".description",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
break;
case 2:
@ -998,7 +998,7 @@ function setupLdapAutocompleteSession()
ldapFormatter.commentFormat =
sPrefs.getComplexValue(autocompleteDirectory +
".autoComplete.commentFormat",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
} catch (innerException) {
// if nothing has been specified, use the ldap
// organization field
@ -1028,7 +1028,7 @@ function setupLdapAutocompleteSession()
LDAPSession.outputFormat =
sPrefs.getComplexValue(autocompleteDirectory +
".autoComplete.outputFormat",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
} catch (ex) {
// if this pref isn't there, no big deal. just let
@ -1040,7 +1040,7 @@ function setupLdapAutocompleteSession()
try {
LDAPSession.filterTemplate = sPrefs.getComplexValue(
autocompleteDirectory + ".autoComplete.filterTemplate",
Components.interfaces.nsISupportsWString).data;
Components.interfaces.nsISupportsString).data;
} catch (ex) {
// if this pref isn't there, no big deal. just let

Просмотреть файл

@ -770,7 +770,7 @@ function DropOnAddressingWidget(event)
var len = new Object();
trans.getAnyTransferData ( bestFlavor, dataObj, len );
if ( dataObj )
dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsWString);
dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString);
if ( !dataObj )
continue;
@ -834,14 +834,14 @@ function awRecipientErrorCommand(errItem, element)
// try and get the string of the specific error to contruct the complete
// err msg, otherwise fall back to something generic. This message is
// handed to us as an nsISupportsWString in the param slot of the
// handed to us as an nsISupportsString in the param slot of the
// autocomplete error item, by agreement documented in
// nsILDAPAutoCompFormatter.idl
//
var specificErrString = "";
try {
var specificError = errItem.param.QueryInterface(
Components.interfaces.nsISupportsWString);
Components.interfaces.nsISupportsString);
specificErrString = specificError.data;
} catch (ex) {
}

Просмотреть файл

@ -81,8 +81,8 @@ nsMsgComposeProgress::OpenProgress(nsIDOMWindowInternal *parent,
rv = NS_NewISupportsArray(getter_AddRefs(array));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsISupportsWString> strptr =
do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv);
nsCOMPtr<nsISupportsString> strptr =
do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
strptr->SetData(subject);

Просмотреть файл

@ -160,7 +160,7 @@ NS_IMETHODIMP nsComm4xMailImport::GetImportInterface(const char *pImportType, ns
nsXPIDLString name;
rv = m_pBundle->GetStringFromID( COMM4XMAILIMPORT_NAME, getter_Copies(name));
nsCOMPtr<nsISupportsWString> nameString (do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv));
nsCOMPtr<nsISupportsString> nameString (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv));
NS_ENSURE_SUCCESS(rv,rv);
nameString->SetData(name.get());
pGeneric->SetData("name", nameString);

Просмотреть файл

@ -287,7 +287,7 @@ NS_IMETHODIMP nsEudoraImport::GetImportInterface( const char *pImportType, nsISu
pGeneric->SetData( "mailInterface", pMail);
nsString name;
nsEudoraStringBundle::GetStringByID( EUDORAIMPORT_NAME, name);
nsCOMPtr<nsISupportsWString> nameString (do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv));
nsCOMPtr<nsISupportsString> nameString (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv)) {
nameString->SetData(name.get());
pGeneric->SetData( "name", nameString);

Просмотреть файл

@ -267,7 +267,7 @@ NS_IMETHODIMP nsOEImport::GetImportInterface( const char *pImportType, nsISuppor
pGeneric->SetData( "mailInterface", pMail);
nsString name;
nsOEStringBundle::GetStringByID( OEIMPORT_NAME, name);
nsCOMPtr<nsISupportsWString> nameString (do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv));
nsCOMPtr<nsISupportsString> nameString (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv)) {
nameString->SetData(name.get());
pGeneric->SetData( "name", nameString);

Просмотреть файл

@ -267,7 +267,7 @@ NS_IMETHODIMP nsOutlookImport::GetImportInterface( const char *pImportType, nsIS
pGeneric->SetData( "mailInterface", pMail);
nsString name;
nsOutlookStringBundle::GetStringByID( OUTLOOKIMPORT_NAME, name);
nsCOMPtr<nsISupportsWString> nameString (do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv));
nsCOMPtr<nsISupportsString> nameString (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv)) {
nameString->SetData(name.get());
pGeneric->SetData( "name", nameString);

Просмотреть файл

@ -44,7 +44,7 @@
#include "nsISupports.idl"
interface nsIDOMWindowInternal;
interface nsISupportsWString;
interface nsISupportsString;
[scriptable, uuid(9b5c20c0-2348-11d3-a206-00a0cc26da63)]
interface nsIImportGeneric : nsISupports
@ -95,7 +95,7 @@ interface nsIImportGeneric : nsISupports
failure of the import. Failure can be reported even if WantsProgress
returned TRUE.
*/
boolean BeginImport( in nsISupportsWString successLog, in nsISupportsWString errorLog, in boolean isAddrLocHome);
boolean BeginImport( in nsISupportsString successLog, in nsISupportsString errorLog, in boolean isAddrLocHome);
/*
If WantsProgress returned TRUE then this will indicate if the import should
continue. If this returns FALSE then no other methods should be called

Просмотреть файл

@ -220,7 +220,7 @@ function FetchSampleData()
var data = top.addInterface.GetData( "sampleData-"+num);
var result = false;
if (data != null) {
data = data.QueryInterface( Components.interfaces.nsISupportsWString);
data = data.QueryInterface( Components.interfaces.nsISupportsString);
if (data != null) {
ShowSampleData( data.data);
result = true;

Просмотреть файл

@ -164,13 +164,13 @@ function ImportDialogOKButton()
{
case "mail":
top.successStr = Components.classes["@mozilla.org/supports-wstring;1"].createInstance();
top.successStr = Components.classes["@mozilla.org/supports-string;1"].createInstance();
if (top.successStr) {
top.successStr = top.successStr.QueryInterface( Components.interfaces.nsISupportsWString);
top.successStr = top.successStr.QueryInterface( Components.interfaces.nsISupportsString);
}
top.errorStr = Components.classes["@mozilla.org/supports-wstring;1"].createInstance();
top.errorStr = Components.classes["@mozilla.org/supports-string;1"].createInstance();
if (top.errorStr)
top.errorStr = top.errorStr.QueryInterface( Components.interfaces.nsISupportsWString);
top.errorStr = top.errorStr.QueryInterface( Components.interfaces.nsISupportsString);
if (ImportMail( module, top.successStr, top.errorStr) == true)
{
@ -206,15 +206,15 @@ function ImportDialogOKButton()
break;
case "addressbook":
top.successStr = Components.classes["@mozilla.org/supports-wstring;1"].createInstance();
top.successStr = Components.classes["@mozilla.org/supports-string;1"].createInstance();
if (top.successStr)
top.successStr = top.successStr.QueryInterface( Components.interfaces.nsISupportsWString);
top.errorStr = Components.classes["@mozilla.org/supports-wstring;1"].createInstance();
top.successStr = top.successStr.QueryInterface( Components.interfaces.nsISupportsString);
top.errorStr = Components.classes["@mozilla.org/supports-string;1"].createInstance();
if (top.errorStr)
top.errorStr = top.errorStr.QueryInterface( Components.interfaces.nsISupportsWString);
top.inputStr = Components.classes["@mozilla.org/supports-wstring;1"].createInstance();
top.errorStr = top.errorStr.QueryInterface( Components.interfaces.nsISupportsString);
top.inputStr = Components.classes["@mozilla.org/supports-string;1"].createInstance();
if (top.inputStr)
top.inputStr = top.inputStr.QueryInterface( Components.interfaces.nsISupportsWString);
top.inputStr = top.inputStr.QueryInterface( Components.interfaces.nsISupportsString);
if (ImportAddress( module, top.successStr, top.errorStr) == true) {
// We think it was a success, either, we need to
@ -376,7 +376,7 @@ function ContinueImport( info) {
if (isMail) {
var mailName = info.importInterface.GetData( "currentMailbox");
if (mailName) {
mailName = mailName.QueryInterface( Components.interfaces.nsISupportsWString);
mailName = mailName.QueryInterface( Components.interfaces.nsISupportsString);
if (mailName)
SetStatusText( mailName.data);
}

Просмотреть файл

@ -72,7 +72,7 @@ static NS_DEFINE_CID(kAbDirectoryCID, NS_ABDIRECTORY_CID);
static NS_DEFINE_CID(kStandardUrlCID, NS_STANDARDURL_CID);
static NS_DEFINE_CID(kAddrBookSessionCID, NS_ADDRBOOKSESSION_CID);
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
static NS_DEFINE_CID(kSupportsWStringCID, NS_SUPPORTS_WSTRING_CID);
static NS_DEFINE_CID(kSupportsWStringCID, NS_SUPPORTS_STRING_CID);
static NS_DEFINE_CID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
@ -102,8 +102,8 @@ public:
/* boolean WantsProgress (); */
NS_IMETHOD WantsProgress(PRBool *_retval);
/* boolean BeginImport (in nsISupportsWString successLog, in nsISupportsWString errorLog, in boolean isAddrLocHome); */
NS_IMETHOD BeginImport(nsISupportsWString *successLog, nsISupportsWString *errorLog, PRBool isAddrLocHome, PRBool *_retval) ;
/* boolean BeginImport (in nsISupportsString successLog, in nsISupportsString errorLog, in boolean isAddrLocHome); */
NS_IMETHOD BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool isAddrLocHome, PRBool *_retval) ;
/* boolean ContinueImport (); */
NS_IMETHOD ContinueImport(PRBool *_retval);
@ -120,7 +120,7 @@ private:
void GetDefaultFieldMap( void);
public:
static void SetLogs( nsString& success, nsString& error, nsISupportsWString *pSuccess, nsISupportsWString *pError);
static void SetLogs( nsString& success, nsString& error, nsISupportsString *pSuccess, nsISupportsString *pError);
static void ReportError( PRUnichar *pName, nsString *pStream);
private:
@ -133,8 +133,8 @@ private:
PRBool m_gotLocation;
PRBool m_found;
PRBool m_userVerify;
nsISupportsWString * m_pSuccessLog;
nsISupportsWString * m_pErrorLog;
nsISupportsString * m_pSuccessLog;
nsISupportsString * m_pErrorLog;
PRUint32 m_totalSize;
PRBool m_doImport;
AddressThreadData * m_pThreadData;
@ -152,8 +152,8 @@ public:
nsISupportsArray * books;
nsIImportAddressBooks * addressImport;
nsIImportFieldMap * fieldMap;
nsISupportsWString * successLog;
nsISupportsWString * errorLog;
nsISupportsString * successLog;
nsISupportsString * errorLog;
char * pDestinationUri;
PRBool bAddrLocInput ;
@ -303,8 +303,8 @@ NS_IMETHODIMP nsImportGenericAddressBooks::GetData(const char *dataId, nsISuppor
}
IMPORT_LOG1( "Requesting sample data #: %ld\n", (long)rNum);
if (m_pInterface) {
nsCOMPtr<nsISupportsWString> data;
rv = nsComponentManager::CreateInstance( kSupportsWStringCID, nsnull, NS_GET_IID(nsISupportsWString), getter_AddRefs( data));
nsCOMPtr<nsISupportsString> data;
rv = nsComponentManager::CreateInstance( kSupportsWStringCID, nsnull, NS_GET_IID(nsISupportsString), getter_AddRefs( data));
if (NS_FAILED( rv))
return( rv);
PRUnichar * pData = nsnull;
@ -541,7 +541,7 @@ NS_IMETHODIMP nsImportGenericAddressBooks::WantsProgress(PRBool *_retval)
return( NS_OK);
}
void nsImportGenericAddressBooks::SetLogs( nsString& success, nsString& error, nsISupportsWString *pSuccess, nsISupportsWString *pError)
void nsImportGenericAddressBooks::SetLogs( nsString& success, nsString& error, nsISupportsString *pSuccess, nsISupportsString *pError)
{
nsString str;
PRUnichar * pStr = nsnull;
@ -572,7 +572,7 @@ void nsImportGenericAddressBooks::SetLogs( nsString& success, nsString& error, n
}
}
NS_IMETHODIMP nsImportGenericAddressBooks::BeginImport(nsISupportsWString *successLog, nsISupportsWString *errorLog, PRBool isAddrLocHome, PRBool *_retval)
NS_IMETHODIMP nsImportGenericAddressBooks::BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool isAddrLocHome, PRBool *_retval)
{
NS_PRECONDITION(_retval != nsnull, "null ptr");
if (!_retval)

Просмотреть файл

@ -77,7 +77,7 @@ static NS_DEFINE_CID(kMsgAccountCID, NS_MSGACCOUNT_CID);
static NS_DEFINE_CID(kMsgIdentityCID, NS_MSGIDENTITY_CID);
static NS_DEFINE_CID(kMsgBiffManagerCID, NS_MSGBIFFMANAGER_CID);
static NS_DEFINE_CID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
static NS_DEFINE_CID(kSupportsWStringCID, NS_SUPPORTS_WSTRING_CID);
static NS_DEFINE_CID(kSupportsWStringCID, NS_SUPPORTS_STRING_CID);
////////////////////////////////////////////////////////////////////////
@ -106,8 +106,8 @@ public:
/* boolean WantsProgress (); */
NS_IMETHOD WantsProgress(PRBool *_retval);
/* boolean BeginImport (in nsISupportsWString successLog, in nsISupportsWString errorLog, in boolean isAddrLocHome); */
NS_IMETHODIMP BeginImport(nsISupportsWString *successLog, nsISupportsWString *errorLog, PRBool isAddrLocHome, PRBool *_retval) ;
/* boolean BeginImport (in nsISupportsString successLog, in nsISupportsString errorLog, in boolean isAddrLocHome); */
NS_IMETHODIMP BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool isAddrLocHome, PRBool *_retval) ;
/* boolean ContinueImport (); */
NS_IMETHOD ContinueImport(PRBool *_retval);
@ -123,10 +123,10 @@ private:
void GetDefaultMailboxes( void);
void GetDefaultLocation( void);
void GetDefaultDestination( void);
void GetMailboxName( PRUint32 index, nsISupportsWString *pStr);
void GetMailboxName( PRUint32 index, nsISupportsString *pStr);
public:
static void SetLogs( nsString& success, nsString& error, nsISupportsWString *pSuccess, nsISupportsWString *pError);
static void SetLogs( nsString& success, nsString& error, nsISupportsString *pSuccess, nsISupportsString *pError);
static void ReportError( PRInt32 id, const PRUnichar *pName, nsString *pStream);
private:
@ -140,8 +140,8 @@ private:
PRBool m_userVerify;
nsIImportMail * m_pInterface;
nsISupportsArray * m_pMailboxes;
nsISupportsWString *m_pSuccessLog;
nsISupportsWString *m_pErrorLog;
nsISupportsString *m_pSuccessLog;
nsISupportsString *m_pErrorLog;
PRUint32 m_totalSize;
PRBool m_doImport;
ImportThreadData * m_pThreadData;
@ -159,8 +159,8 @@ public:
PRBool ownsDestRoot;
nsISupportsArray * boxes;
nsIImportMail * mailImport;
nsISupportsWString * successLog;
nsISupportsWString * errorLog;
nsISupportsString * successLog;
nsISupportsString * errorLog;
PRUint32 currentMailbox;
ImportThreadData();
@ -271,10 +271,10 @@ NS_IMETHODIMP nsImportGenericMail::GetData(const char *dataId, nsISupports **_re
}
if (!nsCRT::strcasecmp( dataId, "currentMailbox")) {
// create an nsISupportsWString, get the current mailbox
// create an nsISupportsString, get the current mailbox
// name being imported and put it in the string
nsCOMPtr<nsISupportsWString> data;
rv = nsComponentManager::CreateInstance( kSupportsWStringCID, nsnull, NS_GET_IID(nsISupportsWString), getter_AddRefs( data));
nsCOMPtr<nsISupportsString> data;
rv = nsComponentManager::CreateInstance( kSupportsWStringCID, nsnull, NS_GET_IID(nsISupportsString), getter_AddRefs( data));
if (NS_FAILED( rv))
return( rv);
if (m_pThreadData) {
@ -323,9 +323,9 @@ NS_IMETHODIMP nsImportGenericMail::SetData( const char *dataId, nsISupports *ite
if (m_pName)
nsCRT::free( m_pName);
m_pName = nsnull;
nsCOMPtr<nsISupportsWString> nameString;
nsCOMPtr<nsISupportsString> nameString;
if (item) {
item->QueryInterface( NS_GET_IID(nsISupportsWString), getter_AddRefs(nameString));
item->QueryInterface( NS_GET_IID(nsISupportsString), getter_AddRefs(nameString));
rv = nameString->GetData(&m_pName);
}
}
@ -463,7 +463,7 @@ NS_IMETHODIMP nsImportGenericMail::WantsProgress(PRBool *_retval)
return( NS_OK);
}
void nsImportGenericMail::GetMailboxName( PRUint32 index, nsISupportsWString *pStr)
void nsImportGenericMail::GetMailboxName( PRUint32 index, nsISupportsString *pStr)
{
if (m_pMailboxes) {
nsISupports *pSupports = m_pMailboxes->ElementAt( index);
@ -482,7 +482,7 @@ void nsImportGenericMail::GetMailboxName( PRUint32 index, nsISupportsWString *pS
}
}
NS_IMETHODIMP nsImportGenericMail::BeginImport(nsISupportsWString *successLog, nsISupportsWString *errorLog, PRBool isAddrLocHome, PRBool *_retval)
NS_IMETHODIMP nsImportGenericMail::BeginImport(nsISupportsString *successLog, nsISupportsString *errorLog, PRBool isAddrLocHome, PRBool *_retval)
{
NS_PRECONDITION(_retval != nsnull, "null ptr");
if (!_retval)
@ -639,7 +639,7 @@ void nsImportGenericMail::ReportError( PRInt32 id, const PRUnichar *pName, nsStr
}
void nsImportGenericMail::SetLogs( nsString& success, nsString& error, nsISupportsWString *pSuccess, nsISupportsWString *pError)
void nsImportGenericMail::SetLogs( nsString& success, nsString& error, nsISupportsString *pSuccess, nsISupportsString *pError)
{
nsString str;
PRUnichar * pStr = nsnull;

Просмотреть файл

@ -615,7 +615,7 @@ nsresult nsImportService::DoDiscover( void)
nsCOMPtr<nsISimpleEnumerator> e;
rv = catMan->EnumerateCategory( "mailnewsimport", getter_AddRefs( e));
if (NS_FAILED( rv)) return( rv);
nsCOMPtr<nsISupportsString> contractid;
nsCOMPtr<nsISupportsCString> contractid;
rv = e->GetNext( getter_AddRefs( contractid));
while (NS_SUCCEEDED( rv) && contractid) {
nsXPIDLCString contractIdStr;

Просмотреть файл

@ -64,7 +64,7 @@ static void PrintImageDecoders()
do {
enumer->CurrentItem(getter_AddRefs(s));
if (s) {
nsCOMPtr<nsISupportsString> ss(do_QueryInterface(s));
nsCOMPtr<nsISupportsCString> ss(do_QueryInterface(s));
nsXPIDLCString xcs;
ss->GetData(getter_Copies(xcs));

Просмотреть файл

@ -168,7 +168,7 @@ interface nsIPrefBranch : nsISupports
* @param aType The XPCOM interface that this complex preference
* represents. Interfaces currently supported are:
* - nsILocalFile
* - nsISupportsWString (UniChar)
* - nsISupportsString (UniChar)
* - nsIPrefLocalizedString (Localized UniChar)
* - nsIFileSpec (deprecated - to be removed eventually)
* @param aValue The XPCOM object into which to the complex preference
@ -191,7 +191,7 @@ interface nsIPrefBranch : nsISupports
* @param aType The XPCOM interface that this complex preference
* represents. Interfaces currently supported are:
* - nsILocalFile
* - nsISupportsWString (UniChar)
* - nsISupportsString (UniChar)
* - nsIPrefLocalizedString (Localized UniChar)
* - nsIFileSpec (deprecated - to be removed eventually)
* @param aValue The XPCOM object from which to set the complex preference

Просмотреть файл

@ -41,13 +41,13 @@
/**
* The nsIPrefLocalizedString interface is simply a wrapper interface for
* nsISupportsWString so the preferences service can have a unique identifier
* to distinguish between requests for normal wide strings (nsISupportsWString)
* nsISupportsString so the preferences service can have a unique identifier
* to distinguish between requests for normal wide strings (nsISupportsString)
* and "localized" wide strings, which get their default values from properites
* files.
*
* @see nsIPrefBranch
* @see nsISupportsWString
* @see nsISupportsString
*
* @status FROZEN
*/

Просмотреть файл

@ -390,8 +390,8 @@ NS_IMETHODIMP nsPref::CopyUnicharPref(const char *pref, PRUnichar **_retval)
nsCOMPtr<nsIPrefBranch> prefBranch = do_QueryInterface(mPrefService, &rv);
if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsISupportsWString> theString;
rv = prefBranch->GetComplexValue(pref, NS_GET_IID(nsISupportsWString),
nsCOMPtr<nsISupportsString> theString;
rv = prefBranch->GetComplexValue(pref, NS_GET_IID(nsISupportsString),
getter_AddRefs(theString));
if (NS_SUCCEEDED(rv)) {
rv = theString->GetData(_retval);
@ -403,9 +403,9 @@ NS_IMETHODIMP nsPref::CopyUnicharPref(const char *pref, PRUnichar **_retval)
NS_IMETHODIMP nsPref::CopyDefaultUnicharPref(const char *pref, PRUnichar **_retval)
{
nsresult rv;
nsCOMPtr<nsISupportsWString> theString;
nsCOMPtr<nsISupportsString> theString;
rv = mDefaultBranch->GetComplexValue(pref, NS_GET_IID(nsISupportsWString),
rv = mDefaultBranch->GetComplexValue(pref, NS_GET_IID(nsISupportsString),
getter_AddRefs(theString));
if (NS_SUCCEEDED(rv)) {
rv = theString->GetData(_retval);
@ -419,10 +419,10 @@ NS_IMETHODIMP nsPref::SetUnicharPref(const char *pref, const PRUnichar *value)
nsCOMPtr<nsIPrefBranch> prefBranch = do_QueryInterface(mPrefService, &rv);
if (NS_SUCCEEDED(rv)) {
nsCOMPtr<nsISupportsWString> theString = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv);
nsCOMPtr<nsISupportsString> theString = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv)) {
theString->SetData(value);
rv = prefBranch->SetComplexValue(pref, NS_GET_IID(nsISupportsWString), theString);
rv = prefBranch->SetComplexValue(pref, NS_GET_IID(nsISupportsString), theString);
}
}
return rv;
@ -432,10 +432,10 @@ NS_IMETHODIMP nsPref::SetDefaultUnicharPref(const char *pref, const PRUnichar *v
{
nsresult rv;
nsCOMPtr<nsISupportsWString> theString = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv);
nsCOMPtr<nsISupportsString> theString = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv)) {
theString->SetData(value);
rv = mDefaultBranch->SetComplexValue(pref, NS_GET_IID(nsISupportsWString), theString);
rv = mDefaultBranch->SetComplexValue(pref, NS_GET_IID(nsISupportsString), theString);
}
return rv;
}

Просмотреть файл

@ -373,13 +373,13 @@ NS_IMETHODIMP nsPrefBranch::GetComplexValue(const char *aPrefName, const nsIID &
return NS_OK;
}
if (aType.Equals(NS_GET_IID(nsISupportsWString))) {
nsCOMPtr<nsISupportsWString> theString(do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv));
if (aType.Equals(NS_GET_IID(nsISupportsString))) {
nsCOMPtr<nsISupportsString> theString(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv));
if (NS_SUCCEEDED(rv)) {
rv = theString->SetData(NS_ConvertUTF8toUCS2(utf8String).get());
if (NS_SUCCEEDED(rv)) {
nsISupportsWString *temp = theString;
nsISupportsString *temp = theString;
NS_ADDREF(temp);
*_retval = (void *)temp;
@ -462,8 +462,8 @@ NS_IMETHODIMP nsPrefBranch::SetComplexValue(const char *aPrefName, const nsIID &
return SetCharPref(aPrefName, descriptorString.get());
}
if (aType.Equals(NS_GET_IID(nsISupportsWString))) {
nsCOMPtr<nsISupportsWString> theString = do_QueryInterface(aValue);
if (aType.Equals(NS_GET_IID(nsISupportsString))) {
nsCOMPtr<nsISupportsString> theString = do_QueryInterface(aValue);
if (theString) {
nsXPIDLString wideString;
@ -969,7 +969,7 @@ nsPrefLocalizedString::nsPrefLocalizedString()
NS_INIT_REFCNT();
mUnicodeString = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv);
mUnicodeString = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);
}
nsPrefLocalizedString::~nsPrefLocalizedString()
@ -987,13 +987,13 @@ NS_IMPL_THREADSAFE_RELEASE(nsPrefLocalizedString)
NS_INTERFACE_MAP_BEGIN(nsPrefLocalizedString)
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIPrefLocalizedString)
NS_INTERFACE_MAP_ENTRY(nsIPrefLocalizedString)
NS_INTERFACE_MAP_ENTRY(nsISupportsWString)
NS_INTERFACE_MAP_ENTRY(nsISupportsString)
NS_INTERFACE_MAP_END
nsresult nsPrefLocalizedString::Init()
{
nsresult rv;
mUnicodeString = do_CreateInstance(NS_SUPPORTS_WSTRING_CONTRACTID, &rv);
mUnicodeString = do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);
return rv;
}

Просмотреть файл

@ -89,20 +89,20 @@ private:
class nsPrefLocalizedString : public nsIPrefLocalizedString,
public nsISupportsWString
public nsISupportsString
{
public:
nsPrefLocalizedString();
virtual ~nsPrefLocalizedString();
NS_DECL_ISUPPORTS
NS_FORWARD_NSISUPPORTSWSTRING(mUnicodeString->)
NS_FORWARD_NSISUPPORTSSTRING(mUnicodeString->)
NS_FORWARD_NSISUPPORTSPRIMITIVE(mUnicodeString->)
nsresult Init();
private:
nsCOMPtr<nsISupportsWString> mUnicodeString;
nsCOMPtr<nsISupportsString> mUnicodeString;
};

Просмотреть файл

@ -509,7 +509,7 @@ nsIOService::GetParserForScheme(const char *scheme, nsIURLParser **_retval)
rv = catmgr->EnumerateCategory(NS_IURLPARSER_KEY, getter_AddRefs(parserList));
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsISupportsString> entry;
nsCOMPtr<nsISupportsCString> entry;
// Walk the list of parsers...
while (1) {

Просмотреть файл

@ -100,7 +100,7 @@ interface nsIHttpChannel : nsIChannel
/**
* This attribute holds the MIME types corresponding to the content
* encodings on the channel. The enumerator returns nsISupportsString
* encodings on the channel. The enumerator returns nsISupportsCString
* objects. The first one corresponds to the outermost encoding on the
* channel and then we work our way inward. "identity" is skipped and not
* represented on the list. Unknown encodings make the enumeration stop.

Просмотреть файл

@ -3271,8 +3271,8 @@ nsHttpChannel::nsContentEncodings::GetNext(nsISupports** aNextEncoding)
encoding.BeginReading(start);
encoding.EndReading(end);
nsCOMPtr<nsISupportsString> str;
str = do_CreateInstance("@mozilla.org/supports-string;1");
nsCOMPtr<nsISupportsCString> str;
str = do_CreateInstance("@mozilla.org/supports-cstring;1");
if (!str)
return NS_ERROR_FAILURE;

Просмотреть файл

@ -111,7 +111,7 @@ nsStreamConverterService::BuildGraph() {
if (NS_FAILED(rv)) return rv;
// go through each entry to build the graph
nsCOMPtr<nsISupportsString> entry;
nsCOMPtr<nsISupportsCString> entry;
rv = entries->GetNext(getter_AddRefs(entry));
while (NS_SUCCEEDED(rv)) {

Просмотреть файл

@ -113,8 +113,8 @@ TestMemoryObjectCache()
goto error_exit;
}
nsCOMPtr<nsISupportsString> foo =
do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);
nsCOMPtr<nsISupportsCString> foo =
do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID, &rv);
foo->SetData("hello world");
@ -134,7 +134,7 @@ TestMemoryObjectCache()
goto error_exit;
}
nsCOMPtr<nsISupportsString> bar;
nsCOMPtr<nsISupportsCString> bar;
descriptor->GetCacheElement(getter_AddRefs(bar));
if (foo.get() != bar.get()) {
printf("cache elements not the same\n");

Просмотреть файл

@ -29,9 +29,9 @@ function openCacheEntry(clientID, url)
function wrapString(str)
{
var nsISupportsString = Components.interfaces.nsISupportsString;
var factory = Components.classes["@mozilla.org/supports-string;1"];
var wrapper = factory.createInstance(nsISupportsString);
var nsISupportsCString = Components.interfaces.nsISupportsCString;
var factory = Components.classes["@mozilla.org/supports-cstring;1"];
var wrapper = factory.createInstance(nsISupportsCString);
wrapper.data = str;
return wrapper;
}

Просмотреть файл

@ -613,7 +613,7 @@ nsProfile::LoadDefaultProfileDir(nsCString & profileURLStr, PRBool canInteract)
{
while (PR_TRUE)
{
nsCOMPtr<nsISupportsString> contractid;
nsCOMPtr<nsISupportsCString> contractid;
rv = enumItem->GetNext(getter_AddRefs(contractid));
if (NS_FAILED(rv) || !contractid) break;

Просмотреть файл

@ -316,12 +316,12 @@ GetFileLocation(const char* aPrefName,
If we have an env var we should check whether the pref is a user
pref. If we do not, we don't care.
*/
nsCOMPtr<nsISupportsWString> prefFileName;
nsCOMPtr<nsISupportsString> prefFileName;
PRBool isUserPref = PR_FALSE;
prefBranch->PrefHasUserValue(aPrefName, &isUserPref);
if (isUserPref) {
rv = prefBranch->GetComplexValue(aPrefName,
NS_GET_IID(nsISupportsWString),
NS_GET_IID(nsISupportsString),
getter_AddRefs(prefFileName));
if (NS_SUCCEEDED(rv)) {
return prefFileName->GetData(aFileLocation);
@ -353,7 +353,7 @@ GetFileLocation(const char* aPrefName,
}
rv = prefBranch->GetComplexValue(aPrefName,
NS_GET_IID(nsISupportsWString),
NS_GET_IID(nsISupportsString),
getter_AddRefs(prefFileName));
if (NS_SUCCEEDED(rv)) {
return prefFileName->GetData(aFileLocation);

Просмотреть файл

@ -82,7 +82,7 @@ interface nsIClipboard : nsISupports
* inexpensive call. All it does is check if there is data on the clipboard matching
* any of the flavors in the given list.
*
* @aFlavorList - nsISupportsString's in a nsISupportsArray (for JavaScript).
* @aFlavorList - nsISupportsCString's in a nsISupportsArray (for JavaScript).
* @param aWhichClipboard Specifies the clipboard to which this operation applies.
* @outResult - if data is present matching one of
* @result NS_OK if successful.

Просмотреть файл

@ -43,14 +43,14 @@
interface nsIFormatConverter : nsISupports
{
/**
* Get the list of the "input" data flavors (mime types as nsISupportsString),
* Get the list of the "input" data flavors (mime types as nsISupportsCString),
* in otherwords, the flavors that this converter can convert "from" (the
* incoming data to the converter).
*/
nsISupportsArray getInputDataFlavors ( ) ;
/**
* Get the list of the "output" data flavors (mime types as nsISupportsString),
* Get the list of the "output" data flavors (mime types as nsISupportsCString),
* in otherwords, the flavors that this converter can convert "to" (the
* outgoing data to the converter).
*

Просмотреть файл

@ -48,7 +48,7 @@
interface nsITransferable : nsISupports
{
/**
* Computes a list of flavors (mime types as nsISupportsString) that the transferable
* Computes a list of flavors (mime types as nsISupportsCString) that the transferable
* can export, either through intrinsic knowledge or output data converters.
*
* @param aDataFlavorList fills list with supported flavors. This is a copy of
@ -86,7 +86,7 @@ interface nsITransferable : nsISupports
///////////////////////////////
/**
* Computes a list of flavors (mime types as nsISupportsString) that the transferable can
* Computes a list of flavors (mime types as nsISupportsCString) that the transferable can
* accept into it, either through intrinsic knowledge or input data converters.
*
* @param outFlavorList fills list with supported flavors. This is a copy of

Просмотреть файл

@ -150,7 +150,7 @@ NS_IMETHODIMP nsClipboard::SetNativeClipboardData(PRInt32 aWhichClipboard)
for (i = 0; i < cnt && rv == NS_OK; i++) {
nsCOMPtr<nsISupports> genericFlavor;
dfList->GetElementAt(i, getter_AddRefs(genericFlavor));
nsCOMPtr<nsISupportsString> currentFlavor (do_QueryInterface(genericFlavor));
nsCOMPtr<nsISupportsCString> currentFlavor (do_QueryInterface(genericFlavor));
if (currentFlavor) {
nsXPIDLCString flavorStr;
currentFlavor->ToString(getter_Copies(flavorStr));
@ -277,7 +277,7 @@ nsClipboard::GetNativeClipboardData(nsITransferable * aTransferable, PRInt32 aWh
for (PRUint32 i = 0; i < cnt; i++) {
nsCOMPtr<nsISupports> genericFlavor;
flavorList->GetElementAt(i, getter_AddRefs(genericFlavor));
nsCOMPtr<nsISupportsString> currentFlavor(do_QueryInterface(genericFlavor));
nsCOMPtr<nsISupportsCString> currentFlavor(do_QueryInterface(genericFlavor));
if (currentFlavor) {
nsXPIDLCString flavorStr;
currentFlavor->ToString(getter_Copies(flavorStr));

Просмотреть файл

@ -129,7 +129,7 @@ nsClipboard :: SetNativeClipboardData ( PRInt32 aWhichClipboard )
for ( PRUint32 i = 0; i < cnt; ++i ) {
nsCOMPtr<nsISupports> genericFlavor;
flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericFlavor) );
nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericFlavor) );
if ( currentFlavor ) {
nsXPIDLCString flavorStr;
currentFlavor->ToString( getter_Copies(flavorStr) );
@ -272,7 +272,7 @@ nsClipboard :: GetNativeClipboardData ( nsITransferable * aTransferable, PRInt32
for ( PRUint32 i = 0; i < cnt; ++i ) {
nsCOMPtr<nsISupports> genericFlavor;
flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericFlavor) );
nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericFlavor) );
if ( currentFlavor ) {
nsXPIDLCString flavorStr;
currentFlavor->ToString ( getter_Copies(flavorStr) );
@ -426,7 +426,7 @@ nsClipboard :: GetDataOffClipboard ( ResType inMacFlavor, void** outData, PRInt3
// HasDataMatchingFlavors
//
// Check the clipboard to see if we have any data that matches the given flavors. This
// does NOT actually fetch the data. The items in the flavor list are nsISupportsString's.
// does NOT actually fetch the data. The items in the flavor list are nsISupportsCString's.
//
// Handle the case where we ask for unicode and it's not there, but plain text is. We
// say "yes" in that case, knowing that we will have to perform a conversion when we actually
@ -452,7 +452,7 @@ nsClipboard :: HasDataMatchingFlavors ( nsISupportsArray* aFlavorList, PRInt32 a
for ( PRUint32 i = 0; i < length; ++i ) {
nsCOMPtr<nsISupports> genericFlavor;
aFlavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> flavorWrapper ( do_QueryInterface(genericFlavor) );
nsCOMPtr<nsISupportsCString> flavorWrapper ( do_QueryInterface(genericFlavor) );
if ( flavorWrapper ) {
nsXPIDLCString flavor;
flavorWrapper->ToString ( getter_Copies(flavor) );

Просмотреть файл

@ -391,7 +391,7 @@ nsDragService :: RegisterDragItemsAndFlavors ( nsISupportsArray * inArray )
nsCOMPtr<nsISupports> genericWrapper;
flavorList->GetElementAt ( flavorIndex, getter_AddRefs(genericWrapper) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericWrapper) );
nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericWrapper) );
if ( currentFlavor ) {
nsXPIDLCString flavorStr;
currentFlavor->ToString ( getter_Copies(flavorStr) );
@ -444,7 +444,7 @@ nsDragService :: GetData ( nsITransferable * aTransferable, PRUint32 aItemIndex
return NS_ERROR_INVALID_ARG;
// get flavor list that includes all acceptable flavors (including ones obtained through
// conversion). Flavors are nsISupportsStrings so that they can be seen from JS.
// conversion). Flavors are nsISupportsCStrings so that they can be seen from JS.
nsCOMPtr<nsISupportsArray> flavorList;
errCode = aTransferable->FlavorsTransferableCanImport ( getter_AddRefs(flavorList) );
if ( NS_FAILED(errCode) )
@ -468,7 +468,7 @@ nsDragService :: GetData ( nsITransferable * aTransferable, PRUint32 aItemIndex
for ( int i = 0; i < cnt; ++i ) {
nsCOMPtr<nsISupports> genericWrapper;
flavorList->GetElementAt ( i, getter_AddRefs(genericWrapper) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericWrapper) );
nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericWrapper) );
if ( currentFlavor ) {
// find MacOS flavor (but don't add it if it's not there)
nsXPIDLCString flavorStr;

Просмотреть файл

@ -338,7 +338,7 @@ NS_IMETHODIMP nsClipboard::SetNativeClipboardData(PRInt32 aWhichClipboard)
{
nsCOMPtr<nsISupports> genericFlavor;
flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericFlavor) );
nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericFlavor) );
if ( currentFlavor ) {
nsXPIDLCString flavorStr;
currentFlavor->ToString(getter_Copies(flavorStr));
@ -440,7 +440,7 @@ nsClipboard::GetNativeClipboardData(nsITransferable * aTransferable,
for ( PRUint32 i = 0; i < cnt; ++i ) {
nsCOMPtr<nsISupports> genericFlavor;
flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericFlavor) );
nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericFlavor) );
if ( currentFlavor ) {
nsXPIDLCString flavorStr;
currentFlavor->ToString ( getter_Copies(flavorStr) );
@ -768,7 +768,7 @@ nsClipboard::HasDataMatchingFlavors(nsISupportsArray* aFlavorList,
for ( PRUint32 i = 0; i < length; ++i ) {
nsCOMPtr<nsISupports> genericFlavor;
aFlavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> flavorWrapper ( do_QueryInterface(genericFlavor) );
nsCOMPtr<nsISupportsCString> flavorWrapper ( do_QueryInterface(genericFlavor) );
if ( flavorWrapper ) {
nsCAutoString flavorStr;
nsXPIDLCString myStr;

Просмотреть файл

@ -320,7 +320,7 @@ nsDragService::GetData (nsITransferable * aTransferable,
return NS_ERROR_INVALID_ARG;
// get flavor list that includes all acceptable flavors (including
// ones obtained through conversion). Flavors are nsISupportsStrings
// ones obtained through conversion). Flavors are nsISupportsCStrings
// so that they can be seen from JS.
nsresult rv = NS_ERROR_FAILURE;
nsCOMPtr<nsISupportsArray> flavorList;
@ -341,7 +341,7 @@ nsDragService::GetData (nsITransferable * aTransferable,
nsCOMPtr<nsISupports> genericWrapper;
// there is always one element if it's a list
flavorList->GetElementAt(0, getter_AddRefs(genericWrapper));
nsCOMPtr<nsISupportsString> currentFlavor;
nsCOMPtr<nsISupportsCString> currentFlavor;
currentFlavor = do_QueryInterface(genericWrapper);
if (currentFlavor) {
nsXPIDLCString flavorStr;
@ -381,7 +381,7 @@ nsDragService::GetData (nsITransferable * aTransferable,
for ( i = 0; i < cnt; ++i ) {
nsCOMPtr<nsISupports> genericWrapper;
flavorList->GetElementAt(i,getter_AddRefs(genericWrapper));
nsCOMPtr<nsISupportsString> currentFlavor;
nsCOMPtr<nsISupportsCString> currentFlavor;
currentFlavor = do_QueryInterface(genericWrapper);
if (currentFlavor) {
// find our gtk flavor
@ -557,7 +557,7 @@ nsDragService::IsDataFlavorSupported (const char *aDataFlavor,
for ( PRUint32 flavorIndex = 0; flavorIndex < numFlavors ; ++flavorIndex ) {
nsCOMPtr<nsISupports> genericWrapper;
flavorList->GetElementAt (flavorIndex, getter_AddRefs(genericWrapper));
nsCOMPtr<nsISupportsString> currentFlavor;
nsCOMPtr<nsISupportsCString> currentFlavor;
currentFlavor = do_QueryInterface(genericWrapper);
if (currentFlavor) {
nsXPIDLCString flavorStr;
@ -811,7 +811,7 @@ nsDragService::GetSourceList(void)
++flavorIndex ) {
nsCOMPtr<nsISupports> genericWrapper;
flavorList->GetElementAt(flavorIndex, getter_AddRefs(genericWrapper));
nsCOMPtr<nsISupportsString> currentFlavor;
nsCOMPtr<nsISupportsCString> currentFlavor;
currentFlavor = do_QueryInterface(genericWrapper);
if (currentFlavor) {
nsXPIDLCString flavorStr;
@ -848,7 +848,7 @@ nsDragService::GetSourceList(void)
++flavorIndex ) {
nsCOMPtr<nsISupports> genericWrapper;
flavorList->GetElementAt(flavorIndex, getter_AddRefs(genericWrapper));
nsCOMPtr<nsISupportsString> currentFlavor;
nsCOMPtr<nsISupportsCString> currentFlavor;
currentFlavor = do_QueryInterface(genericWrapper);
if (currentFlavor) {
nsXPIDLCString flavorStr;

Просмотреть файл

@ -141,7 +141,7 @@ nsClipboard::SetData(nsITransferable *aTransferable,
for (PRUint32 i=0; i < count; i++) {
nsCOMPtr<nsISupports> tastesLike;
flavors->GetElementAt(i, getter_AddRefs(tastesLike));
nsCOMPtr<nsISupportsString> flavor = do_QueryInterface(tastesLike);
nsCOMPtr<nsISupportsCString> flavor = do_QueryInterface(tastesLike);
if (flavor) {
nsXPIDLCString flavorStr;
@ -196,7 +196,7 @@ nsClipboard::GetData(nsITransferable *aTransferable, PRInt32 aWhichClipboard)
nsCOMPtr<nsISupports> genericFlavor;
flavors->GetElementAt(i, getter_AddRefs(genericFlavor));
nsCOMPtr<nsISupportsString> currentFlavor;
nsCOMPtr<nsISupportsCString> currentFlavor;
currentFlavor = do_QueryInterface(genericFlavor);
if (currentFlavor) {
@ -316,7 +316,7 @@ nsClipboard::HasDataMatchingFlavors(nsISupportsArray *aFlavorList,
for (PRUint32 i = 0; i < length && !*_retval; i++) {
nsCOMPtr<nsISupports> genericFlavor;
aFlavorList->GetElementAt(i, getter_AddRefs(genericFlavor));
nsCOMPtr<nsISupportsString> flavorWrapper;
nsCOMPtr<nsISupportsCString> flavorWrapper;
flavorWrapper = do_QueryInterface(genericFlavor);
if (flavorWrapper) {
@ -436,7 +436,7 @@ nsClipboard::SelectionGetEvent (GtkWidget *aWidget,
if (!item || NS_FAILED(rv))
return;
nsCOMPtr<nsISupportsWString> wideString;
nsCOMPtr<nsISupportsString> wideString;
wideString = do_QueryInterface(item);
if (!wideString)
return;

Просмотреть файл

@ -133,7 +133,7 @@ nsClipboard :: SetNativeClipboardData ( PRInt32 aWhichClipboard )
for ( PRUint32 i = 0; i < cnt; ++i ) {
nsCOMPtr<nsISupports> genericFlavor;
flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericFlavor) );
nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericFlavor) );
if ( currentFlavor ) {
nsXPIDLCString flavorStr;
currentFlavor->ToString( getter_Copies(flavorStr) );
@ -290,7 +290,7 @@ nsClipboard :: GetNativeClipboardData ( nsITransferable * aTransferable, PRInt32
for ( PRUint32 i = 0; i < cnt; ++i ) {
nsCOMPtr<nsISupports> genericFlavor;
flavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> currentFlavor ( do_QueryInterface(genericFlavor) );
nsCOMPtr<nsISupportsCString> currentFlavor ( do_QueryInterface(genericFlavor) );
if ( currentFlavor ) {
nsXPIDLCString flavorStr;
currentFlavor->ToString ( getter_Copies(flavorStr) );
@ -478,7 +478,7 @@ nsClipboard :: GetDataOffClipboard ( ResType inMacFlavor, void** outData, PRInt3
// HasDataMatchingFlavors
//
// Check the clipboard to see if we have any data that matches the given flavors. This
// does NOT actually fetch the data. The items in the flavor list are nsISupportsString's.
// does NOT actually fetch the data. The items in the flavor list are nsISupportsCString's.
//
// Handle the case where we ask for unicode and it's not there, but plain text is. We
// say "yes" in that case, knowing that we will have to perform a conversion when we actually
@ -504,7 +504,7 @@ nsClipboard :: HasDataMatchingFlavors ( nsISupportsArray* aFlavorList, PRInt32 a
for ( PRUint32 i = 0; i < length; ++i ) {
nsCOMPtr<nsISupports> genericFlavor;
aFlavorList->GetElementAt ( i, getter_AddRefs(genericFlavor) );
nsCOMPtr<nsISupportsString> flavorWrapper ( do_QueryInterface(genericFlavor) );
nsCOMPtr<nsISupportsCString> flavorWrapper ( do_QueryInterface(genericFlavor) );
if ( flavorWrapper ) {
nsXPIDLCString flavor;
flavorWrapper->ToString ( getter_Copies(flavor) );

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше