diff --git a/mozilla/modules/plugin/Makefile.in b/mozilla/modules/plugin/Makefile.in index 5cf0ceedd36..424d5090953 100644 --- a/mozilla/modules/plugin/Makefile.in +++ b/mozilla/modules/plugin/Makefile.in @@ -69,7 +69,7 @@ TOOL_DIRS += samples/default/windows endif ifeq ($(OS_ARCH),OS2) -TOOL_DIRS += samples/default/os2 +TOOL_DIRS += samples/default/os2 os2wrapper ifdef ENABLE_TESTS TOOL_DIRS += tools/tester/common tools/tester/os2 endif diff --git a/mozilla/modules/plugin/os2wrapper/Makefile.in b/mozilla/modules/plugin/os2wrapper/Makefile.in new file mode 100644 index 00000000000..16b026254cb --- /dev/null +++ b/mozilla/modules/plugin/os2wrapper/Makefile.in @@ -0,0 +1,99 @@ +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is InnoTek Plugin Wrapper code. +# +# The Initial Developer of the Original Code is +# InnoTek Systemberatung GmbH. +# Portions created by the Initial Developer are Copyright (C) 2003-2005 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# InnoTek Systemberatung GmbH / Knut St. Osmundsen +# Peter Weilbacher +# Walter Meinl +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** + +DEPTH = ../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +MODULE = plugin +XPIDL_MODULE = ipluginw +LIBRARY_NAME = ipluginw +FORCE_SHARED_LIB = 1 +IS_COMPONENT = 1 +MODULE_NAME = nsInnoTekPluginWrapperModule + +REQUIRES = xpcom \ + xpconnect \ + string \ + java \ + pref \ + necko \ + caps \ + intl \ + uconv \ + unicharutil \ + dom \ + gfx \ + content \ + widget \ + mimetype \ + oji \ + exthandler \ + docshell \ + windowwatcher \ + liveconnect \ + imglib2 \ + layout \ + js \ + $(NULL) + +CSRCS = \ + util_debug.c \ + $(NULL) + +CPPSRCS = \ + nsInnoTekPluginWrapperModule.cpp \ + wrap_XPCOM.cpp \ + $(NULL) + +EXTRA_DSO_LDOPTS = \ + $(LIBS_DIR) \ + $(EXTRA_DSO_LIBS) \ + $(MOZ_NECKO_UTIL_LIBS) \ + $(MOZ_UNICHARUTIL_LIBS) \ + $(MOZ_COMPONENT_LIBS) \ + $(NULL) +ifdef MOZ_ENABLE_LIBXUL +EXTRA_DSO_LDOPTS += $(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) +endif + +include $(topsrcdir)/config/rules.mk diff --git a/mozilla/modules/plugin/os2wrapper/README.txt b/mozilla/modules/plugin/os2wrapper/README.txt new file mode 100644 index 00000000000..faec76f739d --- /dev/null +++ b/mozilla/modules/plugin/os2wrapper/README.txt @@ -0,0 +1 @@ +Plugin wrapper for OS/2 to enable old plugins to work with GCC-compiled builds. diff --git a/mozilla/modules/plugin/os2wrapper/moz_IDs.cmd b/mozilla/modules/plugin/os2wrapper/moz_IDs.cmd new file mode 100755 index 00000000000..fed753eee41 --- /dev/null +++ b/mozilla/modules/plugin/os2wrapper/moz_IDs.cmd @@ -0,0 +1,183 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is InnoTek Plugin Wrapper code. + * + * The Initial Developer of the Original Code is + * InnoTek Systemberatung GmbH. + * Portions created by the Initial Developer are Copyright (C) 2003-2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * InnoTek Systemberatung GmbH / Knut St. Osmundsen + * Peter Weilbacher + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/* + * Generate moz_IDs_Generated.h from moz_IDs_Input.lst + */ + +/* + * Read the input + */ +aIDs.0 = 0; +parse arg sIn sDummy +if (sIn = '') then + sIn = 'moz_IDs_Input.lst'; +do while lines(sIn) + sLine = strip(linein(sIn)); + if (sLine <> '' & left(sLine,1) <> '#' & left(sLine,1) <> ';') then + do + i = aIDs.0 + 1; + aIDs.0 = i; + parse var sLine aIDs.i.sClass aIDs.i.sDefine aIDs.i.sConst + if (aIDs.i.sDefine = '') then + do + if (left(aIDs.i.sClass, 2) == 'ns') then + aIDs.i.sDefine = 'NS_'||substr(aIDs.i.sClass, 3)||'_IID'; + else + aIDs.i.sDefine = 'NS_'||aIDs.i.sClass||'_IID'; + aIDs.i.sDefine = translate(aIDs.i.sDefine); + end + if (aIDs.i.sConst = '') then + do + if (left(aIDs.i.sClass, 3) == 'nsI') then + aIDs.i.sConst = 'k'||substr(aIDs.i.sClass, 4)||'IID'; + else if (left(aIDs.i.sClass, 2) == 'ns') then + aIDs.i.sConst = 'k'||substr(aIDs.i.sClass, 3)||'IID'; + else + aIDs.i.sConst = 'k'||aIDs.i.sClass||'IID'; + end + end +end +call stream sIn, 'c', 'close'; + + +/* + * Make output. + */ +say '/* ***** BEGIN LICENSE BLOCK *****' +say ' * Version: MPL 1.1/GPL 2.0/LGPL 2.1' +say ' *' +say ' * The contents of this file are subject to the Mozilla Public License Version' +say ' * 1.1 (the "License"); you may not use this file except in compliance with' +say ' * the License. You may obtain a copy of the License at' +say ' * http://www.mozilla.org/MPL/' +say ' *' +say ' * Software distributed under the License is distributed on an "AS IS" basis,' +say ' * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License' +say ' * for the specific language governing rights and limitations under the' +say ' * License.' +say ' *' +say ' * The Original Code is InnoTek Plugin Wrapper code.' +say ' *' +say ' * The Initial Developer of the Original Code is' +say ' * InnoTek Systemberatung GmbH.' +say ' * Portions created by the Initial Developer are Copyright (C) 2003-2005' +say ' * the Initial Developer. All Rights Reserved.' +say ' *' +say ' * Contributor(s):' +say ' * InnoTek Systemberatung GmbH / Knut St. Osmundsen' +say ' * Peter Weilbacher ' +say ' *' +say ' * Alternatively, the contents of this file may be used under the terms of' +say ' * either the GNU General Public License Version 2 or later (the "GPL"), or' +say ' * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),' +say ' * in which case the provisions of the GPL or the LGPL are applicable instead' +say ' * of those above. If you wish to allow use of your version of this file only' +say ' * under the terms of either the GPL or the LGPL, and not to allow others to' +say ' * use your version of this file under the terms of the MPL, indicate your' +say ' * decision by deleting the provisions above and replace them with the notice' +say ' * and other provisions required by the GPL or the LGPL. If you do not delete' +say ' * the provisions above, a recipient may use your version of this file under' +say ' * the terms of any one of the MPL, the GPL or the LGPL.' +say ' *' +say ' * ***** END LICENSE BLOCK ***** */' +say '' +say '/*' +say ' * ID constants.' +say ' */' +say '' +say '/*******************************************************************************' +say '* Defined Constants And Macros *' +say '*******************************************************************************/' +say '#ifndef NP_DEF_ID' +say '#define NP_DEF_ID(_name, _iidspec) extern const nsIID _name' +say '#endif' +say '' +say '' +say '/*******************************************************************************' +say '* Global Variables *' +say '*******************************************************************************/' +say '/** @name Component and Interface IDs Constants.' +say ' * @{' +say ' */' +do i = 1 to aIDs.0 + say '#ifdef '||aIDs.i.sDefine + say 'NP_DEF_ID('||aIDs.i.sConst', '||aIDs.i.sDefine||');' + say '#endif' +end +say '' +say '' +say '' +say '#ifdef NP_INCL_LOOKUP' +say '/**' +say ' * Lookup list for IIDs and CIDs to get an understandable name.' +say ' */' +say 'static struct nsIDNameLookupEntry' +say '{' +say ' const nsID * pID;' +say ' const char * pszName;' +say '} aIDNameLookup[] =' +say '{' +do i = 1 to aIDs.0 + say '#ifdef '||aIDs.i.sDefine + say ' { &'||aIDs.i.sConst', "'||aIDs.i.sDefine||'" },' + say '#endif' +end +say '};' +say '' +say '' +say '' +say '/**' +say ' * Lookup list for IIDs and CIDs to get an understandable name.' +say ' */' +say 'static struct nsLookupStrIDEntry' +say '{' +say ' const nsID * pID;' +say ' const char * pszStrID;' +say '} aIDStrIDLookup[] =' +say '{' +do i = 1 to aIDs.0 + say '#ifdef '||aIDs.i.sDefine||'_STR' + say ' { &'||aIDs.i.sConst', '||aIDs.i.sDefine||'_STR },' + say '#endif' +end +say '};' +say '#endif' +say '' + +exit(0); diff --git a/mozilla/modules/plugin/os2wrapper/moz_IDs_Generated.h b/mozilla/modules/plugin/os2wrapper/moz_IDs_Generated.h new file mode 100644 index 00000000000..4ff7dc2f41a --- /dev/null +++ b/mozilla/modules/plugin/os2wrapper/moz_IDs_Generated.h @@ -0,0 +1,8815 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is InnoTek Plugin Wrapper code. + * + * The Initial Developer of the Original Code is + * InnoTek Systemberatung GmbH. + * Portions created by the Initial Developer are Copyright (C) 2003-2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * InnoTek Systemberatung GmbH / Knut St. Osmundsen + * Peter Weilbacher + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/* + * ID constants. + */ + +/******************************************************************************* +* Defined Constants And Macros * +*******************************************************************************/ +#ifndef NP_DEF_ID +#define NP_DEF_ID(_name, _iidspec) extern const nsIID _name +#endif + + +/******************************************************************************* +* Global Variables * +*******************************************************************************/ +/** @name Component and Interface IDs Constants. + * @{ + */ +#ifdef NS_CDEFAULTURIFIXUP_IID +NP_DEF_ID(kCDefaultURIFixupIID, NS_CDEFAULTURIFIXUP_IID); +#endif +#ifdef NS_CDOCSHELL_IID +NP_DEF_ID(kCDocShellIID, NS_CDOCSHELL_IID); +#endif +#ifdef NS_CEXTERNALHANDLERSERVICE_IID +NP_DEF_ID(kCExternalHandlerServiceIID, NS_CEXTERNALHANDLERSERVICE_IID); +#endif +#ifdef NS_CURILOADER_IID +NP_DEF_ID(kCURILoaderIID, NS_CURILOADER_IID); +#endif +#ifdef NS_CWEBBROWSER_IID +NP_DEF_ID(kCWebBrowserIID, NS_CWEBBROWSER_IID); +#endif +#ifdef NS_CWEBBROWSERPERSIST_IID +NP_DEF_ID(kCWebBrowserPersistIID, NS_CWEBBROWSERPERSIST_IID); +#endif +#ifdef NS_IABADDRESSCOLLECTER_IID +NP_DEF_ID(kAbAddressCollecterIID, NS_IABADDRESSCOLLECTER_IID); +#endif +#ifdef NS_IABAUTOCOMPLETESESSION_IID +NP_DEF_ID(kAbAutoCompleteSessionIID, NS_IABAUTOCOMPLETESESSION_IID); +#endif +#ifdef NS_IABBASE_IID +NP_DEF_ID(kAbBaseIID, NS_IABBASE_IID); +#endif +#ifdef NS_IABBOOLEANEXPRESSION_IID +NP_DEF_ID(kAbBooleanExpressionIID, NS_IABBOOLEANEXPRESSION_IID); +#endif +#ifdef NS_IABCARD_IID +NP_DEF_ID(kAbCardIID, NS_IABCARD_IID); +#endif +#ifdef NS_IABDIRECTORY_IID +NP_DEF_ID(kAbDirectoryIID, NS_IABDIRECTORY_IID); +#endif +#ifdef NS_IABDIRECTORYQUERY_IID +NP_DEF_ID(kAbDirectoryQueryIID, NS_IABDIRECTORYQUERY_IID); +#endif +#ifdef NS_IABDIRECTORYQUERYPROXY_IID +NP_DEF_ID(kAbDirectoryQueryProxyIID, NS_IABDIRECTORYQUERYPROXY_IID); +#endif +#ifdef NS_IABDIRECTORYSEARCH_IID +NP_DEF_ID(kAbDirectorySearchIID, NS_IABDIRECTORYSEARCH_IID); +#endif +#ifdef NS_IABDIRFACTORY_IID +NP_DEF_ID(kAbDirFactoryIID, NS_IABDIRFACTORY_IID); +#endif +#ifdef NS_IABDIRFACTORYSERVICE_IID +NP_DEF_ID(kAbDirFactoryServiceIID, NS_IABDIRFACTORYSERVICE_IID); +#endif +#ifdef NS_IABLDAPAUTOCOMPFORMATTER_IID +NP_DEF_ID(kAbLDAPAutoCompFormatterIID, NS_IABLDAPAUTOCOMPFORMATTER_IID); +#endif +#ifdef NS_IABLDAPREPLICATIONDATA_IID +NP_DEF_ID(kAbLDAPReplicationDataIID, NS_IABLDAPREPLICATIONDATA_IID); +#endif +#ifdef NS_IABLDAPREPLICATIONQUERY_IID +NP_DEF_ID(kAbLDAPReplicationQueryIID, NS_IABLDAPREPLICATIONQUERY_IID); +#endif +#ifdef NS_IABLDAPREPLICATIONSERVICE_IID +NP_DEF_ID(kAbLDAPReplicationServiceIID, NS_IABLDAPREPLICATIONSERVICE_IID); +#endif +#ifdef NS_IABLISTENER_IID +NP_DEF_ID(kAbListenerIID, NS_IABLISTENER_IID); +#endif +#ifdef NS_IABMDBCARD_IID +NP_DEF_ID(kAbMDBCardIID, NS_IABMDBCARD_IID); +#endif +#ifdef NS_IABMDBDIRECTORY_IID +NP_DEF_ID(kAbMDBDirectoryIID, NS_IABMDBDIRECTORY_IID); +#endif +#ifdef NS_IABOUTMODULE_IID +NP_DEF_ID(kAboutModuleIID, NS_IABOUTMODULE_IID); +#endif +#ifdef NS_IABUPGRADER_IID +NP_DEF_ID(kAbUpgraderIID, NS_IABUPGRADER_IID); +#endif +#ifdef NS_IABVIEW_IID +NP_DEF_ID(kAbViewIID, NS_IABVIEW_IID); +#endif +#ifdef NS_IACCESSIBILITYSERVICE_IID +NP_DEF_ID(kAccessibilityServiceIID, NS_IACCESSIBILITYSERVICE_IID); +#endif +#ifdef NS_IACCESSIBLE_IID +NP_DEF_ID(kAccessibleIID, NS_IACCESSIBLE_IID); +#endif +#ifdef NS_IACCESSIBLEACTION_IID +NP_DEF_ID(kAccessibleActionIID, NS_IACCESSIBLEACTION_IID); +#endif +#ifdef NS_IACCESSIBLECARET_IID +NP_DEF_ID(kAccessibleCaretIID, NS_IACCESSIBLECARET_IID); +#endif +#ifdef NS_IACCESSIBLEDOCUMENT_IID +NP_DEF_ID(kAccessibleDocumentIID, NS_IACCESSIBLEDOCUMENT_IID); +#endif +#ifdef NS_IACCESSIBLEEDITABLETEXT_IID +NP_DEF_ID(kAccessibleEditableTextIID, NS_IACCESSIBLEEDITABLETEXT_IID); +#endif +#ifdef NS_IACCESSIBLEEVENTLISTENER_IID +NP_DEF_ID(kAccessibleEventListenerIID, NS_IACCESSIBLEEVENTLISTENER_IID); +#endif +#ifdef NS_IACCESSIBLEEVENTRECEIVER_IID +NP_DEF_ID(kAccessibleEventReceiverIID, NS_IACCESSIBLEEVENTRECEIVER_IID); +#endif +#ifdef NS_IACCESSIBLEHYPERLINK_IID +NP_DEF_ID(kAccessibleHyperLinkIID, NS_IACCESSIBLEHYPERLINK_IID); +#endif +#ifdef NS_IACCESSIBLEHYPERTEXT_IID +NP_DEF_ID(kAccessibleHyperTextIID, NS_IACCESSIBLEHYPERTEXT_IID); +#endif +#ifdef NS_IACCESSIBLEPROVIDER_IID +NP_DEF_ID(kAccessibleProviderIID, NS_IACCESSIBLEPROVIDER_IID); +#endif +#ifdef NS_IACCESSIBLESELECTABLE_IID +NP_DEF_ID(kAccessibleSelectableIID, NS_IACCESSIBLESELECTABLE_IID); +#endif +#ifdef NS_IACCESSIBLETABLE_IID +NP_DEF_ID(kAccessibleTableIID, NS_IACCESSIBLETABLE_IID); +#endif +#ifdef NS_IACCESSIBLETEXT_IID +NP_DEF_ID(kAccessibleTextIID, NS_IACCESSIBLETEXT_IID); +#endif +#ifdef NS_IACCESSIBLEVALUE_IID +NP_DEF_ID(kAccessibleValueIID, NS_IACCESSIBLEVALUE_IID); +#endif +#ifdef NS_IACCESSIBLEWIN32OBJECT_IID +NP_DEF_ID(kAccessibleWin32ObjectIID, NS_IACCESSIBLEWIN32OBJECT_IID); +#endif +#ifdef NS_IADDBOOKURL_IID +NP_DEF_ID(kAddbookUrlIID, NS_IADDBOOKURL_IID); +#endif +#ifdef NS_IADDRBOOKSESSION_IID +NP_DEF_ID(kAddrBookSessionIID, NS_IADDRBOOKSESSION_IID); +#endif +#ifdef NS_IADDRDATABASE_IID +NP_DEF_ID(kAddrDatabaseIID, NS_IADDRDATABASE_IID); +#endif +#ifdef NS_IADDRDBANNOUNCER_IID +NP_DEF_ID(kAddrDBAnnouncerIID, NS_IADDRDBANNOUNCER_IID); +#endif +#ifdef NS_IADDRDBLISTENER_IID +NP_DEF_ID(kAddrDBListenerIID, NS_IADDRDBLISTENER_IID); +#endif +#ifdef NS_IADDRESSBOOK_IID +NP_DEF_ID(kAddressBookIID, NS_IADDRESSBOOK_IID); +#endif +#ifdef NS_IAGGREGATEPRINCIPAL_IID +NP_DEF_ID(kAggregatePrincipalIID, NS_IAGGREGATEPRINCIPAL_IID); +#endif +#ifdef NS_IAPPSHELL_IID +NP_DEF_ID(kAppShellIID, NS_IAPPSHELL_IID); +#endif +#ifdef NS_IAPPSHELLSERVICE_IID +NP_DEF_ID(kAppShellServiceIID, NS_IAPPSHELLSERVICE_IID); +#endif +#ifdef NS_IARRAY_IID +NP_DEF_ID(kArrayIID, NS_IARRAY_IID); +#endif +#ifdef NS_IASN1OBJECT_IID +NP_DEF_ID(kASN1ObjectIID, NS_IASN1OBJECT_IID); +#endif +#ifdef NS_IASN1PRINTABLEITEM_IID +NP_DEF_ID(kASN1PrintableItemIID, NS_IASN1PRINTABLEITEM_IID); +#endif +#ifdef NS_IASN1SEQUENCE_IID +NP_DEF_ID(kASN1SequenceIID, NS_IASN1SEQUENCE_IID); +#endif +#ifdef NS_IASN1TREE_IID +NP_DEF_ID(kASN1TreeIID, NS_IASN1TREE_IID); +#endif +#ifdef NS_IASYNCINPUTSTREAM_IID +NP_DEF_ID(kAsyncInputStreamIID, NS_IASYNCINPUTSTREAM_IID); +#endif +#ifdef NS_IASYNCOUTPUTSTREAM_IID +NP_DEF_ID(kAsyncOutputStreamIID, NS_IASYNCOUTPUTSTREAM_IID); +#endif +#ifdef NS_IASYNCSTREAMCOPIER_IID +NP_DEF_ID(kAsyncStreamCopierIID, NS_IASYNCSTREAMCOPIER_IID); +#endif +#ifdef NS_IATOM_IID +NP_DEF_ID(kAtomIID, NS_IATOM_IID); +#endif +#ifdef NS_IATOMSERVICE_IID +NP_DEF_ID(kAtomServiceIID, NS_IATOMSERVICE_IID); +#endif +#ifdef NS_IAUTHPROMPT_IID +NP_DEF_ID(kAuthPromptIID, NS_IAUTHPROMPT_IID); +#endif +#ifdef NS_IAUTHPROMPTWRAPPER_IID +NP_DEF_ID(kAuthPromptWrapperIID, NS_IAUTHPROMPTWRAPPER_IID); +#endif +#ifdef NS_IAUTOCOMPLETELISTENER_IID +NP_DEF_ID(kAutoCompleteListenerIID, NS_IAUTOCOMPLETELISTENER_IID); +#endif +#ifdef NS_IAUTOCOMPLETERESULTS_IID +NP_DEF_ID(kAutoCompleteResultsIID, NS_IAUTOCOMPLETERESULTS_IID); +#endif +#ifdef NS_IAUTOCOMPLETESESSION_IID +NP_DEF_ID(kAutoCompleteSessionIID, NS_IAUTOCOMPLETESESSION_IID); +#endif +#ifdef NS_IAUTOCONFIG_IID +NP_DEF_ID(kAutoConfigIID, NS_IAUTOCONFIG_IID); +#endif +#ifdef NS_IBADCERTLISTENER_IID +NP_DEF_ID(kBadCertListenerIID, NS_IBADCERTLISTENER_IID); +#endif +#ifdef NS_IBASEWINDOW_IID +NP_DEF_ID(kBaseWindowIID, NS_IBASEWINDOW_IID); +#endif +#ifdef NS_IBIDIKEYBOARD_IID +NP_DEF_ID(kBidiKeyboardIID, NS_IBIDIKEYBOARD_IID); +#endif +#ifdef NS_IBINARYINPUTSTREAM_IID +NP_DEF_ID(kBinaryInputStreamIID, NS_IBINARYINPUTSTREAM_IID); +#endif +#ifdef NS_IBINARYOUTPUTSTREAM_IID +NP_DEF_ID(kBinaryOutputStreamIID, NS_IBINARYOUTPUTSTREAM_IID); +#endif +#ifdef NS_IBOOKMARKSSERVICE_IID +NP_DEF_ID(kBookmarksServiceIID, NS_IBOOKMARKSSERVICE_IID); +#endif +#ifdef NS_IBOXLAYOUTMANAGER_IID +NP_DEF_ID(kBoxLayoutManagerIID, NS_IBOXLAYOUTMANAGER_IID); +#endif +#ifdef NS_IBOXOBJECT_IID +NP_DEF_ID(kBoxObjectIID, NS_IBOXOBJECT_IID); +#endif +#ifdef NS_IBOXPAINTMANAGER_IID +NP_DEF_ID(kBoxPaintManagerIID, NS_IBOXPAINTMANAGER_IID); +#endif +#ifdef NS_IBROWSERBOXOBJECT_IID +NP_DEF_ID(kBrowserBoxObjectIID, NS_IBROWSERBOXOBJECT_IID); +#endif +#ifdef NS_IBROWSERHISTORY_IID +NP_DEF_ID(kBrowserHistoryIID, NS_IBROWSERHISTORY_IID); +#endif +#ifdef NS_IBROWSERINSTANCE_IID +NP_DEF_ID(kBrowserInstanceIID, NS_IBROWSERINSTANCE_IID); +#endif +#ifdef NS_IBUFENTROPYCOLLECTOR_IID +NP_DEF_ID(kBufEntropyCollectorIID, NS_IBUFENTROPYCOLLECTOR_IID); +#endif +#ifdef NS_IBUFFEREDSTREAMS_IID +NP_DEF_ID(kBufferedStreamsIID, NS_IBUFFEREDSTREAMS_IID); +#endif +#ifdef NS_IBYTEARRAYINPUTSTREAM_IID +NP_DEF_ID(kByteArrayInputStreamIID, NS_IBYTEARRAYINPUTSTREAM_IID); +#endif +#ifdef NS_IBYTERANGEREQUEST_IID +NP_DEF_ID(kByteRangeRequestIID, NS_IBYTERANGEREQUEST_IID); +#endif +#ifdef NS_ICACHE_IID +NP_DEF_ID(kCacheIID, NS_ICACHE_IID); +#endif +#ifdef NS_ICACHEENTRYDESCRIPTOR_IID +NP_DEF_ID(kCacheEntryDescriptorIID, NS_ICACHEENTRYDESCRIPTOR_IID); +#endif +#ifdef NS_ICACHELISTENER_IID +NP_DEF_ID(kCacheListenerIID, NS_ICACHELISTENER_IID); +#endif +#ifdef NS_ICACHESERVICE_IID +NP_DEF_ID(kCacheServiceIID, NS_ICACHESERVICE_IID); +#endif +#ifdef NS_ICACHESESSION_IID +NP_DEF_ID(kCacheSessionIID, NS_ICACHESESSION_IID); +#endif +#ifdef NS_ICACHEVISITOR_IID +NP_DEF_ID(kCacheVisitorIID, NS_ICACHEVISITOR_IID); +#endif +#ifdef NS_ICACHINGCHANNEL_IID +NP_DEF_ID(kCachingChannelIID, NS_ICACHINGCHANNEL_IID); +#endif +#ifdef NS_ICATEGORYMANAGER_IID +NP_DEF_ID(kCategoryManagerIID, NS_ICATEGORYMANAGER_IID); +#endif +#ifdef NS_ICERTIFICATEDIALOGS_IID +NP_DEF_ID(kCertificateDialogsIID, NS_ICERTIFICATEDIALOGS_IID); +#endif +#ifdef NS_ICERTIFICATEPRINCIPAL_IID +NP_DEF_ID(kCertificatePrincipalIID, NS_ICERTIFICATEPRINCIPAL_IID); +#endif +#ifdef NS_ICERTPICKDIALOGS_IID +NP_DEF_ID(kCertPickDialogsIID, NS_ICERTPICKDIALOGS_IID); +#endif +#ifdef NS_ICERTSELECT_IID +NP_DEF_ID(kCertSelectIID, NS_ICERTSELECT_IID); +#endif +#ifdef NS_ICERTTREE_IID +NP_DEF_ID(kCertTreeIID, NS_ICERTTREE_IID); +#endif +#ifdef NS_ICHANNEL_IID +NP_DEF_ID(kChannelIID, NS_ICHANNEL_IID); +#endif +#ifdef NS_ICHARSETCONVERTERMANAGER2_IID +NP_DEF_ID(kCharsetConverterManager2IID, NS_ICHARSETCONVERTERMANAGER2_IID); +#endif +#ifdef NS_ICHROMEEVENTHANDLER_IID +NP_DEF_ID(kChromeEventHandlerIID, NS_ICHROMEEVENTHANDLER_IID); +#endif +#ifdef NS_ICHROMEREGISTRY_IID +NP_DEF_ID(kChromeRegistryIID, NS_ICHROMEREGISTRY_IID); +#endif +#ifdef NS_ICIPHERINFO_IID +NP_DEF_ID(kCipherInfoIID, NS_ICIPHERINFO_IID); +#endif +#ifdef NS_ICITER_IID +NP_DEF_ID(kCiterIID, NS_ICITER_IID); +#endif +#ifdef NS_ICLASSICPLUGINFACTORY_IID +NP_DEF_ID(kClassicPluginFactoryIID, NS_ICLASSICPLUGINFACTORY_IID); +#endif +#ifdef NS_ICLASSINFO_IID +NP_DEF_ID(kClassInfoIID, NS_ICLASSINFO_IID); +#endif +#ifdef NS_ICLIENTAUTHDIALOGS_IID +NP_DEF_ID(kClientAuthDialogsIID, NS_ICLIENTAUTHDIALOGS_IID); +#endif +#ifdef NS_ICLIPBOARD_IID +NP_DEF_ID(kClipboardIID, NS_ICLIPBOARD_IID); +#endif +#ifdef NS_ICLIPBOARDCOMMANDS_IID +NP_DEF_ID(kClipboardCommandsIID, NS_ICLIPBOARDCOMMANDS_IID); +#endif +#ifdef NS_ICLIPBOARDHELPER_IID +NP_DEF_ID(kClipboardHelperIID, NS_ICLIPBOARDHELPER_IID); +#endif +#ifdef NS_ICLIPBOARDOWNER_IID +NP_DEF_ID(kClipboardOwnerIID, NS_ICLIPBOARDOWNER_IID); +#endif +#ifdef NS_ICLOSEALLWINDOWS_IID +NP_DEF_ID(kCloseAllWindowsIID, NS_ICLOSEALLWINDOWS_IID); +#endif +#ifdef NS_ICMDLINEHANDLER_IID +NP_DEF_ID(kCmdLineHandlerIID, NS_ICMDLINEHANDLER_IID); +#endif +#ifdef NS_ICMDLINESERVICE_IID +NP_DEF_ID(kCmdLineServiceIID, NS_ICMDLINESERVICE_IID); +#endif +#ifdef NS_ICMSDECODER_IID +NP_DEF_ID(kCMSDecoderIID, NS_ICMSDECODER_IID); +#endif +#ifdef NS_ICMSENCODER_IID +NP_DEF_ID(kCMSEncoderIID, NS_ICMSENCODER_IID); +#endif +#ifdef NS_ICMSMESSAGE_IID +NP_DEF_ID(kCMSMessageIID, NS_ICMSMESSAGE_IID); +#endif +#ifdef NS_ICMSMESSAGEERRORS_IID +NP_DEF_ID(kCMSMessageErrorsIID, NS_ICMSMESSAGEERRORS_IID); +#endif +#ifdef NS_ICMSSECUREMESSAGE_IID +NP_DEF_ID(kCMSSecureMessageIID, NS_ICMSSECUREMESSAGE_IID); +#endif +#ifdef NS_ICODEBASEPRINCIPAL_IID +NP_DEF_ID(kCodebasePrincipalIID, NS_ICODEBASEPRINCIPAL_IID); +#endif +#ifdef NS_ICOLLECTION_IID +NP_DEF_ID(kCollectionIID, NS_ICOLLECTION_IID); +#endif +#ifdef NS_ICOMM4XPROFILE_IID +NP_DEF_ID(kComm4xProfileIID, NS_ICOMM4XPROFILE_IID); +#endif +#ifdef NS_ICOMMANDHANDLER_IID +NP_DEF_ID(kCommandHandlerIID, NS_ICOMMANDHANDLER_IID); +#endif +#ifdef NS_ICOMMANDMANAGER_IID +NP_DEF_ID(kCommandManagerIID, NS_ICOMMANDMANAGER_IID); +#endif +#ifdef NS_ICOMMANDPARAMS_IID +NP_DEF_ID(kCommandParamsIID, NS_ICOMMANDPARAMS_IID); +#endif +#ifdef NS_ICOMPONENTLOADER_IID +NP_DEF_ID(kComponentLoaderIID, NS_ICOMPONENTLOADER_IID); +#endif +#ifdef NS_ICOMPONENTLOADERMANAGER_IID +NP_DEF_ID(kComponentLoaderManagerIID, NS_ICOMPONENTLOADERMANAGER_IID); +#endif +#ifdef NS_ICOMPONENTMANAGER_IID +NP_DEF_ID(kComponentManagerIID, NS_ICOMPONENTMANAGER_IID); +#endif +#ifdef NS_ICOMPONENTMANAGEROBSOLETE_IID +NP_DEF_ID(kComponentManagerObsoleteIID, NS_ICOMPONENTMANAGEROBSOLETE_IID); +#endif +#ifdef NS_ICOMPONENTREGISTRAR_IID +NP_DEF_ID(kComponentRegistrarIID, NS_ICOMPONENTREGISTRAR_IID); +#endif +#ifdef NS_ICONSOLELISTENER_IID +NP_DEF_ID(kConsoleListenerIID, NS_ICONSOLELISTENER_IID); +#endif +#ifdef NS_ICONSOLEMESSAGE_IID +NP_DEF_ID(kConsoleMessageIID, NS_ICONSOLEMESSAGE_IID); +#endif +#ifdef NS_ICONSOLESERVICE_IID +NP_DEF_ID(kConsoleServiceIID, NS_ICONSOLESERVICE_IID); +#endif +#ifdef NS_ICONTENTHANDLER_IID +NP_DEF_ID(kContentHandlerIID, NS_ICONTENTHANDLER_IID); +#endif +#ifdef NS_ICONTENTPOLICY_IID +NP_DEF_ID(kContentPolicyIID, NS_ICONTENTPOLICY_IID); +#endif +#ifdef NS_ICONTENTVIEWER_IID +NP_DEF_ID(kContentViewerIID, NS_ICONTENTVIEWER_IID); +#endif +#ifdef NS_ICONTENTVIEWERCONTAINER_IID +NP_DEF_ID(kContentViewerContainerIID, NS_ICONTENTVIEWERCONTAINER_IID); +#endif +#ifdef NS_ICONTENTVIEWEREDIT_IID +NP_DEF_ID(kContentViewerEditIID, NS_ICONTENTVIEWEREDIT_IID); +#endif +#ifdef NS_ICONTENTVIEWERFILE_IID +NP_DEF_ID(kContentViewerFileIID, NS_ICONTENTVIEWERFILE_IID); +#endif +#ifdef NS_ICONTEXTMENULISTENER_IID +NP_DEF_ID(kContextMenuListenerIID, NS_ICONTEXTMENULISTENER_IID); +#endif +#ifdef NS_ICONTEXTMENULISTENER2_IID +NP_DEF_ID(kContextMenuListener2IID, NS_ICONTEXTMENULISTENER2_IID); +#endif +#ifdef NS_ICONTROLLER_IID +NP_DEF_ID(kControllerIID, NS_ICONTROLLER_IID); +#endif +#ifdef NS_ICONTROLLERCOMMAND_IID +NP_DEF_ID(kControllerCommandIID, NS_ICONTROLLERCOMMAND_IID); +#endif +#ifdef NS_ICONTROLLERCOMMANDMANAGER_IID +NP_DEF_ID(kControllerCommandManagerIID, NS_ICONTROLLERCOMMANDMANAGER_IID); +#endif +#ifdef NS_ICONTROLLERCONTEXT_IID +NP_DEF_ID(kControllerContextIID, NS_ICONTROLLERCONTEXT_IID); +#endif +#ifdef NS_ICONTROLLERS_IID +NP_DEF_ID(kControllersIID, NS_ICONTROLLERS_IID); +#endif +#ifdef NS_ICOOKIE_IID +NP_DEF_ID(kCookieIID, NS_ICOOKIE_IID); +#endif +#ifdef NS_ICOOKIEACCEPTDIALOG_IID +NP_DEF_ID(kCookieAcceptDialogIID, NS_ICOOKIEACCEPTDIALOG_IID); +#endif +#ifdef NS_ICOOKIECONSENT_IID +NP_DEF_ID(kCookieConsentIID, NS_ICOOKIECONSENT_IID); +#endif +#ifdef NS_ICOOKIEMANAGER_IID +NP_DEF_ID(kCookieManagerIID, NS_ICOOKIEMANAGER_IID); +#endif +#ifdef NS_ICOOKIEMANAGER2_IID +NP_DEF_ID(kCookieManager2IID, NS_ICOOKIEMANAGER2_IID); +#endif +#ifdef NS_ICOOKIEPROMPTSERVICE_IID +NP_DEF_ID(kCookiePromptServiceIID, NS_ICOOKIEPROMPTSERVICE_IID); +#endif +#ifdef NS_ICOOKIESERVICE_IID +NP_DEF_ID(kCookieServiceIID, NS_ICOOKIESERVICE_IID); +#endif +#ifdef NS_ICOOKIESTORAGE_IID +NP_DEF_ID(kCookieStorageIID, NS_ICOOKIESTORAGE_IID); +#endif +#ifdef NS_ICOPYMESSAGELISTENER_IID +NP_DEF_ID(kCopyMessageListenerIID, NS_ICOPYMESSAGELISTENER_IID); +#endif +#ifdef NS_ICOPYMSGSTREAMLISTENER_IID +NP_DEF_ID(kCopyMsgStreamListenerIID, NS_ICOPYMSGSTREAMLISTENER_IID); +#endif +#ifdef NS_ICRLINFO_IID +NP_DEF_ID(kCRLInfoIID, NS_ICRLINFO_IID); +#endif +#ifdef NS_ICRLMANAGER_IID +NP_DEF_ID(kCRLManagerIID, NS_ICRLMANAGER_IID); +#endif +#ifdef NS_ICURRENTCHARSETLISTENER_IID +NP_DEF_ID(kCurrentCharsetListenerIID, NS_ICURRENTCHARSETLISTENER_IID); +#endif +#ifdef NS_IDATACHANNEL_IID +NP_DEF_ID(kDataChannelIID, NS_IDATACHANNEL_IID); +#endif +#ifdef NS_IDBCHANGEANNOUNCER_IID +NP_DEF_ID(kDBChangeAnnouncerIID, NS_IDBCHANGEANNOUNCER_IID); +#endif +#ifdef NS_IDBCHANGELISTENER_IID +NP_DEF_ID(kDBChangeListenerIID, NS_IDBCHANGELISTENER_IID); +#endif +#ifdef NS_IDBFOLDERINFO_IID +NP_DEF_ID(kDBFolderInfoIID, NS_IDBFOLDERINFO_IID); +#endif +#ifdef NS_IDIALOGPARAMBLOCK_IID +NP_DEF_ID(kDialogParamBlockIID, NS_IDIALOGPARAMBLOCK_IID); +#endif +#ifdef NS_IDICTIONARY_IID +NP_DEF_ID(kDictionaryIID, NS_IDICTIONARY_IID); +#endif +#ifdef NS_IDIRECTORYLISTING_IID +NP_DEF_ID(kDirectoryListingIID, NS_IDIRECTORYLISTING_IID); +#endif +#ifdef NS_IDIRECTORYSERVICE_IID +NP_DEF_ID(kDirectoryServiceIID, NS_IDIRECTORYSERVICE_IID); +#endif +#ifdef NS_IDIRINDEX_IID +NP_DEF_ID(kDirIndexIID, NS_IDIRINDEX_IID); +#endif +#ifdef NS_IDIRINDEXLISTENER_IID +NP_DEF_ID(kDirIndexListenerIID, NS_IDIRINDEXLISTENER_IID); +#endif +#ifdef NS_IDNSLISTENER_IID +NP_DEF_ID(kDNSListenerIID, NS_IDNSLISTENER_IID); +#endif +#ifdef NS_IDNSSERVICE_IID +NP_DEF_ID(kDNSServiceIID, NS_IDNSSERVICE_IID); +#endif +#ifdef NS_IDOCCHARSET_IID +NP_DEF_ID(kDocCharsetIID, NS_IDOCCHARSET_IID); +#endif +#ifdef NS_IDOCSHELL_IID +NP_DEF_ID(kDocShellIID, NS_IDOCSHELL_IID); +#endif +#ifdef NS_IDOCSHELLHISTORY_IID +NP_DEF_ID(kDocShellHistoryIID, NS_IDOCSHELLHISTORY_IID); +#endif +#ifdef NS_IDOCSHELLLOADINFO_IID +NP_DEF_ID(kDocShellLoadInfoIID, NS_IDOCSHELLLOADINFO_IID); +#endif +#ifdef NS_IDOCSHELLTREEITEM_IID +NP_DEF_ID(kDocShellTreeItemIID, NS_IDOCSHELLTREEITEM_IID); +#endif +#ifdef NS_IDOCSHELLTREENODE_IID +NP_DEF_ID(kDocShellTreeNodeIID, NS_IDOCSHELLTREENODE_IID); +#endif +#ifdef NS_IDOCSHELLTREEOWNER_IID +NP_DEF_ID(kDocShellTreeOwnerIID, NS_IDOCSHELLTREEOWNER_IID); +#endif +#ifdef NS_IDOCUMENTCHARSETINFO_IID +NP_DEF_ID(kDocumentCharsetInfoIID, NS_IDOCUMENTCHARSETINFO_IID); +#endif +#ifdef NS_IDOCUMENTLOADER_IID +NP_DEF_ID(kDocumentLoaderIID, NS_IDOCUMENTLOADER_IID); +#endif +#ifdef NS_IDOCUMENTLOADERFACTORY_IID +NP_DEF_ID(kDocumentLoaderFactoryIID, NS_IDOCUMENTLOADERFACTORY_IID); +#endif +#ifdef NS_IDOCUMENTSTATELISTENER_IID +NP_DEF_ID(kDocumentStateListenerIID, NS_IDOCUMENTSTATELISTENER_IID); +#endif +#ifdef NS_IDOM3DOCUMENTEVENT_IID +NP_DEF_ID(kDOM3DocumentEventIID, NS_IDOM3DOCUMENTEVENT_IID); +#endif +#ifdef NS_IDOM3EVENTTARGET_IID +NP_DEF_ID(kDOM3EventTargetIID, NS_IDOM3EVENTTARGET_IID); +#endif +#ifdef NS_IDOM3NODE_IID +NP_DEF_ID(kDOM3NodeIID, NS_IDOM3NODE_IID); +#endif +#ifdef NS_IDOMABSTRACTVIEW_IID +NP_DEF_ID(kDOMAbstractViewIID, NS_IDOMABSTRACTVIEW_IID); +#endif +#ifdef NS_IDOMATTR_IID +NP_DEF_ID(kDOMAttrIID, NS_IDOMATTR_IID); +#endif +#ifdef NS_IDOMBARPROP_IID +NP_DEF_ID(kDOMBarPropIID, NS_IDOMBARPROP_IID); +#endif +#ifdef NS_IDOMCDATASECTION_IID +NP_DEF_ID(kDOMCDATASectionIID, NS_IDOMCDATASECTION_IID); +#endif +#ifdef NS_IDOMCHARACTERDATA_IID +NP_DEF_ID(kDOMCharacterDataIID, NS_IDOMCHARACTERDATA_IID); +#endif +#ifdef NS_IDOMCHROMEWINDOW_IID +NP_DEF_ID(kDOMChromeWindowIID, NS_IDOMCHROMEWINDOW_IID); +#endif +#ifdef NS_IDOMCOMMENT_IID +NP_DEF_ID(kDOMCommentIID, NS_IDOMCOMMENT_IID); +#endif +#ifdef NS_IDOMCOUNTER_IID +NP_DEF_ID(kDOMCounterIID, NS_IDOMCOUNTER_IID); +#endif +#ifdef NS_IDOMCRMFOBJECT_IID +NP_DEF_ID(kDOMCRMFObjectIID, NS_IDOMCRMFOBJECT_IID); +#endif +#ifdef NS_IDOMCRYPTO_IID +NP_DEF_ID(kDOMCryptoIID, NS_IDOMCRYPTO_IID); +#endif +#ifdef NS_IDOMCRYPTODIALOGS_IID +NP_DEF_ID(kDOMCryptoDialogsIID, NS_IDOMCRYPTODIALOGS_IID); +#endif +#ifdef NS_IDOMCSS2PROPERTIES_IID +NP_DEF_ID(kDOMCSS2PropertiesIID, NS_IDOMCSS2PROPERTIES_IID); +#endif +#ifdef NS_IDOMCSSCHARSETRULE_IID +NP_DEF_ID(kDOMCSSCharsetRuleIID, NS_IDOMCSSCHARSETRULE_IID); +#endif +#ifdef NS_IDOMCSSFONTFACERULE_IID +NP_DEF_ID(kDOMCSSFontFaceRuleIID, NS_IDOMCSSFONTFACERULE_IID); +#endif +#ifdef NS_IDOMCSSIMPORTRULE_IID +NP_DEF_ID(kDOMCSSImportRuleIID, NS_IDOMCSSIMPORTRULE_IID); +#endif +#ifdef NS_IDOMCSSMEDIARULE_IID +NP_DEF_ID(kDOMCSSMediaRuleIID, NS_IDOMCSSMEDIARULE_IID); +#endif +#ifdef NS_IDOMCSSPAGERULE_IID +NP_DEF_ID(kDOMCSSPageRuleIID, NS_IDOMCSSPAGERULE_IID); +#endif +#ifdef NS_IDOMCSSPRIMITIVEVALUE_IID +NP_DEF_ID(kDOMCSSPrimitiveValueIID, NS_IDOMCSSPRIMITIVEVALUE_IID); +#endif +#ifdef NS_IDOMCSSRULE_IID +NP_DEF_ID(kDOMCSSRuleIID, NS_IDOMCSSRULE_IID); +#endif +#ifdef NS_IDOMCSSRULELIST_IID +NP_DEF_ID(kDOMCSSRuleListIID, NS_IDOMCSSRULELIST_IID); +#endif +#ifdef NS_IDOMCSSSTYLEDECLARATION_IID +NP_DEF_ID(kDOMCSSStyleDeclarationIID, NS_IDOMCSSSTYLEDECLARATION_IID); +#endif +#ifdef NS_IDOMCSSSTYLERULE_IID +NP_DEF_ID(kDOMCSSStyleRuleIID, NS_IDOMCSSSTYLERULE_IID); +#endif +#ifdef NS_IDOMCSSSTYLESHEET_IID +NP_DEF_ID(kDOMCSSStyleSheetIID, NS_IDOMCSSSTYLESHEET_IID); +#endif +#ifdef NS_IDOMCSSUNKNOWNRULE_IID +NP_DEF_ID(kDOMCSSUnknownRuleIID, NS_IDOMCSSUNKNOWNRULE_IID); +#endif +#ifdef NS_IDOMCSSVALUE_IID +NP_DEF_ID(kDOMCSSValueIID, NS_IDOMCSSVALUE_IID); +#endif +#ifdef NS_IDOMCSSVALUELIST_IID +NP_DEF_ID(kDOMCSSValueListIID, NS_IDOMCSSVALUELIST_IID); +#endif +#ifdef NS_IDOMCUSTOMEVENT_IID +NP_DEF_ID(kDOMCustomEventIID, NS_IDOMCUSTOMEVENT_IID); +#endif +#ifdef NS_IDOMDOCUMENT_IID +NP_DEF_ID(kDOMDocumentIID, NS_IDOMDOCUMENT_IID); +#endif +#ifdef NS_IDOMDOCUMENTCSS_IID +NP_DEF_ID(kDOMDocumentCSSIID, NS_IDOMDOCUMENTCSS_IID); +#endif +#ifdef NS_IDOMDOCUMENTEVENT_IID +NP_DEF_ID(kDOMDocumentEventIID, NS_IDOMDOCUMENTEVENT_IID); +#endif +#ifdef NS_IDOMDOCUMENTFRAGMENT_IID +NP_DEF_ID(kDOMDocumentFragmentIID, NS_IDOMDOCUMENTFRAGMENT_IID); +#endif +#ifdef NS_IDOMDOCUMENTRANGE_IID +NP_DEF_ID(kDOMDocumentRangeIID, NS_IDOMDOCUMENTRANGE_IID); +#endif +#ifdef NS_IDOMDOCUMENTSTYLE_IID +NP_DEF_ID(kDOMDocumentStyleIID, NS_IDOMDOCUMENTSTYLE_IID); +#endif +#ifdef NS_IDOMDOCUMENTTRAVERSAL_IID +NP_DEF_ID(kDOMDocumentTraversalIID, NS_IDOMDOCUMENTTRAVERSAL_IID); +#endif +#ifdef NS_IDOMDOCUMENTTYPE_IID +NP_DEF_ID(kDOMDocumentTypeIID, NS_IDOMDOCUMENTTYPE_IID); +#endif +#ifdef NS_IDOMDOCUMENTVIEW_IID +NP_DEF_ID(kDOMDocumentViewIID, NS_IDOMDOCUMENTVIEW_IID); +#endif +#ifdef NS_IDOMDOCUMENTXBL_IID +NP_DEF_ID(kDOMDocumentXBLIID, NS_IDOMDOCUMENTXBL_IID); +#endif +#ifdef NS_IDOMDOMEXCEPTION_IID +NP_DEF_ID(kDOMDOMExceptionIID, NS_IDOMDOMEXCEPTION_IID); +#endif +#ifdef NS_IDOMDOMIMPLEMENTATION_IID +NP_DEF_ID(kDOMDOMImplementationIID, NS_IDOMDOMIMPLEMENTATION_IID); +#endif +#ifdef NS_IDOMELEMENT_IID +NP_DEF_ID(kDOMElementIID, NS_IDOMELEMENT_IID); +#endif +#ifdef NS_IDOMELEMENTCSSINLINESTYLE_IID +NP_DEF_ID(kDOMElementCSSInlineStyleIID, NS_IDOMELEMENTCSSINLINESTYLE_IID); +#endif +#ifdef NS_IDOMENTITY_IID +NP_DEF_ID(kDOMEntityIID, NS_IDOMENTITY_IID); +#endif +#ifdef NS_IDOMENTITYREFERENCE_IID +NP_DEF_ID(kDOMEntityReferenceIID, NS_IDOMENTITYREFERENCE_IID); +#endif +#ifdef NS_IDOMEVENT_IID +NP_DEF_ID(kDOMEventIID, NS_IDOMEVENT_IID); +#endif +#ifdef NS_IDOMEVENTGROUP_IID +NP_DEF_ID(kDOMEventGroupIID, NS_IDOMEVENTGROUP_IID); +#endif +#ifdef NS_IDOMEVENTLISTENER_IID +NP_DEF_ID(kDOMEventListenerIID, NS_IDOMEVENTLISTENER_IID); +#endif +#ifdef NS_IDOMEVENTTARGET_IID +NP_DEF_ID(kDOMEventTargetIID, NS_IDOMEVENTTARGET_IID); +#endif +#ifdef NS_IDOMHISTORY_IID +NP_DEF_ID(kDOMHistoryIID, NS_IDOMHISTORY_IID); +#endif +#ifdef NS_IDOMHTMLANCHORELEMENT_IID +NP_DEF_ID(kDOMHTMLAnchorElementIID, NS_IDOMHTMLANCHORELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLAPPLETELEMENT_IID +NP_DEF_ID(kDOMHTMLAppletElementIID, NS_IDOMHTMLAPPLETELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLAREAELEMENT_IID +NP_DEF_ID(kDOMHTMLAreaElementIID, NS_IDOMHTMLAREAELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLBASEELEMENT_IID +NP_DEF_ID(kDOMHTMLBaseElementIID, NS_IDOMHTMLBASEELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLBASEFONTELEMENT_IID +NP_DEF_ID(kDOMHTMLBaseFontElementIID, NS_IDOMHTMLBASEFONTELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLBODYELEMENT_IID +NP_DEF_ID(kDOMHTMLBodyElementIID, NS_IDOMHTMLBODYELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLBRELEMENT_IID +NP_DEF_ID(kDOMHTMLBRElementIID, NS_IDOMHTMLBRELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLBUTTONELEMENT_IID +NP_DEF_ID(kDOMHTMLButtonElementIID, NS_IDOMHTMLBUTTONELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLCOLLECTION_IID +NP_DEF_ID(kDOMHTMLCollectionIID, NS_IDOMHTMLCOLLECTION_IID); +#endif +#ifdef NS_IDOMHTMLDIRECTORYELEMENT_IID +NP_DEF_ID(kDOMHTMLDirectoryElementIID, NS_IDOMHTMLDIRECTORYELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLDIVELEMENT_IID +NP_DEF_ID(kDOMHTMLDivElementIID, NS_IDOMHTMLDIVELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLDLISTELEMENT_IID +NP_DEF_ID(kDOMHTMLDListElementIID, NS_IDOMHTMLDLISTELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLDOCUMENT_IID +NP_DEF_ID(kDOMHTMLDocumentIID, NS_IDOMHTMLDOCUMENT_IID); +#endif +#ifdef NS_IDOMHTMLELEMENT_IID +NP_DEF_ID(kDOMHTMLElementIID, NS_IDOMHTMLELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLEMBEDELEMENT_IID +NP_DEF_ID(kDOMHTMLEmbedElementIID, NS_IDOMHTMLEMBEDELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLFIELDSETELEMENT_IID +NP_DEF_ID(kDOMHTMLFieldSetElementIID, NS_IDOMHTMLFIELDSETELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLFONTELEMENT_IID +NP_DEF_ID(kDOMHTMLFontElementIID, NS_IDOMHTMLFONTELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLFORMELEMENT_IID +NP_DEF_ID(kDOMHTMLFormElementIID, NS_IDOMHTMLFORMELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLFRAMEELEMENT_IID +NP_DEF_ID(kDOMHTMLFrameElementIID, NS_IDOMHTMLFRAMEELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLFRAMESETELEMENT_IID +NP_DEF_ID(kDOMHTMLFrameSetElementIID, NS_IDOMHTMLFRAMESETELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLHEADELEMENT_IID +NP_DEF_ID(kDOMHTMLHeadElementIID, NS_IDOMHTMLHEADELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLHEADINGELEMENT_IID +NP_DEF_ID(kDOMHTMLHeadingElementIID, NS_IDOMHTMLHEADINGELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLHRELEMENT_IID +NP_DEF_ID(kDOMHTMLHRElementIID, NS_IDOMHTMLHRELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLHTMLELEMENT_IID +NP_DEF_ID(kDOMHTMLHtmlElementIID, NS_IDOMHTMLHTMLELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLIFRAMEELEMENT_IID +NP_DEF_ID(kDOMHTMLIFrameElementIID, NS_IDOMHTMLIFRAMEELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLIMAGEELEMENT_IID +NP_DEF_ID(kDOMHTMLImageElementIID, NS_IDOMHTMLIMAGEELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLINPUTELEMENT_IID +NP_DEF_ID(kDOMHTMLInputElementIID, NS_IDOMHTMLINPUTELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLISINDEXELEMENT_IID +NP_DEF_ID(kDOMHTMLIsIndexElementIID, NS_IDOMHTMLISINDEXELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLLABELELEMENT_IID +NP_DEF_ID(kDOMHTMLLabelElementIID, NS_IDOMHTMLLABELELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLLEGENDELEMENT_IID +NP_DEF_ID(kDOMHTMLLegendElementIID, NS_IDOMHTMLLEGENDELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLLIELEMENT_IID +NP_DEF_ID(kDOMHTMLLIElementIID, NS_IDOMHTMLLIELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLLINKELEMENT_IID +NP_DEF_ID(kDOMHTMLLinkElementIID, NS_IDOMHTMLLINKELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLMAPELEMENT_IID +NP_DEF_ID(kDOMHTMLMapElementIID, NS_IDOMHTMLMAPELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLMENUELEMENT_IID +NP_DEF_ID(kDOMHTMLMenuElementIID, NS_IDOMHTMLMENUELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLMETAELEMENT_IID +NP_DEF_ID(kDOMHTMLMetaElementIID, NS_IDOMHTMLMETAELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLMODELEMENT_IID +NP_DEF_ID(kDOMHTMLModElementIID, NS_IDOMHTMLMODELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLOBJECTELEMENT_IID +NP_DEF_ID(kDOMHTMLObjectElementIID, NS_IDOMHTMLOBJECTELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLOLISTELEMENT_IID +NP_DEF_ID(kDOMHTMLOListElementIID, NS_IDOMHTMLOLISTELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLOPTGROUPELEMENT_IID +NP_DEF_ID(kDOMHTMLOptGroupElementIID, NS_IDOMHTMLOPTGROUPELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLOPTIONELEMENT_IID +NP_DEF_ID(kDOMHTMLOptionElementIID, NS_IDOMHTMLOPTIONELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLPARAGRAPHELEMENT_IID +NP_DEF_ID(kDOMHTMLParagraphElementIID, NS_IDOMHTMLPARAGRAPHELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLPARAMELEMENT_IID +NP_DEF_ID(kDOMHTMLParamElementIID, NS_IDOMHTMLPARAMELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLPREELEMENT_IID +NP_DEF_ID(kDOMHTMLPreElementIID, NS_IDOMHTMLPREELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLQUOTEELEMENT_IID +NP_DEF_ID(kDOMHTMLQuoteElementIID, NS_IDOMHTMLQUOTEELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLSCRIPTELEMENT_IID +NP_DEF_ID(kDOMHTMLScriptElementIID, NS_IDOMHTMLSCRIPTELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLSELECTELEMENT_IID +NP_DEF_ID(kDOMHTMLSelectElementIID, NS_IDOMHTMLSELECTELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLSTYLEELEMENT_IID +NP_DEF_ID(kDOMHTMLStyleElementIID, NS_IDOMHTMLSTYLEELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLTABLECAPTIONELEM_IID +NP_DEF_ID(kDOMHTMLTableCaptionElemIID, NS_IDOMHTMLTABLECAPTIONELEM_IID); +#endif +#ifdef NS_IDOMHTMLTABLECELLELEMENT_IID +NP_DEF_ID(kDOMHTMLTableCellElementIID, NS_IDOMHTMLTABLECELLELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLTABLECOLELEMENT_IID +NP_DEF_ID(kDOMHTMLTableColElementIID, NS_IDOMHTMLTABLECOLELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLTABLEELEMENT_IID +NP_DEF_ID(kDOMHTMLTableElementIID, NS_IDOMHTMLTABLEELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLTABLEROWELEMENT_IID +NP_DEF_ID(kDOMHTMLTableRowElementIID, NS_IDOMHTMLTABLEROWELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLTABLESECTIONELEM_IID +NP_DEF_ID(kDOMHTMLTableSectionElemIID, NS_IDOMHTMLTABLESECTIONELEM_IID); +#endif +#ifdef NS_IDOMHTMLTEXTAREAELEMENT_IID +NP_DEF_ID(kDOMHTMLTextAreaElementIID, NS_IDOMHTMLTEXTAREAELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLTITLEELEMENT_IID +NP_DEF_ID(kDOMHTMLTitleElementIID, NS_IDOMHTMLTITLEELEMENT_IID); +#endif +#ifdef NS_IDOMHTMLULISTELEMENT_IID +NP_DEF_ID(kDOMHTMLUListElementIID, NS_IDOMHTMLULISTELEMENT_IID); +#endif +#ifdef NS_IDOMJSWINDOW_IID +NP_DEF_ID(kDOMJSWindowIID, NS_IDOMJSWINDOW_IID); +#endif +#ifdef NS_IDOMKEYEVENT_IID +NP_DEF_ID(kDOMKeyEventIID, NS_IDOMKEYEVENT_IID); +#endif +#ifdef NS_IDOMLINKSTYLE_IID +NP_DEF_ID(kDOMLinkStyleIID, NS_IDOMLINKSTYLE_IID); +#endif +#ifdef NS_IDOMLOCATION_IID +NP_DEF_ID(kDOMLocationIID, NS_IDOMLOCATION_IID); +#endif +#ifdef NS_IDOMMEDIALIST_IID +NP_DEF_ID(kDOMMediaListIID, NS_IDOMMEDIALIST_IID); +#endif +#ifdef NS_IDOMMIMETYPE_IID +NP_DEF_ID(kDOMMimeTypeIID, NS_IDOMMIMETYPE_IID); +#endif +#ifdef NS_IDOMMIMETYPEARRAY_IID +NP_DEF_ID(kDOMMimeTypeArrayIID, NS_IDOMMIMETYPEARRAY_IID); +#endif +#ifdef NS_IDOMMOUSEEVENT_IID +NP_DEF_ID(kDOMMouseEventIID, NS_IDOMMOUSEEVENT_IID); +#endif +#ifdef NS_IDOMMUTATIONEVENT_IID +NP_DEF_ID(kDOMMutationEventIID, NS_IDOMMUTATIONEVENT_IID); +#endif +#ifdef NS_IDOMNAMEDNODEMAP_IID +NP_DEF_ID(kDOMNamedNodeMapIID, NS_IDOMNAMEDNODEMAP_IID); +#endif +#ifdef NS_IDOMNAVIGATOR_IID +NP_DEF_ID(kDOMNavigatorIID, NS_IDOMNAVIGATOR_IID); +#endif +#ifdef NS_IDOMNODE_IID +NP_DEF_ID(kDOMNodeIID, NS_IDOMNODE_IID); +#endif +#ifdef NS_IDOMNODEFILTER_IID +NP_DEF_ID(kDOMNodeFilterIID, NS_IDOMNODEFILTER_IID); +#endif +#ifdef NS_IDOMNODEITERATOR_IID +NP_DEF_ID(kDOMNodeIteratorIID, NS_IDOMNODEITERATOR_IID); +#endif +#ifdef NS_IDOMNODELIST_IID +NP_DEF_ID(kDOMNodeListIID, NS_IDOMNODELIST_IID); +#endif +#ifdef NS_IDOMNOTATION_IID +NP_DEF_ID(kDOMNotationIID, NS_IDOMNOTATION_IID); +#endif +#ifdef NS_IDOMNSDOCUMENT_IID +NP_DEF_ID(kDOMNSDocumentIID, NS_IDOMNSDOCUMENT_IID); +#endif +#ifdef NS_IDOMNSEVENT_IID +NP_DEF_ID(kDOMNSEventIID, NS_IDOMNSEVENT_IID); +#endif +#ifdef NS_IDOMNSHISTORY_IID +NP_DEF_ID(kDOMNSHistoryIID, NS_IDOMNSHISTORY_IID); +#endif +#ifdef NS_IDOMNSHTMLANCHORELEMENT_IID +NP_DEF_ID(kDOMNSHTMLAnchorElementIID, NS_IDOMNSHTMLANCHORELEMENT_IID); +#endif +#ifdef NS_IDOMNSHTMLAREAELEMENT_IID +NP_DEF_ID(kDOMNSHTMLAreaElementIID, NS_IDOMNSHTMLAREAELEMENT_IID); +#endif +#ifdef NS_IDOMNSHTMLBUTTONELEMENT_IID +NP_DEF_ID(kDOMNSHTMLButtonElementIID, NS_IDOMNSHTMLBUTTONELEMENT_IID); +#endif +#ifdef NS_IDOMNSHTMLDOCUMENT_IID +NP_DEF_ID(kDOMNSHTMLDocumentIID, NS_IDOMNSHTMLDOCUMENT_IID); +#endif +#ifdef NS_IDOMNSHTMLELEMENT_IID +NP_DEF_ID(kDOMNSHTMLElementIID, NS_IDOMNSHTMLELEMENT_IID); +#endif +#ifdef NS_IDOMNSHTMLFORMCONTROLLIST_IID +NP_DEF_ID(kDOMNSHTMLFormControlListIID, NS_IDOMNSHTMLFORMCONTROLLIST_IID); +#endif +#ifdef NS_IDOMNSHTMLFORMELEMENT_IID +NP_DEF_ID(kDOMNSHTMLFormElementIID, NS_IDOMNSHTMLFORMELEMENT_IID); +#endif +#ifdef NS_IDOMNSHTMLFRAMEELEMENT_IID +NP_DEF_ID(kDOMNSHTMLFrameElementIID, NS_IDOMNSHTMLFRAMEELEMENT_IID); +#endif +#ifdef NS_IDOMNSHTMLIMAGEELEMENT_IID +NP_DEF_ID(kDOMNSHTMLImageElementIID, NS_IDOMNSHTMLIMAGEELEMENT_IID); +#endif +#ifdef NS_IDOMNSHTMLINPUTELEMENT_IID +NP_DEF_ID(kDOMNSHTMLInputElementIID, NS_IDOMNSHTMLINPUTELEMENT_IID); +#endif +#ifdef NS_IDOMNSHTMLOPTIONCOLLECTN_IID +NP_DEF_ID(kDOMNSHTMLOptionCollectnIID, NS_IDOMNSHTMLOPTIONCOLLECTN_IID); +#endif +#ifdef NS_IDOMNSHTMLSELECTELEMENT_IID +NP_DEF_ID(kDOMNSHTMLSelectElementIID, NS_IDOMNSHTMLSELECTELEMENT_IID); +#endif +#ifdef NS_IDOMNSHTMLTEXTAREAELEMENT_IID +NP_DEF_ID(kDOMNSHTMLTextAreaElementIID, NS_IDOMNSHTMLTEXTAREAELEMENT_IID); +#endif +#ifdef NS_IDOMNSLOCATION_IID +NP_DEF_ID(kDOMNSLocationIID, NS_IDOMNSLOCATION_IID); +#endif +#ifdef NS_IDOMNSRANGE_IID +NP_DEF_ID(kDOMNSRangeIID, NS_IDOMNSRANGE_IID); +#endif +#ifdef NS_IDOMNSUIEVENT_IID +NP_DEF_ID(kDOMNSUIEventIID, NS_IDOMNSUIEVENT_IID); +#endif +#ifdef NS_IDOMNSXBLFORMCONTROL_IID +NP_DEF_ID(kDOMNSXBLFormControlIID, NS_IDOMNSXBLFORMCONTROL_IID); +#endif +#ifdef NS_IDOMPARSER_IID +NP_DEF_ID(kDOMParserIID, NS_IDOMPARSER_IID); +#endif +#ifdef NS_IDOMPKCS11_IID +NP_DEF_ID(kDOMPkcs11IID, NS_IDOMPKCS11_IID); +#endif +#ifdef NS_IDOMPLUGIN_IID +NP_DEF_ID(kDOMPluginIID, NS_IDOMPLUGIN_IID); +#endif +#ifdef NS_IDOMPLUGINARRAY_IID +NP_DEF_ID(kDOMPluginArrayIID, NS_IDOMPLUGINARRAY_IID); +#endif +#ifdef NS_IDOMPROCESSINGINSTRUCTION_IID +NP_DEF_ID(kDOMProcessingInstructionIID, NS_IDOMPROCESSINGINSTRUCTION_IID); +#endif +#ifdef NS_IDOMRANGE_IID +NP_DEF_ID(kDOMRangeIID, NS_IDOMRANGE_IID); +#endif +#ifdef NS_IDOMRANGEEXCEPTION_IID +NP_DEF_ID(kDOMRangeExceptionIID, NS_IDOMRANGEEXCEPTION_IID); +#endif +#ifdef NS_IDOMRECT_IID +NP_DEF_ID(kDOMRectIID, NS_IDOMRECT_IID); +#endif +#ifdef NS_IDOMRGBCOLOR_IID +NP_DEF_ID(kDOMRGBColorIID, NS_IDOMRGBCOLOR_IID); +#endif +#ifdef NS_IDOMSCREEN_IID +NP_DEF_ID(kDOMScreenIID, NS_IDOMSCREEN_IID); +#endif +#ifdef NS_IDOMSERIALIZER_IID +NP_DEF_ID(kDOMSerializerIID, NS_IDOMSERIALIZER_IID); +#endif +#ifdef NS_IDOMSTYLESHEET_IID +NP_DEF_ID(kDOMStyleSheetIID, NS_IDOMSTYLESHEET_IID); +#endif +#ifdef NS_IDOMSTYLESHEETLIST_IID +NP_DEF_ID(kDOMStyleSheetListIID, NS_IDOMSTYLESHEETLIST_IID); +#endif +#ifdef NS_IDOMTEXT_IID +NP_DEF_ID(kDOMTextIID, NS_IDOMTEXT_IID); +#endif +#ifdef NS_IDOMTREEWALKER_IID +NP_DEF_ID(kDOMTreeWalkerIID, NS_IDOMTREEWALKER_IID); +#endif +#ifdef NS_IDOMUIEVENT_IID +NP_DEF_ID(kDOMUIEventIID, NS_IDOMUIEVENT_IID); +#endif +#ifdef NS_IDOMVIEWCSS_IID +NP_DEF_ID(kDOMViewCSSIID, NS_IDOMVIEWCSS_IID); +#endif +#ifdef NS_IDOMWINDOW_IID +NP_DEF_ID(kDOMWindowIID, NS_IDOMWINDOW_IID); +#endif +#ifdef NS_IDOMWINDOWCOLLECTION_IID +NP_DEF_ID(kDOMWindowCollectionIID, NS_IDOMWINDOWCOLLECTION_IID); +#endif +#ifdef NS_IDOMWINDOWINTERNAL_IID +NP_DEF_ID(kDOMWindowInternalIID, NS_IDOMWINDOWINTERNAL_IID); +#endif +#ifdef NS_IDOMXMLDOCUMENT_IID +NP_DEF_ID(kDOMXMLDocumentIID, NS_IDOMXMLDOCUMENT_IID); +#endif +#ifdef NS_IDOMXPATHEVALUATOR_IID +NP_DEF_ID(kDOMXPathEvaluatorIID, NS_IDOMXPATHEVALUATOR_IID); +#endif +#ifdef NS_IDOMXPATHEXCEPTION_IID +NP_DEF_ID(kDOMXPathExceptionIID, NS_IDOMXPATHEXCEPTION_IID); +#endif +#ifdef NS_IDOMXPATHEXPRESSION_IID +NP_DEF_ID(kDOMXPathExpressionIID, NS_IDOMXPATHEXPRESSION_IID); +#endif +#ifdef NS_IDOMXPATHNAMESPACE_IID +NP_DEF_ID(kDOMXPathNamespaceIID, NS_IDOMXPATHNAMESPACE_IID); +#endif +#ifdef NS_IDOMXPATHNSRESOLVER_IID +NP_DEF_ID(kDOMXPathNSResolverIID, NS_IDOMXPATHNSRESOLVER_IID); +#endif +#ifdef NS_IDOMXPATHRESULT_IID +NP_DEF_ID(kDOMXPathResultIID, NS_IDOMXPATHRESULT_IID); +#endif +#ifdef NS_IDOMXULBUTTONELEMENT_IID +NP_DEF_ID(kDOMXULButtonElementIID, NS_IDOMXULBUTTONELEMENT_IID); +#endif +#ifdef NS_IDOMXULCHECKBOXELEMENT_IID +NP_DEF_ID(kDOMXULCheckboxElementIID, NS_IDOMXULCHECKBOXELEMENT_IID); +#endif +#ifdef NS_IDOMXULCOMMANDDISPATCHER_IID +NP_DEF_ID(kDOMXULCommandDispatcherIID, NS_IDOMXULCOMMANDDISPATCHER_IID); +#endif +#ifdef NS_IDOMXULCONTROLELEMENT_IID +NP_DEF_ID(kDOMXULControlElementIID, NS_IDOMXULCONTROLELEMENT_IID); +#endif +#ifdef NS_IDOMXULDESCRIPTIONELEMENT_IID +NP_DEF_ID(kDOMXULDescriptionElementIID, NS_IDOMXULDESCRIPTIONELEMENT_IID); +#endif +#ifdef NS_IDOMXULDOCUMENT_IID +NP_DEF_ID(kDOMXULDocumentIID, NS_IDOMXULDOCUMENT_IID); +#endif +#ifdef NS_IDOMXULELEMENT_IID +NP_DEF_ID(kDOMXULElementIID, NS_IDOMXULELEMENT_IID); +#endif +#ifdef NS_IDOMXULIMAGEELEMENT_IID +NP_DEF_ID(kDOMXULImageElementIID, NS_IDOMXULIMAGEELEMENT_IID); +#endif +#ifdef NS_IDOMXULLABELEDCONTROLEL_IID +NP_DEF_ID(kDOMXULLabeledControlElIID, NS_IDOMXULLABELEDCONTROLEL_IID); +#endif +#ifdef NS_IDOMXULLABELELEMENT_IID +NP_DEF_ID(kDOMXULLabelElementIID, NS_IDOMXULLABELELEMENT_IID); +#endif +#ifdef NS_IDOMXULMENULISTELEMENT_IID +NP_DEF_ID(kDOMXULMenuListElementIID, NS_IDOMXULMENULISTELEMENT_IID); +#endif +#ifdef NS_IDOMXULMULTSELECTCNTRLEL_IID +NP_DEF_ID(kDOMXULMultSelectCntrlElIID, NS_IDOMXULMULTSELECTCNTRLEL_IID); +#endif +#ifdef NS_IDOMXULPOPUPELEMENT_IID +NP_DEF_ID(kDOMXULPopupElementIID, NS_IDOMXULPOPUPELEMENT_IID); +#endif +#ifdef NS_IDOMXULSELECTCNTRLEL_IID +NP_DEF_ID(kDOMXULSelectCntrlElIID, NS_IDOMXULSELECTCNTRLEL_IID); +#endif +#ifdef NS_IDOMXULSELECTCNTRLITEMEL_IID +NP_DEF_ID(kDOMXULSelectCntrlItemElIID, NS_IDOMXULSELECTCNTRLITEMEL_IID); +#endif +#ifdef NS_IDOWNLOAD_IID +NP_DEF_ID(kDownloadIID, NS_IDOWNLOAD_IID); +#endif +#ifdef NS_IDOWNLOADER_IID +NP_DEF_ID(kDownloaderIID, NS_IDOWNLOADER_IID); +#endif +#ifdef NS_IDOWNLOADMANAGER_IID +NP_DEF_ID(kDownloadManagerIID, NS_IDOWNLOADMANAGER_IID); +#endif +#ifdef NS_IDOWNLOADPROGRESSLISTENER_IID +NP_DEF_ID(kDownloadProgressListenerIID, NS_IDOWNLOADPROGRESSLISTENER_IID); +#endif +#ifdef NS_IDRAGDROPHANDLER_IID +NP_DEF_ID(kDragDropHandlerIID, NS_IDRAGDROPHANDLER_IID); +#endif +#ifdef NS_IDRAGDROPOVERRIDE_IID +NP_DEF_ID(kDragDropOverrideIID, NS_IDRAGDROPOVERRIDE_IID); +#endif +#ifdef NS_IDRAGSERVICE_IID +NP_DEF_ID(kDragServiceIID, NS_IDRAGSERVICE_IID); +#endif +#ifdef NS_IDRAGSESSION_IID +NP_DEF_ID(kDragSessionIID, NS_IDRAGSESSION_IID); +#endif +#ifdef NS_IDRAGTRACKER_IID +NP_DEF_ID(kDragTrackerIID, NS_IDRAGTRACKER_IID); +#endif +#ifdef NS_IEDITACTIONLISTENER_IID +NP_DEF_ID(kEditActionListenerIID, NS_IEDITACTIONLISTENER_IID); +#endif +#ifdef NS_IEDITINGSESSION_IID +NP_DEF_ID(kEditingSessionIID, NS_IEDITINGSESSION_IID); +#endif +#ifdef NS_IEDITOR_IID +NP_DEF_ID(kEditorIID, NS_IEDITOR_IID); +#endif +#ifdef NS_IEDITORBOXOBJECT_IID +NP_DEF_ID(kEditorBoxObjectIID, NS_IEDITORBOXOBJECT_IID); +#endif +#ifdef NS_IEDITORDOCSHELL_IID +NP_DEF_ID(kEditorDocShellIID, NS_IEDITORDOCSHELL_IID); +#endif +#ifdef NS_IEDITORIMESUPPORT_IID +NP_DEF_ID(kEditorIMESupportIID, NS_IEDITORIMESUPPORT_IID); +#endif +#ifdef NS_IEDITORLOGGING_IID +NP_DEF_ID(kEditorLoggingIID, NS_IEDITORLOGGING_IID); +#endif +#ifdef NS_IEDITORMAILSUPPORT_IID +NP_DEF_ID(kEditorMailSupportIID, NS_IEDITORMAILSUPPORT_IID); +#endif +#ifdef NS_IEDITOROBSERVER_IID +NP_DEF_ID(kEditorObserverIID, NS_IEDITOROBSERVER_IID); +#endif +#ifdef NS_IEDITORSPELLCHECK_IID +NP_DEF_ID(kEditorSpellCheckIID, NS_IEDITORSPELLCHECK_IID); +#endif +#ifdef NS_IEDITORSTYLESHEETS_IID +NP_DEF_ID(kEditorStyleSheetsIID, NS_IEDITORSTYLESHEETS_IID); +#endif +#ifdef NS_IEMBEDDINGSITEWINDOW_IID +NP_DEF_ID(kEmbeddingSiteWindowIID, NS_IEMBEDDINGSITEWINDOW_IID); +#endif +#ifdef NS_IEMBEDDINGSITEWINDOW2_IID +NP_DEF_ID(kEmbeddingSiteWindow2IID, NS_IEMBEDDINGSITEWINDOW2_IID); +#endif +#ifdef NS_IENCODEDCHANNEL_IID +NP_DEF_ID(kEncodedChannelIID, NS_IENCODEDCHANNEL_IID); +#endif +#ifdef NS_IENCRYPTEDSMIMEURISSRVC_IID +NP_DEF_ID(kEncryptedSMIMEURIsSrvcIID, NS_IENCRYPTEDSMIMEURISSRVC_IID); +#endif +#ifdef NS_IENTITYCONVERTER_IID +NP_DEF_ID(kEntityConverterIID, NS_IENTITYCONVERTER_IID); +#endif +#ifdef NS_IENTROPYCOLLECTOR_IID +NP_DEF_ID(kEntropyCollectorIID, NS_IENTROPYCOLLECTOR_IID); +#endif +#ifdef NS_IENUMERATOR_IID +NP_DEF_ID(kEnumeratorIID, NS_IENUMERATOR_IID); +#endif +#ifdef NS_IERRORSERVICE_IID +NP_DEF_ID(kErrorServiceIID, NS_IERRORSERVICE_IID); +#endif +#ifdef NS_IEVALUATESTRINGPROXY_IID +NP_DEF_ID(kEvaluateStringProxyIID, NS_IEVALUATESTRINGPROXY_IID); +#endif +#ifdef NS_IEVENTHANDLER_IID +NP_DEF_ID(kEventHandlerIID, NS_IEVENTHANDLER_IID); +#endif +#ifdef NS_IEVENTQUEUE_IID +NP_DEF_ID(kEventQueueIID, NS_IEVENTQUEUE_IID); +#endif +#ifdef NS_IEVENTQUEUESERVICE_IID +NP_DEF_ID(kEventQueueServiceIID, NS_IEVENTQUEUESERVICE_IID); +#endif +#ifdef NS_IEXCEPTION_IID +NP_DEF_ID(kExceptionIID, NS_IEXCEPTION_IID); +#endif +#ifdef NS_IEXCEPTIONSERVICE_IID +NP_DEF_ID(kExceptionServiceIID, NS_IEXCEPTIONSERVICE_IID); +#endif +#ifdef NS_IEXPATSINK_IID +NP_DEF_ID(kExpatSinkIID, NS_IEXPATSINK_IID); +#endif +#ifdef NS_IEXTERNALHELPERAPPSERVICE_IID +NP_DEF_ID(kExternalHelperAppServiceIID, NS_IEXTERNALHELPERAPPSERVICE_IID); +#endif +#ifdef NS_IEXTERNALPROTOCOLHANDLER_IID +NP_DEF_ID(kExternalProtocolHandlerIID, NS_IEXTERNALPROTOCOLHANDLER_IID); +#endif +#ifdef NS_IEXTERNALPROTOCOLSERVICE_IID +NP_DEF_ID(kExternalProtocolServiceIID, NS_IEXTERNALPROTOCOLSERVICE_IID); +#endif +#ifdef NS_IFACTORY_IID +NP_DEF_ID(kFactoryIID, NS_IFACTORY_IID); +#endif +#ifdef NS_IFASTLOADFILECONTROL_IID +NP_DEF_ID(kFastLoadFileControlIID, NS_IFASTLOADFILECONTROL_IID); +#endif +#ifdef NS_IFASTLOADSERVICE_IID +NP_DEF_ID(kFastLoadServiceIID, NS_IFASTLOADSERVICE_IID); +#endif +#ifdef NS_IFILE_IID +NP_DEF_ID(kFileIID, NS_IFILE_IID); +#endif +#ifdef NS_IFILECHANNEL_IID +NP_DEF_ID(kFileChannelIID, NS_IFILECHANNEL_IID); +#endif +#ifdef NS_IFILEPICKER_IID +NP_DEF_ID(kFilePickerIID, NS_IFILEPICKER_IID); +#endif +#ifdef NS_IFILEPROTOCOLHANDLER_IID +NP_DEF_ID(kFileProtocolHandlerIID, NS_IFILEPROTOCOLHANDLER_IID); +#endif +#ifdef NS_IFILESPEC_IID +NP_DEF_ID(kFileSpecIID, NS_IFILESPEC_IID); +#endif +#ifdef NS_IFILESTREAMS_IID +NP_DEF_ID(kFileStreamsIID, NS_IFILESTREAMS_IID); +#endif +#ifdef NS_IFILEURL_IID +NP_DEF_ID(kFileURLIID, NS_IFILEURL_IID); +#endif +#ifdef NS_IFILEUTILITIES_IID +NP_DEF_ID(kFileUtilitiesIID, NS_IFILEUTILITIES_IID); +#endif +#ifdef NS_IFIND_IID +NP_DEF_ID(kFindIID, NS_IFIND_IID); +#endif +#ifdef NS_IFINDSERVICE_IID +NP_DEF_ID(kFindServiceIID, NS_IFINDSERVICE_IID); +#endif +#ifdef NS_IFOLDER_IID +NP_DEF_ID(kFolderIID, NS_IFOLDER_IID); +#endif +#ifdef NS_IFOLDERLISTENER_IID +NP_DEF_ID(kFolderListenerIID, NS_IFOLDERLISTENER_IID); +#endif +#ifdef NS_IFONTCATALOGSERVICE_IID +NP_DEF_ID(kFontCatalogServiceIID, NS_IFONTCATALOGSERVICE_IID); +#endif +#ifdef NS_IFONTENUMERATOR_IID +NP_DEF_ID(kFontEnumeratorIID, NS_IFONTENUMERATOR_IID); +#endif +#ifdef NS_IFONTLIST_IID +NP_DEF_ID(kFontListIID, NS_IFONTLIST_IID); +#endif +#ifdef NS_IFONTPACKAGEHANDLER_IID +NP_DEF_ID(kFontPackageHandlerIID, NS_IFONTPACKAGEHANDLER_IID); +#endif +#ifdef NS_IFONTPACKAGEPROXY_IID +NP_DEF_ID(kFontPackageProxyIID, NS_IFONTPACKAGEPROXY_IID); +#endif +#ifdef NS_IFONTPACKAGESERVICE_IID +NP_DEF_ID(kFontPackageServiceIID, NS_IFONTPACKAGESERVICE_IID); +#endif +#ifdef NS_IFORMATCONVERTER_IID +NP_DEF_ID(kFormatConverterIID, NS_IFORMATCONVERTER_IID); +#endif +#ifdef NS_IFREETYPE2_IID +NP_DEF_ID(kFreeType2IID, NS_IFREETYPE2_IID); +#endif +#ifdef NS_IFTPCHANNEL_IID +NP_DEF_ID(kFTPChannelIID, NS_IFTPCHANNEL_IID); +#endif +#ifdef NS_IFULLSCREEN_IID +NP_DEF_ID(kFullScreenIID, NS_IFULLSCREEN_IID); +#endif +#ifdef NS_IGENKEYPAIRINFODLG_IID +NP_DEF_ID(kGenKeypairInfoDlgIID, NS_IGENKEYPAIRINFODLG_IID); +#endif +#ifdef NS_IGLOBALHISTORY_IID +NP_DEF_ID(kGlobalHistoryIID, NS_IGLOBALHISTORY_IID); +#endif +#ifdef NS_IGRAPHICS_IID +NP_DEF_ID(kGraphicsIID, NS_IGRAPHICS_IID); +#endif +#ifdef NS_IHASH_IID +NP_DEF_ID(kHashIID, NS_IHASH_IID); +#endif +#ifdef NS_IHELPERAPPLAUNCHERDIALOG_IID +NP_DEF_ID(kHelperAppLauncherDialogIID, NS_IHELPERAPPLAUNCHERDIALOG_IID); +#endif +#ifdef NS_IHISTORYENTRY_IID +NP_DEF_ID(kHistoryEntryIID, NS_IHISTORYENTRY_IID); +#endif +#ifdef NS_IHTMLEDITOR_IID +NP_DEF_ID(kHTMLEditorIID, NS_IHTMLEDITOR_IID); +#endif +#ifdef NS_IHTMLOBJECTRESIZER_IID +NP_DEF_ID(kHTMLObjectResizerIID, NS_IHTMLOBJECTRESIZER_IID); +#endif +#ifdef NS_IHTTPAUTHENTICATOR_IID +NP_DEF_ID(kHttpAuthenticatorIID, NS_IHTTPAUTHENTICATOR_IID); +#endif +#ifdef NS_IHTTPCHANNEL_IID +NP_DEF_ID(kHttpChannelIID, NS_IHTTPCHANNEL_IID); +#endif +#ifdef NS_IHTTPCHANNELINTERNAL_IID +NP_DEF_ID(kHttpChannelInternalIID, NS_IHTTPCHANNELINTERNAL_IID); +#endif +#ifdef NS_IHTTPEVENTSINK_IID +NP_DEF_ID(kHttpEventSinkIID, NS_IHTTPEVENTSINK_IID); +#endif +#ifdef NS_IHTTPHEADERLISTENER_IID +NP_DEF_ID(kHTTPHeaderListenerIID, NS_IHTTPHEADERLISTENER_IID); +#endif +#ifdef NS_IHTTPHEADERVISITOR_IID +NP_DEF_ID(kHttpHeaderVisitorIID, NS_IHTTPHEADERVISITOR_IID); +#endif +#ifdef NS_IHTTPINDEX_IID +NP_DEF_ID(kHTTPIndexIID, NS_IHTTPINDEX_IID); +#endif +#ifdef NS_IHTTPNOTIFY_IID +NP_DEF_ID(kHttpNotifyIID, NS_IHTTPNOTIFY_IID); +#endif +#ifdef NS_IHTTPPROTOCOLHANDLER_IID +NP_DEF_ID(kHttpProtocolHandlerIID, NS_IHTTPPROTOCOLHANDLER_IID); +#endif +#ifdef NS_IICONURI_IID +NP_DEF_ID(kIconURIIID, NS_IICONURI_IID); +#endif +#ifdef NS_IIDNSERVICE_IID +NP_DEF_ID(kIDNServiceIID, NS_IIDNSERVICE_IID); +#endif +#ifdef NS_IIFRAMEBOXOBJECT_IID +NP_DEF_ID(kIFrameBoxObjectIID, NS_IIFRAMEBOXOBJECT_IID); +#endif +#ifdef NS_IIMAGEDOCUMENT_IID +NP_DEF_ID(kImageDocumentIID, NS_IIMAGEDOCUMENT_IID); +#endif +#ifdef NS_IIMAPFLAGANDUIDSTATE_IID +NP_DEF_ID(kImapFlagAndUidStateIID, NS_IIMAPFLAGANDUIDSTATE_IID); +#endif +#ifdef NS_IIMAPHEADERXFERINFO_IID +NP_DEF_ID(kImapHeaderXferInfoIID, NS_IIMAPHEADERXFERINFO_IID); +#endif +#ifdef NS_IIMAPINCOMINGSERVER_IID +NP_DEF_ID(kImapIncomingServerIID, NS_IIMAPINCOMINGSERVER_IID); +#endif +#ifdef NS_IIMAPMAILFOLDERSINK_IID +NP_DEF_ID(kImapMailFolderSinkIID, NS_IIMAPMAILFOLDERSINK_IID); +#endif +#ifdef NS_IIMAPMESSAGESINK_IID +NP_DEF_ID(kImapMessageSinkIID, NS_IIMAPMESSAGESINK_IID); +#endif +#ifdef NS_IIMAPMOCKCHANNEL_IID +NP_DEF_ID(kImapMockChannelIID, NS_IIMAPMOCKCHANNEL_IID); +#endif +#ifdef NS_IIMAPPROTOCOL_IID +NP_DEF_ID(kImapProtocolIID, NS_IIMAPPROTOCOL_IID); +#endif +#ifdef NS_IIMAPSERVERSINK_IID +NP_DEF_ID(kImapServerSinkIID, NS_IIMAPSERVERSINK_IID); +#endif +#ifdef NS_IIMAPSERVICE_IID +NP_DEF_ID(kImapServiceIID, NS_IIMAPSERVICE_IID); +#endif +#ifdef NS_IIMAPURL_IID +NP_DEF_ID(kImapUrlIID, NS_IIMAPURL_IID); +#endif +#ifdef NS_IIMGMANAGER_IID +NP_DEF_ID(kImgManagerIID, NS_IIMGMANAGER_IID); +#endif +#ifdef NS_IIMPORTABDESCRIPTOR_IID +NP_DEF_ID(kImportABDescriptorIID, NS_IIMPORTABDESCRIPTOR_IID); +#endif +#ifdef NS_IIMPORTADDRESSBOOKS_IID +NP_DEF_ID(kImportAddressBooksIID, NS_IIMPORTADDRESSBOOKS_IID); +#endif +#ifdef NS_IIMPORTFIELDMAP_IID +NP_DEF_ID(kImportFieldMapIID, NS_IIMPORTFIELDMAP_IID); +#endif +#ifdef NS_IIMPORTGENERIC_IID +NP_DEF_ID(kImportGenericIID, NS_IIMPORTGENERIC_IID); +#endif +#ifdef NS_IIMPORTMAIL_IID +NP_DEF_ID(kImportMailIID, NS_IIMPORTMAIL_IID); +#endif +#ifdef NS_IIMPORTMAILBOXDESCRIPTOR_IID +NP_DEF_ID(kImportMailboxDescriptorIID, NS_IIMPORTMAILBOXDESCRIPTOR_IID); +#endif +#ifdef NS_IIMPORTMIMEENCODE_IID +NP_DEF_ID(kImportMimeEncodeIID, NS_IIMPORTMIMEENCODE_IID); +#endif +#ifdef NS_IIMPORTMODULE_IID +NP_DEF_ID(kImportModuleIID, NS_IIMPORTMODULE_IID); +#endif +#ifdef NS_IIMPORTSERVICE_IID +NP_DEF_ID(kImportServiceIID, NS_IIMPORTSERVICE_IID); +#endif +#ifdef NS_IIMPORTSETTINGS_IID +NP_DEF_ID(kImportSettingsIID, NS_IIMPORTSETTINGS_IID); +#endif +#ifdef NS_IINCOMINGSERVERLISTENER_IID +NP_DEF_ID(kIncomingServerListenerIID, NS_IINCOMINGSERVERLISTENER_IID); +#endif +#ifdef NS_IINPUTSTREAM_IID +NP_DEF_ID(kInputStreamIID, NS_IINPUTSTREAM_IID); +#endif +#ifdef NS_IINPUTSTREAMCHANNEL_IID +NP_DEF_ID(kInputStreamChannelIID, NS_IINPUTSTREAMCHANNEL_IID); +#endif +#ifdef NS_IINPUTSTREAMPUMP_IID +NP_DEF_ID(kInputStreamPumpIID, NS_IINPUTSTREAMPUMP_IID); +#endif +#ifdef NS_IINPUTSTREAMTEE_IID +NP_DEF_ID(kInputStreamTeeIID, NS_IINPUTSTREAMTEE_IID); +#endif +#ifdef NS_IINTERFACEINFO_IID +NP_DEF_ID(kInterfaceInfoIID, NS_IINTERFACEINFO_IID); +#endif +#ifdef NS_IINTERFACEINFOMANAGER_IID +NP_DEF_ID(kInterfaceInfoManagerIID, NS_IINTERFACEINFOMANAGER_IID); +#endif +#ifdef NS_IINTERFACEREQUESTOR_IID +NP_DEF_ID(kInterfaceRequestorIID, NS_IINTERFACEREQUESTOR_IID); +#endif +#ifdef NS_IIOSERVICE_IID +NP_DEF_ID(kIOServiceIID, NS_IIOSERVICE_IID); +#endif +#ifdef NS_IJAR_IID +NP_DEF_ID(kJARIID, NS_IJAR_IID); +#endif +#ifdef NS_IJARCHANNEL_IID +NP_DEF_ID(kJARChannelIID, NS_IJARCHANNEL_IID); +#endif +#ifdef NS_IJARPROTOCOLHANDLER_IID +NP_DEF_ID(kJARProtocolHandlerIID, NS_IJARPROTOCOLHANDLER_IID); +#endif +#ifdef NS_IJARURI_IID +NP_DEF_ID(kJARURIIID, NS_IJARURI_IID); +#endif +#ifdef NS_IJRILIVECONNECTPIPEER_IID +NP_DEF_ID(kJRILiveConnectPIPeerIID, NS_IJRILIVECONNECTPIPEER_IID); +#endif +#ifdef NS_IJRILIVECONNECTPLUGIN_IID +NP_DEF_ID(kJRILiveConnectPluginIID, NS_IJRILIVECONNECTPLUGIN_IID); +#endif +#ifdef NS_IJSCONSOLESERVICE_IID +NP_DEF_ID(kJSConsoleServiceIID, NS_IJSCONSOLESERVICE_IID); +#endif +#ifdef NS_IJSCONTEXTSTACK_IID +NP_DEF_ID(kJSContextStackIID, NS_IJSCONTEXTSTACK_IID); +#endif +#ifdef NS_IJSRUNTIMESERVICE_IID +NP_DEF_ID(kJSRuntimeServiceIID, NS_IJSRUNTIMESERVICE_IID); +#endif +#ifdef NS_IKEYEDSTREAMGENERATOR_IID +NP_DEF_ID(kKeyedStreamGeneratorIID, NS_IKEYEDSTREAMGENERATOR_IID); +#endif +#ifdef NS_IKEYGENTHREAD_IID +NP_DEF_ID(kKeygenThreadIID, NS_IKEYGENTHREAD_IID); +#endif +#ifdef NS_ILANGUAGEATOM_IID +NP_DEF_ID(kLanguageAtomIID, NS_ILANGUAGEATOM_IID); +#endif +#ifdef NS_ILANGUAGEATOMSERVICE_IID +NP_DEF_ID(kLanguageAtomServiceIID, NS_ILANGUAGEATOMSERVICE_IID); +#endif +#ifdef NS_ILDAPAUTOCOMPFORMATTER_IID +NP_DEF_ID(kLDAPAutoCompFormatterIID, NS_ILDAPAUTOCOMPFORMATTER_IID); +#endif +#ifdef NS_ILDAPAUTOCOMPLETESESSION_IID +NP_DEF_ID(kLDAPAutoCompleteSessionIID, NS_ILDAPAUTOCOMPLETESESSION_IID); +#endif +#ifdef NS_ILDAPBERVALUE_IID +NP_DEF_ID(kLDAPBERValueIID, NS_ILDAPBERVALUE_IID); +#endif +#ifdef NS_ILDAPCONNECTION_IID +NP_DEF_ID(kLDAPConnectionIID, NS_ILDAPCONNECTION_IID); +#endif +#ifdef NS_ILDAPERRORS_IID +NP_DEF_ID(kLDAPErrorsIID, NS_ILDAPERRORS_IID); +#endif +#ifdef NS_ILDAPMESSAGE_IID +NP_DEF_ID(kLDAPMessageIID, NS_ILDAPMESSAGE_IID); +#endif +#ifdef NS_ILDAPMESSAGELISTENER_IID +NP_DEF_ID(kLDAPMessageListenerIID, NS_ILDAPMESSAGELISTENER_IID); +#endif +#ifdef NS_ILDAPOPERATION_IID +NP_DEF_ID(kLDAPOperationIID, NS_ILDAPOPERATION_IID); +#endif +#ifdef NS_ILDAPPREFSSERVICE_IID +NP_DEF_ID(kLDAPPrefsServiceIID, NS_ILDAPPREFSSERVICE_IID); +#endif +#ifdef NS_ILDAPSERVER_IID +NP_DEF_ID(kLDAPServerIID, NS_ILDAPSERVER_IID); +#endif +#ifdef NS_ILDAPSERVICE_IID +NP_DEF_ID(kLDAPServiceIID, NS_ILDAPSERVICE_IID); +#endif +#ifdef NS_ILDAPSYNCQUERY_IID +NP_DEF_ID(kLDAPSyncQueryIID, NS_ILDAPSYNCQUERY_IID); +#endif +#ifdef NS_ILDAPURL_IID +NP_DEF_ID(kLDAPURLIID, NS_ILDAPURL_IID); +#endif +#ifdef NS_ILINEINPUTSTREAM_IID +NP_DEF_ID(kLineInputStreamIID, NS_ILINEINPUTSTREAM_IID); +#endif +#ifdef NS_ILISTBOXOBJECT_IID +NP_DEF_ID(kListBoxObjectIID, NS_ILISTBOXOBJECT_IID); +#endif +#ifdef NS_ILOADGROUP_IID +NP_DEF_ID(kLoadGroupIID, NS_ILOADGROUP_IID); +#endif +#ifdef NS_ILOCALE_IID +NP_DEF_ID(kLocaleIID, NS_ILOCALE_IID); +#endif +#ifdef NS_ILOCALESERVICE_IID +NP_DEF_ID(kLocaleServiceIID, NS_ILOCALESERVICE_IID); +#endif +#ifdef NS_ILOCALFILE_IID +NP_DEF_ID(kLocalFileIID, NS_ILOCALFILE_IID); +#endif +#ifdef NS_ILOCALMAILINCOMINGSERVER_IID +NP_DEF_ID(kLocalMailIncomingServerIID, NS_ILOCALMAILINCOMINGSERVER_IID); +#endif +#ifdef NS_IMAILBOXSERVICE_IID +NP_DEF_ID(kMailboxServiceIID, NS_IMAILBOXSERVICE_IID); +#endif +#ifdef NS_IMAILBOXSPEC_IID +NP_DEF_ID(kMailboxSpecIID, NS_IMAILBOXSPEC_IID); +#endif +#ifdef NS_IMAILBOXURL_IID +NP_DEF_ID(kMailboxUrlIID, NS_IMAILBOXURL_IID); +#endif +#ifdef NS_IMARKUPDOCUMENTVIEWER_IID +NP_DEF_ID(kMarkupDocumentViewerIID, NS_IMARKUPDOCUMENTVIEWER_IID); +#endif +#ifdef NS_IMEMORY_IID +NP_DEF_ID(kMemoryIID, NS_IMEMORY_IID); +#endif +#ifdef NS_IMENUBOXOBJECT_IID +NP_DEF_ID(kMenuBoxObjectIID, NS_IMENUBOXOBJECT_IID); +#endif +#ifdef NS_IMENUROLLUP_IID +NP_DEF_ID(kMenuRollupIID, NS_IMENUROLLUP_IID); +#endif +#ifdef NS_IMESSENGER_IID +NP_DEF_ID(kMessengerIID, NS_IMESSENGER_IID); +#endif +#ifdef NS_IMESSENGERMIGRATOR_IID +NP_DEF_ID(kMessengerMigratorIID, NS_IMESSENGERMIGRATOR_IID); +#endif +#ifdef NS_IMESSENGEROSINTEGRATION_IID +NP_DEF_ID(kMessengerOSIntegrationIID, NS_IMESSENGEROSINTEGRATION_IID); +#endif +#ifdef NS_IMESSENGERWINDOWSERVICE_IID +NP_DEF_ID(kMessengerWindowServiceIID, NS_IMESSENGERWINDOWSERVICE_IID); +#endif +#ifdef NS_IMIMEEMITTER_IID +NP_DEF_ID(kMimeEmitterIID, NS_IMIMEEMITTER_IID); +#endif +#ifdef NS_IMIMEHEADERS_IID +NP_DEF_ID(kMimeHeadersIID, NS_IMIMEHEADERS_IID); +#endif +#ifdef NS_IMIMEINFO_IID +NP_DEF_ID(kMIMEInfoIID, NS_IMIMEINFO_IID); +#endif +#ifdef NS_IMIMEINPUTSTREAM_IID +NP_DEF_ID(kMIMEInputStreamIID, NS_IMIMEINPUTSTREAM_IID); +#endif +#ifdef NS_IMIMEMISCSTATUS_IID +NP_DEF_ID(kMimeMiscStatusIID, NS_IMIMEMISCSTATUS_IID); +#endif +#ifdef NS_IMIMESERVICE_IID +NP_DEF_ID(kMIMEServiceIID, NS_IMIMESERVICE_IID); +#endif +#ifdef NS_IMIMESTREAMCONVERTER_IID +NP_DEF_ID(kMimeStreamConverterIID, NS_IMIMESTREAMCONVERTER_IID); +#endif +#ifdef NS_IMODULE_IID +NP_DEF_ID(kModuleIID, NS_IMODULE_IID); +#endif +#ifdef NS_IMSGACCOUNT_IID +NP_DEF_ID(kMsgAccountIID, NS_IMSGACCOUNT_IID); +#endif +#ifdef NS_IMSGACCOUNTMANAGER_IID +NP_DEF_ID(kMsgAccountManagerIID, NS_IMSGACCOUNTMANAGER_IID); +#endif +#ifdef NS_IMSGATTACHMENT_IID +NP_DEF_ID(kMsgAttachmentIID, NS_IMSGATTACHMENT_IID); +#endif +#ifdef NS_IMSGBIFFMANAGER_IID +NP_DEF_ID(kMsgBiffManagerIID, NS_IMSGBIFFMANAGER_IID); +#endif +#ifdef NS_IMSGCOMPFIELDS_IID +NP_DEF_ID(kMsgCompFieldsIID, NS_IMSGCOMPFIELDS_IID); +#endif +#ifdef NS_IMSGCOMPOSE_IID +NP_DEF_ID(kMsgComposeIID, NS_IMSGCOMPOSE_IID); +#endif +#ifdef NS_IMSGCOMPOSEPARAMS_IID +NP_DEF_ID(kMsgComposeParamsIID, NS_IMSGCOMPOSEPARAMS_IID); +#endif +#ifdef NS_IMSGCOMPOSEPROGRESSPARAMS_IID +NP_DEF_ID(kMsgComposeProgressParamsIID, NS_IMSGCOMPOSEPROGRESSPARAMS_IID); +#endif +#ifdef NS_IMSGCOMPOSESECURE_IID +NP_DEF_ID(kMsgComposeSecureIID, NS_IMSGCOMPOSESECURE_IID); +#endif +#ifdef NS_IMSGCOMPOSESERVICE_IID +NP_DEF_ID(kMsgComposeServiceIID, NS_IMSGCOMPOSESERVICE_IID); +#endif +#ifdef NS_IMSGCOMPUTILS_IID +NP_DEF_ID(kMsgCompUtilsIID, NS_IMSGCOMPUTILS_IID); +#endif +#ifdef NS_IMSGCOPYSERVICE_IID +NP_DEF_ID(kMsgCopyServiceIID, NS_IMSGCOPYSERVICE_IID); +#endif +#ifdef NS_IMSGCOPYSERVICELISTENER_IID +NP_DEF_ID(kMsgCopyServiceListenerIID, NS_IMSGCOPYSERVICELISTENER_IID); +#endif +#ifdef NS_IMSGDATABASE_IID +NP_DEF_ID(kMsgDatabaseIID, NS_IMSGDATABASE_IID); +#endif +#ifdef NS_IMSGDBVIEW_IID +NP_DEF_ID(kMsgDBViewIID, NS_IMSGDBVIEW_IID); +#endif +#ifdef NS_IMSGDRAFT_IID +NP_DEF_ID(kMsgDraftIID, NS_IMSGDRAFT_IID); +#endif +#ifdef NS_IMSGFILTER_IID +NP_DEF_ID(kMsgFilterIID, NS_IMSGFILTER_IID); +#endif +#ifdef NS_IMSGFILTERHITNOTIFY_IID +NP_DEF_ID(kMsgFilterHitNotifyIID, NS_IMSGFILTERHITNOTIFY_IID); +#endif +#ifdef NS_IMSGFILTERLIST_IID +NP_DEF_ID(kMsgFilterListIID, NS_IMSGFILTERLIST_IID); +#endif +#ifdef NS_IMSGFILTERPLUGIN_IID +NP_DEF_ID(kMsgFilterPluginIID, NS_IMSGFILTERPLUGIN_IID); +#endif +#ifdef NS_IMSGFILTERSERVICE_IID +NP_DEF_ID(kMsgFilterServiceIID, NS_IMSGFILTERSERVICE_IID); +#endif +#ifdef NS_IMSGFOLDER_IID +NP_DEF_ID(kMsgFolderIID, NS_IMSGFOLDER_IID); +#endif +#ifdef NS_IMSGFOLDERCACHE_IID +NP_DEF_ID(kMsgFolderCacheIID, NS_IMSGFOLDERCACHE_IID); +#endif +#ifdef NS_IMSGFOLDERCACHEELEMENT_IID +NP_DEF_ID(kMsgFolderCacheElementIID, NS_IMSGFOLDERCACHEELEMENT_IID); +#endif +#ifdef NS_IMSGFOLDERCOMPACTOR_IID +NP_DEF_ID(kMsgFolderCompactorIID, NS_IMSGFOLDERCOMPACTOR_IID); +#endif +#ifdef NS_IMSGGROUPRECORD_IID +NP_DEF_ID(kMsgGroupRecordIID, NS_IMSGGROUPRECORD_IID); +#endif +#ifdef NS_IMSGHDR_IID +NP_DEF_ID(kMsgHdrIID, NS_IMSGHDR_IID); +#endif +#ifdef NS_IMSGHEADERPARSER_IID +NP_DEF_ID(kMsgHeaderParserIID, NS_IMSGHEADERPARSER_IID); +#endif +#ifdef NS_IMSGHOST_IID +NP_DEF_ID(kMsgHostIID, NS_IMSGHOST_IID); +#endif +#ifdef NS_IMSGIDENTITY_IID +NP_DEF_ID(kMsgIdentityIID, NS_IMSGIDENTITY_IID); +#endif +#ifdef NS_IMSGIMAPMAILFOLDER_IID +NP_DEF_ID(kMsgImapMailFolderIID, NS_IMSGIMAPMAILFOLDER_IID); +#endif +#ifdef NS_IMSGINCOMINGSERVER_IID +NP_DEF_ID(kMsgIncomingServerIID, NS_IMSGINCOMINGSERVER_IID); +#endif +#ifdef NS_IMSGLOCALMAILFOLDER_IID +NP_DEF_ID(kMsgLocalMailFolderIID, NS_IMSGLOCALMAILFOLDER_IID); +#endif +#ifdef NS_IMSGLOGONREDIRECTOR_IID +NP_DEF_ID(kMsgLogonRedirectorIID, NS_IMSGLOGONREDIRECTOR_IID); +#endif +#ifdef NS_IMSGMAILNEWSURL_IID +NP_DEF_ID(kMsgMailNewsUrlIID, NS_IMSGMAILNEWSURL_IID); +#endif +#ifdef NS_IMSGMAILSESSION_IID +NP_DEF_ID(kMsgMailSessionIID, NS_IMSGMAILSESSION_IID); +#endif +#ifdef NS_IMSGMAILVIEW_IID +NP_DEF_ID(kMsgMailViewIID, NS_IMSGMAILVIEW_IID); +#endif +#ifdef NS_IMSGMAILVIEWLIST_IID +NP_DEF_ID(kMsgMailViewListIID, NS_IMSGMAILVIEWLIST_IID); +#endif +#ifdef NS_IMSGMDNGENERATOR_IID +NP_DEF_ID(kMsgMdnGeneratorIID, NS_IMSGMDNGENERATOR_IID); +#endif +#ifdef NS_IMSGMESSAGESERVICE_IID +NP_DEF_ID(kMsgMessageServiceIID, NS_IMSGMESSAGESERVICE_IID); +#endif +#ifdef NS_IMSGNEWSFOLDER_IID +NP_DEF_ID(kMsgNewsFolderIID, NS_IMSGNEWSFOLDER_IID); +#endif +#ifdef NS_IMSGOFFLINEIMAPOPERATION_IID +NP_DEF_ID(kMsgOfflineImapOperationIID, NS_IMSGOFFLINEIMAPOPERATION_IID); +#endif +#ifdef NS_IMSGOFFLINEMANAGER_IID +NP_DEF_ID(kMsgOfflineManagerIID, NS_IMSGOFFLINEMANAGER_IID); +#endif +#ifdef NS_IMSGOFFLINENEWSSTATE_IID +NP_DEF_ID(kMsgOfflineNewsStateIID, NS_IMSGOFFLINENEWSSTATE_IID); +#endif +#ifdef NS_IMSGPARSEMAILMSGSTATE_IID +NP_DEF_ID(kMsgParseMailMsgStateIID, NS_IMSGPARSEMAILMSGSTATE_IID); +#endif +#ifdef NS_IMSGPRINTENGINE_IID +NP_DEF_ID(kMsgPrintEngineIID, NS_IMSGPRINTENGINE_IID); +#endif +#ifdef NS_IMSGPROGRESS_IID +NP_DEF_ID(kMsgProgressIID, NS_IMSGPROGRESS_IID); +#endif +#ifdef NS_IMSGPROTOCOLINFO_IID +NP_DEF_ID(kMsgProtocolInfoIID, NS_IMSGPROTOCOLINFO_IID); +#endif +#ifdef NS_IMSGPURGESERVICE_IID +NP_DEF_ID(kMsgPurgeServiceIID, NS_IMSGPURGESERVICE_IID); +#endif +#ifdef NS_IMSGQUOTE_IID +NP_DEF_ID(kMsgQuoteIID, NS_IMSGQUOTE_IID); +#endif +#ifdef NS_IMSGRDFDATASOURCE_IID +NP_DEF_ID(kMsgRDFDataSourceIID, NS_IMSGRDFDATASOURCE_IID); +#endif +#ifdef NS_IMSGRECIPIENTARRAY_IID +NP_DEF_ID(kMsgRecipientArrayIID, NS_IMSGRECIPIENTARRAY_IID); +#endif +#ifdef NS_IMSGSEARCHADAPTER_IID +NP_DEF_ID(kMsgSearchAdapterIID, NS_IMSGSEARCHADAPTER_IID); +#endif +#ifdef NS_IMSGSEARCHNOTIFY_IID +NP_DEF_ID(kMsgSearchNotifyIID, NS_IMSGSEARCHNOTIFY_IID); +#endif +#ifdef NS_IMSGSEARCHSCOPETERM_IID +NP_DEF_ID(kMsgSearchScopeTermIID, NS_IMSGSEARCHSCOPETERM_IID); +#endif +#ifdef NS_IMSGSEARCHSESSION_IID +NP_DEF_ID(kMsgSearchSessionIID, NS_IMSGSEARCHSESSION_IID); +#endif +#ifdef NS_IMSGSEARCHTERM_IID +NP_DEF_ID(kMsgSearchTermIID, NS_IMSGSEARCHTERM_IID); +#endif +#ifdef NS_IMSGSEARCHVALIDITYMANAGER_IID +NP_DEF_ID(kMsgSearchValidityManagerIID, NS_IMSGSEARCHVALIDITYMANAGER_IID); +#endif +#ifdef NS_IMSGSEARCHVALIDITYTABLE_IID +NP_DEF_ID(kMsgSearchValidityTableIID, NS_IMSGSEARCHVALIDITYTABLE_IID); +#endif +#ifdef NS_IMSGSEARCHVALUE_IID +NP_DEF_ID(kMsgSearchValueIID, NS_IMSGSEARCHVALUE_IID); +#endif +#ifdef NS_IMSGSEND_IID +NP_DEF_ID(kMsgSendIID, NS_IMSGSEND_IID); +#endif +#ifdef NS_IMSGSENDLATER_IID +NP_DEF_ID(kMsgSendLaterIID, NS_IMSGSENDLATER_IID); +#endif +#ifdef NS_IMSGSENDLATERLISTENER_IID +NP_DEF_ID(kMsgSendLaterListenerIID, NS_IMSGSENDLATERLISTENER_IID); +#endif +#ifdef NS_IMSGSENDLISTENER_IID +NP_DEF_ID(kMsgSendListenerIID, NS_IMSGSENDLISTENER_IID); +#endif +#ifdef NS_IMSGSENDREPORT_IID +NP_DEF_ID(kMsgSendReportIID, NS_IMSGSENDREPORT_IID); +#endif +#ifdef NS_IMSGSIGNATURE_IID +NP_DEF_ID(kMsgSignatureIID, NS_IMSGSIGNATURE_IID); +#endif +#ifdef NS_IMSGSMIMECOMPFIELDS_IID +NP_DEF_ID(kMsgSMIMECompFieldsIID, NS_IMSGSMIMECOMPFIELDS_IID); +#endif +#ifdef NS_IMSGSMIMEHEADERSINK_IID +NP_DEF_ID(kMsgSMIMEHeaderSinkIID, NS_IMSGSMIMEHEADERSINK_IID); +#endif +#ifdef NS_IMSGSTATUSFEEDBACK_IID +NP_DEF_ID(kMsgStatusFeedbackIID, NS_IMSGSTATUSFEEDBACK_IID); +#endif +#ifdef NS_IMSGSTRINGSERVICE_IID +NP_DEF_ID(kMsgStringServiceIID, NS_IMSGSTRINGSERVICE_IID); +#endif +#ifdef NS_IMSGTHREAD_IID +NP_DEF_ID(kMsgThreadIID, NS_IMSGTHREAD_IID); +#endif +#ifdef NS_IMSGVCARD_IID +NP_DEF_ID(kMsgVCardIID, NS_IMSGVCARD_IID); +#endif +#ifdef NS_IMSGWINDOW_IID +NP_DEF_ID(kMsgWindowIID, NS_IMSGWINDOW_IID); +#endif +#ifdef NS_IMULTIPARTCHANNEL_IID +NP_DEF_ID(kMultiPartChannelIID, NS_IMULTIPARTCHANNEL_IID); +#endif +#ifdef NS_IMULTIPLEXINPUTSTREAM_IID +NP_DEF_ID(kMultiplexInputStreamIID, NS_IMULTIPLEXINPUTSTREAM_IID); +#endif +#ifdef NS_INATIVEAPPSUPPORT_IID +NP_DEF_ID(kNativeAppSupportIID, NS_INATIVEAPPSUPPORT_IID); +#endif +#ifdef NS_INATIVECOMPONENTLOADER_IID +NP_DEF_ID(kNativeComponentLoaderIID, NS_INATIVECOMPONENTLOADER_IID); +#endif +#ifdef NS_INATIVESCROLLBAR_IID +NP_DEF_ID(kNativeScrollbarIID, NS_INATIVESCROLLBAR_IID); +#endif +#ifdef NS_INETMODREGENTRY_IID +NP_DEF_ID(kNetModRegEntryIID, NS_INETMODREGENTRY_IID); +#endif +#ifdef NS_INETMODULEMGR_IID +NP_DEF_ID(kNetModuleMgrIID, NS_INETMODULEMGR_IID); +#endif +#ifdef NS_INETNOTIFY_IID +NP_DEF_ID(kNetNotifyIID, NS_INETNOTIFY_IID); +#endif +#ifdef NS_INEWSDATABASE_IID +NP_DEF_ID(kNewsDatabaseIID, NS_INEWSDATABASE_IID); +#endif +#ifdef NS_INEWSDOWNLOADDIALOGARGS_IID +NP_DEF_ID(kNewsDownloadDialogArgsIID, NS_INEWSDOWNLOADDIALOGARGS_IID); +#endif +#ifdef NS_INNTPARTICLELIST_IID +NP_DEF_ID(kNNTPArticleListIID, NS_INNTPARTICLELIST_IID); +#endif +#ifdef NS_INNTPINCOMINGSERVER_IID +NP_DEF_ID(kNntpIncomingServerIID, NS_INNTPINCOMINGSERVER_IID); +#endif +#ifdef NS_INNTPNEWSGROUPLIST_IID +NP_DEF_ID(kNNTPNewsgroupListIID, NS_INNTPNEWSGROUPLIST_IID); +#endif +#ifdef NS_INNTPNEWSGROUPPOST_IID +NP_DEF_ID(kNNTPNewsgroupPostIID, NS_INNTPNEWSGROUPPOST_IID); +#endif +#ifdef NS_INNTPPROTOCOL_IID +NP_DEF_ID(kNNTPProtocolIID, NS_INNTPPROTOCOL_IID); +#endif +#ifdef NS_INNTPSERVICE_IID +NP_DEF_ID(kNntpServiceIID, NS_INNTPSERVICE_IID); +#endif +#ifdef NS_INNTPURL_IID +NP_DEF_ID(kNntpUrlIID, NS_INNTPURL_IID); +#endif +#ifdef NS_INOINCOMINGSERVER_IID +NP_DEF_ID(kNoIncomingServerIID, NS_INOINCOMINGSERVER_IID); +#endif +#ifdef NS_INONESERVICE_IID +NP_DEF_ID(kNoneServiceIID, NS_INONESERVICE_IID); +#endif +#ifdef NS_INSSCERTCACHE_IID +NP_DEF_ID(kNSSCertCacheIID, NS_INSSCERTCACHE_IID); +#endif +#ifdef NS_IOBJECTINPUTSTREAM_IID +NP_DEF_ID(kObjectInputStreamIID, NS_IOBJECTINPUTSTREAM_IID); +#endif +#ifdef NS_IOBJECTOUTPUTSTREAM_IID +NP_DEF_ID(kObjectOutputStreamIID, NS_IOBJECTOUTPUTSTREAM_IID); +#endif +#ifdef NS_IOBSERVER_IID +NP_DEF_ID(kObserverIID, NS_IOBSERVER_IID); +#endif +#ifdef NS_IOBSERVERSERVICE_IID +NP_DEF_ID(kObserverServiceIID, NS_IOBSERVERSERVICE_IID); +#endif +#ifdef NS_IOCSPRESPONDER_IID +NP_DEF_ID(kOCSPResponderIID, NS_IOCSPRESPONDER_IID); +#endif +#ifdef NS_IOUTPUTSTREAM_IID +NP_DEF_ID(kOutputStreamIID, NS_IOUTPUTSTREAM_IID); +#endif +#ifdef NS_IPASSWORD_IID +NP_DEF_ID(kPasswordIID, NS_IPASSWORD_IID); +#endif +#ifdef NS_IPASSWORDMANAGER_IID +NP_DEF_ID(kPasswordManagerIID, NS_IPASSWORDMANAGER_IID); +#endif +#ifdef NS_IPASSWORDMANAGERINTERNAL_IID +NP_DEF_ID(kPasswordManagerInternalIID, NS_IPASSWORDMANAGERINTERNAL_IID); +#endif +#ifdef NS_IPASSWORDSINK_IID +NP_DEF_ID(kPasswordSinkIID, NS_IPASSWORDSINK_IID); +#endif +#ifdef NS_IPERMISSION_IID +NP_DEF_ID(kPermissionIID, NS_IPERMISSION_IID); +#endif +#ifdef NS_IPERMISSIONMANAGER_IID +NP_DEF_ID(kPermissionManagerIID, NS_IPERMISSIONMANAGER_IID); +#endif +#ifdef NS_IPERSISTENTPROPERTIES2_IID +NP_DEF_ID(kPersistentProperties2IID, NS_IPERSISTENTPROPERTIES2_IID); +#endif +#ifdef NS_IPHONETIC_IID +NP_DEF_ID(kPhoneticIID, NS_IPHONETIC_IID); +#endif +#ifdef NS_IPIPE_IID +NP_DEF_ID(kPipeIID, NS_IPIPE_IID); +#endif +#ifdef NS_IPK11TOKEN_IID +NP_DEF_ID(kPK11TokenIID, NS_IPK11TOKEN_IID); +#endif +#ifdef NS_IPK11TOKENDB_IID +NP_DEF_ID(kPK11TokenDBIID, NS_IPK11TOKENDB_IID); +#endif +#ifdef NS_IPKCS11MODULE_IID +NP_DEF_ID(kPKCS11ModuleIID, NS_IPKCS11MODULE_IID); +#endif +#ifdef NS_IPKCS11MODULEDB_IID +NP_DEF_ID(kPKCS11ModuleDBIID, NS_IPKCS11MODULEDB_IID); +#endif +#ifdef NS_IPKCS11SLOT_IID +NP_DEF_ID(kPKCS11SlotIID, NS_IPKCS11SLOT_IID); +#endif +#ifdef NS_IPKIPARAMBLOCK_IID +NP_DEF_ID(kPKIParamBlockIID, NS_IPKIPARAMBLOCK_IID); +#endif +#ifdef NS_IPLAINTEXTEDITOR_IID +NP_DEF_ID(kPlaintextEditorIID, NS_IPLAINTEXTEDITOR_IID); +#endif +#ifdef NS_IPLUGIN_IID +NP_DEF_ID(kPluginIID, NS_IPLUGIN_IID); +#endif +#ifdef NS_IPLUGINHOST_IID +NP_DEF_ID(kPluginHostIID, NS_IPLUGINHOST_IID); +#endif +#ifdef NS_IPLUGININPUTSTREAM_IID +NP_DEF_ID(kPluginInputStreamIID, NS_IPLUGININPUTSTREAM_IID); +#endif +#ifdef NS_IPLUGININSTANCE_IID +NP_DEF_ID(kPluginInstanceIID, NS_IPLUGININSTANCE_IID); +#endif +#ifdef NS_IPLUGININSTANCEOWNER_IID +NP_DEF_ID(kPluginInstanceOwnerIID, NS_IPLUGININSTANCEOWNER_IID); +#endif +#ifdef NS_IPLUGININSTANCEPEER_IID +NP_DEF_ID(kPluginInstancePeerIID, NS_IPLUGININSTANCEPEER_IID); +#endif +#ifdef NS_IPLUGININSTANCEPEER2_IID +NP_DEF_ID(kPluginInstancePeer2IID, NS_IPLUGININSTANCEPEER2_IID); +#endif +#ifdef NS_IPLUGINMANAGER_IID +NP_DEF_ID(kPluginManagerIID, NS_IPLUGINMANAGER_IID); +#endif +#ifdef NS_IPLUGINMANAGER2_IID +NP_DEF_ID(kPluginManager2IID, NS_IPLUGINMANAGER2_IID); +#endif +#ifdef NS_IPLUGINSTREAMINFO_IID +NP_DEF_ID(kPluginStreamInfoIID, NS_IPLUGINSTREAMINFO_IID); +#endif +#ifdef NS_IPLUGINSTREAMLISTENER_IID +NP_DEF_ID(kPluginStreamListenerIID, NS_IPLUGINSTREAMLISTENER_IID); +#endif +#ifdef NS_IPLUGINTAGINFO_IID +NP_DEF_ID(kPluginTagInfoIID, NS_IPLUGINTAGINFO_IID); +#endif +#ifdef NS_IPLUGINTAGINFO2_IID +NP_DEF_ID(kPluginTagInfo2IID, NS_IPLUGINTAGINFO2_IID); +#endif +#ifdef NS_IPLUGINVIEWER_IID +NP_DEF_ID(kPluginViewerIID, NS_IPLUGINVIEWER_IID); +#endif +#ifdef NS_IPOP3INCOMINGSERVER_IID +NP_DEF_ID(kPop3IncomingServerIID, NS_IPOP3INCOMINGSERVER_IID); +#endif +#ifdef NS_IPOP3SERVICE_IID +NP_DEF_ID(kPop3ServiceIID, NS_IPOP3SERVICE_IID); +#endif +#ifdef NS_IPOP3SINK_IID +NP_DEF_ID(kPop3SinkIID, NS_IPOP3SINK_IID); +#endif +#ifdef NS_IPOP3URL_IID +NP_DEF_ID(kPop3URLIID, NS_IPOP3URL_IID); +#endif +#ifdef NS_IPOPUPBOXOBJECT_IID +NP_DEF_ID(kPopupBoxObjectIID, NS_IPOPUPBOXOBJECT_IID); +#endif +#ifdef NS_IPOPUPWINDOWMANAGER_IID +NP_DEF_ID(kPopupWindowManagerIID, NS_IPOPUPWINDOWMANAGER_IID); +#endif +#ifdef NS_IPREF_IID +NP_DEF_ID(kPrefIID, NS_IPREF_IID); +#endif +#ifdef NS_IPREFBRANCH_IID +NP_DEF_ID(kPrefBranchIID, NS_IPREFBRANCH_IID); +#endif +#ifdef NS_IPREFBRANCHINTERNAL_IID +NP_DEF_ID(kPrefBranchInternalIID, NS_IPREFBRANCHINTERNAL_IID); +#endif +#ifdef NS_IPREFETCHSERVICE_IID +NP_DEF_ID(kPrefetchServiceIID, NS_IPREFETCHSERVICE_IID); +#endif +#ifdef NS_IPREFLOCALIZEDSTRING_IID +NP_DEF_ID(kPrefLocalizedStringIID, NS_IPREFLOCALIZEDSTRING_IID); +#endif +#ifdef NS_IPREFMIGRATION_IID +NP_DEF_ID(kPrefMigrationIID, NS_IPREFMIGRATION_IID); +#endif +#ifdef NS_IPREFMIGRATIONPROGRESS_IID +NP_DEF_ID(kPrefMigrationProgressIID, NS_IPREFMIGRATIONPROGRESS_IID); +#endif +#ifdef NS_IPREFSERVICE_IID +NP_DEF_ID(kPrefServiceIID, NS_IPREFSERVICE_IID); +#endif +#ifdef NS_IPRINCIPAL_IID +NP_DEF_ID(kPrincipalIID, NS_IPRINCIPAL_IID); +#endif +#ifdef NS_IPRINTINGPROMPT_IID +NP_DEF_ID(kPrintingPromptIID, NS_IPRINTINGPROMPT_IID); +#endif +#ifdef NS_IPRINTINGPROMPTSERVICE_IID +NP_DEF_ID(kPrintingPromptServiceIID, NS_IPRINTINGPROMPTSERVICE_IID); +#endif +#ifdef NS_IPRINTOPTIONS_IID +NP_DEF_ID(kPrintOptionsIID, NS_IPRINTOPTIONS_IID); +#endif +#ifdef NS_IPRINTPROGRESS_IID +NP_DEF_ID(kPrintProgressIID, NS_IPRINTPROGRESS_IID); +#endif +#ifdef NS_IPRINTPROGRESSPARAMS_IID +NP_DEF_ID(kPrintProgressParamsIID, NS_IPRINTPROGRESSPARAMS_IID); +#endif +#ifdef NS_IPRINTSESSION_IID +NP_DEF_ID(kPrintSessionIID, NS_IPRINTSESSION_IID); +#endif +#ifdef NS_IPRINTSETTINGS_IID +NP_DEF_ID(kPrintSettingsIID, NS_IPRINTSETTINGS_IID); +#endif +#ifdef NS_IPRINTSETTINGSSERVICE_IID +NP_DEF_ID(kPrintSettingsServiceIID, NS_IPRINTSETTINGSSERVICE_IID); +#endif +#ifdef NS_IPRINTSTATUSFEEDBACK_IID +NP_DEF_ID(kPrintStatusFeedbackIID, NS_IPRINTSTATUSFEEDBACK_IID); +#endif +#ifdef NS_IPROCESS_IID +NP_DEF_ID(kProcessIID, NS_IPROCESS_IID); +#endif +#ifdef NS_IPROFILE_IID +NP_DEF_ID(kProfileIID, NS_IPROFILE_IID); +#endif +#ifdef NS_IPROFILECHANGESTATUS_IID +NP_DEF_ID(kProfileChangeStatusIID, NS_IPROFILECHANGESTATUS_IID); +#endif +#ifdef NS_IPROFILEINTERNAL_IID +NP_DEF_ID(kProfileInternalIID, NS_IPROFILEINTERNAL_IID); +#endif +#ifdef NS_IPROFILESTARTUPLISTENER_IID +NP_DEF_ID(kProfileStartupListenerIID, NS_IPROFILESTARTUPLISTENER_IID); +#endif +#ifdef NS_IPROGRAMMINGLANGUAGE_IID +NP_DEF_ID(kProgrammingLanguageIID, NS_IPROGRAMMINGLANGUAGE_IID); +#endif +#ifdef NS_IPROGRESSDIALOG_IID +NP_DEF_ID(kProgressDialogIID, NS_IPROGRESSDIALOG_IID); +#endif +#ifdef NS_IPROGRESSEVENTSINK_IID +NP_DEF_ID(kProgressEventSinkIID, NS_IPROGRESSEVENTSINK_IID); +#endif +#ifdef NS_IPROMPT_IID +NP_DEF_ID(kPromptIID, NS_IPROMPT_IID); +#endif +#ifdef NS_IPROMPTSERVICE_IID +NP_DEF_ID(kPromptServiceIID, NS_IPROMPTSERVICE_IID); +#endif +#ifdef NS_IPROPERTIES_IID +NP_DEF_ID(kPropertiesIID, NS_IPROPERTIES_IID); +#endif +#ifdef NS_IPROPERTYBAG_IID +NP_DEF_ID(kPropertyBagIID, NS_IPROPERTYBAG_IID); +#endif +#ifdef NS_IPROTOCOLHANDLER_IID +NP_DEF_ID(kProtocolHandlerIID, NS_IPROTOCOLHANDLER_IID); +#endif +#ifdef NS_IPROTOCOLPROXYSERVICE_IID +NP_DEF_ID(kProtocolProxyServiceIID, NS_IPROTOCOLPROXYSERVICE_IID); +#endif +#ifdef NS_IPROXIEDPROTOCOLHANDLER_IID +NP_DEF_ID(kProxiedProtocolHandlerIID, NS_IPROXIEDPROTOCOLHANDLER_IID); +#endif +#ifdef NS_IPROXY_IID +NP_DEF_ID(kProxyIID, NS_IPROXY_IID); +#endif +#ifdef NS_IPROXYAUTOCONFIG_IID +NP_DEF_ID(kProxyAutoConfigIID, NS_IPROXYAUTOCONFIG_IID); +#endif +#ifdef NS_IPROXYCREATEINSTANCE_IID +NP_DEF_ID(kProxyCreateInstanceIID, NS_IPROXYCREATEINSTANCE_IID); +#endif +#ifdef NS_IPROXYINFO_IID +NP_DEF_ID(kProxyInfoIID, NS_IPROXYINFO_IID); +#endif +#ifdef NS_IPROXYOBJECTMANAGER_IID +NP_DEF_ID(kProxyObjectManagerIID, NS_IPROXYOBJECTMANAGER_IID); +#endif +#ifdef NS_IRDFCOMPOSITEDATASOURCE_IID +NP_DEF_ID(kRDFCompositeDataSourceIID, NS_IRDFCOMPOSITEDATASOURCE_IID); +#endif +#ifdef NS_IRDFCONTAINER_IID +NP_DEF_ID(kRDFContainerIID, NS_IRDFCONTAINER_IID); +#endif +#ifdef NS_IRDFCONTAINERUTILS_IID +NP_DEF_ID(kRDFContainerUtilsIID, NS_IRDFCONTAINERUTILS_IID); +#endif +#ifdef NS_IRDFDATASOURCE_IID +NP_DEF_ID(kRDFDataSourceIID, NS_IRDFDATASOURCE_IID); +#endif +#ifdef NS_IRDFDELEGATEFACTORY_IID +NP_DEF_ID(kRDFDelegateFactoryIID, NS_IRDFDELEGATEFACTORY_IID); +#endif +#ifdef NS_IRDFINMEMORYDATASOURCE_IID +NP_DEF_ID(kRDFInMemoryDataSourceIID, NS_IRDFINMEMORYDATASOURCE_IID); +#endif +#ifdef NS_IRDFLITERAL_IID +NP_DEF_ID(kRDFLiteralIID, NS_IRDFLITERAL_IID); +#endif +#ifdef NS_IRDFNODE_IID +NP_DEF_ID(kRDFNodeIID, NS_IRDFNODE_IID); +#endif +#ifdef NS_IRDFOBSERVER_IID +NP_DEF_ID(kRDFObserverIID, NS_IRDFOBSERVER_IID); +#endif +#ifdef NS_IRDFPURGEABLEDATASOURCE_IID +NP_DEF_ID(kRDFPurgeableDataSourceIID, NS_IRDFPURGEABLEDATASOURCE_IID); +#endif +#ifdef NS_IRDFREMOTEDATASOURCE_IID +NP_DEF_ID(kRDFRemoteDataSourceIID, NS_IRDFREMOTEDATASOURCE_IID); +#endif +#ifdef NS_IRDFRESOURCE_IID +NP_DEF_ID(kRDFResourceIID, NS_IRDFRESOURCE_IID); +#endif +#ifdef NS_IRDFSERVICE_IID +NP_DEF_ID(kRDFServiceIID, NS_IRDFSERVICE_IID); +#endif +#ifdef NS_IRDFXMLPARSER_IID +NP_DEF_ID(kRDFXMLParserIID, NS_IRDFXMLPARSER_IID); +#endif +#ifdef NS_IRDFXMLSERIALIZER_IID +NP_DEF_ID(kRDFXMLSerializerIID, NS_IRDFXMLSERIALIZER_IID); +#endif +#ifdef NS_IRDFXMLSINK_IID +NP_DEF_ID(kRDFXMLSinkIID, NS_IRDFXMLSINK_IID); +#endif +#ifdef NS_IRDFXMLSOURCE_IID +NP_DEF_ID(kRDFXMLSourceIID, NS_IRDFXMLSOURCE_IID); +#endif +#ifdef NS_IREADCONFIG_IID +NP_DEF_ID(kReadConfigIID, NS_IREADCONFIG_IID); +#endif +#ifdef NS_IRECYCLINGALLOCATOR_IID +NP_DEF_ID(kRecyclingAllocatorIID, NS_IRECYCLINGALLOCATOR_IID); +#endif +#ifdef NS_IREFRESHURI_IID +NP_DEF_ID(kRefreshURIIID, NS_IREFRESHURI_IID); +#endif +#ifdef NS_IREGISTRY_IID +NP_DEF_ID(kRegistryIID, NS_IREGISTRY_IID); +#endif +#ifdef NS_IRELATEDLINKSHANDLER_IID +NP_DEF_ID(kRelatedLinksHandlerIID, NS_IRELATEDLINKSHANDLER_IID); +#endif +#ifdef NS_IRELATIVEFILEPREF_IID +NP_DEF_ID(kRelativeFilePrefIID, NS_IRELATIVEFILEPREF_IID); +#endif +#ifdef NS_IREQUEST_IID +NP_DEF_ID(kRequestIID, NS_IREQUEST_IID); +#endif +#ifdef NS_IREQUESTOBSERVER_IID +NP_DEF_ID(kRequestObserverIID, NS_IREQUESTOBSERVER_IID); +#endif +#ifdef NS_IREQUESTOBSERVERPROXY_IID +NP_DEF_ID(kRequestObserverProxyIID, NS_IREQUESTOBSERVERPROXY_IID); +#endif +#ifdef NS_IRESPROTOCOLHANDLER_IID +NP_DEF_ID(kResProtocolHandlerIID, NS_IRESPROTOCOLHANDLER_IID); +#endif +#ifdef NS_IRESUMABLECHANNEL_IID +NP_DEF_ID(kResumableChannelIID, NS_IRESUMABLECHANNEL_IID); +#endif +#ifdef NS_IRESUMABLEENTITYID_IID +NP_DEF_ID(kResumableEntityIDIID, NS_IRESUMABLEENTITYID_IID); +#endif +#ifdef NS_IROLLUPLISTENER_IID +NP_DEF_ID(kRollupListenerIID, NS_IROLLUPLISTENER_IID); +#endif +#ifdef NS_IRUNNABLE_IID +NP_DEF_ID(kRunnableIID, NS_IRUNNABLE_IID); +#endif +#ifdef NS_ISAMPLE_IID +NP_DEF_ID(kSampleIID, NS_ISAMPLE_IID); +#endif +#ifdef NS_ISAVEASCHARSET_IID +NP_DEF_ID(kSaveAsCharsetIID, NS_ISAVEASCHARSET_IID); +#endif +#ifdef NS_ISCHEMA_IID +NP_DEF_ID(kSchemaIID, NS_ISCHEMA_IID); +#endif +#ifdef NS_ISCHEMALOADER_IID +NP_DEF_ID(kSchemaLoaderIID, NS_ISCHEMALOADER_IID); +#endif +#ifdef NS_ISCREEN_IID +NP_DEF_ID(kScreenIID, NS_ISCREEN_IID); +#endif +#ifdef NS_ISCREENMANAGER_IID +NP_DEF_ID(kScreenManagerIID, NS_ISCREENMANAGER_IID); +#endif +#ifdef NS_ISCRIPTABLEDATEFORMAT_IID +NP_DEF_ID(kScriptableDateFormatIID, NS_ISCRIPTABLEDATEFORMAT_IID); +#endif +#ifdef NS_ISCRIPTABLEINPUTSTREAM_IID +NP_DEF_ID(kScriptableInputStreamIID, NS_ISCRIPTABLEINPUTSTREAM_IID); +#endif +#ifdef NS_ISCRIPTABLEINTERFACES_IID +NP_DEF_ID(kScriptableInterfacesIID, NS_ISCRIPTABLEINTERFACES_IID); +#endif +#ifdef NS_ISCRIPTABLEPLUGIN_IID +NP_DEF_ID(kScriptablePluginIID, NS_ISCRIPTABLEPLUGIN_IID); +#endif +#ifdef NS_ISCRIPTABLEREGION_IID +NP_DEF_ID(kScriptableRegionIID, NS_ISCRIPTABLEREGION_IID); +#endif +#ifdef NS_ISCRIPTABLEUCONV_IID +NP_DEF_ID(kScriptableUConvIID, NS_ISCRIPTABLEUCONV_IID); +#endif +#ifdef NS_ISCRIPTCONTEXTOWNER_IID +NP_DEF_ID(kScriptContextOwnerIID, NS_ISCRIPTCONTEXTOWNER_IID); +#endif +#ifdef NS_ISCRIPTERROR_IID +NP_DEF_ID(kScriptErrorIID, NS_ISCRIPTERROR_IID); +#endif +#ifdef NS_ISCRIPTEVENTHANDLER_IID +NP_DEF_ID(kScriptEventHandlerIID, NS_ISCRIPTEVENTHANDLER_IID); +#endif +#ifdef NS_ISCRIPTEVENTMANAGER_IID +NP_DEF_ID(kScriptEventManagerIID, NS_ISCRIPTEVENTMANAGER_IID); +#endif +#ifdef NS_ISCRIPTGLOBALOBJECTOWNER_IID +NP_DEF_ID(kScriptGlobalObjectOwnerIID, NS_ISCRIPTGLOBALOBJECTOWNER_IID); +#endif +#ifdef NS_ISCRIPTLOADER_IID +NP_DEF_ID(kScriptLoaderIID, NS_ISCRIPTLOADER_IID); +#endif +#ifdef NS_ISCRIPTLOADEROBSERVER_IID +NP_DEF_ID(kScriptLoaderObserverIID, NS_ISCRIPTLOADEROBSERVER_IID); +#endif +#ifdef NS_ISCRIPTSECURITYMANAGER_IID +NP_DEF_ID(kScriptSecurityManagerIID, NS_ISCRIPTSECURITYMANAGER_IID); +#endif +#ifdef NS_ISCROLLABLE_IID +NP_DEF_ID(kScrollableIID, NS_ISCROLLABLE_IID); +#endif +#ifdef NS_ISCROLLBOXOBJECT_IID +NP_DEF_ID(kScrollBoxObjectIID, NS_ISCROLLBOXOBJECT_IID); +#endif +#ifdef NS_ISEARCHCONTEXT_IID +NP_DEF_ID(kSearchContextIID, NS_ISEARCHCONTEXT_IID); +#endif +#ifdef NS_ISEARCHSERVICE_IID +NP_DEF_ID(kSearchServiceIID, NS_ISEARCHSERVICE_IID); +#endif +#ifdef NS_ISECRETDECODERRING_IID +NP_DEF_ID(kSecretDecoderRingIID, NS_ISECRETDECODERRING_IID); +#endif +#ifdef NS_ISECUREBROWSERUI_IID +NP_DEF_ID(kSecureBrowserUIIID, NS_ISECUREBROWSERUI_IID); +#endif +#ifdef NS_ISECURITYCHECKEDCOMPONENT_IID +NP_DEF_ID(kSecurityCheckedComponentIID, NS_ISECURITYCHECKEDCOMPONENT_IID); +#endif +#ifdef NS_ISECURITYEVENTSINK_IID +NP_DEF_ID(kSecurityEventSinkIID, NS_ISECURITYEVENTSINK_IID); +#endif +#ifdef NS_ISECURITYPREF_IID +NP_DEF_ID(kSecurityPrefIID, NS_ISECURITYPREF_IID); +#endif +#ifdef NS_ISECURITYWARNINGDIALOGS_IID +NP_DEF_ID(kSecurityWarningDialogsIID, NS_ISECURITYWARNINGDIALOGS_IID); +#endif +#ifdef NS_ISEEKABLESTREAM_IID +NP_DEF_ID(kSeekableStreamIID, NS_ISEEKABLESTREAM_IID); +#endif +#ifdef NS_ISELECTELEMENT_IID +NP_DEF_ID(kSelectElementIID, NS_ISELECTELEMENT_IID); +#endif +#ifdef NS_ISELECTION_IID +NP_DEF_ID(kSelectionIID, NS_ISELECTION_IID); +#endif +#ifdef NS_ISELECTIONCONTROLLER_IID +NP_DEF_ID(kSelectionControllerIID, NS_ISELECTIONCONTROLLER_IID); +#endif +#ifdef NS_ISELECTIONDISPLAY_IID +NP_DEF_ID(kSelectionDisplayIID, NS_ISELECTIONDISPLAY_IID); +#endif +#ifdef NS_ISELECTIONIMAGESERVICE_IID +NP_DEF_ID(kSelectionImageServiceIID, NS_ISELECTIONIMAGESERVICE_IID); +#endif +#ifdef NS_ISELECTIONLISTENER_IID +NP_DEF_ID(kSelectionListenerIID, NS_ISELECTIONLISTENER_IID); +#endif +#ifdef NS_ISELECTIONPRIVATE_IID +NP_DEF_ID(kSelectionPrivateIID, NS_ISELECTIONPRIVATE_IID); +#endif +#ifdef NS_ISEMANTICUNITSCANNER_IID +NP_DEF_ID(kSemanticUnitScannerIID, NS_ISEMANTICUNITSCANNER_IID); +#endif +#ifdef NS_ISERIALIZABLE_IID +NP_DEF_ID(kSerializableIID, NS_ISERIALIZABLE_IID); +#endif +#ifdef NS_ISERVICEMANAGER_IID +NP_DEF_ID(kServiceManagerIID, NS_ISERVICEMANAGER_IID); +#endif +#ifdef NS_ISHCONTAINER_IID +NP_DEF_ID(kSHContainerIID, NS_ISHCONTAINER_IID); +#endif +#ifdef NS_ISHENTRY_IID +NP_DEF_ID(kSHEntryIID, NS_ISHENTRY_IID); +#endif +#ifdef NS_ISHISTORY_IID +NP_DEF_ID(kSHistoryIID, NS_ISHISTORY_IID); +#endif +#ifdef NS_ISHISTORYINTERNAL_IID +NP_DEF_ID(kSHistoryInternalIID, NS_ISHISTORYINTERNAL_IID); +#endif +#ifdef NS_ISHISTORYLISTENER_IID +NP_DEF_ID(kSHistoryListenerIID, NS_ISHISTORYLISTENER_IID); +#endif +#ifdef NS_ISHTRANSACTION_IID +NP_DEF_ID(kSHTransactionIID, NS_ISHTRANSACTION_IID); +#endif +#ifdef NS_ISIDEBAR_IID +NP_DEF_ID(kSidebarIID, NS_ISIDEBAR_IID); +#endif +#ifdef NS_ISIGNATUREVERIFIER_IID +NP_DEF_ID(kSignatureVerifierIID, NS_ISIGNATUREVERIFIER_IID); +#endif +#ifdef NS_ISIGNONVIEWER_IID +NP_DEF_ID(kSignonViewerIID, NS_ISIGNONVIEWER_IID); +#endif +#ifdef NS_ISIMPLEENUMERATOR_IID +NP_DEF_ID(kSimpleEnumeratorIID, NS_ISIMPLEENUMERATOR_IID); +#endif +#ifdef NS_ISIMPLESTREAMLISTENER_IID +NP_DEF_ID(kSimpleStreamListenerIID, NS_ISIMPLESTREAMLISTENER_IID); +#endif +#ifdef NS_ISMIMECERT_IID +NP_DEF_ID(kSMimeCertIID, NS_ISMIMECERT_IID); +#endif +#ifdef NS_ISMIMEJSHELPER_IID +NP_DEF_ID(kSMimeJSHelperIID, NS_ISMIMEJSHELPER_IID); +#endif +#ifdef NS_ISMTPSERVER_IID +NP_DEF_ID(kSmtpServerIID, NS_ISMTPSERVER_IID); +#endif +#ifdef NS_ISMTPSERVICE_IID +NP_DEF_ID(kSmtpServiceIID, NS_ISMTPSERVICE_IID); +#endif +#ifdef NS_ISMTPURL_IID +NP_DEF_ID(kSmtpUrlIID, NS_ISMTPURL_IID); +#endif +#ifdef NS_ISOAPATTACHMENTS_IID +NP_DEF_ID(kSOAPAttachmentsIID, NS_ISOAPATTACHMENTS_IID); +#endif +#ifdef NS_ISOAPBLOCK_IID +NP_DEF_ID(kSOAPBlockIID, NS_ISOAPBLOCK_IID); +#endif +#ifdef NS_ISOAPCALL_IID +NP_DEF_ID(kSOAPCallIID, NS_ISOAPCALL_IID); +#endif +#ifdef NS_ISOAPCALLCOMPLETION_IID +NP_DEF_ID(kSOAPCallCompletionIID, NS_ISOAPCALLCOMPLETION_IID); +#endif +#ifdef NS_ISOAPDECODER_IID +NP_DEF_ID(kSOAPDecoderIID, NS_ISOAPDECODER_IID); +#endif +#ifdef NS_ISOAPENCODER_IID +NP_DEF_ID(kSOAPEncoderIID, NS_ISOAPENCODER_IID); +#endif +#ifdef NS_ISOAPENCODING_IID +NP_DEF_ID(kSOAPEncodingIID, NS_ISOAPENCODING_IID); +#endif +#ifdef NS_ISOAPFAULT_IID +NP_DEF_ID(kSOAPFaultIID, NS_ISOAPFAULT_IID); +#endif +#ifdef NS_ISOAPHEADERBLOCK_IID +NP_DEF_ID(kSOAPHeaderBlockIID, NS_ISOAPHEADERBLOCK_IID); +#endif +#ifdef NS_ISOAPMESSAGE_IID +NP_DEF_ID(kSOAPMessageIID, NS_ISOAPMESSAGE_IID); +#endif +#ifdef NS_ISOAPPARAMETER_IID +NP_DEF_ID(kSOAPParameterIID, NS_ISOAPPARAMETER_IID); +#endif +#ifdef NS_ISOAPPROPERTYBAGMUTATOR_IID +NP_DEF_ID(kSOAPPropertyBagMutatorIID, NS_ISOAPPROPERTYBAGMUTATOR_IID); +#endif +#ifdef NS_ISOAPRESPONSE_IID +NP_DEF_ID(kSOAPResponseIID, NS_ISOAPRESPONSE_IID); +#endif +#ifdef NS_ISOAPRESPONSELISTENER_IID +NP_DEF_ID(kSOAPResponseListenerIID, NS_ISOAPRESPONSELISTENER_IID); +#endif +#ifdef NS_ISOAPSERVICE_IID +NP_DEF_ID(kSOAPServiceIID, NS_ISOAPSERVICE_IID); +#endif +#ifdef NS_ISOAPSERVICEREGISTRY_IID +NP_DEF_ID(kSOAPServiceRegistryIID, NS_ISOAPSERVICEREGISTRY_IID); +#endif +#ifdef NS_ISOAPTRANSPORT_IID +NP_DEF_ID(kSOAPTransportIID, NS_ISOAPTRANSPORT_IID); +#endif +#ifdef NS_ISOAPTRANSPORTLISTENER_IID +NP_DEF_ID(kSOAPTransportListenerIID, NS_ISOAPTRANSPORTLISTENER_IID); +#endif +#ifdef NS_ISOCKETPROVIDER_IID +NP_DEF_ID(kSocketProviderIID, NS_ISOCKETPROVIDER_IID); +#endif +#ifdef NS_ISOCKETPROVIDERSERVICE_IID +NP_DEF_ID(kSocketProviderServiceIID, NS_ISOCKETPROVIDERSERVICE_IID); +#endif +#ifdef NS_ISOCKETTRANSPORT_IID +NP_DEF_ID(kSocketTransportIID, NS_ISOCKETTRANSPORT_IID); +#endif +#ifdef NS_ISOCKETTRANSPORTSERVICE_IID +NP_DEF_ID(kSocketTransportServiceIID, NS_ISOCKETTRANSPORTSERVICE_IID); +#endif +#ifdef NS_ISOCKS4SOCKETINFO_IID +NP_DEF_ID(kSOCKS4SocketInfoIID, NS_ISOCKS4SOCKETINFO_IID); +#endif +#ifdef NS_ISOCKS4SOCKETPROVIDER_IID +NP_DEF_ID(kSOCKS4SocketProviderIID, NS_ISOCKS4SOCKETPROVIDER_IID); +#endif +#ifdef NS_ISOCKSSOCKETINFO_IID +NP_DEF_ID(kSOCKSSocketInfoIID, NS_ISOCKSSOCKETINFO_IID); +#endif +#ifdef NS_ISOCKSSOCKETPROVIDER_IID +NP_DEF_ID(kSOCKSSocketProviderIID, NS_ISOCKSSOCKETPROVIDER_IID); +#endif +#ifdef NS_ISOUND_IID +NP_DEF_ID(kSoundIID, NS_ISOUND_IID); +#endif +#ifdef NS_ISPAMSETTINGS_IID +NP_DEF_ID(kSpamSettingsIID, NS_ISPAMSETTINGS_IID); +#endif +#ifdef NS_ISSLSOCKETCONTROL_IID +NP_DEF_ID(kSSLSocketControlIID, NS_ISSLSOCKETCONTROL_IID); +#endif +#ifdef NS_ISSLSOCKETPROVIDER_IID +NP_DEF_ID(kSSLSocketProviderIID, NS_ISSLSOCKETPROVIDER_IID); +#endif +#ifdef NS_ISSLSTATUS_IID +NP_DEF_ID(kSSLStatusIID, NS_ISSLSTATUS_IID); +#endif +#ifdef NS_ISSLSTATUSPROVIDER_IID +NP_DEF_ID(kSSLStatusProviderIID, NS_ISSLSTATUSPROVIDER_IID); +#endif +#ifdef NS_ISTANDARDURL_IID +NP_DEF_ID(kStandardURLIID, NS_ISTANDARDURL_IID); +#endif +#ifdef NS_ISTORAGESTREAM_IID +NP_DEF_ID(kStorageStreamIID, NS_ISTORAGESTREAM_IID); +#endif +#ifdef NS_ISTREAMBUFFERACCESS_IID +NP_DEF_ID(kStreamBufferAccessIID, NS_ISTREAMBUFFERACCESS_IID); +#endif +#ifdef NS_ISTREAMCONVERTER_IID +NP_DEF_ID(kStreamConverterIID, NS_ISTREAMCONVERTER_IID); +#endif +#ifdef NS_ISTREAMCONVERTERSERVICE_IID +NP_DEF_ID(kStreamConverterServiceIID, NS_ISTREAMCONVERTERSERVICE_IID); +#endif +#ifdef NS_ISTREAMLISTENER_IID +NP_DEF_ID(kStreamListenerIID, NS_ISTREAMLISTENER_IID); +#endif +#ifdef NS_ISTREAMLISTENERPROXY_IID +NP_DEF_ID(kStreamListenerProxyIID, NS_ISTREAMLISTENERPROXY_IID); +#endif +#ifdef NS_ISTREAMLISTENERTEE_IID +NP_DEF_ID(kStreamListenerTeeIID, NS_ISTREAMLISTENERTEE_IID); +#endif +#ifdef NS_ISTREAMLOADER_IID +NP_DEF_ID(kStreamLoaderIID, NS_ISTREAMLOADER_IID); +#endif +#ifdef NS_ISTREAMTRANSPORTSERVICE_IID +NP_DEF_ID(kStreamTransportServiceIID, NS_ISTREAMTRANSPORTSERVICE_IID); +#endif +#ifdef NS_ISTRINGBUNDLE_IID +NP_DEF_ID(kStringBundleIID, NS_ISTRINGBUNDLE_IID); +#endif +#ifdef NS_ISTRINGBUNDLEOVERRIDE_IID +NP_DEF_ID(kStringBundleOverrideIID, NS_ISTRINGBUNDLEOVERRIDE_IID); +#endif +#ifdef NS_ISTRINGSERVICE_IID +NP_DEF_ID(kStringServiceIID, NS_ISTRINGSERVICE_IID); +#endif +#ifdef NS_ISTRINGSTREAM_IID +NP_DEF_ID(kStringStreamIID, NS_ISTRINGSTREAM_IID); +#endif +#ifdef NS_ISUBSCRIBABLESERVER_IID +NP_DEF_ID(kSubscribableServerIID, NS_ISUBSCRIBABLESERVER_IID); +#endif +#ifdef NS_ISUPPORTS_IID +NP_DEF_ID(kSupportsIID, NS_ISUPPORTS_IID); +#endif +#ifdef NS_ISUPPORTSARRAY_IID +NP_DEF_ID(kSupportsArrayIID, NS_ISUPPORTSARRAY_IID); +#endif +#ifdef NS_ISUPPORTSITERATORS_IID +NP_DEF_ID(kSupportsIteratorsIID, NS_ISUPPORTSITERATORS_IID); +#endif +#ifdef NS_ISUPPORTSPRIMITIVES_IID +NP_DEF_ID(kSupportsPrimitivesIID, NS_ISUPPORTSPRIMITIVES_IID); +#endif +#ifdef NS_ISYNCLOADDOMSERVICE_IID +NP_DEF_ID(kSyncLoadDOMServiceIID, NS_ISYNCLOADDOMSERVICE_IID); +#endif +#ifdef NS_ITABLEEDITOR_IID +NP_DEF_ID(kTableEditorIID, NS_ITABLEEDITOR_IID); +#endif +#ifdef NS_ITESTPROXY_IID +NP_DEF_ID(kTestProxyIID, NS_ITESTPROXY_IID); +#endif +#ifdef NS_ITEXTAREAELEMENT_IID +NP_DEF_ID(kTextAreaElementIID, NS_ITEXTAREAELEMENT_IID); +#endif +#ifdef NS_ITEXTSCROLL_IID +NP_DEF_ID(kTextScrollIID, NS_ITEXTSCROLL_IID); +#endif +#ifdef NS_ITEXTSERVICESFILTER_IID +NP_DEF_ID(kTextServicesFilterIID, NS_ITEXTSERVICESFILTER_IID); +#endif +#ifdef NS_ITEXTTOSUBURI_IID +NP_DEF_ID(kTextToSubURIIID, NS_ITEXTTOSUBURI_IID); +#endif +#ifdef NS_ITHREAD_IID +NP_DEF_ID(kThreadIID, NS_ITHREAD_IID); +#endif +#ifdef NS_ITHREADPOOL_IID +NP_DEF_ID(kThreadPoolIID, NS_ITHREADPOOL_IID); +#endif +#ifdef NS_ITIMEBOMB_IID +NP_DEF_ID(kTimeBombIID, NS_ITIMEBOMB_IID); +#endif +#ifdef NS_ITIMELINESERVICE_IID +NP_DEF_ID(kTimelineServiceIID, NS_ITIMELINESERVICE_IID); +#endif +#ifdef NS_ITIMER_IID +NP_DEF_ID(kTimerIID, NS_ITIMER_IID); +#endif +#ifdef NS_ITIMERECORDER_IID +NP_DEF_ID(kTimeRecorderIID, NS_ITIMERECORDER_IID); +#endif +#ifdef NS_ITIMERINTERNAL_IID +NP_DEF_ID(kTimerInternalIID, NS_ITIMERINTERNAL_IID); +#endif +#ifdef NS_ITIMERMANAGER_IID +NP_DEF_ID(kTimerManagerIID, NS_ITIMERMANAGER_IID); +#endif +#ifdef NS_ITIMINGSERVICE_IID +NP_DEF_ID(kTimingServiceIID, NS_ITIMINGSERVICE_IID); +#endif +#ifdef NS_ITOKENDIALOGS_IID +NP_DEF_ID(kTokenDialogsIID, NS_ITOKENDIALOGS_IID); +#endif +#ifdef NS_ITOKENPASSWORDDIALOGS_IID +NP_DEF_ID(kTokenPasswordDialogsIID, NS_ITOKENPASSWORDDIALOGS_IID); +#endif +#ifdef NS_ITOOLKIT_IID +NP_DEF_ID(kToolkitIID, NS_ITOOLKIT_IID); +#endif +#ifdef NS_ITOOLTIPLISTENER_IID +NP_DEF_ID(kTooltipListenerIID, NS_ITOOLTIPLISTENER_IID); +#endif +#ifdef NS_ITOOLTIPTEXTPROVIDER_IID +NP_DEF_ID(kTooltipTextProviderIID, NS_ITOOLTIPTEXTPROVIDER_IID); +#endif +#ifdef NS_ITRANSACTION_IID +NP_DEF_ID(kTransactionIID, NS_ITRANSACTION_IID); +#endif +#ifdef NS_ITRANSACTIONLIST_IID +NP_DEF_ID(kTransactionListIID, NS_ITRANSACTIONLIST_IID); +#endif +#ifdef NS_ITRANSACTIONLISTENER_IID +NP_DEF_ID(kTransactionListenerIID, NS_ITRANSACTIONLISTENER_IID); +#endif +#ifdef NS_ITRANSACTIONMANAGER_IID +NP_DEF_ID(kTransactionManagerIID, NS_ITRANSACTIONMANAGER_IID); +#endif +#ifdef NS_ITRANSFERABLE_IID +NP_DEF_ID(kTransferableIID, NS_ITRANSFERABLE_IID); +#endif +#ifdef NS_ITRANSPORT_IID +NP_DEF_ID(kTransportIID, NS_ITRANSPORT_IID); +#endif +#ifdef NS_ITRANSPORTSECURITYINFO_IID +NP_DEF_ID(kTransportSecurityInfoIID, NS_ITRANSPORTSECURITYINFO_IID); +#endif +#ifdef NS_ITREEBOXOBJECT_IID +NP_DEF_ID(kTreeBoxObjectIID, NS_ITREEBOXOBJECT_IID); +#endif +#ifdef NS_ITREECONTENTVIEW_IID +NP_DEF_ID(kTreeContentViewIID, NS_ITREECONTENTVIEW_IID); +#endif +#ifdef NS_ITREESELECTION_IID +NP_DEF_ID(kTreeSelectionIID, NS_ITREESELECTION_IID); +#endif +#ifdef NS_ITREEVIEW_IID +NP_DEF_ID(kTreeViewIID, NS_ITREEVIEW_IID); +#endif +#ifdef NS_ITXTTOHTMLCONV_IID +NP_DEF_ID(kTXTToHTMLConvIID, NS_ITXTTOHTMLCONV_IID); +#endif +#ifdef NS_ITYPEAHEADFIND_IID +NP_DEF_ID(kTypeAheadFindIID, NS_ITYPEAHEADFIND_IID); +#endif +#ifdef NS_IUNICHARSTREAMLOADER_IID +NP_DEF_ID(kUnicharStreamLoaderIID, NS_IUNICHARSTREAMLOADER_IID); +#endif +#ifdef NS_IUNICODENORMALIZER_IID +NP_DEF_ID(kUnicodeNormalizerIID, NS_IUNICODENORMALIZER_IID); +#endif +#ifdef NS_IUPLOADCHANNEL_IID +NP_DEF_ID(kUploadChannelIID, NS_IUPLOADCHANNEL_IID); +#endif +#ifdef NS_IURI_IID +NP_DEF_ID(kURIIID, NS_IURI_IID); +#endif +#ifdef NS_IURICHECKER_IID +NP_DEF_ID(kURICheckerIID, NS_IURICHECKER_IID); +#endif +#ifdef NS_IURICONTENTLISTENER_IID +NP_DEF_ID(kURIContentListenerIID, NS_IURICONTENTLISTENER_IID); +#endif +#ifdef NS_IURIFIXUP_IID +NP_DEF_ID(kURIFixupIID, NS_IURIFIXUP_IID); +#endif +#ifdef NS_IURILOADER_IID +NP_DEF_ID(kURILoaderIID, NS_IURILOADER_IID); +#endif +#ifdef NS_IURIREFOBJECT_IID +NP_DEF_ID(kURIRefObjectIID, NS_IURIREFOBJECT_IID); +#endif +#ifdef NS_IURL_IID +NP_DEF_ID(kURLIID, NS_IURL_IID); +#endif +#ifdef NS_IURLBARHISTORY_IID +NP_DEF_ID(kUrlbarHistoryIID, NS_IURLBARHISTORY_IID); +#endif +#ifdef NS_IURLFETCHER_IID +NP_DEF_ID(kURLFetcherIID, NS_IURLFETCHER_IID); +#endif +#ifdef NS_IURLLISTENER_IID +NP_DEF_ID(kUrlListenerIID, NS_IURLLISTENER_IID); +#endif +#ifdef NS_IURLLISTENERMANAGER_IID +NP_DEF_ID(kUrlListenerManagerIID, NS_IURLLISTENERMANAGER_IID); +#endif +#ifdef NS_IURLPARSER_IID +NP_DEF_ID(kURLParserIID, NS_IURLPARSER_IID); +#endif +#ifdef NS_IUSERCERTPICKER_IID +NP_DEF_ID(kUserCertPickerIID, NS_IUSERCERTPICKER_IID); +#endif +#ifdef NS_IUSERINFO_IID +NP_DEF_ID(kUserInfoIID, NS_IUSERINFO_IID); +#endif +#ifdef NS_IVARIANT_IID +NP_DEF_ID(kVariantIID, NS_IVARIANT_IID); +#endif +#ifdef NS_IVIEWSOURCECHANNEL_IID +NP_DEF_ID(kViewSourceChannelIID, NS_IVIEWSOURCECHANNEL_IID); +#endif +#ifdef NS_IWALLETEDITOR_IID +NP_DEF_ID(kWalletEditorIID, NS_IWALLETEDITOR_IID); +#endif +#ifdef NS_IWALLETPREVIEW_IID +NP_DEF_ID(kWalletPreviewIID, NS_IWALLETPREVIEW_IID); +#endif +#ifdef NS_IWALLETSERVICE_IID +NP_DEF_ID(kWalletServiceIID, NS_IWALLETSERVICE_IID); +#endif +#ifdef NS_IWEAKREFERENCE_IID +NP_DEF_ID(kWeakReferenceIID, NS_IWEAKREFERENCE_IID); +#endif +#ifdef NS_IWEBBROWSER_IID +NP_DEF_ID(kWebBrowserIID, NS_IWEBBROWSER_IID); +#endif +#ifdef NS_IWEBBROWSERCHROME_IID +NP_DEF_ID(kWebBrowserChromeIID, NS_IWEBBROWSERCHROME_IID); +#endif +#ifdef NS_IWEBBROWSERCHROMEFOCUS_IID +NP_DEF_ID(kWebBrowserChromeFocusIID, NS_IWEBBROWSERCHROMEFOCUS_IID); +#endif +#ifdef NS_IWEBBROWSERFIND_IID +NP_DEF_ID(kWebBrowserFindIID, NS_IWEBBROWSERFIND_IID); +#endif +#ifdef NS_IWEBBROWSERFOCUS_IID +NP_DEF_ID(kWebBrowserFocusIID, NS_IWEBBROWSERFOCUS_IID); +#endif +#ifdef NS_IWEBBROWSERPERSIST_IID +NP_DEF_ID(kWebBrowserPersistIID, NS_IWEBBROWSERPERSIST_IID); +#endif +#ifdef NS_IWEBBROWSERPRINT_IID +NP_DEF_ID(kWebBrowserPrintIID, NS_IWEBBROWSERPRINT_IID); +#endif +#ifdef NS_IWEBBROWSERSETUP_IID +NP_DEF_ID(kWebBrowserSetupIID, NS_IWEBBROWSERSETUP_IID); +#endif +#ifdef NS_IWEBNAVIGATION_IID +NP_DEF_ID(kWebNavigationIID, NS_IWEBNAVIGATION_IID); +#endif +#ifdef NS_IWEBPAGEDESCRIPTOR_IID +NP_DEF_ID(kWebPageDescriptorIID, NS_IWEBPAGEDESCRIPTOR_IID); +#endif +#ifdef NS_IWEBPROGRESS_IID +NP_DEF_ID(kWebProgressIID, NS_IWEBPROGRESS_IID); +#endif +#ifdef NS_IWEBPROGRESSLISTENER_IID +NP_DEF_ID(kWebProgressListenerIID, NS_IWEBPROGRESSLISTENER_IID); +#endif +#ifdef NS_IWINDOWCREATOR_IID +NP_DEF_ID(kWindowCreatorIID, NS_IWINDOWCREATOR_IID); +#endif +#ifdef NS_IWINDOWCREATOR2_IID +NP_DEF_ID(kWindowCreator2IID, NS_IWINDOWCREATOR2_IID); +#endif +#ifdef NS_IWINDOWDATASOURCE_IID +NP_DEF_ID(kWindowDataSourceIID, NS_IWINDOWDATASOURCE_IID); +#endif +#ifdef NS_IWINDOWLESSPLUGINSTPEER_IID +NP_DEF_ID(kWindowlessPlugInstPeerIID, NS_IWINDOWLESSPLUGINSTPEER_IID); +#endif +#ifdef NS_IWINDOWMEDIATOR_IID +NP_DEF_ID(kWindowMediatorIID, NS_IWINDOWMEDIATOR_IID); +#endif +#ifdef NS_IWINDOWMEDIATORLISTENER_IID +NP_DEF_ID(kWindowMediatorListenerIID, NS_IWINDOWMEDIATORLISTENER_IID); +#endif +#ifdef NS_IWINDOWWATCHER_IID +NP_DEF_ID(kWindowWatcherIID, NS_IWINDOWWATCHER_IID); +#endif +#ifdef NS_IWYCIWYGCHANNEL_IID +NP_DEF_ID(kWyciwygChannelIID, NS_IWYCIWYGCHANNEL_IID); +#endif +#ifdef NS_IX509CERT_IID +NP_DEF_ID(kX509CertIID, NS_IX509CERT_IID); +#endif +#ifdef NS_IX509CERTDB_IID +NP_DEF_ID(kX509CertDBIID, NS_IX509CERTDB_IID); +#endif +#ifdef NS_IX509CERTVALIDITY_IID +NP_DEF_ID(kX509CertValidityIID, NS_IX509CERTVALIDITY_IID); +#endif +#ifdef NS_IXMLHTTPREQUEST_IID +NP_DEF_ID(kXMLHttpRequestIID, NS_IXMLHTTPREQUEST_IID); +#endif +#ifdef NS_IXMLRPCCLIENT_IID +NP_DEF_ID(kXmlRpcClientIID, NS_IXMLRPCCLIENT_IID); +#endif +#ifdef NS_IXMLRPCCLIENTLISTENER_IID +NP_DEF_ID(kXmlRpcClientListenerIID, NS_IXMLRPCCLIENTLISTENER_IID); +#endif +#ifdef NS_IXPCONNECT_IID +NP_DEF_ID(kXPConnectIID, NS_IXPCONNECT_IID); +#endif +#ifdef NS_IXPCSCRIPTABLE_IID +NP_DEF_ID(kXPCScriptableIID, NS_IXPCSCRIPTABLE_IID); +#endif +#ifdef NS_IXPCSCRIPTNOTIFY_IID +NP_DEF_ID(kXPCScriptNotifyIID, NS_IXPCSCRIPTNOTIFY_IID); +#endif +#ifdef NS_IXPCSECURITYMANAGER_IID +NP_DEF_ID(kXPCSecurityManagerIID, NS_IXPCSECURITYMANAGER_IID); +#endif +#ifdef NS_IXPIDIALOGSERVICE_IID +NP_DEF_ID(kXPIDialogServiceIID, NS_IXPIDIALOGSERVICE_IID); +#endif +#ifdef NS_IXPINOTIFIER_IID +NP_DEF_ID(kXPINotifierIID, NS_IXPINOTIFIER_IID); +#endif +#ifdef NS_IXPIPROGRESSDIALOG_IID +NP_DEF_ID(kXPIProgressDialogIID, NS_IXPIPROGRESSDIALOG_IID); +#endif +#ifdef NS_IXPTLOADER_IID +NP_DEF_ID(kXPTLoaderIID, NS_IXPTLOADER_IID); +#endif +#ifdef NS_IXREMOTECLIENT_IID +NP_DEF_ID(kXRemoteClientIID, NS_IXREMOTECLIENT_IID); +#endif +#ifdef NS_IXSLTEXCEPTION_IID +NP_DEF_ID(kXSLTExceptionIID, NS_IXSLTEXCEPTION_IID); +#endif +#ifdef NS_IXSLTPROCESSOR_IID +NP_DEF_ID(kXSLTProcessorIID, NS_IXSLTPROCESSOR_IID); +#endif +#ifdef NS_IXSLTPROCESSOROBSOLETE_IID +NP_DEF_ID(kXSLTProcessorObsoleteIID, NS_IXSLTPROCESSOROBSOLETE_IID); +#endif +#ifdef NS_IXULBROWSERWINDOW_IID +NP_DEF_ID(kXULBrowserWindowIID, NS_IXULBROWSERWINDOW_IID); +#endif +#ifdef NS_IXULSORTSERVICE_IID +NP_DEF_ID(kXULSortServiceIID, NS_IXULSORTSERVICE_IID); +#endif +#ifdef NS_IXULTEMPLATEBUILDER_IID +NP_DEF_ID(kXULTemplateBuilderIID, NS_IXULTEMPLATEBUILDER_IID); +#endif +#ifdef NS_IXULWINDOW_IID +NP_DEF_ID(kXULWindowIID, NS_IXULWINDOW_IID); +#endif +#ifdef NS_IZIPREADER_IID +NP_DEF_ID(kZipReaderIID, NS_IZIPREADER_IID); +#endif +#ifdef NS_IJRIPLUGIN_IID +NP_DEF_ID(kJRIPluginIID, NS_IJRIPLUGIN_IID); +#endif +#ifdef NS_IJVMCONSOLE_IID +NP_DEF_ID(kJVMConsoleIID, NS_IJVMCONSOLE_IID); +#endif +#ifdef NS_IJVMMANAGER_IID +NP_DEF_ID(kJVMManagerIID, NS_IJVMMANAGER_IID); +#endif +#ifdef NS_IJVMPLUGIN_IID +NP_DEF_ID(kJVMPluginIID, NS_IJVMPLUGIN_IID); +#endif +#ifdef NS_IJVMPLUGININSTANCE_IID +NP_DEF_ID(kJVMPluginInstanceIID, NS_IJVMPLUGININSTANCE_IID); +#endif +#ifdef NS_IJVMPLUGINTAGINFO_IID +NP_DEF_ID(kJVMPluginTagInfoIID, NS_IJVMPLUGINTAGINFO_IID); +#endif +#ifdef NS_IJVMPREFSWINDOW_IID +NP_DEF_ID(kJVMPrefsWindowIID, NS_IJVMPREFSWINDOW_IID); +#endif +#ifdef NS_IJVMWINDOW_IID +NP_DEF_ID(kJVMWindowIID, NS_IJVMWINDOW_IID); +#endif +#ifdef NS_ILIVECONNECTMANAGER_IID +NP_DEF_ID(kLiveConnectManagerIID, NS_ILIVECONNECTMANAGER_IID); +#endif +#ifdef NS_ISECUREENV_IID +NP_DEF_ID(kSecureEnvIID, NS_ISECUREENV_IID); +#endif +#ifdef NS_ISYMANTECDEBUGGER_IID +NP_DEF_ID(kSymantecDebuggerIID, NS_ISYMANTECDEBUGGER_IID); +#endif +#ifdef NS_ISYMANTECDEBUGMANAGER_IID +NP_DEF_ID(kSymantecDebugManagerIID, NS_ISYMANTECDEBUGMANAGER_IID); +#endif +#ifdef NS_IREADMANAGER_IID +NP_DEF_ID(kreadManagerIID, NS_IREADMANAGER_IID); +#endif +#ifdef NS_JVM_IID +NP_DEF_ID(kjvmIID, NS_JVM_IID); +#endif +#ifdef NS_JVMMANAGER_IID +NP_DEF_ID(kJVMManagerIID, NS_JVMMANAGER_IID); +#endif +#ifdef NS_JVMMANAGER_CID +NP_DEF_ID(kJVMManagerCID, NS_JVMMANAGER_CID); +#endif +#ifdef NS_JVMPLUGINTAGINFO_IID +NP_DEF_ID(kJVMPluginTagInfoIID, NS_JVMPLUGINTAGINFO_IID); +#endif +#ifdef NS_ILIVECONNECT_IID +NP_DEF_ID(kLiveconnectIID, NS_ILIVECONNECT_IID); +#endif +#ifdef NS_ISECURELIVECONNECT_IID +NP_DEF_ID(kSecureLiveconnectIID, NS_ISECURELIVECONNECT_IID); +#endif +#ifdef NS_ISECURITYCONTEXT_IID +NP_DEF_ID(kSecurityContextIID, NS_ISECURITYCONTEXT_IID); +#endif +#ifdef NS_ISHUTDOWNLISTENER_IID +NP_DEF_ID(kShutdownListenerIID, NS_ISHUTDOWNLISTENER_IID); +#endif +#ifdef NS_ISERVICEMANAGER_OBSOLETE_IID +NP_DEF_ID(kServiceManagerObsoleteIID, NS_ISERVICEMANAGER_OBSOLETE_IID); +#endif +#ifdef NS_IJVMTHREADMANAGER_IID +NP_DEF_ID(kJVMThreadManagerIID, NS_IJVMTHREADMANAGER_IID); +#endif +#ifdef FLASH_IOBJECT7_IID +NP_DEF_ID(kFlashIObject7IID, FLASH_IOBJECT7_IID); +#endif +#ifdef FLASH_ISCRIPTABLEPLUGIN7_IID +NP_DEF_ID(kFlashIScriptablePlugin7IID, FLASH_ISCRIPTABLEPLUGIN7_IID); +#endif +#ifdef NS_IFLASH5_IID +NP_DEF_ID(kFlash5IID, NS_IFLASH5_IID); +#endif + + + +#ifdef NP_INCL_LOOKUP +/** + * Lookup list for IIDs and CIDs to get an understandable name. + */ +static struct nsIDNameLookupEntry +{ + const nsID * pID; + const char * pszName; +} aIDNameLookup[] = +{ +#ifdef NS_CDEFAULTURIFIXUP_IID + { &kCDefaultURIFixupIID, "NS_CDEFAULTURIFIXUP_IID" }, +#endif +#ifdef NS_CDOCSHELL_IID + { &kCDocShellIID, "NS_CDOCSHELL_IID" }, +#endif +#ifdef NS_CEXTERNALHANDLERSERVICE_IID + { &kCExternalHandlerServiceIID, "NS_CEXTERNALHANDLERSERVICE_IID" }, +#endif +#ifdef NS_CURILOADER_IID + { &kCURILoaderIID, "NS_CURILOADER_IID" }, +#endif +#ifdef NS_CWEBBROWSER_IID + { &kCWebBrowserIID, "NS_CWEBBROWSER_IID" }, +#endif +#ifdef NS_CWEBBROWSERPERSIST_IID + { &kCWebBrowserPersistIID, "NS_CWEBBROWSERPERSIST_IID" }, +#endif +#ifdef NS_IABADDRESSCOLLECTER_IID + { &kAbAddressCollecterIID, "NS_IABADDRESSCOLLECTER_IID" }, +#endif +#ifdef NS_IABAUTOCOMPLETESESSION_IID + { &kAbAutoCompleteSessionIID, "NS_IABAUTOCOMPLETESESSION_IID" }, +#endif +#ifdef NS_IABBASE_IID + { &kAbBaseIID, "NS_IABBASE_IID" }, +#endif +#ifdef NS_IABBOOLEANEXPRESSION_IID + { &kAbBooleanExpressionIID, "NS_IABBOOLEANEXPRESSION_IID" }, +#endif +#ifdef NS_IABCARD_IID + { &kAbCardIID, "NS_IABCARD_IID" }, +#endif +#ifdef NS_IABDIRECTORY_IID + { &kAbDirectoryIID, "NS_IABDIRECTORY_IID" }, +#endif +#ifdef NS_IABDIRECTORYQUERY_IID + { &kAbDirectoryQueryIID, "NS_IABDIRECTORYQUERY_IID" }, +#endif +#ifdef NS_IABDIRECTORYQUERYPROXY_IID + { &kAbDirectoryQueryProxyIID, "NS_IABDIRECTORYQUERYPROXY_IID" }, +#endif +#ifdef NS_IABDIRECTORYSEARCH_IID + { &kAbDirectorySearchIID, "NS_IABDIRECTORYSEARCH_IID" }, +#endif +#ifdef NS_IABDIRFACTORY_IID + { &kAbDirFactoryIID, "NS_IABDIRFACTORY_IID" }, +#endif +#ifdef NS_IABDIRFACTORYSERVICE_IID + { &kAbDirFactoryServiceIID, "NS_IABDIRFACTORYSERVICE_IID" }, +#endif +#ifdef NS_IABLDAPAUTOCOMPFORMATTER_IID + { &kAbLDAPAutoCompFormatterIID, "NS_IABLDAPAUTOCOMPFORMATTER_IID" }, +#endif +#ifdef NS_IABLDAPREPLICATIONDATA_IID + { &kAbLDAPReplicationDataIID, "NS_IABLDAPREPLICATIONDATA_IID" }, +#endif +#ifdef NS_IABLDAPREPLICATIONQUERY_IID + { &kAbLDAPReplicationQueryIID, "NS_IABLDAPREPLICATIONQUERY_IID" }, +#endif +#ifdef NS_IABLDAPREPLICATIONSERVICE_IID + { &kAbLDAPReplicationServiceIID, "NS_IABLDAPREPLICATIONSERVICE_IID" }, +#endif +#ifdef NS_IABLISTENER_IID + { &kAbListenerIID, "NS_IABLISTENER_IID" }, +#endif +#ifdef NS_IABMDBCARD_IID + { &kAbMDBCardIID, "NS_IABMDBCARD_IID" }, +#endif +#ifdef NS_IABMDBDIRECTORY_IID + { &kAbMDBDirectoryIID, "NS_IABMDBDIRECTORY_IID" }, +#endif +#ifdef NS_IABOUTMODULE_IID + { &kAboutModuleIID, "NS_IABOUTMODULE_IID" }, +#endif +#ifdef NS_IABUPGRADER_IID + { &kAbUpgraderIID, "NS_IABUPGRADER_IID" }, +#endif +#ifdef NS_IABVIEW_IID + { &kAbViewIID, "NS_IABVIEW_IID" }, +#endif +#ifdef NS_IACCESSIBILITYSERVICE_IID + { &kAccessibilityServiceIID, "NS_IACCESSIBILITYSERVICE_IID" }, +#endif +#ifdef NS_IACCESSIBLE_IID + { &kAccessibleIID, "NS_IACCESSIBLE_IID" }, +#endif +#ifdef NS_IACCESSIBLEACTION_IID + { &kAccessibleActionIID, "NS_IACCESSIBLEACTION_IID" }, +#endif +#ifdef NS_IACCESSIBLECARET_IID + { &kAccessibleCaretIID, "NS_IACCESSIBLECARET_IID" }, +#endif +#ifdef NS_IACCESSIBLEDOCUMENT_IID + { &kAccessibleDocumentIID, "NS_IACCESSIBLEDOCUMENT_IID" }, +#endif +#ifdef NS_IACCESSIBLEEDITABLETEXT_IID + { &kAccessibleEditableTextIID, "NS_IACCESSIBLEEDITABLETEXT_IID" }, +#endif +#ifdef NS_IACCESSIBLEEVENTLISTENER_IID + { &kAccessibleEventListenerIID, "NS_IACCESSIBLEEVENTLISTENER_IID" }, +#endif +#ifdef NS_IACCESSIBLEEVENTRECEIVER_IID + { &kAccessibleEventReceiverIID, "NS_IACCESSIBLEEVENTRECEIVER_IID" }, +#endif +#ifdef NS_IACCESSIBLEHYPERLINK_IID + { &kAccessibleHyperLinkIID, "NS_IACCESSIBLEHYPERLINK_IID" }, +#endif +#ifdef NS_IACCESSIBLEHYPERTEXT_IID + { &kAccessibleHyperTextIID, "NS_IACCESSIBLEHYPERTEXT_IID" }, +#endif +#ifdef NS_IACCESSIBLEPROVIDER_IID + { &kAccessibleProviderIID, "NS_IACCESSIBLEPROVIDER_IID" }, +#endif +#ifdef NS_IACCESSIBLESELECTABLE_IID + { &kAccessibleSelectableIID, "NS_IACCESSIBLESELECTABLE_IID" }, +#endif +#ifdef NS_IACCESSIBLETABLE_IID + { &kAccessibleTableIID, "NS_IACCESSIBLETABLE_IID" }, +#endif +#ifdef NS_IACCESSIBLETEXT_IID + { &kAccessibleTextIID, "NS_IACCESSIBLETEXT_IID" }, +#endif +#ifdef NS_IACCESSIBLEVALUE_IID + { &kAccessibleValueIID, "NS_IACCESSIBLEVALUE_IID" }, +#endif +#ifdef NS_IACCESSIBLEWIN32OBJECT_IID + { &kAccessibleWin32ObjectIID, "NS_IACCESSIBLEWIN32OBJECT_IID" }, +#endif +#ifdef NS_IADDBOOKURL_IID + { &kAddbookUrlIID, "NS_IADDBOOKURL_IID" }, +#endif +#ifdef NS_IADDRBOOKSESSION_IID + { &kAddrBookSessionIID, "NS_IADDRBOOKSESSION_IID" }, +#endif +#ifdef NS_IADDRDATABASE_IID + { &kAddrDatabaseIID, "NS_IADDRDATABASE_IID" }, +#endif +#ifdef NS_IADDRDBANNOUNCER_IID + { &kAddrDBAnnouncerIID, "NS_IADDRDBANNOUNCER_IID" }, +#endif +#ifdef NS_IADDRDBLISTENER_IID + { &kAddrDBListenerIID, "NS_IADDRDBLISTENER_IID" }, +#endif +#ifdef NS_IADDRESSBOOK_IID + { &kAddressBookIID, "NS_IADDRESSBOOK_IID" }, +#endif +#ifdef NS_IAGGREGATEPRINCIPAL_IID + { &kAggregatePrincipalIID, "NS_IAGGREGATEPRINCIPAL_IID" }, +#endif +#ifdef NS_IAPPSHELL_IID + { &kAppShellIID, "NS_IAPPSHELL_IID" }, +#endif +#ifdef NS_IAPPSHELLSERVICE_IID + { &kAppShellServiceIID, "NS_IAPPSHELLSERVICE_IID" }, +#endif +#ifdef NS_IARRAY_IID + { &kArrayIID, "NS_IARRAY_IID" }, +#endif +#ifdef NS_IASN1OBJECT_IID + { &kASN1ObjectIID, "NS_IASN1OBJECT_IID" }, +#endif +#ifdef NS_IASN1PRINTABLEITEM_IID + { &kASN1PrintableItemIID, "NS_IASN1PRINTABLEITEM_IID" }, +#endif +#ifdef NS_IASN1SEQUENCE_IID + { &kASN1SequenceIID, "NS_IASN1SEQUENCE_IID" }, +#endif +#ifdef NS_IASN1TREE_IID + { &kASN1TreeIID, "NS_IASN1TREE_IID" }, +#endif +#ifdef NS_IASYNCINPUTSTREAM_IID + { &kAsyncInputStreamIID, "NS_IASYNCINPUTSTREAM_IID" }, +#endif +#ifdef NS_IASYNCOUTPUTSTREAM_IID + { &kAsyncOutputStreamIID, "NS_IASYNCOUTPUTSTREAM_IID" }, +#endif +#ifdef NS_IASYNCSTREAMCOPIER_IID + { &kAsyncStreamCopierIID, "NS_IASYNCSTREAMCOPIER_IID" }, +#endif +#ifdef NS_IATOM_IID + { &kAtomIID, "NS_IATOM_IID" }, +#endif +#ifdef NS_IATOMSERVICE_IID + { &kAtomServiceIID, "NS_IATOMSERVICE_IID" }, +#endif +#ifdef NS_IAUTHPROMPT_IID + { &kAuthPromptIID, "NS_IAUTHPROMPT_IID" }, +#endif +#ifdef NS_IAUTHPROMPTWRAPPER_IID + { &kAuthPromptWrapperIID, "NS_IAUTHPROMPTWRAPPER_IID" }, +#endif +#ifdef NS_IAUTOCOMPLETELISTENER_IID + { &kAutoCompleteListenerIID, "NS_IAUTOCOMPLETELISTENER_IID" }, +#endif +#ifdef NS_IAUTOCOMPLETERESULTS_IID + { &kAutoCompleteResultsIID, "NS_IAUTOCOMPLETERESULTS_IID" }, +#endif +#ifdef NS_IAUTOCOMPLETESESSION_IID + { &kAutoCompleteSessionIID, "NS_IAUTOCOMPLETESESSION_IID" }, +#endif +#ifdef NS_IAUTOCONFIG_IID + { &kAutoConfigIID, "NS_IAUTOCONFIG_IID" }, +#endif +#ifdef NS_IBADCERTLISTENER_IID + { &kBadCertListenerIID, "NS_IBADCERTLISTENER_IID" }, +#endif +#ifdef NS_IBASEWINDOW_IID + { &kBaseWindowIID, "NS_IBASEWINDOW_IID" }, +#endif +#ifdef NS_IBIDIKEYBOARD_IID + { &kBidiKeyboardIID, "NS_IBIDIKEYBOARD_IID" }, +#endif +#ifdef NS_IBINARYINPUTSTREAM_IID + { &kBinaryInputStreamIID, "NS_IBINARYINPUTSTREAM_IID" }, +#endif +#ifdef NS_IBINARYOUTPUTSTREAM_IID + { &kBinaryOutputStreamIID, "NS_IBINARYOUTPUTSTREAM_IID" }, +#endif +#ifdef NS_IBOOKMARKSSERVICE_IID + { &kBookmarksServiceIID, "NS_IBOOKMARKSSERVICE_IID" }, +#endif +#ifdef NS_IBOXLAYOUTMANAGER_IID + { &kBoxLayoutManagerIID, "NS_IBOXLAYOUTMANAGER_IID" }, +#endif +#ifdef NS_IBOXOBJECT_IID + { &kBoxObjectIID, "NS_IBOXOBJECT_IID" }, +#endif +#ifdef NS_IBOXPAINTMANAGER_IID + { &kBoxPaintManagerIID, "NS_IBOXPAINTMANAGER_IID" }, +#endif +#ifdef NS_IBROWSERBOXOBJECT_IID + { &kBrowserBoxObjectIID, "NS_IBROWSERBOXOBJECT_IID" }, +#endif +#ifdef NS_IBROWSERHISTORY_IID + { &kBrowserHistoryIID, "NS_IBROWSERHISTORY_IID" }, +#endif +#ifdef NS_IBROWSERINSTANCE_IID + { &kBrowserInstanceIID, "NS_IBROWSERINSTANCE_IID" }, +#endif +#ifdef NS_IBUFENTROPYCOLLECTOR_IID + { &kBufEntropyCollectorIID, "NS_IBUFENTROPYCOLLECTOR_IID" }, +#endif +#ifdef NS_IBUFFEREDSTREAMS_IID + { &kBufferedStreamsIID, "NS_IBUFFEREDSTREAMS_IID" }, +#endif +#ifdef NS_IBYTEARRAYINPUTSTREAM_IID + { &kByteArrayInputStreamIID, "NS_IBYTEARRAYINPUTSTREAM_IID" }, +#endif +#ifdef NS_IBYTERANGEREQUEST_IID + { &kByteRangeRequestIID, "NS_IBYTERANGEREQUEST_IID" }, +#endif +#ifdef NS_ICACHE_IID + { &kCacheIID, "NS_ICACHE_IID" }, +#endif +#ifdef NS_ICACHEENTRYDESCRIPTOR_IID + { &kCacheEntryDescriptorIID, "NS_ICACHEENTRYDESCRIPTOR_IID" }, +#endif +#ifdef NS_ICACHELISTENER_IID + { &kCacheListenerIID, "NS_ICACHELISTENER_IID" }, +#endif +#ifdef NS_ICACHESERVICE_IID + { &kCacheServiceIID, "NS_ICACHESERVICE_IID" }, +#endif +#ifdef NS_ICACHESESSION_IID + { &kCacheSessionIID, "NS_ICACHESESSION_IID" }, +#endif +#ifdef NS_ICACHEVISITOR_IID + { &kCacheVisitorIID, "NS_ICACHEVISITOR_IID" }, +#endif +#ifdef NS_ICACHINGCHANNEL_IID + { &kCachingChannelIID, "NS_ICACHINGCHANNEL_IID" }, +#endif +#ifdef NS_ICATEGORYMANAGER_IID + { &kCategoryManagerIID, "NS_ICATEGORYMANAGER_IID" }, +#endif +#ifdef NS_ICERTIFICATEDIALOGS_IID + { &kCertificateDialogsIID, "NS_ICERTIFICATEDIALOGS_IID" }, +#endif +#ifdef NS_ICERTIFICATEPRINCIPAL_IID + { &kCertificatePrincipalIID, "NS_ICERTIFICATEPRINCIPAL_IID" }, +#endif +#ifdef NS_ICERTPICKDIALOGS_IID + { &kCertPickDialogsIID, "NS_ICERTPICKDIALOGS_IID" }, +#endif +#ifdef NS_ICERTSELECT_IID + { &kCertSelectIID, "NS_ICERTSELECT_IID" }, +#endif +#ifdef NS_ICERTTREE_IID + { &kCertTreeIID, "NS_ICERTTREE_IID" }, +#endif +#ifdef NS_ICHANNEL_IID + { &kChannelIID, "NS_ICHANNEL_IID" }, +#endif +#ifdef NS_ICHARSETCONVERTERMANAGER2_IID + { &kCharsetConverterManager2IID, "NS_ICHARSETCONVERTERMANAGER2_IID" }, +#endif +#ifdef NS_ICHROMEEVENTHANDLER_IID + { &kChromeEventHandlerIID, "NS_ICHROMEEVENTHANDLER_IID" }, +#endif +#ifdef NS_ICHROMEREGISTRY_IID + { &kChromeRegistryIID, "NS_ICHROMEREGISTRY_IID" }, +#endif +#ifdef NS_ICIPHERINFO_IID + { &kCipherInfoIID, "NS_ICIPHERINFO_IID" }, +#endif +#ifdef NS_ICITER_IID + { &kCiterIID, "NS_ICITER_IID" }, +#endif +#ifdef NS_ICLASSICPLUGINFACTORY_IID + { &kClassicPluginFactoryIID, "NS_ICLASSICPLUGINFACTORY_IID" }, +#endif +#ifdef NS_ICLASSINFO_IID + { &kClassInfoIID, "NS_ICLASSINFO_IID" }, +#endif +#ifdef NS_ICLIENTAUTHDIALOGS_IID + { &kClientAuthDialogsIID, "NS_ICLIENTAUTHDIALOGS_IID" }, +#endif +#ifdef NS_ICLIPBOARD_IID + { &kClipboardIID, "NS_ICLIPBOARD_IID" }, +#endif +#ifdef NS_ICLIPBOARDCOMMANDS_IID + { &kClipboardCommandsIID, "NS_ICLIPBOARDCOMMANDS_IID" }, +#endif +#ifdef NS_ICLIPBOARDHELPER_IID + { &kClipboardHelperIID, "NS_ICLIPBOARDHELPER_IID" }, +#endif +#ifdef NS_ICLIPBOARDOWNER_IID + { &kClipboardOwnerIID, "NS_ICLIPBOARDOWNER_IID" }, +#endif +#ifdef NS_ICLOSEALLWINDOWS_IID + { &kCloseAllWindowsIID, "NS_ICLOSEALLWINDOWS_IID" }, +#endif +#ifdef NS_ICMDLINEHANDLER_IID + { &kCmdLineHandlerIID, "NS_ICMDLINEHANDLER_IID" }, +#endif +#ifdef NS_ICMDLINESERVICE_IID + { &kCmdLineServiceIID, "NS_ICMDLINESERVICE_IID" }, +#endif +#ifdef NS_ICMSDECODER_IID + { &kCMSDecoderIID, "NS_ICMSDECODER_IID" }, +#endif +#ifdef NS_ICMSENCODER_IID + { &kCMSEncoderIID, "NS_ICMSENCODER_IID" }, +#endif +#ifdef NS_ICMSMESSAGE_IID + { &kCMSMessageIID, "NS_ICMSMESSAGE_IID" }, +#endif +#ifdef NS_ICMSMESSAGEERRORS_IID + { &kCMSMessageErrorsIID, "NS_ICMSMESSAGEERRORS_IID" }, +#endif +#ifdef NS_ICMSSECUREMESSAGE_IID + { &kCMSSecureMessageIID, "NS_ICMSSECUREMESSAGE_IID" }, +#endif +#ifdef NS_ICODEBASEPRINCIPAL_IID + { &kCodebasePrincipalIID, "NS_ICODEBASEPRINCIPAL_IID" }, +#endif +#ifdef NS_ICOLLECTION_IID + { &kCollectionIID, "NS_ICOLLECTION_IID" }, +#endif +#ifdef NS_ICOMM4XPROFILE_IID + { &kComm4xProfileIID, "NS_ICOMM4XPROFILE_IID" }, +#endif +#ifdef NS_ICOMMANDHANDLER_IID + { &kCommandHandlerIID, "NS_ICOMMANDHANDLER_IID" }, +#endif +#ifdef NS_ICOMMANDMANAGER_IID + { &kCommandManagerIID, "NS_ICOMMANDMANAGER_IID" }, +#endif +#ifdef NS_ICOMMANDPARAMS_IID + { &kCommandParamsIID, "NS_ICOMMANDPARAMS_IID" }, +#endif +#ifdef NS_ICOMPONENTLOADER_IID + { &kComponentLoaderIID, "NS_ICOMPONENTLOADER_IID" }, +#endif +#ifdef NS_ICOMPONENTLOADERMANAGER_IID + { &kComponentLoaderManagerIID, "NS_ICOMPONENTLOADERMANAGER_IID" }, +#endif +#ifdef NS_ICOMPONENTMANAGER_IID + { &kComponentManagerIID, "NS_ICOMPONENTMANAGER_IID" }, +#endif +#ifdef NS_ICOMPONENTMANAGEROBSOLETE_IID + { &kComponentManagerObsoleteIID, "NS_ICOMPONENTMANAGEROBSOLETE_IID" }, +#endif +#ifdef NS_ICOMPONENTREGISTRAR_IID + { &kComponentRegistrarIID, "NS_ICOMPONENTREGISTRAR_IID" }, +#endif +#ifdef NS_ICONSOLELISTENER_IID + { &kConsoleListenerIID, "NS_ICONSOLELISTENER_IID" }, +#endif +#ifdef NS_ICONSOLEMESSAGE_IID + { &kConsoleMessageIID, "NS_ICONSOLEMESSAGE_IID" }, +#endif +#ifdef NS_ICONSOLESERVICE_IID + { &kConsoleServiceIID, "NS_ICONSOLESERVICE_IID" }, +#endif +#ifdef NS_ICONTENTHANDLER_IID + { &kContentHandlerIID, "NS_ICONTENTHANDLER_IID" }, +#endif +#ifdef NS_ICONTENTPOLICY_IID + { &kContentPolicyIID, "NS_ICONTENTPOLICY_IID" }, +#endif +#ifdef NS_ICONTENTVIEWER_IID + { &kContentViewerIID, "NS_ICONTENTVIEWER_IID" }, +#endif +#ifdef NS_ICONTENTVIEWERCONTAINER_IID + { &kContentViewerContainerIID, "NS_ICONTENTVIEWERCONTAINER_IID" }, +#endif +#ifdef NS_ICONTENTVIEWEREDIT_IID + { &kContentViewerEditIID, "NS_ICONTENTVIEWEREDIT_IID" }, +#endif +#ifdef NS_ICONTENTVIEWERFILE_IID + { &kContentViewerFileIID, "NS_ICONTENTVIEWERFILE_IID" }, +#endif +#ifdef NS_ICONTEXTMENULISTENER_IID + { &kContextMenuListenerIID, "NS_ICONTEXTMENULISTENER_IID" }, +#endif +#ifdef NS_ICONTEXTMENULISTENER2_IID + { &kContextMenuListener2IID, "NS_ICONTEXTMENULISTENER2_IID" }, +#endif +#ifdef NS_ICONTROLLER_IID + { &kControllerIID, "NS_ICONTROLLER_IID" }, +#endif +#ifdef NS_ICONTROLLERCOMMAND_IID + { &kControllerCommandIID, "NS_ICONTROLLERCOMMAND_IID" }, +#endif +#ifdef NS_ICONTROLLERCOMMANDMANAGER_IID + { &kControllerCommandManagerIID, "NS_ICONTROLLERCOMMANDMANAGER_IID" }, +#endif +#ifdef NS_ICONTROLLERCONTEXT_IID + { &kControllerContextIID, "NS_ICONTROLLERCONTEXT_IID" }, +#endif +#ifdef NS_ICONTROLLERS_IID + { &kControllersIID, "NS_ICONTROLLERS_IID" }, +#endif +#ifdef NS_ICOOKIE_IID + { &kCookieIID, "NS_ICOOKIE_IID" }, +#endif +#ifdef NS_ICOOKIEACCEPTDIALOG_IID + { &kCookieAcceptDialogIID, "NS_ICOOKIEACCEPTDIALOG_IID" }, +#endif +#ifdef NS_ICOOKIECONSENT_IID + { &kCookieConsentIID, "NS_ICOOKIECONSENT_IID" }, +#endif +#ifdef NS_ICOOKIEMANAGER_IID + { &kCookieManagerIID, "NS_ICOOKIEMANAGER_IID" }, +#endif +#ifdef NS_ICOOKIEMANAGER2_IID + { &kCookieManager2IID, "NS_ICOOKIEMANAGER2_IID" }, +#endif +#ifdef NS_ICOOKIEPROMPTSERVICE_IID + { &kCookiePromptServiceIID, "NS_ICOOKIEPROMPTSERVICE_IID" }, +#endif +#ifdef NS_ICOOKIESERVICE_IID + { &kCookieServiceIID, "NS_ICOOKIESERVICE_IID" }, +#endif +#ifdef NS_ICOOKIESTORAGE_IID + { &kCookieStorageIID, "NS_ICOOKIESTORAGE_IID" }, +#endif +#ifdef NS_ICOPYMESSAGELISTENER_IID + { &kCopyMessageListenerIID, "NS_ICOPYMESSAGELISTENER_IID" }, +#endif +#ifdef NS_ICOPYMSGSTREAMLISTENER_IID + { &kCopyMsgStreamListenerIID, "NS_ICOPYMSGSTREAMLISTENER_IID" }, +#endif +#ifdef NS_ICRLINFO_IID + { &kCRLInfoIID, "NS_ICRLINFO_IID" }, +#endif +#ifdef NS_ICRLMANAGER_IID + { &kCRLManagerIID, "NS_ICRLMANAGER_IID" }, +#endif +#ifdef NS_ICURRENTCHARSETLISTENER_IID + { &kCurrentCharsetListenerIID, "NS_ICURRENTCHARSETLISTENER_IID" }, +#endif +#ifdef NS_IDATACHANNEL_IID + { &kDataChannelIID, "NS_IDATACHANNEL_IID" }, +#endif +#ifdef NS_IDBCHANGEANNOUNCER_IID + { &kDBChangeAnnouncerIID, "NS_IDBCHANGEANNOUNCER_IID" }, +#endif +#ifdef NS_IDBCHANGELISTENER_IID + { &kDBChangeListenerIID, "NS_IDBCHANGELISTENER_IID" }, +#endif +#ifdef NS_IDBFOLDERINFO_IID + { &kDBFolderInfoIID, "NS_IDBFOLDERINFO_IID" }, +#endif +#ifdef NS_IDIALOGPARAMBLOCK_IID + { &kDialogParamBlockIID, "NS_IDIALOGPARAMBLOCK_IID" }, +#endif +#ifdef NS_IDICTIONARY_IID + { &kDictionaryIID, "NS_IDICTIONARY_IID" }, +#endif +#ifdef NS_IDIRECTORYLISTING_IID + { &kDirectoryListingIID, "NS_IDIRECTORYLISTING_IID" }, +#endif +#ifdef NS_IDIRECTORYSERVICE_IID + { &kDirectoryServiceIID, "NS_IDIRECTORYSERVICE_IID" }, +#endif +#ifdef NS_IDIRINDEX_IID + { &kDirIndexIID, "NS_IDIRINDEX_IID" }, +#endif +#ifdef NS_IDIRINDEXLISTENER_IID + { &kDirIndexListenerIID, "NS_IDIRINDEXLISTENER_IID" }, +#endif +#ifdef NS_IDNSLISTENER_IID + { &kDNSListenerIID, "NS_IDNSLISTENER_IID" }, +#endif +#ifdef NS_IDNSSERVICE_IID + { &kDNSServiceIID, "NS_IDNSSERVICE_IID" }, +#endif +#ifdef NS_IDOCCHARSET_IID + { &kDocCharsetIID, "NS_IDOCCHARSET_IID" }, +#endif +#ifdef NS_IDOCSHELL_IID + { &kDocShellIID, "NS_IDOCSHELL_IID" }, +#endif +#ifdef NS_IDOCSHELLHISTORY_IID + { &kDocShellHistoryIID, "NS_IDOCSHELLHISTORY_IID" }, +#endif +#ifdef NS_IDOCSHELLLOADINFO_IID + { &kDocShellLoadInfoIID, "NS_IDOCSHELLLOADINFO_IID" }, +#endif +#ifdef NS_IDOCSHELLTREEITEM_IID + { &kDocShellTreeItemIID, "NS_IDOCSHELLTREEITEM_IID" }, +#endif +#ifdef NS_IDOCSHELLTREENODE_IID + { &kDocShellTreeNodeIID, "NS_IDOCSHELLTREENODE_IID" }, +#endif +#ifdef NS_IDOCSHELLTREEOWNER_IID + { &kDocShellTreeOwnerIID, "NS_IDOCSHELLTREEOWNER_IID" }, +#endif +#ifdef NS_IDOCUMENTCHARSETINFO_IID + { &kDocumentCharsetInfoIID, "NS_IDOCUMENTCHARSETINFO_IID" }, +#endif +#ifdef NS_IDOCUMENTLOADER_IID + { &kDocumentLoaderIID, "NS_IDOCUMENTLOADER_IID" }, +#endif +#ifdef NS_IDOCUMENTLOADERFACTORY_IID + { &kDocumentLoaderFactoryIID, "NS_IDOCUMENTLOADERFACTORY_IID" }, +#endif +#ifdef NS_IDOCUMENTSTATELISTENER_IID + { &kDocumentStateListenerIID, "NS_IDOCUMENTSTATELISTENER_IID" }, +#endif +#ifdef NS_IDOM3DOCUMENTEVENT_IID + { &kDOM3DocumentEventIID, "NS_IDOM3DOCUMENTEVENT_IID" }, +#endif +#ifdef NS_IDOM3EVENTTARGET_IID + { &kDOM3EventTargetIID, "NS_IDOM3EVENTTARGET_IID" }, +#endif +#ifdef NS_IDOM3NODE_IID + { &kDOM3NodeIID, "NS_IDOM3NODE_IID" }, +#endif +#ifdef NS_IDOMABSTRACTVIEW_IID + { &kDOMAbstractViewIID, "NS_IDOMABSTRACTVIEW_IID" }, +#endif +#ifdef NS_IDOMATTR_IID + { &kDOMAttrIID, "NS_IDOMATTR_IID" }, +#endif +#ifdef NS_IDOMBARPROP_IID + { &kDOMBarPropIID, "NS_IDOMBARPROP_IID" }, +#endif +#ifdef NS_IDOMCDATASECTION_IID + { &kDOMCDATASectionIID, "NS_IDOMCDATASECTION_IID" }, +#endif +#ifdef NS_IDOMCHARACTERDATA_IID + { &kDOMCharacterDataIID, "NS_IDOMCHARACTERDATA_IID" }, +#endif +#ifdef NS_IDOMCHROMEWINDOW_IID + { &kDOMChromeWindowIID, "NS_IDOMCHROMEWINDOW_IID" }, +#endif +#ifdef NS_IDOMCOMMENT_IID + { &kDOMCommentIID, "NS_IDOMCOMMENT_IID" }, +#endif +#ifdef NS_IDOMCOUNTER_IID + { &kDOMCounterIID, "NS_IDOMCOUNTER_IID" }, +#endif +#ifdef NS_IDOMCRMFOBJECT_IID + { &kDOMCRMFObjectIID, "NS_IDOMCRMFOBJECT_IID" }, +#endif +#ifdef NS_IDOMCRYPTO_IID + { &kDOMCryptoIID, "NS_IDOMCRYPTO_IID" }, +#endif +#ifdef NS_IDOMCRYPTODIALOGS_IID + { &kDOMCryptoDialogsIID, "NS_IDOMCRYPTODIALOGS_IID" }, +#endif +#ifdef NS_IDOMCSS2PROPERTIES_IID + { &kDOMCSS2PropertiesIID, "NS_IDOMCSS2PROPERTIES_IID" }, +#endif +#ifdef NS_IDOMCSSCHARSETRULE_IID + { &kDOMCSSCharsetRuleIID, "NS_IDOMCSSCHARSETRULE_IID" }, +#endif +#ifdef NS_IDOMCSSFONTFACERULE_IID + { &kDOMCSSFontFaceRuleIID, "NS_IDOMCSSFONTFACERULE_IID" }, +#endif +#ifdef NS_IDOMCSSIMPORTRULE_IID + { &kDOMCSSImportRuleIID, "NS_IDOMCSSIMPORTRULE_IID" }, +#endif +#ifdef NS_IDOMCSSMEDIARULE_IID + { &kDOMCSSMediaRuleIID, "NS_IDOMCSSMEDIARULE_IID" }, +#endif +#ifdef NS_IDOMCSSPAGERULE_IID + { &kDOMCSSPageRuleIID, "NS_IDOMCSSPAGERULE_IID" }, +#endif +#ifdef NS_IDOMCSSPRIMITIVEVALUE_IID + { &kDOMCSSPrimitiveValueIID, "NS_IDOMCSSPRIMITIVEVALUE_IID" }, +#endif +#ifdef NS_IDOMCSSRULE_IID + { &kDOMCSSRuleIID, "NS_IDOMCSSRULE_IID" }, +#endif +#ifdef NS_IDOMCSSRULELIST_IID + { &kDOMCSSRuleListIID, "NS_IDOMCSSRULELIST_IID" }, +#endif +#ifdef NS_IDOMCSSSTYLEDECLARATION_IID + { &kDOMCSSStyleDeclarationIID, "NS_IDOMCSSSTYLEDECLARATION_IID" }, +#endif +#ifdef NS_IDOMCSSSTYLERULE_IID + { &kDOMCSSStyleRuleIID, "NS_IDOMCSSSTYLERULE_IID" }, +#endif +#ifdef NS_IDOMCSSSTYLESHEET_IID + { &kDOMCSSStyleSheetIID, "NS_IDOMCSSSTYLESHEET_IID" }, +#endif +#ifdef NS_IDOMCSSUNKNOWNRULE_IID + { &kDOMCSSUnknownRuleIID, "NS_IDOMCSSUNKNOWNRULE_IID" }, +#endif +#ifdef NS_IDOMCSSVALUE_IID + { &kDOMCSSValueIID, "NS_IDOMCSSVALUE_IID" }, +#endif +#ifdef NS_IDOMCSSVALUELIST_IID + { &kDOMCSSValueListIID, "NS_IDOMCSSVALUELIST_IID" }, +#endif +#ifdef NS_IDOMCUSTOMEVENT_IID + { &kDOMCustomEventIID, "NS_IDOMCUSTOMEVENT_IID" }, +#endif +#ifdef NS_IDOMDOCUMENT_IID + { &kDOMDocumentIID, "NS_IDOMDOCUMENT_IID" }, +#endif +#ifdef NS_IDOMDOCUMENTCSS_IID + { &kDOMDocumentCSSIID, "NS_IDOMDOCUMENTCSS_IID" }, +#endif +#ifdef NS_IDOMDOCUMENTEVENT_IID + { &kDOMDocumentEventIID, "NS_IDOMDOCUMENTEVENT_IID" }, +#endif +#ifdef NS_IDOMDOCUMENTFRAGMENT_IID + { &kDOMDocumentFragmentIID, "NS_IDOMDOCUMENTFRAGMENT_IID" }, +#endif +#ifdef NS_IDOMDOCUMENTRANGE_IID + { &kDOMDocumentRangeIID, "NS_IDOMDOCUMENTRANGE_IID" }, +#endif +#ifdef NS_IDOMDOCUMENTSTYLE_IID + { &kDOMDocumentStyleIID, "NS_IDOMDOCUMENTSTYLE_IID" }, +#endif +#ifdef NS_IDOMDOCUMENTTRAVERSAL_IID + { &kDOMDocumentTraversalIID, "NS_IDOMDOCUMENTTRAVERSAL_IID" }, +#endif +#ifdef NS_IDOMDOCUMENTTYPE_IID + { &kDOMDocumentTypeIID, "NS_IDOMDOCUMENTTYPE_IID" }, +#endif +#ifdef NS_IDOMDOCUMENTVIEW_IID + { &kDOMDocumentViewIID, "NS_IDOMDOCUMENTVIEW_IID" }, +#endif +#ifdef NS_IDOMDOCUMENTXBL_IID + { &kDOMDocumentXBLIID, "NS_IDOMDOCUMENTXBL_IID" }, +#endif +#ifdef NS_IDOMDOMEXCEPTION_IID + { &kDOMDOMExceptionIID, "NS_IDOMDOMEXCEPTION_IID" }, +#endif +#ifdef NS_IDOMDOMIMPLEMENTATION_IID + { &kDOMDOMImplementationIID, "NS_IDOMDOMIMPLEMENTATION_IID" }, +#endif +#ifdef NS_IDOMELEMENT_IID + { &kDOMElementIID, "NS_IDOMELEMENT_IID" }, +#endif +#ifdef NS_IDOMELEMENTCSSINLINESTYLE_IID + { &kDOMElementCSSInlineStyleIID, "NS_IDOMELEMENTCSSINLINESTYLE_IID" }, +#endif +#ifdef NS_IDOMENTITY_IID + { &kDOMEntityIID, "NS_IDOMENTITY_IID" }, +#endif +#ifdef NS_IDOMENTITYREFERENCE_IID + { &kDOMEntityReferenceIID, "NS_IDOMENTITYREFERENCE_IID" }, +#endif +#ifdef NS_IDOMEVENT_IID + { &kDOMEventIID, "NS_IDOMEVENT_IID" }, +#endif +#ifdef NS_IDOMEVENTGROUP_IID + { &kDOMEventGroupIID, "NS_IDOMEVENTGROUP_IID" }, +#endif +#ifdef NS_IDOMEVENTLISTENER_IID + { &kDOMEventListenerIID, "NS_IDOMEVENTLISTENER_IID" }, +#endif +#ifdef NS_IDOMEVENTTARGET_IID + { &kDOMEventTargetIID, "NS_IDOMEVENTTARGET_IID" }, +#endif +#ifdef NS_IDOMHISTORY_IID + { &kDOMHistoryIID, "NS_IDOMHISTORY_IID" }, +#endif +#ifdef NS_IDOMHTMLANCHORELEMENT_IID + { &kDOMHTMLAnchorElementIID, "NS_IDOMHTMLANCHORELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLAPPLETELEMENT_IID + { &kDOMHTMLAppletElementIID, "NS_IDOMHTMLAPPLETELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLAREAELEMENT_IID + { &kDOMHTMLAreaElementIID, "NS_IDOMHTMLAREAELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLBASEELEMENT_IID + { &kDOMHTMLBaseElementIID, "NS_IDOMHTMLBASEELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLBASEFONTELEMENT_IID + { &kDOMHTMLBaseFontElementIID, "NS_IDOMHTMLBASEFONTELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLBODYELEMENT_IID + { &kDOMHTMLBodyElementIID, "NS_IDOMHTMLBODYELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLBRELEMENT_IID + { &kDOMHTMLBRElementIID, "NS_IDOMHTMLBRELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLBUTTONELEMENT_IID + { &kDOMHTMLButtonElementIID, "NS_IDOMHTMLBUTTONELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLCOLLECTION_IID + { &kDOMHTMLCollectionIID, "NS_IDOMHTMLCOLLECTION_IID" }, +#endif +#ifdef NS_IDOMHTMLDIRECTORYELEMENT_IID + { &kDOMHTMLDirectoryElementIID, "NS_IDOMHTMLDIRECTORYELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLDIVELEMENT_IID + { &kDOMHTMLDivElementIID, "NS_IDOMHTMLDIVELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLDLISTELEMENT_IID + { &kDOMHTMLDListElementIID, "NS_IDOMHTMLDLISTELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLDOCUMENT_IID + { &kDOMHTMLDocumentIID, "NS_IDOMHTMLDOCUMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLELEMENT_IID + { &kDOMHTMLElementIID, "NS_IDOMHTMLELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLEMBEDELEMENT_IID + { &kDOMHTMLEmbedElementIID, "NS_IDOMHTMLEMBEDELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLFIELDSETELEMENT_IID + { &kDOMHTMLFieldSetElementIID, "NS_IDOMHTMLFIELDSETELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLFONTELEMENT_IID + { &kDOMHTMLFontElementIID, "NS_IDOMHTMLFONTELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLFORMELEMENT_IID + { &kDOMHTMLFormElementIID, "NS_IDOMHTMLFORMELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLFRAMEELEMENT_IID + { &kDOMHTMLFrameElementIID, "NS_IDOMHTMLFRAMEELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLFRAMESETELEMENT_IID + { &kDOMHTMLFrameSetElementIID, "NS_IDOMHTMLFRAMESETELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLHEADELEMENT_IID + { &kDOMHTMLHeadElementIID, "NS_IDOMHTMLHEADELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLHEADINGELEMENT_IID + { &kDOMHTMLHeadingElementIID, "NS_IDOMHTMLHEADINGELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLHRELEMENT_IID + { &kDOMHTMLHRElementIID, "NS_IDOMHTMLHRELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLHTMLELEMENT_IID + { &kDOMHTMLHtmlElementIID, "NS_IDOMHTMLHTMLELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLIFRAMEELEMENT_IID + { &kDOMHTMLIFrameElementIID, "NS_IDOMHTMLIFRAMEELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLIMAGEELEMENT_IID + { &kDOMHTMLImageElementIID, "NS_IDOMHTMLIMAGEELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLINPUTELEMENT_IID + { &kDOMHTMLInputElementIID, "NS_IDOMHTMLINPUTELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLISINDEXELEMENT_IID + { &kDOMHTMLIsIndexElementIID, "NS_IDOMHTMLISINDEXELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLLABELELEMENT_IID + { &kDOMHTMLLabelElementIID, "NS_IDOMHTMLLABELELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLLEGENDELEMENT_IID + { &kDOMHTMLLegendElementIID, "NS_IDOMHTMLLEGENDELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLLIELEMENT_IID + { &kDOMHTMLLIElementIID, "NS_IDOMHTMLLIELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLLINKELEMENT_IID + { &kDOMHTMLLinkElementIID, "NS_IDOMHTMLLINKELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLMAPELEMENT_IID + { &kDOMHTMLMapElementIID, "NS_IDOMHTMLMAPELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLMENUELEMENT_IID + { &kDOMHTMLMenuElementIID, "NS_IDOMHTMLMENUELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLMETAELEMENT_IID + { &kDOMHTMLMetaElementIID, "NS_IDOMHTMLMETAELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLMODELEMENT_IID + { &kDOMHTMLModElementIID, "NS_IDOMHTMLMODELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLOBJECTELEMENT_IID + { &kDOMHTMLObjectElementIID, "NS_IDOMHTMLOBJECTELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLOLISTELEMENT_IID + { &kDOMHTMLOListElementIID, "NS_IDOMHTMLOLISTELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLOPTGROUPELEMENT_IID + { &kDOMHTMLOptGroupElementIID, "NS_IDOMHTMLOPTGROUPELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLOPTIONELEMENT_IID + { &kDOMHTMLOptionElementIID, "NS_IDOMHTMLOPTIONELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLPARAGRAPHELEMENT_IID + { &kDOMHTMLParagraphElementIID, "NS_IDOMHTMLPARAGRAPHELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLPARAMELEMENT_IID + { &kDOMHTMLParamElementIID, "NS_IDOMHTMLPARAMELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLPREELEMENT_IID + { &kDOMHTMLPreElementIID, "NS_IDOMHTMLPREELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLQUOTEELEMENT_IID + { &kDOMHTMLQuoteElementIID, "NS_IDOMHTMLQUOTEELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLSCRIPTELEMENT_IID + { &kDOMHTMLScriptElementIID, "NS_IDOMHTMLSCRIPTELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLSELECTELEMENT_IID + { &kDOMHTMLSelectElementIID, "NS_IDOMHTMLSELECTELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLSTYLEELEMENT_IID + { &kDOMHTMLStyleElementIID, "NS_IDOMHTMLSTYLEELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLTABLECAPTIONELEM_IID + { &kDOMHTMLTableCaptionElemIID, "NS_IDOMHTMLTABLECAPTIONELEM_IID" }, +#endif +#ifdef NS_IDOMHTMLTABLECELLELEMENT_IID + { &kDOMHTMLTableCellElementIID, "NS_IDOMHTMLTABLECELLELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLTABLECOLELEMENT_IID + { &kDOMHTMLTableColElementIID, "NS_IDOMHTMLTABLECOLELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLTABLEELEMENT_IID + { &kDOMHTMLTableElementIID, "NS_IDOMHTMLTABLEELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLTABLEROWELEMENT_IID + { &kDOMHTMLTableRowElementIID, "NS_IDOMHTMLTABLEROWELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLTABLESECTIONELEM_IID + { &kDOMHTMLTableSectionElemIID, "NS_IDOMHTMLTABLESECTIONELEM_IID" }, +#endif +#ifdef NS_IDOMHTMLTEXTAREAELEMENT_IID + { &kDOMHTMLTextAreaElementIID, "NS_IDOMHTMLTEXTAREAELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLTITLEELEMENT_IID + { &kDOMHTMLTitleElementIID, "NS_IDOMHTMLTITLEELEMENT_IID" }, +#endif +#ifdef NS_IDOMHTMLULISTELEMENT_IID + { &kDOMHTMLUListElementIID, "NS_IDOMHTMLULISTELEMENT_IID" }, +#endif +#ifdef NS_IDOMJSWINDOW_IID + { &kDOMJSWindowIID, "NS_IDOMJSWINDOW_IID" }, +#endif +#ifdef NS_IDOMKEYEVENT_IID + { &kDOMKeyEventIID, "NS_IDOMKEYEVENT_IID" }, +#endif +#ifdef NS_IDOMLINKSTYLE_IID + { &kDOMLinkStyleIID, "NS_IDOMLINKSTYLE_IID" }, +#endif +#ifdef NS_IDOMLOCATION_IID + { &kDOMLocationIID, "NS_IDOMLOCATION_IID" }, +#endif +#ifdef NS_IDOMMEDIALIST_IID + { &kDOMMediaListIID, "NS_IDOMMEDIALIST_IID" }, +#endif +#ifdef NS_IDOMMIMETYPE_IID + { &kDOMMimeTypeIID, "NS_IDOMMIMETYPE_IID" }, +#endif +#ifdef NS_IDOMMIMETYPEARRAY_IID + { &kDOMMimeTypeArrayIID, "NS_IDOMMIMETYPEARRAY_IID" }, +#endif +#ifdef NS_IDOMMOUSEEVENT_IID + { &kDOMMouseEventIID, "NS_IDOMMOUSEEVENT_IID" }, +#endif +#ifdef NS_IDOMMUTATIONEVENT_IID + { &kDOMMutationEventIID, "NS_IDOMMUTATIONEVENT_IID" }, +#endif +#ifdef NS_IDOMNAMEDNODEMAP_IID + { &kDOMNamedNodeMapIID, "NS_IDOMNAMEDNODEMAP_IID" }, +#endif +#ifdef NS_IDOMNAVIGATOR_IID + { &kDOMNavigatorIID, "NS_IDOMNAVIGATOR_IID" }, +#endif +#ifdef NS_IDOMNODE_IID + { &kDOMNodeIID, "NS_IDOMNODE_IID" }, +#endif +#ifdef NS_IDOMNODEFILTER_IID + { &kDOMNodeFilterIID, "NS_IDOMNODEFILTER_IID" }, +#endif +#ifdef NS_IDOMNODEITERATOR_IID + { &kDOMNodeIteratorIID, "NS_IDOMNODEITERATOR_IID" }, +#endif +#ifdef NS_IDOMNODELIST_IID + { &kDOMNodeListIID, "NS_IDOMNODELIST_IID" }, +#endif +#ifdef NS_IDOMNOTATION_IID + { &kDOMNotationIID, "NS_IDOMNOTATION_IID" }, +#endif +#ifdef NS_IDOMNSDOCUMENT_IID + { &kDOMNSDocumentIID, "NS_IDOMNSDOCUMENT_IID" }, +#endif +#ifdef NS_IDOMNSEVENT_IID + { &kDOMNSEventIID, "NS_IDOMNSEVENT_IID" }, +#endif +#ifdef NS_IDOMNSHISTORY_IID + { &kDOMNSHistoryIID, "NS_IDOMNSHISTORY_IID" }, +#endif +#ifdef NS_IDOMNSHTMLANCHORELEMENT_IID + { &kDOMNSHTMLAnchorElementIID, "NS_IDOMNSHTMLANCHORELEMENT_IID" }, +#endif +#ifdef NS_IDOMNSHTMLAREAELEMENT_IID + { &kDOMNSHTMLAreaElementIID, "NS_IDOMNSHTMLAREAELEMENT_IID" }, +#endif +#ifdef NS_IDOMNSHTMLBUTTONELEMENT_IID + { &kDOMNSHTMLButtonElementIID, "NS_IDOMNSHTMLBUTTONELEMENT_IID" }, +#endif +#ifdef NS_IDOMNSHTMLDOCUMENT_IID + { &kDOMNSHTMLDocumentIID, "NS_IDOMNSHTMLDOCUMENT_IID" }, +#endif +#ifdef NS_IDOMNSHTMLELEMENT_IID + { &kDOMNSHTMLElementIID, "NS_IDOMNSHTMLELEMENT_IID" }, +#endif +#ifdef NS_IDOMNSHTMLFORMCONTROLLIST_IID + { &kDOMNSHTMLFormControlListIID, "NS_IDOMNSHTMLFORMCONTROLLIST_IID" }, +#endif +#ifdef NS_IDOMNSHTMLFORMELEMENT_IID + { &kDOMNSHTMLFormElementIID, "NS_IDOMNSHTMLFORMELEMENT_IID" }, +#endif +#ifdef NS_IDOMNSHTMLFRAMEELEMENT_IID + { &kDOMNSHTMLFrameElementIID, "NS_IDOMNSHTMLFRAMEELEMENT_IID" }, +#endif +#ifdef NS_IDOMNSHTMLIMAGEELEMENT_IID + { &kDOMNSHTMLImageElementIID, "NS_IDOMNSHTMLIMAGEELEMENT_IID" }, +#endif +#ifdef NS_IDOMNSHTMLINPUTELEMENT_IID + { &kDOMNSHTMLInputElementIID, "NS_IDOMNSHTMLINPUTELEMENT_IID" }, +#endif +#ifdef NS_IDOMNSHTMLOPTIONCOLLECTN_IID + { &kDOMNSHTMLOptionCollectnIID, "NS_IDOMNSHTMLOPTIONCOLLECTN_IID" }, +#endif +#ifdef NS_IDOMNSHTMLSELECTELEMENT_IID + { &kDOMNSHTMLSelectElementIID, "NS_IDOMNSHTMLSELECTELEMENT_IID" }, +#endif +#ifdef NS_IDOMNSHTMLTEXTAREAELEMENT_IID + { &kDOMNSHTMLTextAreaElementIID, "NS_IDOMNSHTMLTEXTAREAELEMENT_IID" }, +#endif +#ifdef NS_IDOMNSLOCATION_IID + { &kDOMNSLocationIID, "NS_IDOMNSLOCATION_IID" }, +#endif +#ifdef NS_IDOMNSRANGE_IID + { &kDOMNSRangeIID, "NS_IDOMNSRANGE_IID" }, +#endif +#ifdef NS_IDOMNSUIEVENT_IID + { &kDOMNSUIEventIID, "NS_IDOMNSUIEVENT_IID" }, +#endif +#ifdef NS_IDOMNSXBLFORMCONTROL_IID + { &kDOMNSXBLFormControlIID, "NS_IDOMNSXBLFORMCONTROL_IID" }, +#endif +#ifdef NS_IDOMPARSER_IID + { &kDOMParserIID, "NS_IDOMPARSER_IID" }, +#endif +#ifdef NS_IDOMPKCS11_IID + { &kDOMPkcs11IID, "NS_IDOMPKCS11_IID" }, +#endif +#ifdef NS_IDOMPLUGIN_IID + { &kDOMPluginIID, "NS_IDOMPLUGIN_IID" }, +#endif +#ifdef NS_IDOMPLUGINARRAY_IID + { &kDOMPluginArrayIID, "NS_IDOMPLUGINARRAY_IID" }, +#endif +#ifdef NS_IDOMPROCESSINGINSTRUCTION_IID + { &kDOMProcessingInstructionIID, "NS_IDOMPROCESSINGINSTRUCTION_IID" }, +#endif +#ifdef NS_IDOMRANGE_IID + { &kDOMRangeIID, "NS_IDOMRANGE_IID" }, +#endif +#ifdef NS_IDOMRANGEEXCEPTION_IID + { &kDOMRangeExceptionIID, "NS_IDOMRANGEEXCEPTION_IID" }, +#endif +#ifdef NS_IDOMRECT_IID + { &kDOMRectIID, "NS_IDOMRECT_IID" }, +#endif +#ifdef NS_IDOMRGBCOLOR_IID + { &kDOMRGBColorIID, "NS_IDOMRGBCOLOR_IID" }, +#endif +#ifdef NS_IDOMSCREEN_IID + { &kDOMScreenIID, "NS_IDOMSCREEN_IID" }, +#endif +#ifdef NS_IDOMSERIALIZER_IID + { &kDOMSerializerIID, "NS_IDOMSERIALIZER_IID" }, +#endif +#ifdef NS_IDOMSTYLESHEET_IID + { &kDOMStyleSheetIID, "NS_IDOMSTYLESHEET_IID" }, +#endif +#ifdef NS_IDOMSTYLESHEETLIST_IID + { &kDOMStyleSheetListIID, "NS_IDOMSTYLESHEETLIST_IID" }, +#endif +#ifdef NS_IDOMTEXT_IID + { &kDOMTextIID, "NS_IDOMTEXT_IID" }, +#endif +#ifdef NS_IDOMTREEWALKER_IID + { &kDOMTreeWalkerIID, "NS_IDOMTREEWALKER_IID" }, +#endif +#ifdef NS_IDOMUIEVENT_IID + { &kDOMUIEventIID, "NS_IDOMUIEVENT_IID" }, +#endif +#ifdef NS_IDOMVIEWCSS_IID + { &kDOMViewCSSIID, "NS_IDOMVIEWCSS_IID" }, +#endif +#ifdef NS_IDOMWINDOW_IID + { &kDOMWindowIID, "NS_IDOMWINDOW_IID" }, +#endif +#ifdef NS_IDOMWINDOWCOLLECTION_IID + { &kDOMWindowCollectionIID, "NS_IDOMWINDOWCOLLECTION_IID" }, +#endif +#ifdef NS_IDOMWINDOWINTERNAL_IID + { &kDOMWindowInternalIID, "NS_IDOMWINDOWINTERNAL_IID" }, +#endif +#ifdef NS_IDOMXMLDOCUMENT_IID + { &kDOMXMLDocumentIID, "NS_IDOMXMLDOCUMENT_IID" }, +#endif +#ifdef NS_IDOMXPATHEVALUATOR_IID + { &kDOMXPathEvaluatorIID, "NS_IDOMXPATHEVALUATOR_IID" }, +#endif +#ifdef NS_IDOMXPATHEXCEPTION_IID + { &kDOMXPathExceptionIID, "NS_IDOMXPATHEXCEPTION_IID" }, +#endif +#ifdef NS_IDOMXPATHEXPRESSION_IID + { &kDOMXPathExpressionIID, "NS_IDOMXPATHEXPRESSION_IID" }, +#endif +#ifdef NS_IDOMXPATHNAMESPACE_IID + { &kDOMXPathNamespaceIID, "NS_IDOMXPATHNAMESPACE_IID" }, +#endif +#ifdef NS_IDOMXPATHNSRESOLVER_IID + { &kDOMXPathNSResolverIID, "NS_IDOMXPATHNSRESOLVER_IID" }, +#endif +#ifdef NS_IDOMXPATHRESULT_IID + { &kDOMXPathResultIID, "NS_IDOMXPATHRESULT_IID" }, +#endif +#ifdef NS_IDOMXULBUTTONELEMENT_IID + { &kDOMXULButtonElementIID, "NS_IDOMXULBUTTONELEMENT_IID" }, +#endif +#ifdef NS_IDOMXULCHECKBOXELEMENT_IID + { &kDOMXULCheckboxElementIID, "NS_IDOMXULCHECKBOXELEMENT_IID" }, +#endif +#ifdef NS_IDOMXULCOMMANDDISPATCHER_IID + { &kDOMXULCommandDispatcherIID, "NS_IDOMXULCOMMANDDISPATCHER_IID" }, +#endif +#ifdef NS_IDOMXULCONTROLELEMENT_IID + { &kDOMXULControlElementIID, "NS_IDOMXULCONTROLELEMENT_IID" }, +#endif +#ifdef NS_IDOMXULDESCRIPTIONELEMENT_IID + { &kDOMXULDescriptionElementIID, "NS_IDOMXULDESCRIPTIONELEMENT_IID" }, +#endif +#ifdef NS_IDOMXULDOCUMENT_IID + { &kDOMXULDocumentIID, "NS_IDOMXULDOCUMENT_IID" }, +#endif +#ifdef NS_IDOMXULELEMENT_IID + { &kDOMXULElementIID, "NS_IDOMXULELEMENT_IID" }, +#endif +#ifdef NS_IDOMXULIMAGEELEMENT_IID + { &kDOMXULImageElementIID, "NS_IDOMXULIMAGEELEMENT_IID" }, +#endif +#ifdef NS_IDOMXULLABELEDCONTROLEL_IID + { &kDOMXULLabeledControlElIID, "NS_IDOMXULLABELEDCONTROLEL_IID" }, +#endif +#ifdef NS_IDOMXULLABELELEMENT_IID + { &kDOMXULLabelElementIID, "NS_IDOMXULLABELELEMENT_IID" }, +#endif +#ifdef NS_IDOMXULMENULISTELEMENT_IID + { &kDOMXULMenuListElementIID, "NS_IDOMXULMENULISTELEMENT_IID" }, +#endif +#ifdef NS_IDOMXULMULTSELECTCNTRLEL_IID + { &kDOMXULMultSelectCntrlElIID, "NS_IDOMXULMULTSELECTCNTRLEL_IID" }, +#endif +#ifdef NS_IDOMXULPOPUPELEMENT_IID + { &kDOMXULPopupElementIID, "NS_IDOMXULPOPUPELEMENT_IID" }, +#endif +#ifdef NS_IDOMXULSELECTCNTRLEL_IID + { &kDOMXULSelectCntrlElIID, "NS_IDOMXULSELECTCNTRLEL_IID" }, +#endif +#ifdef NS_IDOMXULSELECTCNTRLITEMEL_IID + { &kDOMXULSelectCntrlItemElIID, "NS_IDOMXULSELECTCNTRLITEMEL_IID" }, +#endif +#ifdef NS_IDOWNLOAD_IID + { &kDownloadIID, "NS_IDOWNLOAD_IID" }, +#endif +#ifdef NS_IDOWNLOADER_IID + { &kDownloaderIID, "NS_IDOWNLOADER_IID" }, +#endif +#ifdef NS_IDOWNLOADMANAGER_IID + { &kDownloadManagerIID, "NS_IDOWNLOADMANAGER_IID" }, +#endif +#ifdef NS_IDOWNLOADPROGRESSLISTENER_IID + { &kDownloadProgressListenerIID, "NS_IDOWNLOADPROGRESSLISTENER_IID" }, +#endif +#ifdef NS_IDRAGDROPHANDLER_IID + { &kDragDropHandlerIID, "NS_IDRAGDROPHANDLER_IID" }, +#endif +#ifdef NS_IDRAGDROPOVERRIDE_IID + { &kDragDropOverrideIID, "NS_IDRAGDROPOVERRIDE_IID" }, +#endif +#ifdef NS_IDRAGSERVICE_IID + { &kDragServiceIID, "NS_IDRAGSERVICE_IID" }, +#endif +#ifdef NS_IDRAGSESSION_IID + { &kDragSessionIID, "NS_IDRAGSESSION_IID" }, +#endif +#ifdef NS_IDRAGTRACKER_IID + { &kDragTrackerIID, "NS_IDRAGTRACKER_IID" }, +#endif +#ifdef NS_IEDITACTIONLISTENER_IID + { &kEditActionListenerIID, "NS_IEDITACTIONLISTENER_IID" }, +#endif +#ifdef NS_IEDITINGSESSION_IID + { &kEditingSessionIID, "NS_IEDITINGSESSION_IID" }, +#endif +#ifdef NS_IEDITOR_IID + { &kEditorIID, "NS_IEDITOR_IID" }, +#endif +#ifdef NS_IEDITORBOXOBJECT_IID + { &kEditorBoxObjectIID, "NS_IEDITORBOXOBJECT_IID" }, +#endif +#ifdef NS_IEDITORDOCSHELL_IID + { &kEditorDocShellIID, "NS_IEDITORDOCSHELL_IID" }, +#endif +#ifdef NS_IEDITORIMESUPPORT_IID + { &kEditorIMESupportIID, "NS_IEDITORIMESUPPORT_IID" }, +#endif +#ifdef NS_IEDITORLOGGING_IID + { &kEditorLoggingIID, "NS_IEDITORLOGGING_IID" }, +#endif +#ifdef NS_IEDITORMAILSUPPORT_IID + { &kEditorMailSupportIID, "NS_IEDITORMAILSUPPORT_IID" }, +#endif +#ifdef NS_IEDITOROBSERVER_IID + { &kEditorObserverIID, "NS_IEDITOROBSERVER_IID" }, +#endif +#ifdef NS_IEDITORSPELLCHECK_IID + { &kEditorSpellCheckIID, "NS_IEDITORSPELLCHECK_IID" }, +#endif +#ifdef NS_IEDITORSTYLESHEETS_IID + { &kEditorStyleSheetsIID, "NS_IEDITORSTYLESHEETS_IID" }, +#endif +#ifdef NS_IEMBEDDINGSITEWINDOW_IID + { &kEmbeddingSiteWindowIID, "NS_IEMBEDDINGSITEWINDOW_IID" }, +#endif +#ifdef NS_IEMBEDDINGSITEWINDOW2_IID + { &kEmbeddingSiteWindow2IID, "NS_IEMBEDDINGSITEWINDOW2_IID" }, +#endif +#ifdef NS_IENCODEDCHANNEL_IID + { &kEncodedChannelIID, "NS_IENCODEDCHANNEL_IID" }, +#endif +#ifdef NS_IENCRYPTEDSMIMEURISSRVC_IID + { &kEncryptedSMIMEURIsSrvcIID, "NS_IENCRYPTEDSMIMEURISSRVC_IID" }, +#endif +#ifdef NS_IENTITYCONVERTER_IID + { &kEntityConverterIID, "NS_IENTITYCONVERTER_IID" }, +#endif +#ifdef NS_IENTROPYCOLLECTOR_IID + { &kEntropyCollectorIID, "NS_IENTROPYCOLLECTOR_IID" }, +#endif +#ifdef NS_IENUMERATOR_IID + { &kEnumeratorIID, "NS_IENUMERATOR_IID" }, +#endif +#ifdef NS_IERRORSERVICE_IID + { &kErrorServiceIID, "NS_IERRORSERVICE_IID" }, +#endif +#ifdef NS_IEVALUATESTRINGPROXY_IID + { &kEvaluateStringProxyIID, "NS_IEVALUATESTRINGPROXY_IID" }, +#endif +#ifdef NS_IEVENTHANDLER_IID + { &kEventHandlerIID, "NS_IEVENTHANDLER_IID" }, +#endif +#ifdef NS_IEVENTQUEUE_IID + { &kEventQueueIID, "NS_IEVENTQUEUE_IID" }, +#endif +#ifdef NS_IEVENTQUEUESERVICE_IID + { &kEventQueueServiceIID, "NS_IEVENTQUEUESERVICE_IID" }, +#endif +#ifdef NS_IEXCEPTION_IID + { &kExceptionIID, "NS_IEXCEPTION_IID" }, +#endif +#ifdef NS_IEXCEPTIONSERVICE_IID + { &kExceptionServiceIID, "NS_IEXCEPTIONSERVICE_IID" }, +#endif +#ifdef NS_IEXPATSINK_IID + { &kExpatSinkIID, "NS_IEXPATSINK_IID" }, +#endif +#ifdef NS_IEXTERNALHELPERAPPSERVICE_IID + { &kExternalHelperAppServiceIID, "NS_IEXTERNALHELPERAPPSERVICE_IID" }, +#endif +#ifdef NS_IEXTERNALPROTOCOLHANDLER_IID + { &kExternalProtocolHandlerIID, "NS_IEXTERNALPROTOCOLHANDLER_IID" }, +#endif +#ifdef NS_IEXTERNALPROTOCOLSERVICE_IID + { &kExternalProtocolServiceIID, "NS_IEXTERNALPROTOCOLSERVICE_IID" }, +#endif +#ifdef NS_IFACTORY_IID + { &kFactoryIID, "NS_IFACTORY_IID" }, +#endif +#ifdef NS_IFASTLOADFILECONTROL_IID + { &kFastLoadFileControlIID, "NS_IFASTLOADFILECONTROL_IID" }, +#endif +#ifdef NS_IFASTLOADSERVICE_IID + { &kFastLoadServiceIID, "NS_IFASTLOADSERVICE_IID" }, +#endif +#ifdef NS_IFILE_IID + { &kFileIID, "NS_IFILE_IID" }, +#endif +#ifdef NS_IFILECHANNEL_IID + { &kFileChannelIID, "NS_IFILECHANNEL_IID" }, +#endif +#ifdef NS_IFILEPICKER_IID + { &kFilePickerIID, "NS_IFILEPICKER_IID" }, +#endif +#ifdef NS_IFILEPROTOCOLHANDLER_IID + { &kFileProtocolHandlerIID, "NS_IFILEPROTOCOLHANDLER_IID" }, +#endif +#ifdef NS_IFILESPEC_IID + { &kFileSpecIID, "NS_IFILESPEC_IID" }, +#endif +#ifdef NS_IFILESTREAMS_IID + { &kFileStreamsIID, "NS_IFILESTREAMS_IID" }, +#endif +#ifdef NS_IFILEURL_IID + { &kFileURLIID, "NS_IFILEURL_IID" }, +#endif +#ifdef NS_IFILEUTILITIES_IID + { &kFileUtilitiesIID, "NS_IFILEUTILITIES_IID" }, +#endif +#ifdef NS_IFIND_IID + { &kFindIID, "NS_IFIND_IID" }, +#endif +#ifdef NS_IFINDSERVICE_IID + { &kFindServiceIID, "NS_IFINDSERVICE_IID" }, +#endif +#ifdef NS_IFOLDER_IID + { &kFolderIID, "NS_IFOLDER_IID" }, +#endif +#ifdef NS_IFOLDERLISTENER_IID + { &kFolderListenerIID, "NS_IFOLDERLISTENER_IID" }, +#endif +#ifdef NS_IFONTCATALOGSERVICE_IID + { &kFontCatalogServiceIID, "NS_IFONTCATALOGSERVICE_IID" }, +#endif +#ifdef NS_IFONTENUMERATOR_IID + { &kFontEnumeratorIID, "NS_IFONTENUMERATOR_IID" }, +#endif +#ifdef NS_IFONTLIST_IID + { &kFontListIID, "NS_IFONTLIST_IID" }, +#endif +#ifdef NS_IFONTPACKAGEHANDLER_IID + { &kFontPackageHandlerIID, "NS_IFONTPACKAGEHANDLER_IID" }, +#endif +#ifdef NS_IFONTPACKAGEPROXY_IID + { &kFontPackageProxyIID, "NS_IFONTPACKAGEPROXY_IID" }, +#endif +#ifdef NS_IFONTPACKAGESERVICE_IID + { &kFontPackageServiceIID, "NS_IFONTPACKAGESERVICE_IID" }, +#endif +#ifdef NS_IFORMATCONVERTER_IID + { &kFormatConverterIID, "NS_IFORMATCONVERTER_IID" }, +#endif +#ifdef NS_IFREETYPE2_IID + { &kFreeType2IID, "NS_IFREETYPE2_IID" }, +#endif +#ifdef NS_IFTPCHANNEL_IID + { &kFTPChannelIID, "NS_IFTPCHANNEL_IID" }, +#endif +#ifdef NS_IFULLSCREEN_IID + { &kFullScreenIID, "NS_IFULLSCREEN_IID" }, +#endif +#ifdef NS_IGENKEYPAIRINFODLG_IID + { &kGenKeypairInfoDlgIID, "NS_IGENKEYPAIRINFODLG_IID" }, +#endif +#ifdef NS_IGLOBALHISTORY_IID + { &kGlobalHistoryIID, "NS_IGLOBALHISTORY_IID" }, +#endif +#ifdef NS_IGRAPHICS_IID + { &kGraphicsIID, "NS_IGRAPHICS_IID" }, +#endif +#ifdef NS_IHASH_IID + { &kHashIID, "NS_IHASH_IID" }, +#endif +#ifdef NS_IHELPERAPPLAUNCHERDIALOG_IID + { &kHelperAppLauncherDialogIID, "NS_IHELPERAPPLAUNCHERDIALOG_IID" }, +#endif +#ifdef NS_IHISTORYENTRY_IID + { &kHistoryEntryIID, "NS_IHISTORYENTRY_IID" }, +#endif +#ifdef NS_IHTMLEDITOR_IID + { &kHTMLEditorIID, "NS_IHTMLEDITOR_IID" }, +#endif +#ifdef NS_IHTMLOBJECTRESIZER_IID + { &kHTMLObjectResizerIID, "NS_IHTMLOBJECTRESIZER_IID" }, +#endif +#ifdef NS_IHTTPAUTHENTICATOR_IID + { &kHttpAuthenticatorIID, "NS_IHTTPAUTHENTICATOR_IID" }, +#endif +#ifdef NS_IHTTPCHANNEL_IID + { &kHttpChannelIID, "NS_IHTTPCHANNEL_IID" }, +#endif +#ifdef NS_IHTTPCHANNELINTERNAL_IID + { &kHttpChannelInternalIID, "NS_IHTTPCHANNELINTERNAL_IID" }, +#endif +#ifdef NS_IHTTPEVENTSINK_IID + { &kHttpEventSinkIID, "NS_IHTTPEVENTSINK_IID" }, +#endif +#ifdef NS_IHTTPHEADERLISTENER_IID + { &kHTTPHeaderListenerIID, "NS_IHTTPHEADERLISTENER_IID" }, +#endif +#ifdef NS_IHTTPHEADERVISITOR_IID + { &kHttpHeaderVisitorIID, "NS_IHTTPHEADERVISITOR_IID" }, +#endif +#ifdef NS_IHTTPINDEX_IID + { &kHTTPIndexIID, "NS_IHTTPINDEX_IID" }, +#endif +#ifdef NS_IHTTPNOTIFY_IID + { &kHttpNotifyIID, "NS_IHTTPNOTIFY_IID" }, +#endif +#ifdef NS_IHTTPPROTOCOLHANDLER_IID + { &kHttpProtocolHandlerIID, "NS_IHTTPPROTOCOLHANDLER_IID" }, +#endif +#ifdef NS_IICONURI_IID + { &kIconURIIID, "NS_IICONURI_IID" }, +#endif +#ifdef NS_IIDNSERVICE_IID + { &kIDNServiceIID, "NS_IIDNSERVICE_IID" }, +#endif +#ifdef NS_IIFRAMEBOXOBJECT_IID + { &kIFrameBoxObjectIID, "NS_IIFRAMEBOXOBJECT_IID" }, +#endif +#ifdef NS_IIMAGEDOCUMENT_IID + { &kImageDocumentIID, "NS_IIMAGEDOCUMENT_IID" }, +#endif +#ifdef NS_IIMAPFLAGANDUIDSTATE_IID + { &kImapFlagAndUidStateIID, "NS_IIMAPFLAGANDUIDSTATE_IID" }, +#endif +#ifdef NS_IIMAPHEADERXFERINFO_IID + { &kImapHeaderXferInfoIID, "NS_IIMAPHEADERXFERINFO_IID" }, +#endif +#ifdef NS_IIMAPINCOMINGSERVER_IID + { &kImapIncomingServerIID, "NS_IIMAPINCOMINGSERVER_IID" }, +#endif +#ifdef NS_IIMAPMAILFOLDERSINK_IID + { &kImapMailFolderSinkIID, "NS_IIMAPMAILFOLDERSINK_IID" }, +#endif +#ifdef NS_IIMAPMESSAGESINK_IID + { &kImapMessageSinkIID, "NS_IIMAPMESSAGESINK_IID" }, +#endif +#ifdef NS_IIMAPMOCKCHANNEL_IID + { &kImapMockChannelIID, "NS_IIMAPMOCKCHANNEL_IID" }, +#endif +#ifdef NS_IIMAPPROTOCOL_IID + { &kImapProtocolIID, "NS_IIMAPPROTOCOL_IID" }, +#endif +#ifdef NS_IIMAPSERVERSINK_IID + { &kImapServerSinkIID, "NS_IIMAPSERVERSINK_IID" }, +#endif +#ifdef NS_IIMAPSERVICE_IID + { &kImapServiceIID, "NS_IIMAPSERVICE_IID" }, +#endif +#ifdef NS_IIMAPURL_IID + { &kImapUrlIID, "NS_IIMAPURL_IID" }, +#endif +#ifdef NS_IIMGMANAGER_IID + { &kImgManagerIID, "NS_IIMGMANAGER_IID" }, +#endif +#ifdef NS_IIMPORTABDESCRIPTOR_IID + { &kImportABDescriptorIID, "NS_IIMPORTABDESCRIPTOR_IID" }, +#endif +#ifdef NS_IIMPORTADDRESSBOOKS_IID + { &kImportAddressBooksIID, "NS_IIMPORTADDRESSBOOKS_IID" }, +#endif +#ifdef NS_IIMPORTFIELDMAP_IID + { &kImportFieldMapIID, "NS_IIMPORTFIELDMAP_IID" }, +#endif +#ifdef NS_IIMPORTGENERIC_IID + { &kImportGenericIID, "NS_IIMPORTGENERIC_IID" }, +#endif +#ifdef NS_IIMPORTMAIL_IID + { &kImportMailIID, "NS_IIMPORTMAIL_IID" }, +#endif +#ifdef NS_IIMPORTMAILBOXDESCRIPTOR_IID + { &kImportMailboxDescriptorIID, "NS_IIMPORTMAILBOXDESCRIPTOR_IID" }, +#endif +#ifdef NS_IIMPORTMIMEENCODE_IID + { &kImportMimeEncodeIID, "NS_IIMPORTMIMEENCODE_IID" }, +#endif +#ifdef NS_IIMPORTMODULE_IID + { &kImportModuleIID, "NS_IIMPORTMODULE_IID" }, +#endif +#ifdef NS_IIMPORTSERVICE_IID + { &kImportServiceIID, "NS_IIMPORTSERVICE_IID" }, +#endif +#ifdef NS_IIMPORTSETTINGS_IID + { &kImportSettingsIID, "NS_IIMPORTSETTINGS_IID" }, +#endif +#ifdef NS_IINCOMINGSERVERLISTENER_IID + { &kIncomingServerListenerIID, "NS_IINCOMINGSERVERLISTENER_IID" }, +#endif +#ifdef NS_IINPUTSTREAM_IID + { &kInputStreamIID, "NS_IINPUTSTREAM_IID" }, +#endif +#ifdef NS_IINPUTSTREAMCHANNEL_IID + { &kInputStreamChannelIID, "NS_IINPUTSTREAMCHANNEL_IID" }, +#endif +#ifdef NS_IINPUTSTREAMPUMP_IID + { &kInputStreamPumpIID, "NS_IINPUTSTREAMPUMP_IID" }, +#endif +#ifdef NS_IINPUTSTREAMTEE_IID + { &kInputStreamTeeIID, "NS_IINPUTSTREAMTEE_IID" }, +#endif +#ifdef NS_IINTERFACEINFO_IID + { &kInterfaceInfoIID, "NS_IINTERFACEINFO_IID" }, +#endif +#ifdef NS_IINTERFACEINFOMANAGER_IID + { &kInterfaceInfoManagerIID, "NS_IINTERFACEINFOMANAGER_IID" }, +#endif +#ifdef NS_IINTERFACEREQUESTOR_IID + { &kInterfaceRequestorIID, "NS_IINTERFACEREQUESTOR_IID" }, +#endif +#ifdef NS_IIOSERVICE_IID + { &kIOServiceIID, "NS_IIOSERVICE_IID" }, +#endif +#ifdef NS_IJAR_IID + { &kJARIID, "NS_IJAR_IID" }, +#endif +#ifdef NS_IJARCHANNEL_IID + { &kJARChannelIID, "NS_IJARCHANNEL_IID" }, +#endif +#ifdef NS_IJARPROTOCOLHANDLER_IID + { &kJARProtocolHandlerIID, "NS_IJARPROTOCOLHANDLER_IID" }, +#endif +#ifdef NS_IJARURI_IID + { &kJARURIIID, "NS_IJARURI_IID" }, +#endif +#ifdef NS_IJRILIVECONNECTPIPEER_IID + { &kJRILiveConnectPIPeerIID, "NS_IJRILIVECONNECTPIPEER_IID" }, +#endif +#ifdef NS_IJRILIVECONNECTPLUGIN_IID + { &kJRILiveConnectPluginIID, "NS_IJRILIVECONNECTPLUGIN_IID" }, +#endif +#ifdef NS_IJSCONSOLESERVICE_IID + { &kJSConsoleServiceIID, "NS_IJSCONSOLESERVICE_IID" }, +#endif +#ifdef NS_IJSCONTEXTSTACK_IID + { &kJSContextStackIID, "NS_IJSCONTEXTSTACK_IID" }, +#endif +#ifdef NS_IJSRUNTIMESERVICE_IID + { &kJSRuntimeServiceIID, "NS_IJSRUNTIMESERVICE_IID" }, +#endif +#ifdef NS_IKEYEDSTREAMGENERATOR_IID + { &kKeyedStreamGeneratorIID, "NS_IKEYEDSTREAMGENERATOR_IID" }, +#endif +#ifdef NS_IKEYGENTHREAD_IID + { &kKeygenThreadIID, "NS_IKEYGENTHREAD_IID" }, +#endif +#ifdef NS_ILANGUAGEATOM_IID + { &kLanguageAtomIID, "NS_ILANGUAGEATOM_IID" }, +#endif +#ifdef NS_ILANGUAGEATOMSERVICE_IID + { &kLanguageAtomServiceIID, "NS_ILANGUAGEATOMSERVICE_IID" }, +#endif +#ifdef NS_ILDAPAUTOCOMPFORMATTER_IID + { &kLDAPAutoCompFormatterIID, "NS_ILDAPAUTOCOMPFORMATTER_IID" }, +#endif +#ifdef NS_ILDAPAUTOCOMPLETESESSION_IID + { &kLDAPAutoCompleteSessionIID, "NS_ILDAPAUTOCOMPLETESESSION_IID" }, +#endif +#ifdef NS_ILDAPBERVALUE_IID + { &kLDAPBERValueIID, "NS_ILDAPBERVALUE_IID" }, +#endif +#ifdef NS_ILDAPCONNECTION_IID + { &kLDAPConnectionIID, "NS_ILDAPCONNECTION_IID" }, +#endif +#ifdef NS_ILDAPERRORS_IID + { &kLDAPErrorsIID, "NS_ILDAPERRORS_IID" }, +#endif +#ifdef NS_ILDAPMESSAGE_IID + { &kLDAPMessageIID, "NS_ILDAPMESSAGE_IID" }, +#endif +#ifdef NS_ILDAPMESSAGELISTENER_IID + { &kLDAPMessageListenerIID, "NS_ILDAPMESSAGELISTENER_IID" }, +#endif +#ifdef NS_ILDAPOPERATION_IID + { &kLDAPOperationIID, "NS_ILDAPOPERATION_IID" }, +#endif +#ifdef NS_ILDAPPREFSSERVICE_IID + { &kLDAPPrefsServiceIID, "NS_ILDAPPREFSSERVICE_IID" }, +#endif +#ifdef NS_ILDAPSERVER_IID + { &kLDAPServerIID, "NS_ILDAPSERVER_IID" }, +#endif +#ifdef NS_ILDAPSERVICE_IID + { &kLDAPServiceIID, "NS_ILDAPSERVICE_IID" }, +#endif +#ifdef NS_ILDAPSYNCQUERY_IID + { &kLDAPSyncQueryIID, "NS_ILDAPSYNCQUERY_IID" }, +#endif +#ifdef NS_ILDAPURL_IID + { &kLDAPURLIID, "NS_ILDAPURL_IID" }, +#endif +#ifdef NS_ILINEINPUTSTREAM_IID + { &kLineInputStreamIID, "NS_ILINEINPUTSTREAM_IID" }, +#endif +#ifdef NS_ILISTBOXOBJECT_IID + { &kListBoxObjectIID, "NS_ILISTBOXOBJECT_IID" }, +#endif +#ifdef NS_ILOADGROUP_IID + { &kLoadGroupIID, "NS_ILOADGROUP_IID" }, +#endif +#ifdef NS_ILOCALE_IID + { &kLocaleIID, "NS_ILOCALE_IID" }, +#endif +#ifdef NS_ILOCALESERVICE_IID + { &kLocaleServiceIID, "NS_ILOCALESERVICE_IID" }, +#endif +#ifdef NS_ILOCALFILE_IID + { &kLocalFileIID, "NS_ILOCALFILE_IID" }, +#endif +#ifdef NS_ILOCALMAILINCOMINGSERVER_IID + { &kLocalMailIncomingServerIID, "NS_ILOCALMAILINCOMINGSERVER_IID" }, +#endif +#ifdef NS_IMAILBOXSERVICE_IID + { &kMailboxServiceIID, "NS_IMAILBOXSERVICE_IID" }, +#endif +#ifdef NS_IMAILBOXSPEC_IID + { &kMailboxSpecIID, "NS_IMAILBOXSPEC_IID" }, +#endif +#ifdef NS_IMAILBOXURL_IID + { &kMailboxUrlIID, "NS_IMAILBOXURL_IID" }, +#endif +#ifdef NS_IMARKUPDOCUMENTVIEWER_IID + { &kMarkupDocumentViewerIID, "NS_IMARKUPDOCUMENTVIEWER_IID" }, +#endif +#ifdef NS_IMEMORY_IID + { &kMemoryIID, "NS_IMEMORY_IID" }, +#endif +#ifdef NS_IMENUBOXOBJECT_IID + { &kMenuBoxObjectIID, "NS_IMENUBOXOBJECT_IID" }, +#endif +#ifdef NS_IMENUROLLUP_IID + { &kMenuRollupIID, "NS_IMENUROLLUP_IID" }, +#endif +#ifdef NS_IMESSENGER_IID + { &kMessengerIID, "NS_IMESSENGER_IID" }, +#endif +#ifdef NS_IMESSENGERMIGRATOR_IID + { &kMessengerMigratorIID, "NS_IMESSENGERMIGRATOR_IID" }, +#endif +#ifdef NS_IMESSENGEROSINTEGRATION_IID + { &kMessengerOSIntegrationIID, "NS_IMESSENGEROSINTEGRATION_IID" }, +#endif +#ifdef NS_IMESSENGERWINDOWSERVICE_IID + { &kMessengerWindowServiceIID, "NS_IMESSENGERWINDOWSERVICE_IID" }, +#endif +#ifdef NS_IMIMEEMITTER_IID + { &kMimeEmitterIID, "NS_IMIMEEMITTER_IID" }, +#endif +#ifdef NS_IMIMEHEADERS_IID + { &kMimeHeadersIID, "NS_IMIMEHEADERS_IID" }, +#endif +#ifdef NS_IMIMEINFO_IID + { &kMIMEInfoIID, "NS_IMIMEINFO_IID" }, +#endif +#ifdef NS_IMIMEINPUTSTREAM_IID + { &kMIMEInputStreamIID, "NS_IMIMEINPUTSTREAM_IID" }, +#endif +#ifdef NS_IMIMEMISCSTATUS_IID + { &kMimeMiscStatusIID, "NS_IMIMEMISCSTATUS_IID" }, +#endif +#ifdef NS_IMIMESERVICE_IID + { &kMIMEServiceIID, "NS_IMIMESERVICE_IID" }, +#endif +#ifdef NS_IMIMESTREAMCONVERTER_IID + { &kMimeStreamConverterIID, "NS_IMIMESTREAMCONVERTER_IID" }, +#endif +#ifdef NS_IMODULE_IID + { &kModuleIID, "NS_IMODULE_IID" }, +#endif +#ifdef NS_IMSGACCOUNT_IID + { &kMsgAccountIID, "NS_IMSGACCOUNT_IID" }, +#endif +#ifdef NS_IMSGACCOUNTMANAGER_IID + { &kMsgAccountManagerIID, "NS_IMSGACCOUNTMANAGER_IID" }, +#endif +#ifdef NS_IMSGATTACHMENT_IID + { &kMsgAttachmentIID, "NS_IMSGATTACHMENT_IID" }, +#endif +#ifdef NS_IMSGBIFFMANAGER_IID + { &kMsgBiffManagerIID, "NS_IMSGBIFFMANAGER_IID" }, +#endif +#ifdef NS_IMSGCOMPFIELDS_IID + { &kMsgCompFieldsIID, "NS_IMSGCOMPFIELDS_IID" }, +#endif +#ifdef NS_IMSGCOMPOSE_IID + { &kMsgComposeIID, "NS_IMSGCOMPOSE_IID" }, +#endif +#ifdef NS_IMSGCOMPOSEPARAMS_IID + { &kMsgComposeParamsIID, "NS_IMSGCOMPOSEPARAMS_IID" }, +#endif +#ifdef NS_IMSGCOMPOSEPROGRESSPARAMS_IID + { &kMsgComposeProgressParamsIID, "NS_IMSGCOMPOSEPROGRESSPARAMS_IID" }, +#endif +#ifdef NS_IMSGCOMPOSESECURE_IID + { &kMsgComposeSecureIID, "NS_IMSGCOMPOSESECURE_IID" }, +#endif +#ifdef NS_IMSGCOMPOSESERVICE_IID + { &kMsgComposeServiceIID, "NS_IMSGCOMPOSESERVICE_IID" }, +#endif +#ifdef NS_IMSGCOMPUTILS_IID + { &kMsgCompUtilsIID, "NS_IMSGCOMPUTILS_IID" }, +#endif +#ifdef NS_IMSGCOPYSERVICE_IID + { &kMsgCopyServiceIID, "NS_IMSGCOPYSERVICE_IID" }, +#endif +#ifdef NS_IMSGCOPYSERVICELISTENER_IID + { &kMsgCopyServiceListenerIID, "NS_IMSGCOPYSERVICELISTENER_IID" }, +#endif +#ifdef NS_IMSGDATABASE_IID + { &kMsgDatabaseIID, "NS_IMSGDATABASE_IID" }, +#endif +#ifdef NS_IMSGDBVIEW_IID + { &kMsgDBViewIID, "NS_IMSGDBVIEW_IID" }, +#endif +#ifdef NS_IMSGDRAFT_IID + { &kMsgDraftIID, "NS_IMSGDRAFT_IID" }, +#endif +#ifdef NS_IMSGFILTER_IID + { &kMsgFilterIID, "NS_IMSGFILTER_IID" }, +#endif +#ifdef NS_IMSGFILTERHITNOTIFY_IID + { &kMsgFilterHitNotifyIID, "NS_IMSGFILTERHITNOTIFY_IID" }, +#endif +#ifdef NS_IMSGFILTERLIST_IID + { &kMsgFilterListIID, "NS_IMSGFILTERLIST_IID" }, +#endif +#ifdef NS_IMSGFILTERPLUGIN_IID + { &kMsgFilterPluginIID, "NS_IMSGFILTERPLUGIN_IID" }, +#endif +#ifdef NS_IMSGFILTERSERVICE_IID + { &kMsgFilterServiceIID, "NS_IMSGFILTERSERVICE_IID" }, +#endif +#ifdef NS_IMSGFOLDER_IID + { &kMsgFolderIID, "NS_IMSGFOLDER_IID" }, +#endif +#ifdef NS_IMSGFOLDERCACHE_IID + { &kMsgFolderCacheIID, "NS_IMSGFOLDERCACHE_IID" }, +#endif +#ifdef NS_IMSGFOLDERCACHEELEMENT_IID + { &kMsgFolderCacheElementIID, "NS_IMSGFOLDERCACHEELEMENT_IID" }, +#endif +#ifdef NS_IMSGFOLDERCOMPACTOR_IID + { &kMsgFolderCompactorIID, "NS_IMSGFOLDERCOMPACTOR_IID" }, +#endif +#ifdef NS_IMSGGROUPRECORD_IID + { &kMsgGroupRecordIID, "NS_IMSGGROUPRECORD_IID" }, +#endif +#ifdef NS_IMSGHDR_IID + { &kMsgHdrIID, "NS_IMSGHDR_IID" }, +#endif +#ifdef NS_IMSGHEADERPARSER_IID + { &kMsgHeaderParserIID, "NS_IMSGHEADERPARSER_IID" }, +#endif +#ifdef NS_IMSGHOST_IID + { &kMsgHostIID, "NS_IMSGHOST_IID" }, +#endif +#ifdef NS_IMSGIDENTITY_IID + { &kMsgIdentityIID, "NS_IMSGIDENTITY_IID" }, +#endif +#ifdef NS_IMSGIMAPMAILFOLDER_IID + { &kMsgImapMailFolderIID, "NS_IMSGIMAPMAILFOLDER_IID" }, +#endif +#ifdef NS_IMSGINCOMINGSERVER_IID + { &kMsgIncomingServerIID, "NS_IMSGINCOMINGSERVER_IID" }, +#endif +#ifdef NS_IMSGLOCALMAILFOLDER_IID + { &kMsgLocalMailFolderIID, "NS_IMSGLOCALMAILFOLDER_IID" }, +#endif +#ifdef NS_IMSGLOGONREDIRECTOR_IID + { &kMsgLogonRedirectorIID, "NS_IMSGLOGONREDIRECTOR_IID" }, +#endif +#ifdef NS_IMSGMAILNEWSURL_IID + { &kMsgMailNewsUrlIID, "NS_IMSGMAILNEWSURL_IID" }, +#endif +#ifdef NS_IMSGMAILSESSION_IID + { &kMsgMailSessionIID, "NS_IMSGMAILSESSION_IID" }, +#endif +#ifdef NS_IMSGMAILVIEW_IID + { &kMsgMailViewIID, "NS_IMSGMAILVIEW_IID" }, +#endif +#ifdef NS_IMSGMAILVIEWLIST_IID + { &kMsgMailViewListIID, "NS_IMSGMAILVIEWLIST_IID" }, +#endif +#ifdef NS_IMSGMDNGENERATOR_IID + { &kMsgMdnGeneratorIID, "NS_IMSGMDNGENERATOR_IID" }, +#endif +#ifdef NS_IMSGMESSAGESERVICE_IID + { &kMsgMessageServiceIID, "NS_IMSGMESSAGESERVICE_IID" }, +#endif +#ifdef NS_IMSGNEWSFOLDER_IID + { &kMsgNewsFolderIID, "NS_IMSGNEWSFOLDER_IID" }, +#endif +#ifdef NS_IMSGOFFLINEIMAPOPERATION_IID + { &kMsgOfflineImapOperationIID, "NS_IMSGOFFLINEIMAPOPERATION_IID" }, +#endif +#ifdef NS_IMSGOFFLINEMANAGER_IID + { &kMsgOfflineManagerIID, "NS_IMSGOFFLINEMANAGER_IID" }, +#endif +#ifdef NS_IMSGOFFLINENEWSSTATE_IID + { &kMsgOfflineNewsStateIID, "NS_IMSGOFFLINENEWSSTATE_IID" }, +#endif +#ifdef NS_IMSGPARSEMAILMSGSTATE_IID + { &kMsgParseMailMsgStateIID, "NS_IMSGPARSEMAILMSGSTATE_IID" }, +#endif +#ifdef NS_IMSGPRINTENGINE_IID + { &kMsgPrintEngineIID, "NS_IMSGPRINTENGINE_IID" }, +#endif +#ifdef NS_IMSGPROGRESS_IID + { &kMsgProgressIID, "NS_IMSGPROGRESS_IID" }, +#endif +#ifdef NS_IMSGPROTOCOLINFO_IID + { &kMsgProtocolInfoIID, "NS_IMSGPROTOCOLINFO_IID" }, +#endif +#ifdef NS_IMSGPURGESERVICE_IID + { &kMsgPurgeServiceIID, "NS_IMSGPURGESERVICE_IID" }, +#endif +#ifdef NS_IMSGQUOTE_IID + { &kMsgQuoteIID, "NS_IMSGQUOTE_IID" }, +#endif +#ifdef NS_IMSGRDFDATASOURCE_IID + { &kMsgRDFDataSourceIID, "NS_IMSGRDFDATASOURCE_IID" }, +#endif +#ifdef NS_IMSGRECIPIENTARRAY_IID + { &kMsgRecipientArrayIID, "NS_IMSGRECIPIENTARRAY_IID" }, +#endif +#ifdef NS_IMSGSEARCHADAPTER_IID + { &kMsgSearchAdapterIID, "NS_IMSGSEARCHADAPTER_IID" }, +#endif +#ifdef NS_IMSGSEARCHNOTIFY_IID + { &kMsgSearchNotifyIID, "NS_IMSGSEARCHNOTIFY_IID" }, +#endif +#ifdef NS_IMSGSEARCHSCOPETERM_IID + { &kMsgSearchScopeTermIID, "NS_IMSGSEARCHSCOPETERM_IID" }, +#endif +#ifdef NS_IMSGSEARCHSESSION_IID + { &kMsgSearchSessionIID, "NS_IMSGSEARCHSESSION_IID" }, +#endif +#ifdef NS_IMSGSEARCHTERM_IID + { &kMsgSearchTermIID, "NS_IMSGSEARCHTERM_IID" }, +#endif +#ifdef NS_IMSGSEARCHVALIDITYMANAGER_IID + { &kMsgSearchValidityManagerIID, "NS_IMSGSEARCHVALIDITYMANAGER_IID" }, +#endif +#ifdef NS_IMSGSEARCHVALIDITYTABLE_IID + { &kMsgSearchValidityTableIID, "NS_IMSGSEARCHVALIDITYTABLE_IID" }, +#endif +#ifdef NS_IMSGSEARCHVALUE_IID + { &kMsgSearchValueIID, "NS_IMSGSEARCHVALUE_IID" }, +#endif +#ifdef NS_IMSGSEND_IID + { &kMsgSendIID, "NS_IMSGSEND_IID" }, +#endif +#ifdef NS_IMSGSENDLATER_IID + { &kMsgSendLaterIID, "NS_IMSGSENDLATER_IID" }, +#endif +#ifdef NS_IMSGSENDLATERLISTENER_IID + { &kMsgSendLaterListenerIID, "NS_IMSGSENDLATERLISTENER_IID" }, +#endif +#ifdef NS_IMSGSENDLISTENER_IID + { &kMsgSendListenerIID, "NS_IMSGSENDLISTENER_IID" }, +#endif +#ifdef NS_IMSGSENDREPORT_IID + { &kMsgSendReportIID, "NS_IMSGSENDREPORT_IID" }, +#endif +#ifdef NS_IMSGSIGNATURE_IID + { &kMsgSignatureIID, "NS_IMSGSIGNATURE_IID" }, +#endif +#ifdef NS_IMSGSMIMECOMPFIELDS_IID + { &kMsgSMIMECompFieldsIID, "NS_IMSGSMIMECOMPFIELDS_IID" }, +#endif +#ifdef NS_IMSGSMIMEHEADERSINK_IID + { &kMsgSMIMEHeaderSinkIID, "NS_IMSGSMIMEHEADERSINK_IID" }, +#endif +#ifdef NS_IMSGSTATUSFEEDBACK_IID + { &kMsgStatusFeedbackIID, "NS_IMSGSTATUSFEEDBACK_IID" }, +#endif +#ifdef NS_IMSGSTRINGSERVICE_IID + { &kMsgStringServiceIID, "NS_IMSGSTRINGSERVICE_IID" }, +#endif +#ifdef NS_IMSGTHREAD_IID + { &kMsgThreadIID, "NS_IMSGTHREAD_IID" }, +#endif +#ifdef NS_IMSGVCARD_IID + { &kMsgVCardIID, "NS_IMSGVCARD_IID" }, +#endif +#ifdef NS_IMSGWINDOW_IID + { &kMsgWindowIID, "NS_IMSGWINDOW_IID" }, +#endif +#ifdef NS_IMULTIPARTCHANNEL_IID + { &kMultiPartChannelIID, "NS_IMULTIPARTCHANNEL_IID" }, +#endif +#ifdef NS_IMULTIPLEXINPUTSTREAM_IID + { &kMultiplexInputStreamIID, "NS_IMULTIPLEXINPUTSTREAM_IID" }, +#endif +#ifdef NS_INATIVEAPPSUPPORT_IID + { &kNativeAppSupportIID, "NS_INATIVEAPPSUPPORT_IID" }, +#endif +#ifdef NS_INATIVECOMPONENTLOADER_IID + { &kNativeComponentLoaderIID, "NS_INATIVECOMPONENTLOADER_IID" }, +#endif +#ifdef NS_INATIVESCROLLBAR_IID + { &kNativeScrollbarIID, "NS_INATIVESCROLLBAR_IID" }, +#endif +#ifdef NS_INETMODREGENTRY_IID + { &kNetModRegEntryIID, "NS_INETMODREGENTRY_IID" }, +#endif +#ifdef NS_INETMODULEMGR_IID + { &kNetModuleMgrIID, "NS_INETMODULEMGR_IID" }, +#endif +#ifdef NS_INETNOTIFY_IID + { &kNetNotifyIID, "NS_INETNOTIFY_IID" }, +#endif +#ifdef NS_INEWSDATABASE_IID + { &kNewsDatabaseIID, "NS_INEWSDATABASE_IID" }, +#endif +#ifdef NS_INEWSDOWNLOADDIALOGARGS_IID + { &kNewsDownloadDialogArgsIID, "NS_INEWSDOWNLOADDIALOGARGS_IID" }, +#endif +#ifdef NS_INNTPARTICLELIST_IID + { &kNNTPArticleListIID, "NS_INNTPARTICLELIST_IID" }, +#endif +#ifdef NS_INNTPINCOMINGSERVER_IID + { &kNntpIncomingServerIID, "NS_INNTPINCOMINGSERVER_IID" }, +#endif +#ifdef NS_INNTPNEWSGROUPLIST_IID + { &kNNTPNewsgroupListIID, "NS_INNTPNEWSGROUPLIST_IID" }, +#endif +#ifdef NS_INNTPNEWSGROUPPOST_IID + { &kNNTPNewsgroupPostIID, "NS_INNTPNEWSGROUPPOST_IID" }, +#endif +#ifdef NS_INNTPPROTOCOL_IID + { &kNNTPProtocolIID, "NS_INNTPPROTOCOL_IID" }, +#endif +#ifdef NS_INNTPSERVICE_IID + { &kNntpServiceIID, "NS_INNTPSERVICE_IID" }, +#endif +#ifdef NS_INNTPURL_IID + { &kNntpUrlIID, "NS_INNTPURL_IID" }, +#endif +#ifdef NS_INOINCOMINGSERVER_IID + { &kNoIncomingServerIID, "NS_INOINCOMINGSERVER_IID" }, +#endif +#ifdef NS_INONESERVICE_IID + { &kNoneServiceIID, "NS_INONESERVICE_IID" }, +#endif +#ifdef NS_INSSCERTCACHE_IID + { &kNSSCertCacheIID, "NS_INSSCERTCACHE_IID" }, +#endif +#ifdef NS_IOBJECTINPUTSTREAM_IID + { &kObjectInputStreamIID, "NS_IOBJECTINPUTSTREAM_IID" }, +#endif +#ifdef NS_IOBJECTOUTPUTSTREAM_IID + { &kObjectOutputStreamIID, "NS_IOBJECTOUTPUTSTREAM_IID" }, +#endif +#ifdef NS_IOBSERVER_IID + { &kObserverIID, "NS_IOBSERVER_IID" }, +#endif +#ifdef NS_IOBSERVERSERVICE_IID + { &kObserverServiceIID, "NS_IOBSERVERSERVICE_IID" }, +#endif +#ifdef NS_IOCSPRESPONDER_IID + { &kOCSPResponderIID, "NS_IOCSPRESPONDER_IID" }, +#endif +#ifdef NS_IOUTPUTSTREAM_IID + { &kOutputStreamIID, "NS_IOUTPUTSTREAM_IID" }, +#endif +#ifdef NS_IPASSWORD_IID + { &kPasswordIID, "NS_IPASSWORD_IID" }, +#endif +#ifdef NS_IPASSWORDMANAGER_IID + { &kPasswordManagerIID, "NS_IPASSWORDMANAGER_IID" }, +#endif +#ifdef NS_IPASSWORDMANAGERINTERNAL_IID + { &kPasswordManagerInternalIID, "NS_IPASSWORDMANAGERINTERNAL_IID" }, +#endif +#ifdef NS_IPASSWORDSINK_IID + { &kPasswordSinkIID, "NS_IPASSWORDSINK_IID" }, +#endif +#ifdef NS_IPERMISSION_IID + { &kPermissionIID, "NS_IPERMISSION_IID" }, +#endif +#ifdef NS_IPERMISSIONMANAGER_IID + { &kPermissionManagerIID, "NS_IPERMISSIONMANAGER_IID" }, +#endif +#ifdef NS_IPERSISTENTPROPERTIES2_IID + { &kPersistentProperties2IID, "NS_IPERSISTENTPROPERTIES2_IID" }, +#endif +#ifdef NS_IPHONETIC_IID + { &kPhoneticIID, "NS_IPHONETIC_IID" }, +#endif +#ifdef NS_IPIPE_IID + { &kPipeIID, "NS_IPIPE_IID" }, +#endif +#ifdef NS_IPK11TOKEN_IID + { &kPK11TokenIID, "NS_IPK11TOKEN_IID" }, +#endif +#ifdef NS_IPK11TOKENDB_IID + { &kPK11TokenDBIID, "NS_IPK11TOKENDB_IID" }, +#endif +#ifdef NS_IPKCS11MODULE_IID + { &kPKCS11ModuleIID, "NS_IPKCS11MODULE_IID" }, +#endif +#ifdef NS_IPKCS11MODULEDB_IID + { &kPKCS11ModuleDBIID, "NS_IPKCS11MODULEDB_IID" }, +#endif +#ifdef NS_IPKCS11SLOT_IID + { &kPKCS11SlotIID, "NS_IPKCS11SLOT_IID" }, +#endif +#ifdef NS_IPKIPARAMBLOCK_IID + { &kPKIParamBlockIID, "NS_IPKIPARAMBLOCK_IID" }, +#endif +#ifdef NS_IPLAINTEXTEDITOR_IID + { &kPlaintextEditorIID, "NS_IPLAINTEXTEDITOR_IID" }, +#endif +#ifdef NS_IPLUGIN_IID + { &kPluginIID, "NS_IPLUGIN_IID" }, +#endif +#ifdef NS_IPLUGINHOST_IID + { &kPluginHostIID, "NS_IPLUGINHOST_IID" }, +#endif +#ifdef NS_IPLUGININPUTSTREAM_IID + { &kPluginInputStreamIID, "NS_IPLUGININPUTSTREAM_IID" }, +#endif +#ifdef NS_IPLUGININSTANCE_IID + { &kPluginInstanceIID, "NS_IPLUGININSTANCE_IID" }, +#endif +#ifdef NS_IPLUGININSTANCEOWNER_IID + { &kPluginInstanceOwnerIID, "NS_IPLUGININSTANCEOWNER_IID" }, +#endif +#ifdef NS_IPLUGININSTANCEPEER_IID + { &kPluginInstancePeerIID, "NS_IPLUGININSTANCEPEER_IID" }, +#endif +#ifdef NS_IPLUGININSTANCEPEER2_IID + { &kPluginInstancePeer2IID, "NS_IPLUGININSTANCEPEER2_IID" }, +#endif +#ifdef NS_IPLUGINMANAGER_IID + { &kPluginManagerIID, "NS_IPLUGINMANAGER_IID" }, +#endif +#ifdef NS_IPLUGINMANAGER2_IID + { &kPluginManager2IID, "NS_IPLUGINMANAGER2_IID" }, +#endif +#ifdef NS_IPLUGINSTREAMINFO_IID + { &kPluginStreamInfoIID, "NS_IPLUGINSTREAMINFO_IID" }, +#endif +#ifdef NS_IPLUGINSTREAMLISTENER_IID + { &kPluginStreamListenerIID, "NS_IPLUGINSTREAMLISTENER_IID" }, +#endif +#ifdef NS_IPLUGINTAGINFO_IID + { &kPluginTagInfoIID, "NS_IPLUGINTAGINFO_IID" }, +#endif +#ifdef NS_IPLUGINTAGINFO2_IID + { &kPluginTagInfo2IID, "NS_IPLUGINTAGINFO2_IID" }, +#endif +#ifdef NS_IPLUGINVIEWER_IID + { &kPluginViewerIID, "NS_IPLUGINVIEWER_IID" }, +#endif +#ifdef NS_IPOP3INCOMINGSERVER_IID + { &kPop3IncomingServerIID, "NS_IPOP3INCOMINGSERVER_IID" }, +#endif +#ifdef NS_IPOP3SERVICE_IID + { &kPop3ServiceIID, "NS_IPOP3SERVICE_IID" }, +#endif +#ifdef NS_IPOP3SINK_IID + { &kPop3SinkIID, "NS_IPOP3SINK_IID" }, +#endif +#ifdef NS_IPOP3URL_IID + { &kPop3URLIID, "NS_IPOP3URL_IID" }, +#endif +#ifdef NS_IPOPUPBOXOBJECT_IID + { &kPopupBoxObjectIID, "NS_IPOPUPBOXOBJECT_IID" }, +#endif +#ifdef NS_IPOPUPWINDOWMANAGER_IID + { &kPopupWindowManagerIID, "NS_IPOPUPWINDOWMANAGER_IID" }, +#endif +#ifdef NS_IPREF_IID + { &kPrefIID, "NS_IPREF_IID" }, +#endif +#ifdef NS_IPREFBRANCH_IID + { &kPrefBranchIID, "NS_IPREFBRANCH_IID" }, +#endif +#ifdef NS_IPREFBRANCHINTERNAL_IID + { &kPrefBranchInternalIID, "NS_IPREFBRANCHINTERNAL_IID" }, +#endif +#ifdef NS_IPREFETCHSERVICE_IID + { &kPrefetchServiceIID, "NS_IPREFETCHSERVICE_IID" }, +#endif +#ifdef NS_IPREFLOCALIZEDSTRING_IID + { &kPrefLocalizedStringIID, "NS_IPREFLOCALIZEDSTRING_IID" }, +#endif +#ifdef NS_IPREFMIGRATION_IID + { &kPrefMigrationIID, "NS_IPREFMIGRATION_IID" }, +#endif +#ifdef NS_IPREFMIGRATIONPROGRESS_IID + { &kPrefMigrationProgressIID, "NS_IPREFMIGRATIONPROGRESS_IID" }, +#endif +#ifdef NS_IPREFSERVICE_IID + { &kPrefServiceIID, "NS_IPREFSERVICE_IID" }, +#endif +#ifdef NS_IPRINCIPAL_IID + { &kPrincipalIID, "NS_IPRINCIPAL_IID" }, +#endif +#ifdef NS_IPRINTINGPROMPT_IID + { &kPrintingPromptIID, "NS_IPRINTINGPROMPT_IID" }, +#endif +#ifdef NS_IPRINTINGPROMPTSERVICE_IID + { &kPrintingPromptServiceIID, "NS_IPRINTINGPROMPTSERVICE_IID" }, +#endif +#ifdef NS_IPRINTOPTIONS_IID + { &kPrintOptionsIID, "NS_IPRINTOPTIONS_IID" }, +#endif +#ifdef NS_IPRINTPROGRESS_IID + { &kPrintProgressIID, "NS_IPRINTPROGRESS_IID" }, +#endif +#ifdef NS_IPRINTPROGRESSPARAMS_IID + { &kPrintProgressParamsIID, "NS_IPRINTPROGRESSPARAMS_IID" }, +#endif +#ifdef NS_IPRINTSESSION_IID + { &kPrintSessionIID, "NS_IPRINTSESSION_IID" }, +#endif +#ifdef NS_IPRINTSETTINGS_IID + { &kPrintSettingsIID, "NS_IPRINTSETTINGS_IID" }, +#endif +#ifdef NS_IPRINTSETTINGSSERVICE_IID + { &kPrintSettingsServiceIID, "NS_IPRINTSETTINGSSERVICE_IID" }, +#endif +#ifdef NS_IPRINTSTATUSFEEDBACK_IID + { &kPrintStatusFeedbackIID, "NS_IPRINTSTATUSFEEDBACK_IID" }, +#endif +#ifdef NS_IPROCESS_IID + { &kProcessIID, "NS_IPROCESS_IID" }, +#endif +#ifdef NS_IPROFILE_IID + { &kProfileIID, "NS_IPROFILE_IID" }, +#endif +#ifdef NS_IPROFILECHANGESTATUS_IID + { &kProfileChangeStatusIID, "NS_IPROFILECHANGESTATUS_IID" }, +#endif +#ifdef NS_IPROFILEINTERNAL_IID + { &kProfileInternalIID, "NS_IPROFILEINTERNAL_IID" }, +#endif +#ifdef NS_IPROFILESTARTUPLISTENER_IID + { &kProfileStartupListenerIID, "NS_IPROFILESTARTUPLISTENER_IID" }, +#endif +#ifdef NS_IPROGRAMMINGLANGUAGE_IID + { &kProgrammingLanguageIID, "NS_IPROGRAMMINGLANGUAGE_IID" }, +#endif +#ifdef NS_IPROGRESSDIALOG_IID + { &kProgressDialogIID, "NS_IPROGRESSDIALOG_IID" }, +#endif +#ifdef NS_IPROGRESSEVENTSINK_IID + { &kProgressEventSinkIID, "NS_IPROGRESSEVENTSINK_IID" }, +#endif +#ifdef NS_IPROMPT_IID + { &kPromptIID, "NS_IPROMPT_IID" }, +#endif +#ifdef NS_IPROMPTSERVICE_IID + { &kPromptServiceIID, "NS_IPROMPTSERVICE_IID" }, +#endif +#ifdef NS_IPROPERTIES_IID + { &kPropertiesIID, "NS_IPROPERTIES_IID" }, +#endif +#ifdef NS_IPROPERTYBAG_IID + { &kPropertyBagIID, "NS_IPROPERTYBAG_IID" }, +#endif +#ifdef NS_IPROTOCOLHANDLER_IID + { &kProtocolHandlerIID, "NS_IPROTOCOLHANDLER_IID" }, +#endif +#ifdef NS_IPROTOCOLPROXYSERVICE_IID + { &kProtocolProxyServiceIID, "NS_IPROTOCOLPROXYSERVICE_IID" }, +#endif +#ifdef NS_IPROXIEDPROTOCOLHANDLER_IID + { &kProxiedProtocolHandlerIID, "NS_IPROXIEDPROTOCOLHANDLER_IID" }, +#endif +#ifdef NS_IPROXY_IID + { &kProxyIID, "NS_IPROXY_IID" }, +#endif +#ifdef NS_IPROXYAUTOCONFIG_IID + { &kProxyAutoConfigIID, "NS_IPROXYAUTOCONFIG_IID" }, +#endif +#ifdef NS_IPROXYCREATEINSTANCE_IID + { &kProxyCreateInstanceIID, "NS_IPROXYCREATEINSTANCE_IID" }, +#endif +#ifdef NS_IPROXYINFO_IID + { &kProxyInfoIID, "NS_IPROXYINFO_IID" }, +#endif +#ifdef NS_IPROXYOBJECTMANAGER_IID + { &kProxyObjectManagerIID, "NS_IPROXYOBJECTMANAGER_IID" }, +#endif +#ifdef NS_IRDFCOMPOSITEDATASOURCE_IID + { &kRDFCompositeDataSourceIID, "NS_IRDFCOMPOSITEDATASOURCE_IID" }, +#endif +#ifdef NS_IRDFCONTAINER_IID + { &kRDFContainerIID, "NS_IRDFCONTAINER_IID" }, +#endif +#ifdef NS_IRDFCONTAINERUTILS_IID + { &kRDFContainerUtilsIID, "NS_IRDFCONTAINERUTILS_IID" }, +#endif +#ifdef NS_IRDFDATASOURCE_IID + { &kRDFDataSourceIID, "NS_IRDFDATASOURCE_IID" }, +#endif +#ifdef NS_IRDFDELEGATEFACTORY_IID + { &kRDFDelegateFactoryIID, "NS_IRDFDELEGATEFACTORY_IID" }, +#endif +#ifdef NS_IRDFINMEMORYDATASOURCE_IID + { &kRDFInMemoryDataSourceIID, "NS_IRDFINMEMORYDATASOURCE_IID" }, +#endif +#ifdef NS_IRDFLITERAL_IID + { &kRDFLiteralIID, "NS_IRDFLITERAL_IID" }, +#endif +#ifdef NS_IRDFNODE_IID + { &kRDFNodeIID, "NS_IRDFNODE_IID" }, +#endif +#ifdef NS_IRDFOBSERVER_IID + { &kRDFObserverIID, "NS_IRDFOBSERVER_IID" }, +#endif +#ifdef NS_IRDFPURGEABLEDATASOURCE_IID + { &kRDFPurgeableDataSourceIID, "NS_IRDFPURGEABLEDATASOURCE_IID" }, +#endif +#ifdef NS_IRDFREMOTEDATASOURCE_IID + { &kRDFRemoteDataSourceIID, "NS_IRDFREMOTEDATASOURCE_IID" }, +#endif +#ifdef NS_IRDFRESOURCE_IID + { &kRDFResourceIID, "NS_IRDFRESOURCE_IID" }, +#endif +#ifdef NS_IRDFSERVICE_IID + { &kRDFServiceIID, "NS_IRDFSERVICE_IID" }, +#endif +#ifdef NS_IRDFXMLPARSER_IID + { &kRDFXMLParserIID, "NS_IRDFXMLPARSER_IID" }, +#endif +#ifdef NS_IRDFXMLSERIALIZER_IID + { &kRDFXMLSerializerIID, "NS_IRDFXMLSERIALIZER_IID" }, +#endif +#ifdef NS_IRDFXMLSINK_IID + { &kRDFXMLSinkIID, "NS_IRDFXMLSINK_IID" }, +#endif +#ifdef NS_IRDFXMLSOURCE_IID + { &kRDFXMLSourceIID, "NS_IRDFXMLSOURCE_IID" }, +#endif +#ifdef NS_IREADCONFIG_IID + { &kReadConfigIID, "NS_IREADCONFIG_IID" }, +#endif +#ifdef NS_IRECYCLINGALLOCATOR_IID + { &kRecyclingAllocatorIID, "NS_IRECYCLINGALLOCATOR_IID" }, +#endif +#ifdef NS_IREFRESHURI_IID + { &kRefreshURIIID, "NS_IREFRESHURI_IID" }, +#endif +#ifdef NS_IREGISTRY_IID + { &kRegistryIID, "NS_IREGISTRY_IID" }, +#endif +#ifdef NS_IRELATEDLINKSHANDLER_IID + { &kRelatedLinksHandlerIID, "NS_IRELATEDLINKSHANDLER_IID" }, +#endif +#ifdef NS_IRELATIVEFILEPREF_IID + { &kRelativeFilePrefIID, "NS_IRELATIVEFILEPREF_IID" }, +#endif +#ifdef NS_IREQUEST_IID + { &kRequestIID, "NS_IREQUEST_IID" }, +#endif +#ifdef NS_IREQUESTOBSERVER_IID + { &kRequestObserverIID, "NS_IREQUESTOBSERVER_IID" }, +#endif +#ifdef NS_IREQUESTOBSERVERPROXY_IID + { &kRequestObserverProxyIID, "NS_IREQUESTOBSERVERPROXY_IID" }, +#endif +#ifdef NS_IRESPROTOCOLHANDLER_IID + { &kResProtocolHandlerIID, "NS_IRESPROTOCOLHANDLER_IID" }, +#endif +#ifdef NS_IRESUMABLECHANNEL_IID + { &kResumableChannelIID, "NS_IRESUMABLECHANNEL_IID" }, +#endif +#ifdef NS_IRESUMABLEENTITYID_IID + { &kResumableEntityIDIID, "NS_IRESUMABLEENTITYID_IID" }, +#endif +#ifdef NS_IROLLUPLISTENER_IID + { &kRollupListenerIID, "NS_IROLLUPLISTENER_IID" }, +#endif +#ifdef NS_IRUNNABLE_IID + { &kRunnableIID, "NS_IRUNNABLE_IID" }, +#endif +#ifdef NS_ISAMPLE_IID + { &kSampleIID, "NS_ISAMPLE_IID" }, +#endif +#ifdef NS_ISAVEASCHARSET_IID + { &kSaveAsCharsetIID, "NS_ISAVEASCHARSET_IID" }, +#endif +#ifdef NS_ISCHEMA_IID + { &kSchemaIID, "NS_ISCHEMA_IID" }, +#endif +#ifdef NS_ISCHEMALOADER_IID + { &kSchemaLoaderIID, "NS_ISCHEMALOADER_IID" }, +#endif +#ifdef NS_ISCREEN_IID + { &kScreenIID, "NS_ISCREEN_IID" }, +#endif +#ifdef NS_ISCREENMANAGER_IID + { &kScreenManagerIID, "NS_ISCREENMANAGER_IID" }, +#endif +#ifdef NS_ISCRIPTABLEDATEFORMAT_IID + { &kScriptableDateFormatIID, "NS_ISCRIPTABLEDATEFORMAT_IID" }, +#endif +#ifdef NS_ISCRIPTABLEINPUTSTREAM_IID + { &kScriptableInputStreamIID, "NS_ISCRIPTABLEINPUTSTREAM_IID" }, +#endif +#ifdef NS_ISCRIPTABLEINTERFACES_IID + { &kScriptableInterfacesIID, "NS_ISCRIPTABLEINTERFACES_IID" }, +#endif +#ifdef NS_ISCRIPTABLEPLUGIN_IID + { &kScriptablePluginIID, "NS_ISCRIPTABLEPLUGIN_IID" }, +#endif +#ifdef NS_ISCRIPTABLEREGION_IID + { &kScriptableRegionIID, "NS_ISCRIPTABLEREGION_IID" }, +#endif +#ifdef NS_ISCRIPTABLEUCONV_IID + { &kScriptableUConvIID, "NS_ISCRIPTABLEUCONV_IID" }, +#endif +#ifdef NS_ISCRIPTCONTEXTOWNER_IID + { &kScriptContextOwnerIID, "NS_ISCRIPTCONTEXTOWNER_IID" }, +#endif +#ifdef NS_ISCRIPTERROR_IID + { &kScriptErrorIID, "NS_ISCRIPTERROR_IID" }, +#endif +#ifdef NS_ISCRIPTEVENTHANDLER_IID + { &kScriptEventHandlerIID, "NS_ISCRIPTEVENTHANDLER_IID" }, +#endif +#ifdef NS_ISCRIPTEVENTMANAGER_IID + { &kScriptEventManagerIID, "NS_ISCRIPTEVENTMANAGER_IID" }, +#endif +#ifdef NS_ISCRIPTGLOBALOBJECTOWNER_IID + { &kScriptGlobalObjectOwnerIID, "NS_ISCRIPTGLOBALOBJECTOWNER_IID" }, +#endif +#ifdef NS_ISCRIPTLOADER_IID + { &kScriptLoaderIID, "NS_ISCRIPTLOADER_IID" }, +#endif +#ifdef NS_ISCRIPTLOADEROBSERVER_IID + { &kScriptLoaderObserverIID, "NS_ISCRIPTLOADEROBSERVER_IID" }, +#endif +#ifdef NS_ISCRIPTSECURITYMANAGER_IID + { &kScriptSecurityManagerIID, "NS_ISCRIPTSECURITYMANAGER_IID" }, +#endif +#ifdef NS_ISCROLLABLE_IID + { &kScrollableIID, "NS_ISCROLLABLE_IID" }, +#endif +#ifdef NS_ISCROLLBOXOBJECT_IID + { &kScrollBoxObjectIID, "NS_ISCROLLBOXOBJECT_IID" }, +#endif +#ifdef NS_ISEARCHCONTEXT_IID + { &kSearchContextIID, "NS_ISEARCHCONTEXT_IID" }, +#endif +#ifdef NS_ISEARCHSERVICE_IID + { &kSearchServiceIID, "NS_ISEARCHSERVICE_IID" }, +#endif +#ifdef NS_ISECRETDECODERRING_IID + { &kSecretDecoderRingIID, "NS_ISECRETDECODERRING_IID" }, +#endif +#ifdef NS_ISECUREBROWSERUI_IID + { &kSecureBrowserUIIID, "NS_ISECUREBROWSERUI_IID" }, +#endif +#ifdef NS_ISECURITYCHECKEDCOMPONENT_IID + { &kSecurityCheckedComponentIID, "NS_ISECURITYCHECKEDCOMPONENT_IID" }, +#endif +#ifdef NS_ISECURITYEVENTSINK_IID + { &kSecurityEventSinkIID, "NS_ISECURITYEVENTSINK_IID" }, +#endif +#ifdef NS_ISECURITYPREF_IID + { &kSecurityPrefIID, "NS_ISECURITYPREF_IID" }, +#endif +#ifdef NS_ISECURITYWARNINGDIALOGS_IID + { &kSecurityWarningDialogsIID, "NS_ISECURITYWARNINGDIALOGS_IID" }, +#endif +#ifdef NS_ISEEKABLESTREAM_IID + { &kSeekableStreamIID, "NS_ISEEKABLESTREAM_IID" }, +#endif +#ifdef NS_ISELECTELEMENT_IID + { &kSelectElementIID, "NS_ISELECTELEMENT_IID" }, +#endif +#ifdef NS_ISELECTION_IID + { &kSelectionIID, "NS_ISELECTION_IID" }, +#endif +#ifdef NS_ISELECTIONCONTROLLER_IID + { &kSelectionControllerIID, "NS_ISELECTIONCONTROLLER_IID" }, +#endif +#ifdef NS_ISELECTIONDISPLAY_IID + { &kSelectionDisplayIID, "NS_ISELECTIONDISPLAY_IID" }, +#endif +#ifdef NS_ISELECTIONIMAGESERVICE_IID + { &kSelectionImageServiceIID, "NS_ISELECTIONIMAGESERVICE_IID" }, +#endif +#ifdef NS_ISELECTIONLISTENER_IID + { &kSelectionListenerIID, "NS_ISELECTIONLISTENER_IID" }, +#endif +#ifdef NS_ISELECTIONPRIVATE_IID + { &kSelectionPrivateIID, "NS_ISELECTIONPRIVATE_IID" }, +#endif +#ifdef NS_ISEMANTICUNITSCANNER_IID + { &kSemanticUnitScannerIID, "NS_ISEMANTICUNITSCANNER_IID" }, +#endif +#ifdef NS_ISERIALIZABLE_IID + { &kSerializableIID, "NS_ISERIALIZABLE_IID" }, +#endif +#ifdef NS_ISERVICEMANAGER_IID + { &kServiceManagerIID, "NS_ISERVICEMANAGER_IID" }, +#endif +#ifdef NS_ISHCONTAINER_IID + { &kSHContainerIID, "NS_ISHCONTAINER_IID" }, +#endif +#ifdef NS_ISHENTRY_IID + { &kSHEntryIID, "NS_ISHENTRY_IID" }, +#endif +#ifdef NS_ISHISTORY_IID + { &kSHistoryIID, "NS_ISHISTORY_IID" }, +#endif +#ifdef NS_ISHISTORYINTERNAL_IID + { &kSHistoryInternalIID, "NS_ISHISTORYINTERNAL_IID" }, +#endif +#ifdef NS_ISHISTORYLISTENER_IID + { &kSHistoryListenerIID, "NS_ISHISTORYLISTENER_IID" }, +#endif +#ifdef NS_ISHTRANSACTION_IID + { &kSHTransactionIID, "NS_ISHTRANSACTION_IID" }, +#endif +#ifdef NS_ISIDEBAR_IID + { &kSidebarIID, "NS_ISIDEBAR_IID" }, +#endif +#ifdef NS_ISIGNATUREVERIFIER_IID + { &kSignatureVerifierIID, "NS_ISIGNATUREVERIFIER_IID" }, +#endif +#ifdef NS_ISIGNONVIEWER_IID + { &kSignonViewerIID, "NS_ISIGNONVIEWER_IID" }, +#endif +#ifdef NS_ISIMPLEENUMERATOR_IID + { &kSimpleEnumeratorIID, "NS_ISIMPLEENUMERATOR_IID" }, +#endif +#ifdef NS_ISIMPLESTREAMLISTENER_IID + { &kSimpleStreamListenerIID, "NS_ISIMPLESTREAMLISTENER_IID" }, +#endif +#ifdef NS_ISMIMECERT_IID + { &kSMimeCertIID, "NS_ISMIMECERT_IID" }, +#endif +#ifdef NS_ISMIMEJSHELPER_IID + { &kSMimeJSHelperIID, "NS_ISMIMEJSHELPER_IID" }, +#endif +#ifdef NS_ISMTPSERVER_IID + { &kSmtpServerIID, "NS_ISMTPSERVER_IID" }, +#endif +#ifdef NS_ISMTPSERVICE_IID + { &kSmtpServiceIID, "NS_ISMTPSERVICE_IID" }, +#endif +#ifdef NS_ISMTPURL_IID + { &kSmtpUrlIID, "NS_ISMTPURL_IID" }, +#endif +#ifdef NS_ISOAPATTACHMENTS_IID + { &kSOAPAttachmentsIID, "NS_ISOAPATTACHMENTS_IID" }, +#endif +#ifdef NS_ISOAPBLOCK_IID + { &kSOAPBlockIID, "NS_ISOAPBLOCK_IID" }, +#endif +#ifdef NS_ISOAPCALL_IID + { &kSOAPCallIID, "NS_ISOAPCALL_IID" }, +#endif +#ifdef NS_ISOAPCALLCOMPLETION_IID + { &kSOAPCallCompletionIID, "NS_ISOAPCALLCOMPLETION_IID" }, +#endif +#ifdef NS_ISOAPDECODER_IID + { &kSOAPDecoderIID, "NS_ISOAPDECODER_IID" }, +#endif +#ifdef NS_ISOAPENCODER_IID + { &kSOAPEncoderIID, "NS_ISOAPENCODER_IID" }, +#endif +#ifdef NS_ISOAPENCODING_IID + { &kSOAPEncodingIID, "NS_ISOAPENCODING_IID" }, +#endif +#ifdef NS_ISOAPFAULT_IID + { &kSOAPFaultIID, "NS_ISOAPFAULT_IID" }, +#endif +#ifdef NS_ISOAPHEADERBLOCK_IID + { &kSOAPHeaderBlockIID, "NS_ISOAPHEADERBLOCK_IID" }, +#endif +#ifdef NS_ISOAPMESSAGE_IID + { &kSOAPMessageIID, "NS_ISOAPMESSAGE_IID" }, +#endif +#ifdef NS_ISOAPPARAMETER_IID + { &kSOAPParameterIID, "NS_ISOAPPARAMETER_IID" }, +#endif +#ifdef NS_ISOAPPROPERTYBAGMUTATOR_IID + { &kSOAPPropertyBagMutatorIID, "NS_ISOAPPROPERTYBAGMUTATOR_IID" }, +#endif +#ifdef NS_ISOAPRESPONSE_IID + { &kSOAPResponseIID, "NS_ISOAPRESPONSE_IID" }, +#endif +#ifdef NS_ISOAPRESPONSELISTENER_IID + { &kSOAPResponseListenerIID, "NS_ISOAPRESPONSELISTENER_IID" }, +#endif +#ifdef NS_ISOAPSERVICE_IID + { &kSOAPServiceIID, "NS_ISOAPSERVICE_IID" }, +#endif +#ifdef NS_ISOAPSERVICEREGISTRY_IID + { &kSOAPServiceRegistryIID, "NS_ISOAPSERVICEREGISTRY_IID" }, +#endif +#ifdef NS_ISOAPTRANSPORT_IID + { &kSOAPTransportIID, "NS_ISOAPTRANSPORT_IID" }, +#endif +#ifdef NS_ISOAPTRANSPORTLISTENER_IID + { &kSOAPTransportListenerIID, "NS_ISOAPTRANSPORTLISTENER_IID" }, +#endif +#ifdef NS_ISOCKETPROVIDER_IID + { &kSocketProviderIID, "NS_ISOCKETPROVIDER_IID" }, +#endif +#ifdef NS_ISOCKETPROVIDERSERVICE_IID + { &kSocketProviderServiceIID, "NS_ISOCKETPROVIDERSERVICE_IID" }, +#endif +#ifdef NS_ISOCKETTRANSPORT_IID + { &kSocketTransportIID, "NS_ISOCKETTRANSPORT_IID" }, +#endif +#ifdef NS_ISOCKETTRANSPORTSERVICE_IID + { &kSocketTransportServiceIID, "NS_ISOCKETTRANSPORTSERVICE_IID" }, +#endif +#ifdef NS_ISOCKS4SOCKETINFO_IID + { &kSOCKS4SocketInfoIID, "NS_ISOCKS4SOCKETINFO_IID" }, +#endif +#ifdef NS_ISOCKS4SOCKETPROVIDER_IID + { &kSOCKS4SocketProviderIID, "NS_ISOCKS4SOCKETPROVIDER_IID" }, +#endif +#ifdef NS_ISOCKSSOCKETINFO_IID + { &kSOCKSSocketInfoIID, "NS_ISOCKSSOCKETINFO_IID" }, +#endif +#ifdef NS_ISOCKSSOCKETPROVIDER_IID + { &kSOCKSSocketProviderIID, "NS_ISOCKSSOCKETPROVIDER_IID" }, +#endif +#ifdef NS_ISOUND_IID + { &kSoundIID, "NS_ISOUND_IID" }, +#endif +#ifdef NS_ISPAMSETTINGS_IID + { &kSpamSettingsIID, "NS_ISPAMSETTINGS_IID" }, +#endif +#ifdef NS_ISSLSOCKETCONTROL_IID + { &kSSLSocketControlIID, "NS_ISSLSOCKETCONTROL_IID" }, +#endif +#ifdef NS_ISSLSOCKETPROVIDER_IID + { &kSSLSocketProviderIID, "NS_ISSLSOCKETPROVIDER_IID" }, +#endif +#ifdef NS_ISSLSTATUS_IID + { &kSSLStatusIID, "NS_ISSLSTATUS_IID" }, +#endif +#ifdef NS_ISSLSTATUSPROVIDER_IID + { &kSSLStatusProviderIID, "NS_ISSLSTATUSPROVIDER_IID" }, +#endif +#ifdef NS_ISTANDARDURL_IID + { &kStandardURLIID, "NS_ISTANDARDURL_IID" }, +#endif +#ifdef NS_ISTORAGESTREAM_IID + { &kStorageStreamIID, "NS_ISTORAGESTREAM_IID" }, +#endif +#ifdef NS_ISTREAMBUFFERACCESS_IID + { &kStreamBufferAccessIID, "NS_ISTREAMBUFFERACCESS_IID" }, +#endif +#ifdef NS_ISTREAMCONVERTER_IID + { &kStreamConverterIID, "NS_ISTREAMCONVERTER_IID" }, +#endif +#ifdef NS_ISTREAMCONVERTERSERVICE_IID + { &kStreamConverterServiceIID, "NS_ISTREAMCONVERTERSERVICE_IID" }, +#endif +#ifdef NS_ISTREAMLISTENER_IID + { &kStreamListenerIID, "NS_ISTREAMLISTENER_IID" }, +#endif +#ifdef NS_ISTREAMLISTENERPROXY_IID + { &kStreamListenerProxyIID, "NS_ISTREAMLISTENERPROXY_IID" }, +#endif +#ifdef NS_ISTREAMLISTENERTEE_IID + { &kStreamListenerTeeIID, "NS_ISTREAMLISTENERTEE_IID" }, +#endif +#ifdef NS_ISTREAMLOADER_IID + { &kStreamLoaderIID, "NS_ISTREAMLOADER_IID" }, +#endif +#ifdef NS_ISTREAMTRANSPORTSERVICE_IID + { &kStreamTransportServiceIID, "NS_ISTREAMTRANSPORTSERVICE_IID" }, +#endif +#ifdef NS_ISTRINGBUNDLE_IID + { &kStringBundleIID, "NS_ISTRINGBUNDLE_IID" }, +#endif +#ifdef NS_ISTRINGBUNDLEOVERRIDE_IID + { &kStringBundleOverrideIID, "NS_ISTRINGBUNDLEOVERRIDE_IID" }, +#endif +#ifdef NS_ISTRINGSERVICE_IID + { &kStringServiceIID, "NS_ISTRINGSERVICE_IID" }, +#endif +#ifdef NS_ISTRINGSTREAM_IID + { &kStringStreamIID, "NS_ISTRINGSTREAM_IID" }, +#endif +#ifdef NS_ISUBSCRIBABLESERVER_IID + { &kSubscribableServerIID, "NS_ISUBSCRIBABLESERVER_IID" }, +#endif +#ifdef NS_ISUPPORTS_IID + { &kSupportsIID, "NS_ISUPPORTS_IID" }, +#endif +#ifdef NS_ISUPPORTSARRAY_IID + { &kSupportsArrayIID, "NS_ISUPPORTSARRAY_IID" }, +#endif +#ifdef NS_ISUPPORTSITERATORS_IID + { &kSupportsIteratorsIID, "NS_ISUPPORTSITERATORS_IID" }, +#endif +#ifdef NS_ISUPPORTSPRIMITIVES_IID + { &kSupportsPrimitivesIID, "NS_ISUPPORTSPRIMITIVES_IID" }, +#endif +#ifdef NS_ISYNCLOADDOMSERVICE_IID + { &kSyncLoadDOMServiceIID, "NS_ISYNCLOADDOMSERVICE_IID" }, +#endif +#ifdef NS_ITABLEEDITOR_IID + { &kTableEditorIID, "NS_ITABLEEDITOR_IID" }, +#endif +#ifdef NS_ITESTPROXY_IID + { &kTestProxyIID, "NS_ITESTPROXY_IID" }, +#endif +#ifdef NS_ITEXTAREAELEMENT_IID + { &kTextAreaElementIID, "NS_ITEXTAREAELEMENT_IID" }, +#endif +#ifdef NS_ITEXTSCROLL_IID + { &kTextScrollIID, "NS_ITEXTSCROLL_IID" }, +#endif +#ifdef NS_ITEXTSERVICESFILTER_IID + { &kTextServicesFilterIID, "NS_ITEXTSERVICESFILTER_IID" }, +#endif +#ifdef NS_ITEXTTOSUBURI_IID + { &kTextToSubURIIID, "NS_ITEXTTOSUBURI_IID" }, +#endif +#ifdef NS_ITHREAD_IID + { &kThreadIID, "NS_ITHREAD_IID" }, +#endif +#ifdef NS_ITHREADPOOL_IID + { &kThreadPoolIID, "NS_ITHREADPOOL_IID" }, +#endif +#ifdef NS_ITIMEBOMB_IID + { &kTimeBombIID, "NS_ITIMEBOMB_IID" }, +#endif +#ifdef NS_ITIMELINESERVICE_IID + { &kTimelineServiceIID, "NS_ITIMELINESERVICE_IID" }, +#endif +#ifdef NS_ITIMER_IID + { &kTimerIID, "NS_ITIMER_IID" }, +#endif +#ifdef NS_ITIMERECORDER_IID + { &kTimeRecorderIID, "NS_ITIMERECORDER_IID" }, +#endif +#ifdef NS_ITIMERINTERNAL_IID + { &kTimerInternalIID, "NS_ITIMERINTERNAL_IID" }, +#endif +#ifdef NS_ITIMERMANAGER_IID + { &kTimerManagerIID, "NS_ITIMERMANAGER_IID" }, +#endif +#ifdef NS_ITIMINGSERVICE_IID + { &kTimingServiceIID, "NS_ITIMINGSERVICE_IID" }, +#endif +#ifdef NS_ITOKENDIALOGS_IID + { &kTokenDialogsIID, "NS_ITOKENDIALOGS_IID" }, +#endif +#ifdef NS_ITOKENPASSWORDDIALOGS_IID + { &kTokenPasswordDialogsIID, "NS_ITOKENPASSWORDDIALOGS_IID" }, +#endif +#ifdef NS_ITOOLKIT_IID + { &kToolkitIID, "NS_ITOOLKIT_IID" }, +#endif +#ifdef NS_ITOOLTIPLISTENER_IID + { &kTooltipListenerIID, "NS_ITOOLTIPLISTENER_IID" }, +#endif +#ifdef NS_ITOOLTIPTEXTPROVIDER_IID + { &kTooltipTextProviderIID, "NS_ITOOLTIPTEXTPROVIDER_IID" }, +#endif +#ifdef NS_ITRANSACTION_IID + { &kTransactionIID, "NS_ITRANSACTION_IID" }, +#endif +#ifdef NS_ITRANSACTIONLIST_IID + { &kTransactionListIID, "NS_ITRANSACTIONLIST_IID" }, +#endif +#ifdef NS_ITRANSACTIONLISTENER_IID + { &kTransactionListenerIID, "NS_ITRANSACTIONLISTENER_IID" }, +#endif +#ifdef NS_ITRANSACTIONMANAGER_IID + { &kTransactionManagerIID, "NS_ITRANSACTIONMANAGER_IID" }, +#endif +#ifdef NS_ITRANSFERABLE_IID + { &kTransferableIID, "NS_ITRANSFERABLE_IID" }, +#endif +#ifdef NS_ITRANSPORT_IID + { &kTransportIID, "NS_ITRANSPORT_IID" }, +#endif +#ifdef NS_ITRANSPORTSECURITYINFO_IID + { &kTransportSecurityInfoIID, "NS_ITRANSPORTSECURITYINFO_IID" }, +#endif +#ifdef NS_ITREEBOXOBJECT_IID + { &kTreeBoxObjectIID, "NS_ITREEBOXOBJECT_IID" }, +#endif +#ifdef NS_ITREECONTENTVIEW_IID + { &kTreeContentViewIID, "NS_ITREECONTENTVIEW_IID" }, +#endif +#ifdef NS_ITREESELECTION_IID + { &kTreeSelectionIID, "NS_ITREESELECTION_IID" }, +#endif +#ifdef NS_ITREEVIEW_IID + { &kTreeViewIID, "NS_ITREEVIEW_IID" }, +#endif +#ifdef NS_ITXTTOHTMLCONV_IID + { &kTXTToHTMLConvIID, "NS_ITXTTOHTMLCONV_IID" }, +#endif +#ifdef NS_ITYPEAHEADFIND_IID + { &kTypeAheadFindIID, "NS_ITYPEAHEADFIND_IID" }, +#endif +#ifdef NS_IUNICHARSTREAMLOADER_IID + { &kUnicharStreamLoaderIID, "NS_IUNICHARSTREAMLOADER_IID" }, +#endif +#ifdef NS_IUNICODENORMALIZER_IID + { &kUnicodeNormalizerIID, "NS_IUNICODENORMALIZER_IID" }, +#endif +#ifdef NS_IUPLOADCHANNEL_IID + { &kUploadChannelIID, "NS_IUPLOADCHANNEL_IID" }, +#endif +#ifdef NS_IURI_IID + { &kURIIID, "NS_IURI_IID" }, +#endif +#ifdef NS_IURICHECKER_IID + { &kURICheckerIID, "NS_IURICHECKER_IID" }, +#endif +#ifdef NS_IURICONTENTLISTENER_IID + { &kURIContentListenerIID, "NS_IURICONTENTLISTENER_IID" }, +#endif +#ifdef NS_IURIFIXUP_IID + { &kURIFixupIID, "NS_IURIFIXUP_IID" }, +#endif +#ifdef NS_IURILOADER_IID + { &kURILoaderIID, "NS_IURILOADER_IID" }, +#endif +#ifdef NS_IURIREFOBJECT_IID + { &kURIRefObjectIID, "NS_IURIREFOBJECT_IID" }, +#endif +#ifdef NS_IURL_IID + { &kURLIID, "NS_IURL_IID" }, +#endif +#ifdef NS_IURLBARHISTORY_IID + { &kUrlbarHistoryIID, "NS_IURLBARHISTORY_IID" }, +#endif +#ifdef NS_IURLFETCHER_IID + { &kURLFetcherIID, "NS_IURLFETCHER_IID" }, +#endif +#ifdef NS_IURLLISTENER_IID + { &kUrlListenerIID, "NS_IURLLISTENER_IID" }, +#endif +#ifdef NS_IURLLISTENERMANAGER_IID + { &kUrlListenerManagerIID, "NS_IURLLISTENERMANAGER_IID" }, +#endif +#ifdef NS_IURLPARSER_IID + { &kURLParserIID, "NS_IURLPARSER_IID" }, +#endif +#ifdef NS_IUSERCERTPICKER_IID + { &kUserCertPickerIID, "NS_IUSERCERTPICKER_IID" }, +#endif +#ifdef NS_IUSERINFO_IID + { &kUserInfoIID, "NS_IUSERINFO_IID" }, +#endif +#ifdef NS_IVARIANT_IID + { &kVariantIID, "NS_IVARIANT_IID" }, +#endif +#ifdef NS_IVIEWSOURCECHANNEL_IID + { &kViewSourceChannelIID, "NS_IVIEWSOURCECHANNEL_IID" }, +#endif +#ifdef NS_IWALLETEDITOR_IID + { &kWalletEditorIID, "NS_IWALLETEDITOR_IID" }, +#endif +#ifdef NS_IWALLETPREVIEW_IID + { &kWalletPreviewIID, "NS_IWALLETPREVIEW_IID" }, +#endif +#ifdef NS_IWALLETSERVICE_IID + { &kWalletServiceIID, "NS_IWALLETSERVICE_IID" }, +#endif +#ifdef NS_IWEAKREFERENCE_IID + { &kWeakReferenceIID, "NS_IWEAKREFERENCE_IID" }, +#endif +#ifdef NS_IWEBBROWSER_IID + { &kWebBrowserIID, "NS_IWEBBROWSER_IID" }, +#endif +#ifdef NS_IWEBBROWSERCHROME_IID + { &kWebBrowserChromeIID, "NS_IWEBBROWSERCHROME_IID" }, +#endif +#ifdef NS_IWEBBROWSERCHROMEFOCUS_IID + { &kWebBrowserChromeFocusIID, "NS_IWEBBROWSERCHROMEFOCUS_IID" }, +#endif +#ifdef NS_IWEBBROWSERFIND_IID + { &kWebBrowserFindIID, "NS_IWEBBROWSERFIND_IID" }, +#endif +#ifdef NS_IWEBBROWSERFOCUS_IID + { &kWebBrowserFocusIID, "NS_IWEBBROWSERFOCUS_IID" }, +#endif +#ifdef NS_IWEBBROWSERPERSIST_IID + { &kWebBrowserPersistIID, "NS_IWEBBROWSERPERSIST_IID" }, +#endif +#ifdef NS_IWEBBROWSERPRINT_IID + { &kWebBrowserPrintIID, "NS_IWEBBROWSERPRINT_IID" }, +#endif +#ifdef NS_IWEBBROWSERSETUP_IID + { &kWebBrowserSetupIID, "NS_IWEBBROWSERSETUP_IID" }, +#endif +#ifdef NS_IWEBNAVIGATION_IID + { &kWebNavigationIID, "NS_IWEBNAVIGATION_IID" }, +#endif +#ifdef NS_IWEBPAGEDESCRIPTOR_IID + { &kWebPageDescriptorIID, "NS_IWEBPAGEDESCRIPTOR_IID" }, +#endif +#ifdef NS_IWEBPROGRESS_IID + { &kWebProgressIID, "NS_IWEBPROGRESS_IID" }, +#endif +#ifdef NS_IWEBPROGRESSLISTENER_IID + { &kWebProgressListenerIID, "NS_IWEBPROGRESSLISTENER_IID" }, +#endif +#ifdef NS_IWINDOWCREATOR_IID + { &kWindowCreatorIID, "NS_IWINDOWCREATOR_IID" }, +#endif +#ifdef NS_IWINDOWCREATOR2_IID + { &kWindowCreator2IID, "NS_IWINDOWCREATOR2_IID" }, +#endif +#ifdef NS_IWINDOWDATASOURCE_IID + { &kWindowDataSourceIID, "NS_IWINDOWDATASOURCE_IID" }, +#endif +#ifdef NS_IWINDOWLESSPLUGINSTPEER_IID + { &kWindowlessPlugInstPeerIID, "NS_IWINDOWLESSPLUGINSTPEER_IID" }, +#endif +#ifdef NS_IWINDOWMEDIATOR_IID + { &kWindowMediatorIID, "NS_IWINDOWMEDIATOR_IID" }, +#endif +#ifdef NS_IWINDOWMEDIATORLISTENER_IID + { &kWindowMediatorListenerIID, "NS_IWINDOWMEDIATORLISTENER_IID" }, +#endif +#ifdef NS_IWINDOWWATCHER_IID + { &kWindowWatcherIID, "NS_IWINDOWWATCHER_IID" }, +#endif +#ifdef NS_IWYCIWYGCHANNEL_IID + { &kWyciwygChannelIID, "NS_IWYCIWYGCHANNEL_IID" }, +#endif +#ifdef NS_IX509CERT_IID + { &kX509CertIID, "NS_IX509CERT_IID" }, +#endif +#ifdef NS_IX509CERTDB_IID + { &kX509CertDBIID, "NS_IX509CERTDB_IID" }, +#endif +#ifdef NS_IX509CERTVALIDITY_IID + { &kX509CertValidityIID, "NS_IX509CERTVALIDITY_IID" }, +#endif +#ifdef NS_IXMLHTTPREQUEST_IID + { &kXMLHttpRequestIID, "NS_IXMLHTTPREQUEST_IID" }, +#endif +#ifdef NS_IXMLRPCCLIENT_IID + { &kXmlRpcClientIID, "NS_IXMLRPCCLIENT_IID" }, +#endif +#ifdef NS_IXMLRPCCLIENTLISTENER_IID + { &kXmlRpcClientListenerIID, "NS_IXMLRPCCLIENTLISTENER_IID" }, +#endif +#ifdef NS_IXPCONNECT_IID + { &kXPConnectIID, "NS_IXPCONNECT_IID" }, +#endif +#ifdef NS_IXPCSCRIPTABLE_IID + { &kXPCScriptableIID, "NS_IXPCSCRIPTABLE_IID" }, +#endif +#ifdef NS_IXPCSCRIPTNOTIFY_IID + { &kXPCScriptNotifyIID, "NS_IXPCSCRIPTNOTIFY_IID" }, +#endif +#ifdef NS_IXPCSECURITYMANAGER_IID + { &kXPCSecurityManagerIID, "NS_IXPCSECURITYMANAGER_IID" }, +#endif +#ifdef NS_IXPIDIALOGSERVICE_IID + { &kXPIDialogServiceIID, "NS_IXPIDIALOGSERVICE_IID" }, +#endif +#ifdef NS_IXPINOTIFIER_IID + { &kXPINotifierIID, "NS_IXPINOTIFIER_IID" }, +#endif +#ifdef NS_IXPIPROGRESSDIALOG_IID + { &kXPIProgressDialogIID, "NS_IXPIPROGRESSDIALOG_IID" }, +#endif +#ifdef NS_IXPTLOADER_IID + { &kXPTLoaderIID, "NS_IXPTLOADER_IID" }, +#endif +#ifdef NS_IXREMOTECLIENT_IID + { &kXRemoteClientIID, "NS_IXREMOTECLIENT_IID" }, +#endif +#ifdef NS_IXSLTEXCEPTION_IID + { &kXSLTExceptionIID, "NS_IXSLTEXCEPTION_IID" }, +#endif +#ifdef NS_IXSLTPROCESSOR_IID + { &kXSLTProcessorIID, "NS_IXSLTPROCESSOR_IID" }, +#endif +#ifdef NS_IXSLTPROCESSOROBSOLETE_IID + { &kXSLTProcessorObsoleteIID, "NS_IXSLTPROCESSOROBSOLETE_IID" }, +#endif +#ifdef NS_IXULBROWSERWINDOW_IID + { &kXULBrowserWindowIID, "NS_IXULBROWSERWINDOW_IID" }, +#endif +#ifdef NS_IXULSORTSERVICE_IID + { &kXULSortServiceIID, "NS_IXULSORTSERVICE_IID" }, +#endif +#ifdef NS_IXULTEMPLATEBUILDER_IID + { &kXULTemplateBuilderIID, "NS_IXULTEMPLATEBUILDER_IID" }, +#endif +#ifdef NS_IXULWINDOW_IID + { &kXULWindowIID, "NS_IXULWINDOW_IID" }, +#endif +#ifdef NS_IZIPREADER_IID + { &kZipReaderIID, "NS_IZIPREADER_IID" }, +#endif +#ifdef NS_IJRIPLUGIN_IID + { &kJRIPluginIID, "NS_IJRIPLUGIN_IID" }, +#endif +#ifdef NS_IJVMCONSOLE_IID + { &kJVMConsoleIID, "NS_IJVMCONSOLE_IID" }, +#endif +#ifdef NS_IJVMMANAGER_IID + { &kJVMManagerIID, "NS_IJVMMANAGER_IID" }, +#endif +#ifdef NS_IJVMPLUGIN_IID + { &kJVMPluginIID, "NS_IJVMPLUGIN_IID" }, +#endif +#ifdef NS_IJVMPLUGININSTANCE_IID + { &kJVMPluginInstanceIID, "NS_IJVMPLUGININSTANCE_IID" }, +#endif +#ifdef NS_IJVMPLUGINTAGINFO_IID + { &kJVMPluginTagInfoIID, "NS_IJVMPLUGINTAGINFO_IID" }, +#endif +#ifdef NS_IJVMPREFSWINDOW_IID + { &kJVMPrefsWindowIID, "NS_IJVMPREFSWINDOW_IID" }, +#endif +#ifdef NS_IJVMWINDOW_IID + { &kJVMWindowIID, "NS_IJVMWINDOW_IID" }, +#endif +#ifdef NS_ILIVECONNECTMANAGER_IID + { &kLiveConnectManagerIID, "NS_ILIVECONNECTMANAGER_IID" }, +#endif +#ifdef NS_ISECUREENV_IID + { &kSecureEnvIID, "NS_ISECUREENV_IID" }, +#endif +#ifdef NS_ISYMANTECDEBUGGER_IID + { &kSymantecDebuggerIID, "NS_ISYMANTECDEBUGGER_IID" }, +#endif +#ifdef NS_ISYMANTECDEBUGMANAGER_IID + { &kSymantecDebugManagerIID, "NS_ISYMANTECDEBUGMANAGER_IID" }, +#endif +#ifdef NS_IREADMANAGER_IID + { &kreadManagerIID, "NS_IREADMANAGER_IID" }, +#endif +#ifdef NS_JVM_IID + { &kjvmIID, "NS_JVM_IID" }, +#endif +#ifdef NS_JVMMANAGER_IID + { &kJVMManagerIID, "NS_JVMMANAGER_IID" }, +#endif +#ifdef NS_JVMMANAGER_CID + { &kJVMManagerCID, "NS_JVMMANAGER_CID" }, +#endif +#ifdef NS_JVMPLUGINTAGINFO_IID + { &kJVMPluginTagInfoIID, "NS_JVMPLUGINTAGINFO_IID" }, +#endif +#ifdef NS_ILIVECONNECT_IID + { &kLiveconnectIID, "NS_ILIVECONNECT_IID" }, +#endif +#ifdef NS_ISECURELIVECONNECT_IID + { &kSecureLiveconnectIID, "NS_ISECURELIVECONNECT_IID" }, +#endif +#ifdef NS_ISECURITYCONTEXT_IID + { &kSecurityContextIID, "NS_ISECURITYCONTEXT_IID" }, +#endif +#ifdef NS_ISHUTDOWNLISTENER_IID + { &kShutdownListenerIID, "NS_ISHUTDOWNLISTENER_IID" }, +#endif +#ifdef NS_ISERVICEMANAGER_OBSOLETE_IID + { &kServiceManagerObsoleteIID, "NS_ISERVICEMANAGER_OBSOLETE_IID" }, +#endif +#ifdef NS_IJVMTHREADMANAGER_IID + { &kJVMThreadManagerIID, "NS_IJVMTHREADMANAGER_IID" }, +#endif +#ifdef FLASH_IOBJECT7_IID + { &kFlashIObject7IID, "FLASH_IOBJECT7_IID" }, +#endif +#ifdef FLASH_ISCRIPTABLEPLUGIN7_IID + { &kFlashIScriptablePlugin7IID, "FLASH_ISCRIPTABLEPLUGIN7_IID" }, +#endif +#ifdef NS_IFLASH5_IID + { &kFlash5IID, "NS_IFLASH5_IID" }, +#endif +}; + + + +/** + * Lookup list for IIDs and CIDs to get an understandable name. + */ +static struct nsLookupStrIDEntry +{ + const nsID * pID; + const char * pszStrID; +} aIDStrIDLookup[] = +{ +#ifdef NS_CDEFAULTURIFIXUP_IID_STR + { &kCDefaultURIFixupIID, NS_CDEFAULTURIFIXUP_IID_STR }, +#endif +#ifdef NS_CDOCSHELL_IID_STR + { &kCDocShellIID, NS_CDOCSHELL_IID_STR }, +#endif +#ifdef NS_CEXTERNALHANDLERSERVICE_IID_STR + { &kCExternalHandlerServiceIID, NS_CEXTERNALHANDLERSERVICE_IID_STR }, +#endif +#ifdef NS_CURILOADER_IID_STR + { &kCURILoaderIID, NS_CURILOADER_IID_STR }, +#endif +#ifdef NS_CWEBBROWSER_IID_STR + { &kCWebBrowserIID, NS_CWEBBROWSER_IID_STR }, +#endif +#ifdef NS_CWEBBROWSERPERSIST_IID_STR + { &kCWebBrowserPersistIID, NS_CWEBBROWSERPERSIST_IID_STR }, +#endif +#ifdef NS_IABADDRESSCOLLECTER_IID_STR + { &kAbAddressCollecterIID, NS_IABADDRESSCOLLECTER_IID_STR }, +#endif +#ifdef NS_IABAUTOCOMPLETESESSION_IID_STR + { &kAbAutoCompleteSessionIID, NS_IABAUTOCOMPLETESESSION_IID_STR }, +#endif +#ifdef NS_IABBASE_IID_STR + { &kAbBaseIID, NS_IABBASE_IID_STR }, +#endif +#ifdef NS_IABBOOLEANEXPRESSION_IID_STR + { &kAbBooleanExpressionIID, NS_IABBOOLEANEXPRESSION_IID_STR }, +#endif +#ifdef NS_IABCARD_IID_STR + { &kAbCardIID, NS_IABCARD_IID_STR }, +#endif +#ifdef NS_IABDIRECTORY_IID_STR + { &kAbDirectoryIID, NS_IABDIRECTORY_IID_STR }, +#endif +#ifdef NS_IABDIRECTORYQUERY_IID_STR + { &kAbDirectoryQueryIID, NS_IABDIRECTORYQUERY_IID_STR }, +#endif +#ifdef NS_IABDIRECTORYQUERYPROXY_IID_STR + { &kAbDirectoryQueryProxyIID, NS_IABDIRECTORYQUERYPROXY_IID_STR }, +#endif +#ifdef NS_IABDIRECTORYSEARCH_IID_STR + { &kAbDirectorySearchIID, NS_IABDIRECTORYSEARCH_IID_STR }, +#endif +#ifdef NS_IABDIRFACTORY_IID_STR + { &kAbDirFactoryIID, NS_IABDIRFACTORY_IID_STR }, +#endif +#ifdef NS_IABDIRFACTORYSERVICE_IID_STR + { &kAbDirFactoryServiceIID, NS_IABDIRFACTORYSERVICE_IID_STR }, +#endif +#ifdef NS_IABLDAPAUTOCOMPFORMATTER_IID_STR + { &kAbLDAPAutoCompFormatterIID, NS_IABLDAPAUTOCOMPFORMATTER_IID_STR }, +#endif +#ifdef NS_IABLDAPREPLICATIONDATA_IID_STR + { &kAbLDAPReplicationDataIID, NS_IABLDAPREPLICATIONDATA_IID_STR }, +#endif +#ifdef NS_IABLDAPREPLICATIONQUERY_IID_STR + { &kAbLDAPReplicationQueryIID, NS_IABLDAPREPLICATIONQUERY_IID_STR }, +#endif +#ifdef NS_IABLDAPREPLICATIONSERVICE_IID_STR + { &kAbLDAPReplicationServiceIID, NS_IABLDAPREPLICATIONSERVICE_IID_STR }, +#endif +#ifdef NS_IABLISTENER_IID_STR + { &kAbListenerIID, NS_IABLISTENER_IID_STR }, +#endif +#ifdef NS_IABMDBCARD_IID_STR + { &kAbMDBCardIID, NS_IABMDBCARD_IID_STR }, +#endif +#ifdef NS_IABMDBDIRECTORY_IID_STR + { &kAbMDBDirectoryIID, NS_IABMDBDIRECTORY_IID_STR }, +#endif +#ifdef NS_IABOUTMODULE_IID_STR + { &kAboutModuleIID, NS_IABOUTMODULE_IID_STR }, +#endif +#ifdef NS_IABUPGRADER_IID_STR + { &kAbUpgraderIID, NS_IABUPGRADER_IID_STR }, +#endif +#ifdef NS_IABVIEW_IID_STR + { &kAbViewIID, NS_IABVIEW_IID_STR }, +#endif +#ifdef NS_IACCESSIBILITYSERVICE_IID_STR + { &kAccessibilityServiceIID, NS_IACCESSIBILITYSERVICE_IID_STR }, +#endif +#ifdef NS_IACCESSIBLE_IID_STR + { &kAccessibleIID, NS_IACCESSIBLE_IID_STR }, +#endif +#ifdef NS_IACCESSIBLEACTION_IID_STR + { &kAccessibleActionIID, NS_IACCESSIBLEACTION_IID_STR }, +#endif +#ifdef NS_IACCESSIBLECARET_IID_STR + { &kAccessibleCaretIID, NS_IACCESSIBLECARET_IID_STR }, +#endif +#ifdef NS_IACCESSIBLEDOCUMENT_IID_STR + { &kAccessibleDocumentIID, NS_IACCESSIBLEDOCUMENT_IID_STR }, +#endif +#ifdef NS_IACCESSIBLEEDITABLETEXT_IID_STR + { &kAccessibleEditableTextIID, NS_IACCESSIBLEEDITABLETEXT_IID_STR }, +#endif +#ifdef NS_IACCESSIBLEEVENTLISTENER_IID_STR + { &kAccessibleEventListenerIID, NS_IACCESSIBLEEVENTLISTENER_IID_STR }, +#endif +#ifdef NS_IACCESSIBLEEVENTRECEIVER_IID_STR + { &kAccessibleEventReceiverIID, NS_IACCESSIBLEEVENTRECEIVER_IID_STR }, +#endif +#ifdef NS_IACCESSIBLEHYPERLINK_IID_STR + { &kAccessibleHyperLinkIID, NS_IACCESSIBLEHYPERLINK_IID_STR }, +#endif +#ifdef NS_IACCESSIBLEHYPERTEXT_IID_STR + { &kAccessibleHyperTextIID, NS_IACCESSIBLEHYPERTEXT_IID_STR }, +#endif +#ifdef NS_IACCESSIBLEPROVIDER_IID_STR + { &kAccessibleProviderIID, NS_IACCESSIBLEPROVIDER_IID_STR }, +#endif +#ifdef NS_IACCESSIBLESELECTABLE_IID_STR + { &kAccessibleSelectableIID, NS_IACCESSIBLESELECTABLE_IID_STR }, +#endif +#ifdef NS_IACCESSIBLETABLE_IID_STR + { &kAccessibleTableIID, NS_IACCESSIBLETABLE_IID_STR }, +#endif +#ifdef NS_IACCESSIBLETEXT_IID_STR + { &kAccessibleTextIID, NS_IACCESSIBLETEXT_IID_STR }, +#endif +#ifdef NS_IACCESSIBLEVALUE_IID_STR + { &kAccessibleValueIID, NS_IACCESSIBLEVALUE_IID_STR }, +#endif +#ifdef NS_IACCESSIBLEWIN32OBJECT_IID_STR + { &kAccessibleWin32ObjectIID, NS_IACCESSIBLEWIN32OBJECT_IID_STR }, +#endif +#ifdef NS_IADDBOOKURL_IID_STR + { &kAddbookUrlIID, NS_IADDBOOKURL_IID_STR }, +#endif +#ifdef NS_IADDRBOOKSESSION_IID_STR + { &kAddrBookSessionIID, NS_IADDRBOOKSESSION_IID_STR }, +#endif +#ifdef NS_IADDRDATABASE_IID_STR + { &kAddrDatabaseIID, NS_IADDRDATABASE_IID_STR }, +#endif +#ifdef NS_IADDRDBANNOUNCER_IID_STR + { &kAddrDBAnnouncerIID, NS_IADDRDBANNOUNCER_IID_STR }, +#endif +#ifdef NS_IADDRDBLISTENER_IID_STR + { &kAddrDBListenerIID, NS_IADDRDBLISTENER_IID_STR }, +#endif +#ifdef NS_IADDRESSBOOK_IID_STR + { &kAddressBookIID, NS_IADDRESSBOOK_IID_STR }, +#endif +#ifdef NS_IAGGREGATEPRINCIPAL_IID_STR + { &kAggregatePrincipalIID, NS_IAGGREGATEPRINCIPAL_IID_STR }, +#endif +#ifdef NS_IAPPSHELL_IID_STR + { &kAppShellIID, NS_IAPPSHELL_IID_STR }, +#endif +#ifdef NS_IAPPSHELLSERVICE_IID_STR + { &kAppShellServiceIID, NS_IAPPSHELLSERVICE_IID_STR }, +#endif +#ifdef NS_IARRAY_IID_STR + { &kArrayIID, NS_IARRAY_IID_STR }, +#endif +#ifdef NS_IASN1OBJECT_IID_STR + { &kASN1ObjectIID, NS_IASN1OBJECT_IID_STR }, +#endif +#ifdef NS_IASN1PRINTABLEITEM_IID_STR + { &kASN1PrintableItemIID, NS_IASN1PRINTABLEITEM_IID_STR }, +#endif +#ifdef NS_IASN1SEQUENCE_IID_STR + { &kASN1SequenceIID, NS_IASN1SEQUENCE_IID_STR }, +#endif +#ifdef NS_IASN1TREE_IID_STR + { &kASN1TreeIID, NS_IASN1TREE_IID_STR }, +#endif +#ifdef NS_IASYNCINPUTSTREAM_IID_STR + { &kAsyncInputStreamIID, NS_IASYNCINPUTSTREAM_IID_STR }, +#endif +#ifdef NS_IASYNCOUTPUTSTREAM_IID_STR + { &kAsyncOutputStreamIID, NS_IASYNCOUTPUTSTREAM_IID_STR }, +#endif +#ifdef NS_IASYNCSTREAMCOPIER_IID_STR + { &kAsyncStreamCopierIID, NS_IASYNCSTREAMCOPIER_IID_STR }, +#endif +#ifdef NS_IATOM_IID_STR + { &kAtomIID, NS_IATOM_IID_STR }, +#endif +#ifdef NS_IATOMSERVICE_IID_STR + { &kAtomServiceIID, NS_IATOMSERVICE_IID_STR }, +#endif +#ifdef NS_IAUTHPROMPT_IID_STR + { &kAuthPromptIID, NS_IAUTHPROMPT_IID_STR }, +#endif +#ifdef NS_IAUTHPROMPTWRAPPER_IID_STR + { &kAuthPromptWrapperIID, NS_IAUTHPROMPTWRAPPER_IID_STR }, +#endif +#ifdef NS_IAUTOCOMPLETELISTENER_IID_STR + { &kAutoCompleteListenerIID, NS_IAUTOCOMPLETELISTENER_IID_STR }, +#endif +#ifdef NS_IAUTOCOMPLETERESULTS_IID_STR + { &kAutoCompleteResultsIID, NS_IAUTOCOMPLETERESULTS_IID_STR }, +#endif +#ifdef NS_IAUTOCOMPLETESESSION_IID_STR + { &kAutoCompleteSessionIID, NS_IAUTOCOMPLETESESSION_IID_STR }, +#endif +#ifdef NS_IAUTOCONFIG_IID_STR + { &kAutoConfigIID, NS_IAUTOCONFIG_IID_STR }, +#endif +#ifdef NS_IBADCERTLISTENER_IID_STR + { &kBadCertListenerIID, NS_IBADCERTLISTENER_IID_STR }, +#endif +#ifdef NS_IBASEWINDOW_IID_STR + { &kBaseWindowIID, NS_IBASEWINDOW_IID_STR }, +#endif +#ifdef NS_IBIDIKEYBOARD_IID_STR + { &kBidiKeyboardIID, NS_IBIDIKEYBOARD_IID_STR }, +#endif +#ifdef NS_IBINARYINPUTSTREAM_IID_STR + { &kBinaryInputStreamIID, NS_IBINARYINPUTSTREAM_IID_STR }, +#endif +#ifdef NS_IBINARYOUTPUTSTREAM_IID_STR + { &kBinaryOutputStreamIID, NS_IBINARYOUTPUTSTREAM_IID_STR }, +#endif +#ifdef NS_IBOOKMARKSSERVICE_IID_STR + { &kBookmarksServiceIID, NS_IBOOKMARKSSERVICE_IID_STR }, +#endif +#ifdef NS_IBOXLAYOUTMANAGER_IID_STR + { &kBoxLayoutManagerIID, NS_IBOXLAYOUTMANAGER_IID_STR }, +#endif +#ifdef NS_IBOXOBJECT_IID_STR + { &kBoxObjectIID, NS_IBOXOBJECT_IID_STR }, +#endif +#ifdef NS_IBOXPAINTMANAGER_IID_STR + { &kBoxPaintManagerIID, NS_IBOXPAINTMANAGER_IID_STR }, +#endif +#ifdef NS_IBROWSERBOXOBJECT_IID_STR + { &kBrowserBoxObjectIID, NS_IBROWSERBOXOBJECT_IID_STR }, +#endif +#ifdef NS_IBROWSERHISTORY_IID_STR + { &kBrowserHistoryIID, NS_IBROWSERHISTORY_IID_STR }, +#endif +#ifdef NS_IBROWSERINSTANCE_IID_STR + { &kBrowserInstanceIID, NS_IBROWSERINSTANCE_IID_STR }, +#endif +#ifdef NS_IBUFENTROPYCOLLECTOR_IID_STR + { &kBufEntropyCollectorIID, NS_IBUFENTROPYCOLLECTOR_IID_STR }, +#endif +#ifdef NS_IBUFFEREDSTREAMS_IID_STR + { &kBufferedStreamsIID, NS_IBUFFEREDSTREAMS_IID_STR }, +#endif +#ifdef NS_IBYTEARRAYINPUTSTREAM_IID_STR + { &kByteArrayInputStreamIID, NS_IBYTEARRAYINPUTSTREAM_IID_STR }, +#endif +#ifdef NS_IBYTERANGEREQUEST_IID_STR + { &kByteRangeRequestIID, NS_IBYTERANGEREQUEST_IID_STR }, +#endif +#ifdef NS_ICACHE_IID_STR + { &kCacheIID, NS_ICACHE_IID_STR }, +#endif +#ifdef NS_ICACHEENTRYDESCRIPTOR_IID_STR + { &kCacheEntryDescriptorIID, NS_ICACHEENTRYDESCRIPTOR_IID_STR }, +#endif +#ifdef NS_ICACHELISTENER_IID_STR + { &kCacheListenerIID, NS_ICACHELISTENER_IID_STR }, +#endif +#ifdef NS_ICACHESERVICE_IID_STR + { &kCacheServiceIID, NS_ICACHESERVICE_IID_STR }, +#endif +#ifdef NS_ICACHESESSION_IID_STR + { &kCacheSessionIID, NS_ICACHESESSION_IID_STR }, +#endif +#ifdef NS_ICACHEVISITOR_IID_STR + { &kCacheVisitorIID, NS_ICACHEVISITOR_IID_STR }, +#endif +#ifdef NS_ICACHINGCHANNEL_IID_STR + { &kCachingChannelIID, NS_ICACHINGCHANNEL_IID_STR }, +#endif +#ifdef NS_ICATEGORYMANAGER_IID_STR + { &kCategoryManagerIID, NS_ICATEGORYMANAGER_IID_STR }, +#endif +#ifdef NS_ICERTIFICATEDIALOGS_IID_STR + { &kCertificateDialogsIID, NS_ICERTIFICATEDIALOGS_IID_STR }, +#endif +#ifdef NS_ICERTIFICATEPRINCIPAL_IID_STR + { &kCertificatePrincipalIID, NS_ICERTIFICATEPRINCIPAL_IID_STR }, +#endif +#ifdef NS_ICERTPICKDIALOGS_IID_STR + { &kCertPickDialogsIID, NS_ICERTPICKDIALOGS_IID_STR }, +#endif +#ifdef NS_ICERTSELECT_IID_STR + { &kCertSelectIID, NS_ICERTSELECT_IID_STR }, +#endif +#ifdef NS_ICERTTREE_IID_STR + { &kCertTreeIID, NS_ICERTTREE_IID_STR }, +#endif +#ifdef NS_ICHANNEL_IID_STR + { &kChannelIID, NS_ICHANNEL_IID_STR }, +#endif +#ifdef NS_ICHARSETCONVERTERMANAGER2_IID_STR + { &kCharsetConverterManager2IID, NS_ICHARSETCONVERTERMANAGER2_IID_STR }, +#endif +#ifdef NS_ICHROMEEVENTHANDLER_IID_STR + { &kChromeEventHandlerIID, NS_ICHROMEEVENTHANDLER_IID_STR }, +#endif +#ifdef NS_ICHROMEREGISTRY_IID_STR + { &kChromeRegistryIID, NS_ICHROMEREGISTRY_IID_STR }, +#endif +#ifdef NS_ICIPHERINFO_IID_STR + { &kCipherInfoIID, NS_ICIPHERINFO_IID_STR }, +#endif +#ifdef NS_ICITER_IID_STR + { &kCiterIID, NS_ICITER_IID_STR }, +#endif +#ifdef NS_ICLASSICPLUGINFACTORY_IID_STR + { &kClassicPluginFactoryIID, NS_ICLASSICPLUGINFACTORY_IID_STR }, +#endif +#ifdef NS_ICLASSINFO_IID_STR + { &kClassInfoIID, NS_ICLASSINFO_IID_STR }, +#endif +#ifdef NS_ICLIENTAUTHDIALOGS_IID_STR + { &kClientAuthDialogsIID, NS_ICLIENTAUTHDIALOGS_IID_STR }, +#endif +#ifdef NS_ICLIPBOARD_IID_STR + { &kClipboardIID, NS_ICLIPBOARD_IID_STR }, +#endif +#ifdef NS_ICLIPBOARDCOMMANDS_IID_STR + { &kClipboardCommandsIID, NS_ICLIPBOARDCOMMANDS_IID_STR }, +#endif +#ifdef NS_ICLIPBOARDHELPER_IID_STR + { &kClipboardHelperIID, NS_ICLIPBOARDHELPER_IID_STR }, +#endif +#ifdef NS_ICLIPBOARDOWNER_IID_STR + { &kClipboardOwnerIID, NS_ICLIPBOARDOWNER_IID_STR }, +#endif +#ifdef NS_ICLOSEALLWINDOWS_IID_STR + { &kCloseAllWindowsIID, NS_ICLOSEALLWINDOWS_IID_STR }, +#endif +#ifdef NS_ICMDLINEHANDLER_IID_STR + { &kCmdLineHandlerIID, NS_ICMDLINEHANDLER_IID_STR }, +#endif +#ifdef NS_ICMDLINESERVICE_IID_STR + { &kCmdLineServiceIID, NS_ICMDLINESERVICE_IID_STR }, +#endif +#ifdef NS_ICMSDECODER_IID_STR + { &kCMSDecoderIID, NS_ICMSDECODER_IID_STR }, +#endif +#ifdef NS_ICMSENCODER_IID_STR + { &kCMSEncoderIID, NS_ICMSENCODER_IID_STR }, +#endif +#ifdef NS_ICMSMESSAGE_IID_STR + { &kCMSMessageIID, NS_ICMSMESSAGE_IID_STR }, +#endif +#ifdef NS_ICMSMESSAGEERRORS_IID_STR + { &kCMSMessageErrorsIID, NS_ICMSMESSAGEERRORS_IID_STR }, +#endif +#ifdef NS_ICMSSECUREMESSAGE_IID_STR + { &kCMSSecureMessageIID, NS_ICMSSECUREMESSAGE_IID_STR }, +#endif +#ifdef NS_ICODEBASEPRINCIPAL_IID_STR + { &kCodebasePrincipalIID, NS_ICODEBASEPRINCIPAL_IID_STR }, +#endif +#ifdef NS_ICOLLECTION_IID_STR + { &kCollectionIID, NS_ICOLLECTION_IID_STR }, +#endif +#ifdef NS_ICOMM4XPROFILE_IID_STR + { &kComm4xProfileIID, NS_ICOMM4XPROFILE_IID_STR }, +#endif +#ifdef NS_ICOMMANDHANDLER_IID_STR + { &kCommandHandlerIID, NS_ICOMMANDHANDLER_IID_STR }, +#endif +#ifdef NS_ICOMMANDMANAGER_IID_STR + { &kCommandManagerIID, NS_ICOMMANDMANAGER_IID_STR }, +#endif +#ifdef NS_ICOMMANDPARAMS_IID_STR + { &kCommandParamsIID, NS_ICOMMANDPARAMS_IID_STR }, +#endif +#ifdef NS_ICOMPONENTLOADER_IID_STR + { &kComponentLoaderIID, NS_ICOMPONENTLOADER_IID_STR }, +#endif +#ifdef NS_ICOMPONENTLOADERMANAGER_IID_STR + { &kComponentLoaderManagerIID, NS_ICOMPONENTLOADERMANAGER_IID_STR }, +#endif +#ifdef NS_ICOMPONENTMANAGER_IID_STR + { &kComponentManagerIID, NS_ICOMPONENTMANAGER_IID_STR }, +#endif +#ifdef NS_ICOMPONENTMANAGEROBSOLETE_IID_STR + { &kComponentManagerObsoleteIID, NS_ICOMPONENTMANAGEROBSOLETE_IID_STR }, +#endif +#ifdef NS_ICOMPONENTREGISTRAR_IID_STR + { &kComponentRegistrarIID, NS_ICOMPONENTREGISTRAR_IID_STR }, +#endif +#ifdef NS_ICONSOLELISTENER_IID_STR + { &kConsoleListenerIID, NS_ICONSOLELISTENER_IID_STR }, +#endif +#ifdef NS_ICONSOLEMESSAGE_IID_STR + { &kConsoleMessageIID, NS_ICONSOLEMESSAGE_IID_STR }, +#endif +#ifdef NS_ICONSOLESERVICE_IID_STR + { &kConsoleServiceIID, NS_ICONSOLESERVICE_IID_STR }, +#endif +#ifdef NS_ICONTENTHANDLER_IID_STR + { &kContentHandlerIID, NS_ICONTENTHANDLER_IID_STR }, +#endif +#ifdef NS_ICONTENTPOLICY_IID_STR + { &kContentPolicyIID, NS_ICONTENTPOLICY_IID_STR }, +#endif +#ifdef NS_ICONTENTVIEWER_IID_STR + { &kContentViewerIID, NS_ICONTENTVIEWER_IID_STR }, +#endif +#ifdef NS_ICONTENTVIEWERCONTAINER_IID_STR + { &kContentViewerContainerIID, NS_ICONTENTVIEWERCONTAINER_IID_STR }, +#endif +#ifdef NS_ICONTENTVIEWEREDIT_IID_STR + { &kContentViewerEditIID, NS_ICONTENTVIEWEREDIT_IID_STR }, +#endif +#ifdef NS_ICONTENTVIEWERFILE_IID_STR + { &kContentViewerFileIID, NS_ICONTENTVIEWERFILE_IID_STR }, +#endif +#ifdef NS_ICONTEXTMENULISTENER_IID_STR + { &kContextMenuListenerIID, NS_ICONTEXTMENULISTENER_IID_STR }, +#endif +#ifdef NS_ICONTEXTMENULISTENER2_IID_STR + { &kContextMenuListener2IID, NS_ICONTEXTMENULISTENER2_IID_STR }, +#endif +#ifdef NS_ICONTROLLER_IID_STR + { &kControllerIID, NS_ICONTROLLER_IID_STR }, +#endif +#ifdef NS_ICONTROLLERCOMMAND_IID_STR + { &kControllerCommandIID, NS_ICONTROLLERCOMMAND_IID_STR }, +#endif +#ifdef NS_ICONTROLLERCOMMANDMANAGER_IID_STR + { &kControllerCommandManagerIID, NS_ICONTROLLERCOMMANDMANAGER_IID_STR }, +#endif +#ifdef NS_ICONTROLLERCONTEXT_IID_STR + { &kControllerContextIID, NS_ICONTROLLERCONTEXT_IID_STR }, +#endif +#ifdef NS_ICONTROLLERS_IID_STR + { &kControllersIID, NS_ICONTROLLERS_IID_STR }, +#endif +#ifdef NS_ICOOKIE_IID_STR + { &kCookieIID, NS_ICOOKIE_IID_STR }, +#endif +#ifdef NS_ICOOKIEACCEPTDIALOG_IID_STR + { &kCookieAcceptDialogIID, NS_ICOOKIEACCEPTDIALOG_IID_STR }, +#endif +#ifdef NS_ICOOKIECONSENT_IID_STR + { &kCookieConsentIID, NS_ICOOKIECONSENT_IID_STR }, +#endif +#ifdef NS_ICOOKIEMANAGER_IID_STR + { &kCookieManagerIID, NS_ICOOKIEMANAGER_IID_STR }, +#endif +#ifdef NS_ICOOKIEMANAGER2_IID_STR + { &kCookieManager2IID, NS_ICOOKIEMANAGER2_IID_STR }, +#endif +#ifdef NS_ICOOKIEPROMPTSERVICE_IID_STR + { &kCookiePromptServiceIID, NS_ICOOKIEPROMPTSERVICE_IID_STR }, +#endif +#ifdef NS_ICOOKIESERVICE_IID_STR + { &kCookieServiceIID, NS_ICOOKIESERVICE_IID_STR }, +#endif +#ifdef NS_ICOOKIESTORAGE_IID_STR + { &kCookieStorageIID, NS_ICOOKIESTORAGE_IID_STR }, +#endif +#ifdef NS_ICOPYMESSAGELISTENER_IID_STR + { &kCopyMessageListenerIID, NS_ICOPYMESSAGELISTENER_IID_STR }, +#endif +#ifdef NS_ICOPYMSGSTREAMLISTENER_IID_STR + { &kCopyMsgStreamListenerIID, NS_ICOPYMSGSTREAMLISTENER_IID_STR }, +#endif +#ifdef NS_ICRLINFO_IID_STR + { &kCRLInfoIID, NS_ICRLINFO_IID_STR }, +#endif +#ifdef NS_ICRLMANAGER_IID_STR + { &kCRLManagerIID, NS_ICRLMANAGER_IID_STR }, +#endif +#ifdef NS_ICURRENTCHARSETLISTENER_IID_STR + { &kCurrentCharsetListenerIID, NS_ICURRENTCHARSETLISTENER_IID_STR }, +#endif +#ifdef NS_IDATACHANNEL_IID_STR + { &kDataChannelIID, NS_IDATACHANNEL_IID_STR }, +#endif +#ifdef NS_IDBCHANGEANNOUNCER_IID_STR + { &kDBChangeAnnouncerIID, NS_IDBCHANGEANNOUNCER_IID_STR }, +#endif +#ifdef NS_IDBCHANGELISTENER_IID_STR + { &kDBChangeListenerIID, NS_IDBCHANGELISTENER_IID_STR }, +#endif +#ifdef NS_IDBFOLDERINFO_IID_STR + { &kDBFolderInfoIID, NS_IDBFOLDERINFO_IID_STR }, +#endif +#ifdef NS_IDIALOGPARAMBLOCK_IID_STR + { &kDialogParamBlockIID, NS_IDIALOGPARAMBLOCK_IID_STR }, +#endif +#ifdef NS_IDICTIONARY_IID_STR + { &kDictionaryIID, NS_IDICTIONARY_IID_STR }, +#endif +#ifdef NS_IDIRECTORYLISTING_IID_STR + { &kDirectoryListingIID, NS_IDIRECTORYLISTING_IID_STR }, +#endif +#ifdef NS_IDIRECTORYSERVICE_IID_STR + { &kDirectoryServiceIID, NS_IDIRECTORYSERVICE_IID_STR }, +#endif +#ifdef NS_IDIRINDEX_IID_STR + { &kDirIndexIID, NS_IDIRINDEX_IID_STR }, +#endif +#ifdef NS_IDIRINDEXLISTENER_IID_STR + { &kDirIndexListenerIID, NS_IDIRINDEXLISTENER_IID_STR }, +#endif +#ifdef NS_IDNSLISTENER_IID_STR + { &kDNSListenerIID, NS_IDNSLISTENER_IID_STR }, +#endif +#ifdef NS_IDNSSERVICE_IID_STR + { &kDNSServiceIID, NS_IDNSSERVICE_IID_STR }, +#endif +#ifdef NS_IDOCCHARSET_IID_STR + { &kDocCharsetIID, NS_IDOCCHARSET_IID_STR }, +#endif +#ifdef NS_IDOCSHELL_IID_STR + { &kDocShellIID, NS_IDOCSHELL_IID_STR }, +#endif +#ifdef NS_IDOCSHELLHISTORY_IID_STR + { &kDocShellHistoryIID, NS_IDOCSHELLHISTORY_IID_STR }, +#endif +#ifdef NS_IDOCSHELLLOADINFO_IID_STR + { &kDocShellLoadInfoIID, NS_IDOCSHELLLOADINFO_IID_STR }, +#endif +#ifdef NS_IDOCSHELLTREEITEM_IID_STR + { &kDocShellTreeItemIID, NS_IDOCSHELLTREEITEM_IID_STR }, +#endif +#ifdef NS_IDOCSHELLTREENODE_IID_STR + { &kDocShellTreeNodeIID, NS_IDOCSHELLTREENODE_IID_STR }, +#endif +#ifdef NS_IDOCSHELLTREEOWNER_IID_STR + { &kDocShellTreeOwnerIID, NS_IDOCSHELLTREEOWNER_IID_STR }, +#endif +#ifdef NS_IDOCUMENTCHARSETINFO_IID_STR + { &kDocumentCharsetInfoIID, NS_IDOCUMENTCHARSETINFO_IID_STR }, +#endif +#ifdef NS_IDOCUMENTLOADER_IID_STR + { &kDocumentLoaderIID, NS_IDOCUMENTLOADER_IID_STR }, +#endif +#ifdef NS_IDOCUMENTLOADERFACTORY_IID_STR + { &kDocumentLoaderFactoryIID, NS_IDOCUMENTLOADERFACTORY_IID_STR }, +#endif +#ifdef NS_IDOCUMENTSTATELISTENER_IID_STR + { &kDocumentStateListenerIID, NS_IDOCUMENTSTATELISTENER_IID_STR }, +#endif +#ifdef NS_IDOM3DOCUMENTEVENT_IID_STR + { &kDOM3DocumentEventIID, NS_IDOM3DOCUMENTEVENT_IID_STR }, +#endif +#ifdef NS_IDOM3EVENTTARGET_IID_STR + { &kDOM3EventTargetIID, NS_IDOM3EVENTTARGET_IID_STR }, +#endif +#ifdef NS_IDOM3NODE_IID_STR + { &kDOM3NodeIID, NS_IDOM3NODE_IID_STR }, +#endif +#ifdef NS_IDOMABSTRACTVIEW_IID_STR + { &kDOMAbstractViewIID, NS_IDOMABSTRACTVIEW_IID_STR }, +#endif +#ifdef NS_IDOMATTR_IID_STR + { &kDOMAttrIID, NS_IDOMATTR_IID_STR }, +#endif +#ifdef NS_IDOMBARPROP_IID_STR + { &kDOMBarPropIID, NS_IDOMBARPROP_IID_STR }, +#endif +#ifdef NS_IDOMCDATASECTION_IID_STR + { &kDOMCDATASectionIID, NS_IDOMCDATASECTION_IID_STR }, +#endif +#ifdef NS_IDOMCHARACTERDATA_IID_STR + { &kDOMCharacterDataIID, NS_IDOMCHARACTERDATA_IID_STR }, +#endif +#ifdef NS_IDOMCHROMEWINDOW_IID_STR + { &kDOMChromeWindowIID, NS_IDOMCHROMEWINDOW_IID_STR }, +#endif +#ifdef NS_IDOMCOMMENT_IID_STR + { &kDOMCommentIID, NS_IDOMCOMMENT_IID_STR }, +#endif +#ifdef NS_IDOMCOUNTER_IID_STR + { &kDOMCounterIID, NS_IDOMCOUNTER_IID_STR }, +#endif +#ifdef NS_IDOMCRMFOBJECT_IID_STR + { &kDOMCRMFObjectIID, NS_IDOMCRMFOBJECT_IID_STR }, +#endif +#ifdef NS_IDOMCRYPTO_IID_STR + { &kDOMCryptoIID, NS_IDOMCRYPTO_IID_STR }, +#endif +#ifdef NS_IDOMCRYPTODIALOGS_IID_STR + { &kDOMCryptoDialogsIID, NS_IDOMCRYPTODIALOGS_IID_STR }, +#endif +#ifdef NS_IDOMCSS2PROPERTIES_IID_STR + { &kDOMCSS2PropertiesIID, NS_IDOMCSS2PROPERTIES_IID_STR }, +#endif +#ifdef NS_IDOMCSSCHARSETRULE_IID_STR + { &kDOMCSSCharsetRuleIID, NS_IDOMCSSCHARSETRULE_IID_STR }, +#endif +#ifdef NS_IDOMCSSFONTFACERULE_IID_STR + { &kDOMCSSFontFaceRuleIID, NS_IDOMCSSFONTFACERULE_IID_STR }, +#endif +#ifdef NS_IDOMCSSIMPORTRULE_IID_STR + { &kDOMCSSImportRuleIID, NS_IDOMCSSIMPORTRULE_IID_STR }, +#endif +#ifdef NS_IDOMCSSMEDIARULE_IID_STR + { &kDOMCSSMediaRuleIID, NS_IDOMCSSMEDIARULE_IID_STR }, +#endif +#ifdef NS_IDOMCSSPAGERULE_IID_STR + { &kDOMCSSPageRuleIID, NS_IDOMCSSPAGERULE_IID_STR }, +#endif +#ifdef NS_IDOMCSSPRIMITIVEVALUE_IID_STR + { &kDOMCSSPrimitiveValueIID, NS_IDOMCSSPRIMITIVEVALUE_IID_STR }, +#endif +#ifdef NS_IDOMCSSRULE_IID_STR + { &kDOMCSSRuleIID, NS_IDOMCSSRULE_IID_STR }, +#endif +#ifdef NS_IDOMCSSRULELIST_IID_STR + { &kDOMCSSRuleListIID, NS_IDOMCSSRULELIST_IID_STR }, +#endif +#ifdef NS_IDOMCSSSTYLEDECLARATION_IID_STR + { &kDOMCSSStyleDeclarationIID, NS_IDOMCSSSTYLEDECLARATION_IID_STR }, +#endif +#ifdef NS_IDOMCSSSTYLERULE_IID_STR + { &kDOMCSSStyleRuleIID, NS_IDOMCSSSTYLERULE_IID_STR }, +#endif +#ifdef NS_IDOMCSSSTYLESHEET_IID_STR + { &kDOMCSSStyleSheetIID, NS_IDOMCSSSTYLESHEET_IID_STR }, +#endif +#ifdef NS_IDOMCSSUNKNOWNRULE_IID_STR + { &kDOMCSSUnknownRuleIID, NS_IDOMCSSUNKNOWNRULE_IID_STR }, +#endif +#ifdef NS_IDOMCSSVALUE_IID_STR + { &kDOMCSSValueIID, NS_IDOMCSSVALUE_IID_STR }, +#endif +#ifdef NS_IDOMCSSVALUELIST_IID_STR + { &kDOMCSSValueListIID, NS_IDOMCSSVALUELIST_IID_STR }, +#endif +#ifdef NS_IDOMCUSTOMEVENT_IID_STR + { &kDOMCustomEventIID, NS_IDOMCUSTOMEVENT_IID_STR }, +#endif +#ifdef NS_IDOMDOCUMENT_IID_STR + { &kDOMDocumentIID, NS_IDOMDOCUMENT_IID_STR }, +#endif +#ifdef NS_IDOMDOCUMENTCSS_IID_STR + { &kDOMDocumentCSSIID, NS_IDOMDOCUMENTCSS_IID_STR }, +#endif +#ifdef NS_IDOMDOCUMENTEVENT_IID_STR + { &kDOMDocumentEventIID, NS_IDOMDOCUMENTEVENT_IID_STR }, +#endif +#ifdef NS_IDOMDOCUMENTFRAGMENT_IID_STR + { &kDOMDocumentFragmentIID, NS_IDOMDOCUMENTFRAGMENT_IID_STR }, +#endif +#ifdef NS_IDOMDOCUMENTRANGE_IID_STR + { &kDOMDocumentRangeIID, NS_IDOMDOCUMENTRANGE_IID_STR }, +#endif +#ifdef NS_IDOMDOCUMENTSTYLE_IID_STR + { &kDOMDocumentStyleIID, NS_IDOMDOCUMENTSTYLE_IID_STR }, +#endif +#ifdef NS_IDOMDOCUMENTTRAVERSAL_IID_STR + { &kDOMDocumentTraversalIID, NS_IDOMDOCUMENTTRAVERSAL_IID_STR }, +#endif +#ifdef NS_IDOMDOCUMENTTYPE_IID_STR + { &kDOMDocumentTypeIID, NS_IDOMDOCUMENTTYPE_IID_STR }, +#endif +#ifdef NS_IDOMDOCUMENTVIEW_IID_STR + { &kDOMDocumentViewIID, NS_IDOMDOCUMENTVIEW_IID_STR }, +#endif +#ifdef NS_IDOMDOCUMENTXBL_IID_STR + { &kDOMDocumentXBLIID, NS_IDOMDOCUMENTXBL_IID_STR }, +#endif +#ifdef NS_IDOMDOMEXCEPTION_IID_STR + { &kDOMDOMExceptionIID, NS_IDOMDOMEXCEPTION_IID_STR }, +#endif +#ifdef NS_IDOMDOMIMPLEMENTATION_IID_STR + { &kDOMDOMImplementationIID, NS_IDOMDOMIMPLEMENTATION_IID_STR }, +#endif +#ifdef NS_IDOMELEMENT_IID_STR + { &kDOMElementIID, NS_IDOMELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMELEMENTCSSINLINESTYLE_IID_STR + { &kDOMElementCSSInlineStyleIID, NS_IDOMELEMENTCSSINLINESTYLE_IID_STR }, +#endif +#ifdef NS_IDOMENTITY_IID_STR + { &kDOMEntityIID, NS_IDOMENTITY_IID_STR }, +#endif +#ifdef NS_IDOMENTITYREFERENCE_IID_STR + { &kDOMEntityReferenceIID, NS_IDOMENTITYREFERENCE_IID_STR }, +#endif +#ifdef NS_IDOMEVENT_IID_STR + { &kDOMEventIID, NS_IDOMEVENT_IID_STR }, +#endif +#ifdef NS_IDOMEVENTGROUP_IID_STR + { &kDOMEventGroupIID, NS_IDOMEVENTGROUP_IID_STR }, +#endif +#ifdef NS_IDOMEVENTLISTENER_IID_STR + { &kDOMEventListenerIID, NS_IDOMEVENTLISTENER_IID_STR }, +#endif +#ifdef NS_IDOMEVENTTARGET_IID_STR + { &kDOMEventTargetIID, NS_IDOMEVENTTARGET_IID_STR }, +#endif +#ifdef NS_IDOMHISTORY_IID_STR + { &kDOMHistoryIID, NS_IDOMHISTORY_IID_STR }, +#endif +#ifdef NS_IDOMHTMLANCHORELEMENT_IID_STR + { &kDOMHTMLAnchorElementIID, NS_IDOMHTMLANCHORELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLAPPLETELEMENT_IID_STR + { &kDOMHTMLAppletElementIID, NS_IDOMHTMLAPPLETELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLAREAELEMENT_IID_STR + { &kDOMHTMLAreaElementIID, NS_IDOMHTMLAREAELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLBASEELEMENT_IID_STR + { &kDOMHTMLBaseElementIID, NS_IDOMHTMLBASEELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLBASEFONTELEMENT_IID_STR + { &kDOMHTMLBaseFontElementIID, NS_IDOMHTMLBASEFONTELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLBODYELEMENT_IID_STR + { &kDOMHTMLBodyElementIID, NS_IDOMHTMLBODYELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLBRELEMENT_IID_STR + { &kDOMHTMLBRElementIID, NS_IDOMHTMLBRELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLBUTTONELEMENT_IID_STR + { &kDOMHTMLButtonElementIID, NS_IDOMHTMLBUTTONELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLCOLLECTION_IID_STR + { &kDOMHTMLCollectionIID, NS_IDOMHTMLCOLLECTION_IID_STR }, +#endif +#ifdef NS_IDOMHTMLDIRECTORYELEMENT_IID_STR + { &kDOMHTMLDirectoryElementIID, NS_IDOMHTMLDIRECTORYELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLDIVELEMENT_IID_STR + { &kDOMHTMLDivElementIID, NS_IDOMHTMLDIVELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLDLISTELEMENT_IID_STR + { &kDOMHTMLDListElementIID, NS_IDOMHTMLDLISTELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLDOCUMENT_IID_STR + { &kDOMHTMLDocumentIID, NS_IDOMHTMLDOCUMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLELEMENT_IID_STR + { &kDOMHTMLElementIID, NS_IDOMHTMLELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLEMBEDELEMENT_IID_STR + { &kDOMHTMLEmbedElementIID, NS_IDOMHTMLEMBEDELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLFIELDSETELEMENT_IID_STR + { &kDOMHTMLFieldSetElementIID, NS_IDOMHTMLFIELDSETELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLFONTELEMENT_IID_STR + { &kDOMHTMLFontElementIID, NS_IDOMHTMLFONTELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLFORMELEMENT_IID_STR + { &kDOMHTMLFormElementIID, NS_IDOMHTMLFORMELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLFRAMEELEMENT_IID_STR + { &kDOMHTMLFrameElementIID, NS_IDOMHTMLFRAMEELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLFRAMESETELEMENT_IID_STR + { &kDOMHTMLFrameSetElementIID, NS_IDOMHTMLFRAMESETELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLHEADELEMENT_IID_STR + { &kDOMHTMLHeadElementIID, NS_IDOMHTMLHEADELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLHEADINGELEMENT_IID_STR + { &kDOMHTMLHeadingElementIID, NS_IDOMHTMLHEADINGELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLHRELEMENT_IID_STR + { &kDOMHTMLHRElementIID, NS_IDOMHTMLHRELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLHTMLELEMENT_IID_STR + { &kDOMHTMLHtmlElementIID, NS_IDOMHTMLHTMLELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLIFRAMEELEMENT_IID_STR + { &kDOMHTMLIFrameElementIID, NS_IDOMHTMLIFRAMEELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLIMAGEELEMENT_IID_STR + { &kDOMHTMLImageElementIID, NS_IDOMHTMLIMAGEELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLINPUTELEMENT_IID_STR + { &kDOMHTMLInputElementIID, NS_IDOMHTMLINPUTELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLISINDEXELEMENT_IID_STR + { &kDOMHTMLIsIndexElementIID, NS_IDOMHTMLISINDEXELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLLABELELEMENT_IID_STR + { &kDOMHTMLLabelElementIID, NS_IDOMHTMLLABELELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLLEGENDELEMENT_IID_STR + { &kDOMHTMLLegendElementIID, NS_IDOMHTMLLEGENDELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLLIELEMENT_IID_STR + { &kDOMHTMLLIElementIID, NS_IDOMHTMLLIELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLLINKELEMENT_IID_STR + { &kDOMHTMLLinkElementIID, NS_IDOMHTMLLINKELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLMAPELEMENT_IID_STR + { &kDOMHTMLMapElementIID, NS_IDOMHTMLMAPELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLMENUELEMENT_IID_STR + { &kDOMHTMLMenuElementIID, NS_IDOMHTMLMENUELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLMETAELEMENT_IID_STR + { &kDOMHTMLMetaElementIID, NS_IDOMHTMLMETAELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLMODELEMENT_IID_STR + { &kDOMHTMLModElementIID, NS_IDOMHTMLMODELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLOBJECTELEMENT_IID_STR + { &kDOMHTMLObjectElementIID, NS_IDOMHTMLOBJECTELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLOLISTELEMENT_IID_STR + { &kDOMHTMLOListElementIID, NS_IDOMHTMLOLISTELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLOPTGROUPELEMENT_IID_STR + { &kDOMHTMLOptGroupElementIID, NS_IDOMHTMLOPTGROUPELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLOPTIONELEMENT_IID_STR + { &kDOMHTMLOptionElementIID, NS_IDOMHTMLOPTIONELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLPARAGRAPHELEMENT_IID_STR + { &kDOMHTMLParagraphElementIID, NS_IDOMHTMLPARAGRAPHELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLPARAMELEMENT_IID_STR + { &kDOMHTMLParamElementIID, NS_IDOMHTMLPARAMELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLPREELEMENT_IID_STR + { &kDOMHTMLPreElementIID, NS_IDOMHTMLPREELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLQUOTEELEMENT_IID_STR + { &kDOMHTMLQuoteElementIID, NS_IDOMHTMLQUOTEELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLSCRIPTELEMENT_IID_STR + { &kDOMHTMLScriptElementIID, NS_IDOMHTMLSCRIPTELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLSELECTELEMENT_IID_STR + { &kDOMHTMLSelectElementIID, NS_IDOMHTMLSELECTELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLSTYLEELEMENT_IID_STR + { &kDOMHTMLStyleElementIID, NS_IDOMHTMLSTYLEELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLTABLECAPTIONELEM_IID_STR + { &kDOMHTMLTableCaptionElemIID, NS_IDOMHTMLTABLECAPTIONELEM_IID_STR }, +#endif +#ifdef NS_IDOMHTMLTABLECELLELEMENT_IID_STR + { &kDOMHTMLTableCellElementIID, NS_IDOMHTMLTABLECELLELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLTABLECOLELEMENT_IID_STR + { &kDOMHTMLTableColElementIID, NS_IDOMHTMLTABLECOLELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLTABLEELEMENT_IID_STR + { &kDOMHTMLTableElementIID, NS_IDOMHTMLTABLEELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLTABLEROWELEMENT_IID_STR + { &kDOMHTMLTableRowElementIID, NS_IDOMHTMLTABLEROWELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLTABLESECTIONELEM_IID_STR + { &kDOMHTMLTableSectionElemIID, NS_IDOMHTMLTABLESECTIONELEM_IID_STR }, +#endif +#ifdef NS_IDOMHTMLTEXTAREAELEMENT_IID_STR + { &kDOMHTMLTextAreaElementIID, NS_IDOMHTMLTEXTAREAELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLTITLEELEMENT_IID_STR + { &kDOMHTMLTitleElementIID, NS_IDOMHTMLTITLEELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMHTMLULISTELEMENT_IID_STR + { &kDOMHTMLUListElementIID, NS_IDOMHTMLULISTELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMJSWINDOW_IID_STR + { &kDOMJSWindowIID, NS_IDOMJSWINDOW_IID_STR }, +#endif +#ifdef NS_IDOMKEYEVENT_IID_STR + { &kDOMKeyEventIID, NS_IDOMKEYEVENT_IID_STR }, +#endif +#ifdef NS_IDOMLINKSTYLE_IID_STR + { &kDOMLinkStyleIID, NS_IDOMLINKSTYLE_IID_STR }, +#endif +#ifdef NS_IDOMLOCATION_IID_STR + { &kDOMLocationIID, NS_IDOMLOCATION_IID_STR }, +#endif +#ifdef NS_IDOMMEDIALIST_IID_STR + { &kDOMMediaListIID, NS_IDOMMEDIALIST_IID_STR }, +#endif +#ifdef NS_IDOMMIMETYPE_IID_STR + { &kDOMMimeTypeIID, NS_IDOMMIMETYPE_IID_STR }, +#endif +#ifdef NS_IDOMMIMETYPEARRAY_IID_STR + { &kDOMMimeTypeArrayIID, NS_IDOMMIMETYPEARRAY_IID_STR }, +#endif +#ifdef NS_IDOMMOUSEEVENT_IID_STR + { &kDOMMouseEventIID, NS_IDOMMOUSEEVENT_IID_STR }, +#endif +#ifdef NS_IDOMMUTATIONEVENT_IID_STR + { &kDOMMutationEventIID, NS_IDOMMUTATIONEVENT_IID_STR }, +#endif +#ifdef NS_IDOMNAMEDNODEMAP_IID_STR + { &kDOMNamedNodeMapIID, NS_IDOMNAMEDNODEMAP_IID_STR }, +#endif +#ifdef NS_IDOMNAVIGATOR_IID_STR + { &kDOMNavigatorIID, NS_IDOMNAVIGATOR_IID_STR }, +#endif +#ifdef NS_IDOMNODE_IID_STR + { &kDOMNodeIID, NS_IDOMNODE_IID_STR }, +#endif +#ifdef NS_IDOMNODEFILTER_IID_STR + { &kDOMNodeFilterIID, NS_IDOMNODEFILTER_IID_STR }, +#endif +#ifdef NS_IDOMNODEITERATOR_IID_STR + { &kDOMNodeIteratorIID, NS_IDOMNODEITERATOR_IID_STR }, +#endif +#ifdef NS_IDOMNODELIST_IID_STR + { &kDOMNodeListIID, NS_IDOMNODELIST_IID_STR }, +#endif +#ifdef NS_IDOMNOTATION_IID_STR + { &kDOMNotationIID, NS_IDOMNOTATION_IID_STR }, +#endif +#ifdef NS_IDOMNSDOCUMENT_IID_STR + { &kDOMNSDocumentIID, NS_IDOMNSDOCUMENT_IID_STR }, +#endif +#ifdef NS_IDOMNSEVENT_IID_STR + { &kDOMNSEventIID, NS_IDOMNSEVENT_IID_STR }, +#endif +#ifdef NS_IDOMNSHISTORY_IID_STR + { &kDOMNSHistoryIID, NS_IDOMNSHISTORY_IID_STR }, +#endif +#ifdef NS_IDOMNSHTMLANCHORELEMENT_IID_STR + { &kDOMNSHTMLAnchorElementIID, NS_IDOMNSHTMLANCHORELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMNSHTMLAREAELEMENT_IID_STR + { &kDOMNSHTMLAreaElementIID, NS_IDOMNSHTMLAREAELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMNSHTMLBUTTONELEMENT_IID_STR + { &kDOMNSHTMLButtonElementIID, NS_IDOMNSHTMLBUTTONELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMNSHTMLDOCUMENT_IID_STR + { &kDOMNSHTMLDocumentIID, NS_IDOMNSHTMLDOCUMENT_IID_STR }, +#endif +#ifdef NS_IDOMNSHTMLELEMENT_IID_STR + { &kDOMNSHTMLElementIID, NS_IDOMNSHTMLELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMNSHTMLFORMCONTROLLIST_IID_STR + { &kDOMNSHTMLFormControlListIID, NS_IDOMNSHTMLFORMCONTROLLIST_IID_STR }, +#endif +#ifdef NS_IDOMNSHTMLFORMELEMENT_IID_STR + { &kDOMNSHTMLFormElementIID, NS_IDOMNSHTMLFORMELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMNSHTMLFRAMEELEMENT_IID_STR + { &kDOMNSHTMLFrameElementIID, NS_IDOMNSHTMLFRAMEELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMNSHTMLIMAGEELEMENT_IID_STR + { &kDOMNSHTMLImageElementIID, NS_IDOMNSHTMLIMAGEELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMNSHTMLINPUTELEMENT_IID_STR + { &kDOMNSHTMLInputElementIID, NS_IDOMNSHTMLINPUTELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMNSHTMLOPTIONCOLLECTN_IID_STR + { &kDOMNSHTMLOptionCollectnIID, NS_IDOMNSHTMLOPTIONCOLLECTN_IID_STR }, +#endif +#ifdef NS_IDOMNSHTMLSELECTELEMENT_IID_STR + { &kDOMNSHTMLSelectElementIID, NS_IDOMNSHTMLSELECTELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMNSHTMLTEXTAREAELEMENT_IID_STR + { &kDOMNSHTMLTextAreaElementIID, NS_IDOMNSHTMLTEXTAREAELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMNSLOCATION_IID_STR + { &kDOMNSLocationIID, NS_IDOMNSLOCATION_IID_STR }, +#endif +#ifdef NS_IDOMNSRANGE_IID_STR + { &kDOMNSRangeIID, NS_IDOMNSRANGE_IID_STR }, +#endif +#ifdef NS_IDOMNSUIEVENT_IID_STR + { &kDOMNSUIEventIID, NS_IDOMNSUIEVENT_IID_STR }, +#endif +#ifdef NS_IDOMNSXBLFORMCONTROL_IID_STR + { &kDOMNSXBLFormControlIID, NS_IDOMNSXBLFORMCONTROL_IID_STR }, +#endif +#ifdef NS_IDOMPARSER_IID_STR + { &kDOMParserIID, NS_IDOMPARSER_IID_STR }, +#endif +#ifdef NS_IDOMPKCS11_IID_STR + { &kDOMPkcs11IID, NS_IDOMPKCS11_IID_STR }, +#endif +#ifdef NS_IDOMPLUGIN_IID_STR + { &kDOMPluginIID, NS_IDOMPLUGIN_IID_STR }, +#endif +#ifdef NS_IDOMPLUGINARRAY_IID_STR + { &kDOMPluginArrayIID, NS_IDOMPLUGINARRAY_IID_STR }, +#endif +#ifdef NS_IDOMPROCESSINGINSTRUCTION_IID_STR + { &kDOMProcessingInstructionIID, NS_IDOMPROCESSINGINSTRUCTION_IID_STR }, +#endif +#ifdef NS_IDOMRANGE_IID_STR + { &kDOMRangeIID, NS_IDOMRANGE_IID_STR }, +#endif +#ifdef NS_IDOMRANGEEXCEPTION_IID_STR + { &kDOMRangeExceptionIID, NS_IDOMRANGEEXCEPTION_IID_STR }, +#endif +#ifdef NS_IDOMRECT_IID_STR + { &kDOMRectIID, NS_IDOMRECT_IID_STR }, +#endif +#ifdef NS_IDOMRGBCOLOR_IID_STR + { &kDOMRGBColorIID, NS_IDOMRGBCOLOR_IID_STR }, +#endif +#ifdef NS_IDOMSCREEN_IID_STR + { &kDOMScreenIID, NS_IDOMSCREEN_IID_STR }, +#endif +#ifdef NS_IDOMSERIALIZER_IID_STR + { &kDOMSerializerIID, NS_IDOMSERIALIZER_IID_STR }, +#endif +#ifdef NS_IDOMSTYLESHEET_IID_STR + { &kDOMStyleSheetIID, NS_IDOMSTYLESHEET_IID_STR }, +#endif +#ifdef NS_IDOMSTYLESHEETLIST_IID_STR + { &kDOMStyleSheetListIID, NS_IDOMSTYLESHEETLIST_IID_STR }, +#endif +#ifdef NS_IDOMTEXT_IID_STR + { &kDOMTextIID, NS_IDOMTEXT_IID_STR }, +#endif +#ifdef NS_IDOMTREEWALKER_IID_STR + { &kDOMTreeWalkerIID, NS_IDOMTREEWALKER_IID_STR }, +#endif +#ifdef NS_IDOMUIEVENT_IID_STR + { &kDOMUIEventIID, NS_IDOMUIEVENT_IID_STR }, +#endif +#ifdef NS_IDOMVIEWCSS_IID_STR + { &kDOMViewCSSIID, NS_IDOMVIEWCSS_IID_STR }, +#endif +#ifdef NS_IDOMWINDOW_IID_STR + { &kDOMWindowIID, NS_IDOMWINDOW_IID_STR }, +#endif +#ifdef NS_IDOMWINDOWCOLLECTION_IID_STR + { &kDOMWindowCollectionIID, NS_IDOMWINDOWCOLLECTION_IID_STR }, +#endif +#ifdef NS_IDOMWINDOWINTERNAL_IID_STR + { &kDOMWindowInternalIID, NS_IDOMWINDOWINTERNAL_IID_STR }, +#endif +#ifdef NS_IDOMXMLDOCUMENT_IID_STR + { &kDOMXMLDocumentIID, NS_IDOMXMLDOCUMENT_IID_STR }, +#endif +#ifdef NS_IDOMXPATHEVALUATOR_IID_STR + { &kDOMXPathEvaluatorIID, NS_IDOMXPATHEVALUATOR_IID_STR }, +#endif +#ifdef NS_IDOMXPATHEXCEPTION_IID_STR + { &kDOMXPathExceptionIID, NS_IDOMXPATHEXCEPTION_IID_STR }, +#endif +#ifdef NS_IDOMXPATHEXPRESSION_IID_STR + { &kDOMXPathExpressionIID, NS_IDOMXPATHEXPRESSION_IID_STR }, +#endif +#ifdef NS_IDOMXPATHNAMESPACE_IID_STR + { &kDOMXPathNamespaceIID, NS_IDOMXPATHNAMESPACE_IID_STR }, +#endif +#ifdef NS_IDOMXPATHNSRESOLVER_IID_STR + { &kDOMXPathNSResolverIID, NS_IDOMXPATHNSRESOLVER_IID_STR }, +#endif +#ifdef NS_IDOMXPATHRESULT_IID_STR + { &kDOMXPathResultIID, NS_IDOMXPATHRESULT_IID_STR }, +#endif +#ifdef NS_IDOMXULBUTTONELEMENT_IID_STR + { &kDOMXULButtonElementIID, NS_IDOMXULBUTTONELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMXULCHECKBOXELEMENT_IID_STR + { &kDOMXULCheckboxElementIID, NS_IDOMXULCHECKBOXELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMXULCOMMANDDISPATCHER_IID_STR + { &kDOMXULCommandDispatcherIID, NS_IDOMXULCOMMANDDISPATCHER_IID_STR }, +#endif +#ifdef NS_IDOMXULCONTROLELEMENT_IID_STR + { &kDOMXULControlElementIID, NS_IDOMXULCONTROLELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMXULDESCRIPTIONELEMENT_IID_STR + { &kDOMXULDescriptionElementIID, NS_IDOMXULDESCRIPTIONELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMXULDOCUMENT_IID_STR + { &kDOMXULDocumentIID, NS_IDOMXULDOCUMENT_IID_STR }, +#endif +#ifdef NS_IDOMXULELEMENT_IID_STR + { &kDOMXULElementIID, NS_IDOMXULELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMXULIMAGEELEMENT_IID_STR + { &kDOMXULImageElementIID, NS_IDOMXULIMAGEELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMXULLABELEDCONTROLEL_IID_STR + { &kDOMXULLabeledControlElIID, NS_IDOMXULLABELEDCONTROLEL_IID_STR }, +#endif +#ifdef NS_IDOMXULLABELELEMENT_IID_STR + { &kDOMXULLabelElementIID, NS_IDOMXULLABELELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMXULMENULISTELEMENT_IID_STR + { &kDOMXULMenuListElementIID, NS_IDOMXULMENULISTELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMXULMULTSELECTCNTRLEL_IID_STR + { &kDOMXULMultSelectCntrlElIID, NS_IDOMXULMULTSELECTCNTRLEL_IID_STR }, +#endif +#ifdef NS_IDOMXULPOPUPELEMENT_IID_STR + { &kDOMXULPopupElementIID, NS_IDOMXULPOPUPELEMENT_IID_STR }, +#endif +#ifdef NS_IDOMXULSELECTCNTRLEL_IID_STR + { &kDOMXULSelectCntrlElIID, NS_IDOMXULSELECTCNTRLEL_IID_STR }, +#endif +#ifdef NS_IDOMXULSELECTCNTRLITEMEL_IID_STR + { &kDOMXULSelectCntrlItemElIID, NS_IDOMXULSELECTCNTRLITEMEL_IID_STR }, +#endif +#ifdef NS_IDOWNLOAD_IID_STR + { &kDownloadIID, NS_IDOWNLOAD_IID_STR }, +#endif +#ifdef NS_IDOWNLOADER_IID_STR + { &kDownloaderIID, NS_IDOWNLOADER_IID_STR }, +#endif +#ifdef NS_IDOWNLOADMANAGER_IID_STR + { &kDownloadManagerIID, NS_IDOWNLOADMANAGER_IID_STR }, +#endif +#ifdef NS_IDOWNLOADPROGRESSLISTENER_IID_STR + { &kDownloadProgressListenerIID, NS_IDOWNLOADPROGRESSLISTENER_IID_STR }, +#endif +#ifdef NS_IDRAGDROPHANDLER_IID_STR + { &kDragDropHandlerIID, NS_IDRAGDROPHANDLER_IID_STR }, +#endif +#ifdef NS_IDRAGDROPOVERRIDE_IID_STR + { &kDragDropOverrideIID, NS_IDRAGDROPOVERRIDE_IID_STR }, +#endif +#ifdef NS_IDRAGSERVICE_IID_STR + { &kDragServiceIID, NS_IDRAGSERVICE_IID_STR }, +#endif +#ifdef NS_IDRAGSESSION_IID_STR + { &kDragSessionIID, NS_IDRAGSESSION_IID_STR }, +#endif +#ifdef NS_IDRAGTRACKER_IID_STR + { &kDragTrackerIID, NS_IDRAGTRACKER_IID_STR }, +#endif +#ifdef NS_IEDITACTIONLISTENER_IID_STR + { &kEditActionListenerIID, NS_IEDITACTIONLISTENER_IID_STR }, +#endif +#ifdef NS_IEDITINGSESSION_IID_STR + { &kEditingSessionIID, NS_IEDITINGSESSION_IID_STR }, +#endif +#ifdef NS_IEDITOR_IID_STR + { &kEditorIID, NS_IEDITOR_IID_STR }, +#endif +#ifdef NS_IEDITORBOXOBJECT_IID_STR + { &kEditorBoxObjectIID, NS_IEDITORBOXOBJECT_IID_STR }, +#endif +#ifdef NS_IEDITORDOCSHELL_IID_STR + { &kEditorDocShellIID, NS_IEDITORDOCSHELL_IID_STR }, +#endif +#ifdef NS_IEDITORIMESUPPORT_IID_STR + { &kEditorIMESupportIID, NS_IEDITORIMESUPPORT_IID_STR }, +#endif +#ifdef NS_IEDITORLOGGING_IID_STR + { &kEditorLoggingIID, NS_IEDITORLOGGING_IID_STR }, +#endif +#ifdef NS_IEDITORMAILSUPPORT_IID_STR + { &kEditorMailSupportIID, NS_IEDITORMAILSUPPORT_IID_STR }, +#endif +#ifdef NS_IEDITOROBSERVER_IID_STR + { &kEditorObserverIID, NS_IEDITOROBSERVER_IID_STR }, +#endif +#ifdef NS_IEDITORSPELLCHECK_IID_STR + { &kEditorSpellCheckIID, NS_IEDITORSPELLCHECK_IID_STR }, +#endif +#ifdef NS_IEDITORSTYLESHEETS_IID_STR + { &kEditorStyleSheetsIID, NS_IEDITORSTYLESHEETS_IID_STR }, +#endif +#ifdef NS_IEMBEDDINGSITEWINDOW_IID_STR + { &kEmbeddingSiteWindowIID, NS_IEMBEDDINGSITEWINDOW_IID_STR }, +#endif +#ifdef NS_IEMBEDDINGSITEWINDOW2_IID_STR + { &kEmbeddingSiteWindow2IID, NS_IEMBEDDINGSITEWINDOW2_IID_STR }, +#endif +#ifdef NS_IENCODEDCHANNEL_IID_STR + { &kEncodedChannelIID, NS_IENCODEDCHANNEL_IID_STR }, +#endif +#ifdef NS_IENCRYPTEDSMIMEURISSRVC_IID_STR + { &kEncryptedSMIMEURIsSrvcIID, NS_IENCRYPTEDSMIMEURISSRVC_IID_STR }, +#endif +#ifdef NS_IENTITYCONVERTER_IID_STR + { &kEntityConverterIID, NS_IENTITYCONVERTER_IID_STR }, +#endif +#ifdef NS_IENTROPYCOLLECTOR_IID_STR + { &kEntropyCollectorIID, NS_IENTROPYCOLLECTOR_IID_STR }, +#endif +#ifdef NS_IENUMERATOR_IID_STR + { &kEnumeratorIID, NS_IENUMERATOR_IID_STR }, +#endif +#ifdef NS_IERRORSERVICE_IID_STR + { &kErrorServiceIID, NS_IERRORSERVICE_IID_STR }, +#endif +#ifdef NS_IEVALUATESTRINGPROXY_IID_STR + { &kEvaluateStringProxyIID, NS_IEVALUATESTRINGPROXY_IID_STR }, +#endif +#ifdef NS_IEVENTHANDLER_IID_STR + { &kEventHandlerIID, NS_IEVENTHANDLER_IID_STR }, +#endif +#ifdef NS_IEVENTQUEUE_IID_STR + { &kEventQueueIID, NS_IEVENTQUEUE_IID_STR }, +#endif +#ifdef NS_IEVENTQUEUESERVICE_IID_STR + { &kEventQueueServiceIID, NS_IEVENTQUEUESERVICE_IID_STR }, +#endif +#ifdef NS_IEXCEPTION_IID_STR + { &kExceptionIID, NS_IEXCEPTION_IID_STR }, +#endif +#ifdef NS_IEXCEPTIONSERVICE_IID_STR + { &kExceptionServiceIID, NS_IEXCEPTIONSERVICE_IID_STR }, +#endif +#ifdef NS_IEXPATSINK_IID_STR + { &kExpatSinkIID, NS_IEXPATSINK_IID_STR }, +#endif +#ifdef NS_IEXTERNALHELPERAPPSERVICE_IID_STR + { &kExternalHelperAppServiceIID, NS_IEXTERNALHELPERAPPSERVICE_IID_STR }, +#endif +#ifdef NS_IEXTERNALPROTOCOLHANDLER_IID_STR + { &kExternalProtocolHandlerIID, NS_IEXTERNALPROTOCOLHANDLER_IID_STR }, +#endif +#ifdef NS_IEXTERNALPROTOCOLSERVICE_IID_STR + { &kExternalProtocolServiceIID, NS_IEXTERNALPROTOCOLSERVICE_IID_STR }, +#endif +#ifdef NS_IFACTORY_IID_STR + { &kFactoryIID, NS_IFACTORY_IID_STR }, +#endif +#ifdef NS_IFASTLOADFILECONTROL_IID_STR + { &kFastLoadFileControlIID, NS_IFASTLOADFILECONTROL_IID_STR }, +#endif +#ifdef NS_IFASTLOADSERVICE_IID_STR + { &kFastLoadServiceIID, NS_IFASTLOADSERVICE_IID_STR }, +#endif +#ifdef NS_IFILE_IID_STR + { &kFileIID, NS_IFILE_IID_STR }, +#endif +#ifdef NS_IFILECHANNEL_IID_STR + { &kFileChannelIID, NS_IFILECHANNEL_IID_STR }, +#endif +#ifdef NS_IFILEPICKER_IID_STR + { &kFilePickerIID, NS_IFILEPICKER_IID_STR }, +#endif +#ifdef NS_IFILEPROTOCOLHANDLER_IID_STR + { &kFileProtocolHandlerIID, NS_IFILEPROTOCOLHANDLER_IID_STR }, +#endif +#ifdef NS_IFILESPEC_IID_STR + { &kFileSpecIID, NS_IFILESPEC_IID_STR }, +#endif +#ifdef NS_IFILESTREAMS_IID_STR + { &kFileStreamsIID, NS_IFILESTREAMS_IID_STR }, +#endif +#ifdef NS_IFILEURL_IID_STR + { &kFileURLIID, NS_IFILEURL_IID_STR }, +#endif +#ifdef NS_IFILEUTILITIES_IID_STR + { &kFileUtilitiesIID, NS_IFILEUTILITIES_IID_STR }, +#endif +#ifdef NS_IFIND_IID_STR + { &kFindIID, NS_IFIND_IID_STR }, +#endif +#ifdef NS_IFINDSERVICE_IID_STR + { &kFindServiceIID, NS_IFINDSERVICE_IID_STR }, +#endif +#ifdef NS_IFOLDER_IID_STR + { &kFolderIID, NS_IFOLDER_IID_STR }, +#endif +#ifdef NS_IFOLDERLISTENER_IID_STR + { &kFolderListenerIID, NS_IFOLDERLISTENER_IID_STR }, +#endif +#ifdef NS_IFONTCATALOGSERVICE_IID_STR + { &kFontCatalogServiceIID, NS_IFONTCATALOGSERVICE_IID_STR }, +#endif +#ifdef NS_IFONTENUMERATOR_IID_STR + { &kFontEnumeratorIID, NS_IFONTENUMERATOR_IID_STR }, +#endif +#ifdef NS_IFONTLIST_IID_STR + { &kFontListIID, NS_IFONTLIST_IID_STR }, +#endif +#ifdef NS_IFONTPACKAGEHANDLER_IID_STR + { &kFontPackageHandlerIID, NS_IFONTPACKAGEHANDLER_IID_STR }, +#endif +#ifdef NS_IFONTPACKAGEPROXY_IID_STR + { &kFontPackageProxyIID, NS_IFONTPACKAGEPROXY_IID_STR }, +#endif +#ifdef NS_IFONTPACKAGESERVICE_IID_STR + { &kFontPackageServiceIID, NS_IFONTPACKAGESERVICE_IID_STR }, +#endif +#ifdef NS_IFORMATCONVERTER_IID_STR + { &kFormatConverterIID, NS_IFORMATCONVERTER_IID_STR }, +#endif +#ifdef NS_IFREETYPE2_IID_STR + { &kFreeType2IID, NS_IFREETYPE2_IID_STR }, +#endif +#ifdef NS_IFTPCHANNEL_IID_STR + { &kFTPChannelIID, NS_IFTPCHANNEL_IID_STR }, +#endif +#ifdef NS_IFULLSCREEN_IID_STR + { &kFullScreenIID, NS_IFULLSCREEN_IID_STR }, +#endif +#ifdef NS_IGENKEYPAIRINFODLG_IID_STR + { &kGenKeypairInfoDlgIID, NS_IGENKEYPAIRINFODLG_IID_STR }, +#endif +#ifdef NS_IGLOBALHISTORY_IID_STR + { &kGlobalHistoryIID, NS_IGLOBALHISTORY_IID_STR }, +#endif +#ifdef NS_IGRAPHICS_IID_STR + { &kGraphicsIID, NS_IGRAPHICS_IID_STR }, +#endif +#ifdef NS_IHASH_IID_STR + { &kHashIID, NS_IHASH_IID_STR }, +#endif +#ifdef NS_IHELPERAPPLAUNCHERDIALOG_IID_STR + { &kHelperAppLauncherDialogIID, NS_IHELPERAPPLAUNCHERDIALOG_IID_STR }, +#endif +#ifdef NS_IHISTORYENTRY_IID_STR + { &kHistoryEntryIID, NS_IHISTORYENTRY_IID_STR }, +#endif +#ifdef NS_IHTMLEDITOR_IID_STR + { &kHTMLEditorIID, NS_IHTMLEDITOR_IID_STR }, +#endif +#ifdef NS_IHTMLOBJECTRESIZER_IID_STR + { &kHTMLObjectResizerIID, NS_IHTMLOBJECTRESIZER_IID_STR }, +#endif +#ifdef NS_IHTTPAUTHENTICATOR_IID_STR + { &kHttpAuthenticatorIID, NS_IHTTPAUTHENTICATOR_IID_STR }, +#endif +#ifdef NS_IHTTPCHANNEL_IID_STR + { &kHttpChannelIID, NS_IHTTPCHANNEL_IID_STR }, +#endif +#ifdef NS_IHTTPCHANNELINTERNAL_IID_STR + { &kHttpChannelInternalIID, NS_IHTTPCHANNELINTERNAL_IID_STR }, +#endif +#ifdef NS_IHTTPEVENTSINK_IID_STR + { &kHttpEventSinkIID, NS_IHTTPEVENTSINK_IID_STR }, +#endif +#ifdef NS_IHTTPHEADERLISTENER_IID_STR + { &kHTTPHeaderListenerIID, NS_IHTTPHEADERLISTENER_IID_STR }, +#endif +#ifdef NS_IHTTPHEADERVISITOR_IID_STR + { &kHttpHeaderVisitorIID, NS_IHTTPHEADERVISITOR_IID_STR }, +#endif +#ifdef NS_IHTTPINDEX_IID_STR + { &kHTTPIndexIID, NS_IHTTPINDEX_IID_STR }, +#endif +#ifdef NS_IHTTPNOTIFY_IID_STR + { &kHttpNotifyIID, NS_IHTTPNOTIFY_IID_STR }, +#endif +#ifdef NS_IHTTPPROTOCOLHANDLER_IID_STR + { &kHttpProtocolHandlerIID, NS_IHTTPPROTOCOLHANDLER_IID_STR }, +#endif +#ifdef NS_IICONURI_IID_STR + { &kIconURIIID, NS_IICONURI_IID_STR }, +#endif +#ifdef NS_IIDNSERVICE_IID_STR + { &kIDNServiceIID, NS_IIDNSERVICE_IID_STR }, +#endif +#ifdef NS_IIFRAMEBOXOBJECT_IID_STR + { &kIFrameBoxObjectIID, NS_IIFRAMEBOXOBJECT_IID_STR }, +#endif +#ifdef NS_IIMAGEDOCUMENT_IID_STR + { &kImageDocumentIID, NS_IIMAGEDOCUMENT_IID_STR }, +#endif +#ifdef NS_IIMAPFLAGANDUIDSTATE_IID_STR + { &kImapFlagAndUidStateIID, NS_IIMAPFLAGANDUIDSTATE_IID_STR }, +#endif +#ifdef NS_IIMAPHEADERXFERINFO_IID_STR + { &kImapHeaderXferInfoIID, NS_IIMAPHEADERXFERINFO_IID_STR }, +#endif +#ifdef NS_IIMAPINCOMINGSERVER_IID_STR + { &kImapIncomingServerIID, NS_IIMAPINCOMINGSERVER_IID_STR }, +#endif +#ifdef NS_IIMAPMAILFOLDERSINK_IID_STR + { &kImapMailFolderSinkIID, NS_IIMAPMAILFOLDERSINK_IID_STR }, +#endif +#ifdef NS_IIMAPMESSAGESINK_IID_STR + { &kImapMessageSinkIID, NS_IIMAPMESSAGESINK_IID_STR }, +#endif +#ifdef NS_IIMAPMOCKCHANNEL_IID_STR + { &kImapMockChannelIID, NS_IIMAPMOCKCHANNEL_IID_STR }, +#endif +#ifdef NS_IIMAPPROTOCOL_IID_STR + { &kImapProtocolIID, NS_IIMAPPROTOCOL_IID_STR }, +#endif +#ifdef NS_IIMAPSERVERSINK_IID_STR + { &kImapServerSinkIID, NS_IIMAPSERVERSINK_IID_STR }, +#endif +#ifdef NS_IIMAPSERVICE_IID_STR + { &kImapServiceIID, NS_IIMAPSERVICE_IID_STR }, +#endif +#ifdef NS_IIMAPURL_IID_STR + { &kImapUrlIID, NS_IIMAPURL_IID_STR }, +#endif +#ifdef NS_IIMGMANAGER_IID_STR + { &kImgManagerIID, NS_IIMGMANAGER_IID_STR }, +#endif +#ifdef NS_IIMPORTABDESCRIPTOR_IID_STR + { &kImportABDescriptorIID, NS_IIMPORTABDESCRIPTOR_IID_STR }, +#endif +#ifdef NS_IIMPORTADDRESSBOOKS_IID_STR + { &kImportAddressBooksIID, NS_IIMPORTADDRESSBOOKS_IID_STR }, +#endif +#ifdef NS_IIMPORTFIELDMAP_IID_STR + { &kImportFieldMapIID, NS_IIMPORTFIELDMAP_IID_STR }, +#endif +#ifdef NS_IIMPORTGENERIC_IID_STR + { &kImportGenericIID, NS_IIMPORTGENERIC_IID_STR }, +#endif +#ifdef NS_IIMPORTMAIL_IID_STR + { &kImportMailIID, NS_IIMPORTMAIL_IID_STR }, +#endif +#ifdef NS_IIMPORTMAILBOXDESCRIPTOR_IID_STR + { &kImportMailboxDescriptorIID, NS_IIMPORTMAILBOXDESCRIPTOR_IID_STR }, +#endif +#ifdef NS_IIMPORTMIMEENCODE_IID_STR + { &kImportMimeEncodeIID, NS_IIMPORTMIMEENCODE_IID_STR }, +#endif +#ifdef NS_IIMPORTMODULE_IID_STR + { &kImportModuleIID, NS_IIMPORTMODULE_IID_STR }, +#endif +#ifdef NS_IIMPORTSERVICE_IID_STR + { &kImportServiceIID, NS_IIMPORTSERVICE_IID_STR }, +#endif +#ifdef NS_IIMPORTSETTINGS_IID_STR + { &kImportSettingsIID, NS_IIMPORTSETTINGS_IID_STR }, +#endif +#ifdef NS_IINCOMINGSERVERLISTENER_IID_STR + { &kIncomingServerListenerIID, NS_IINCOMINGSERVERLISTENER_IID_STR }, +#endif +#ifdef NS_IINPUTSTREAM_IID_STR + { &kInputStreamIID, NS_IINPUTSTREAM_IID_STR }, +#endif +#ifdef NS_IINPUTSTREAMCHANNEL_IID_STR + { &kInputStreamChannelIID, NS_IINPUTSTREAMCHANNEL_IID_STR }, +#endif +#ifdef NS_IINPUTSTREAMPUMP_IID_STR + { &kInputStreamPumpIID, NS_IINPUTSTREAMPUMP_IID_STR }, +#endif +#ifdef NS_IINPUTSTREAMTEE_IID_STR + { &kInputStreamTeeIID, NS_IINPUTSTREAMTEE_IID_STR }, +#endif +#ifdef NS_IINTERFACEINFO_IID_STR + { &kInterfaceInfoIID, NS_IINTERFACEINFO_IID_STR }, +#endif +#ifdef NS_IINTERFACEINFOMANAGER_IID_STR + { &kInterfaceInfoManagerIID, NS_IINTERFACEINFOMANAGER_IID_STR }, +#endif +#ifdef NS_IINTERFACEREQUESTOR_IID_STR + { &kInterfaceRequestorIID, NS_IINTERFACEREQUESTOR_IID_STR }, +#endif +#ifdef NS_IIOSERVICE_IID_STR + { &kIOServiceIID, NS_IIOSERVICE_IID_STR }, +#endif +#ifdef NS_IJAR_IID_STR + { &kJARIID, NS_IJAR_IID_STR }, +#endif +#ifdef NS_IJARCHANNEL_IID_STR + { &kJARChannelIID, NS_IJARCHANNEL_IID_STR }, +#endif +#ifdef NS_IJARPROTOCOLHANDLER_IID_STR + { &kJARProtocolHandlerIID, NS_IJARPROTOCOLHANDLER_IID_STR }, +#endif +#ifdef NS_IJARURI_IID_STR + { &kJARURIIID, NS_IJARURI_IID_STR }, +#endif +#ifdef NS_IJRILIVECONNECTPIPEER_IID_STR + { &kJRILiveConnectPIPeerIID, NS_IJRILIVECONNECTPIPEER_IID_STR }, +#endif +#ifdef NS_IJRILIVECONNECTPLUGIN_IID_STR + { &kJRILiveConnectPluginIID, NS_IJRILIVECONNECTPLUGIN_IID_STR }, +#endif +#ifdef NS_IJSCONSOLESERVICE_IID_STR + { &kJSConsoleServiceIID, NS_IJSCONSOLESERVICE_IID_STR }, +#endif +#ifdef NS_IJSCONTEXTSTACK_IID_STR + { &kJSContextStackIID, NS_IJSCONTEXTSTACK_IID_STR }, +#endif +#ifdef NS_IJSRUNTIMESERVICE_IID_STR + { &kJSRuntimeServiceIID, NS_IJSRUNTIMESERVICE_IID_STR }, +#endif +#ifdef NS_IKEYEDSTREAMGENERATOR_IID_STR + { &kKeyedStreamGeneratorIID, NS_IKEYEDSTREAMGENERATOR_IID_STR }, +#endif +#ifdef NS_IKEYGENTHREAD_IID_STR + { &kKeygenThreadIID, NS_IKEYGENTHREAD_IID_STR }, +#endif +#ifdef NS_ILANGUAGEATOM_IID_STR + { &kLanguageAtomIID, NS_ILANGUAGEATOM_IID_STR }, +#endif +#ifdef NS_ILANGUAGEATOMSERVICE_IID_STR + { &kLanguageAtomServiceIID, NS_ILANGUAGEATOMSERVICE_IID_STR }, +#endif +#ifdef NS_ILDAPAUTOCOMPFORMATTER_IID_STR + { &kLDAPAutoCompFormatterIID, NS_ILDAPAUTOCOMPFORMATTER_IID_STR }, +#endif +#ifdef NS_ILDAPAUTOCOMPLETESESSION_IID_STR + { &kLDAPAutoCompleteSessionIID, NS_ILDAPAUTOCOMPLETESESSION_IID_STR }, +#endif +#ifdef NS_ILDAPBERVALUE_IID_STR + { &kLDAPBERValueIID, NS_ILDAPBERVALUE_IID_STR }, +#endif +#ifdef NS_ILDAPCONNECTION_IID_STR + { &kLDAPConnectionIID, NS_ILDAPCONNECTION_IID_STR }, +#endif +#ifdef NS_ILDAPERRORS_IID_STR + { &kLDAPErrorsIID, NS_ILDAPERRORS_IID_STR }, +#endif +#ifdef NS_ILDAPMESSAGE_IID_STR + { &kLDAPMessageIID, NS_ILDAPMESSAGE_IID_STR }, +#endif +#ifdef NS_ILDAPMESSAGELISTENER_IID_STR + { &kLDAPMessageListenerIID, NS_ILDAPMESSAGELISTENER_IID_STR }, +#endif +#ifdef NS_ILDAPOPERATION_IID_STR + { &kLDAPOperationIID, NS_ILDAPOPERATION_IID_STR }, +#endif +#ifdef NS_ILDAPPREFSSERVICE_IID_STR + { &kLDAPPrefsServiceIID, NS_ILDAPPREFSSERVICE_IID_STR }, +#endif +#ifdef NS_ILDAPSERVER_IID_STR + { &kLDAPServerIID, NS_ILDAPSERVER_IID_STR }, +#endif +#ifdef NS_ILDAPSERVICE_IID_STR + { &kLDAPServiceIID, NS_ILDAPSERVICE_IID_STR }, +#endif +#ifdef NS_ILDAPSYNCQUERY_IID_STR + { &kLDAPSyncQueryIID, NS_ILDAPSYNCQUERY_IID_STR }, +#endif +#ifdef NS_ILDAPURL_IID_STR + { &kLDAPURLIID, NS_ILDAPURL_IID_STR }, +#endif +#ifdef NS_ILINEINPUTSTREAM_IID_STR + { &kLineInputStreamIID, NS_ILINEINPUTSTREAM_IID_STR }, +#endif +#ifdef NS_ILISTBOXOBJECT_IID_STR + { &kListBoxObjectIID, NS_ILISTBOXOBJECT_IID_STR }, +#endif +#ifdef NS_ILOADGROUP_IID_STR + { &kLoadGroupIID, NS_ILOADGROUP_IID_STR }, +#endif +#ifdef NS_ILOCALE_IID_STR + { &kLocaleIID, NS_ILOCALE_IID_STR }, +#endif +#ifdef NS_ILOCALESERVICE_IID_STR + { &kLocaleServiceIID, NS_ILOCALESERVICE_IID_STR }, +#endif +#ifdef NS_ILOCALFILE_IID_STR + { &kLocalFileIID, NS_ILOCALFILE_IID_STR }, +#endif +#ifdef NS_ILOCALMAILINCOMINGSERVER_IID_STR + { &kLocalMailIncomingServerIID, NS_ILOCALMAILINCOMINGSERVER_IID_STR }, +#endif +#ifdef NS_IMAILBOXSERVICE_IID_STR + { &kMailboxServiceIID, NS_IMAILBOXSERVICE_IID_STR }, +#endif +#ifdef NS_IMAILBOXSPEC_IID_STR + { &kMailboxSpecIID, NS_IMAILBOXSPEC_IID_STR }, +#endif +#ifdef NS_IMAILBOXURL_IID_STR + { &kMailboxUrlIID, NS_IMAILBOXURL_IID_STR }, +#endif +#ifdef NS_IMARKUPDOCUMENTVIEWER_IID_STR + { &kMarkupDocumentViewerIID, NS_IMARKUPDOCUMENTVIEWER_IID_STR }, +#endif +#ifdef NS_IMEMORY_IID_STR + { &kMemoryIID, NS_IMEMORY_IID_STR }, +#endif +#ifdef NS_IMENUBOXOBJECT_IID_STR + { &kMenuBoxObjectIID, NS_IMENUBOXOBJECT_IID_STR }, +#endif +#ifdef NS_IMENUROLLUP_IID_STR + { &kMenuRollupIID, NS_IMENUROLLUP_IID_STR }, +#endif +#ifdef NS_IMESSENGER_IID_STR + { &kMessengerIID, NS_IMESSENGER_IID_STR }, +#endif +#ifdef NS_IMESSENGERMIGRATOR_IID_STR + { &kMessengerMigratorIID, NS_IMESSENGERMIGRATOR_IID_STR }, +#endif +#ifdef NS_IMESSENGEROSINTEGRATION_IID_STR + { &kMessengerOSIntegrationIID, NS_IMESSENGEROSINTEGRATION_IID_STR }, +#endif +#ifdef NS_IMESSENGERWINDOWSERVICE_IID_STR + { &kMessengerWindowServiceIID, NS_IMESSENGERWINDOWSERVICE_IID_STR }, +#endif +#ifdef NS_IMIMEEMITTER_IID_STR + { &kMimeEmitterIID, NS_IMIMEEMITTER_IID_STR }, +#endif +#ifdef NS_IMIMEHEADERS_IID_STR + { &kMimeHeadersIID, NS_IMIMEHEADERS_IID_STR }, +#endif +#ifdef NS_IMIMEINFO_IID_STR + { &kMIMEInfoIID, NS_IMIMEINFO_IID_STR }, +#endif +#ifdef NS_IMIMEINPUTSTREAM_IID_STR + { &kMIMEInputStreamIID, NS_IMIMEINPUTSTREAM_IID_STR }, +#endif +#ifdef NS_IMIMEMISCSTATUS_IID_STR + { &kMimeMiscStatusIID, NS_IMIMEMISCSTATUS_IID_STR }, +#endif +#ifdef NS_IMIMESERVICE_IID_STR + { &kMIMEServiceIID, NS_IMIMESERVICE_IID_STR }, +#endif +#ifdef NS_IMIMESTREAMCONVERTER_IID_STR + { &kMimeStreamConverterIID, NS_IMIMESTREAMCONVERTER_IID_STR }, +#endif +#ifdef NS_IMODULE_IID_STR + { &kModuleIID, NS_IMODULE_IID_STR }, +#endif +#ifdef NS_IMSGACCOUNT_IID_STR + { &kMsgAccountIID, NS_IMSGACCOUNT_IID_STR }, +#endif +#ifdef NS_IMSGACCOUNTMANAGER_IID_STR + { &kMsgAccountManagerIID, NS_IMSGACCOUNTMANAGER_IID_STR }, +#endif +#ifdef NS_IMSGATTACHMENT_IID_STR + { &kMsgAttachmentIID, NS_IMSGATTACHMENT_IID_STR }, +#endif +#ifdef NS_IMSGBIFFMANAGER_IID_STR + { &kMsgBiffManagerIID, NS_IMSGBIFFMANAGER_IID_STR }, +#endif +#ifdef NS_IMSGCOMPFIELDS_IID_STR + { &kMsgCompFieldsIID, NS_IMSGCOMPFIELDS_IID_STR }, +#endif +#ifdef NS_IMSGCOMPOSE_IID_STR + { &kMsgComposeIID, NS_IMSGCOMPOSE_IID_STR }, +#endif +#ifdef NS_IMSGCOMPOSEPARAMS_IID_STR + { &kMsgComposeParamsIID, NS_IMSGCOMPOSEPARAMS_IID_STR }, +#endif +#ifdef NS_IMSGCOMPOSEPROGRESSPARAMS_IID_STR + { &kMsgComposeProgressParamsIID, NS_IMSGCOMPOSEPROGRESSPARAMS_IID_STR }, +#endif +#ifdef NS_IMSGCOMPOSESECURE_IID_STR + { &kMsgComposeSecureIID, NS_IMSGCOMPOSESECURE_IID_STR }, +#endif +#ifdef NS_IMSGCOMPOSESERVICE_IID_STR + { &kMsgComposeServiceIID, NS_IMSGCOMPOSESERVICE_IID_STR }, +#endif +#ifdef NS_IMSGCOMPUTILS_IID_STR + { &kMsgCompUtilsIID, NS_IMSGCOMPUTILS_IID_STR }, +#endif +#ifdef NS_IMSGCOPYSERVICE_IID_STR + { &kMsgCopyServiceIID, NS_IMSGCOPYSERVICE_IID_STR }, +#endif +#ifdef NS_IMSGCOPYSERVICELISTENER_IID_STR + { &kMsgCopyServiceListenerIID, NS_IMSGCOPYSERVICELISTENER_IID_STR }, +#endif +#ifdef NS_IMSGDATABASE_IID_STR + { &kMsgDatabaseIID, NS_IMSGDATABASE_IID_STR }, +#endif +#ifdef NS_IMSGDBVIEW_IID_STR + { &kMsgDBViewIID, NS_IMSGDBVIEW_IID_STR }, +#endif +#ifdef NS_IMSGDRAFT_IID_STR + { &kMsgDraftIID, NS_IMSGDRAFT_IID_STR }, +#endif +#ifdef NS_IMSGFILTER_IID_STR + { &kMsgFilterIID, NS_IMSGFILTER_IID_STR }, +#endif +#ifdef NS_IMSGFILTERHITNOTIFY_IID_STR + { &kMsgFilterHitNotifyIID, NS_IMSGFILTERHITNOTIFY_IID_STR }, +#endif +#ifdef NS_IMSGFILTERLIST_IID_STR + { &kMsgFilterListIID, NS_IMSGFILTERLIST_IID_STR }, +#endif +#ifdef NS_IMSGFILTERPLUGIN_IID_STR + { &kMsgFilterPluginIID, NS_IMSGFILTERPLUGIN_IID_STR }, +#endif +#ifdef NS_IMSGFILTERSERVICE_IID_STR + { &kMsgFilterServiceIID, NS_IMSGFILTERSERVICE_IID_STR }, +#endif +#ifdef NS_IMSGFOLDER_IID_STR + { &kMsgFolderIID, NS_IMSGFOLDER_IID_STR }, +#endif +#ifdef NS_IMSGFOLDERCACHE_IID_STR + { &kMsgFolderCacheIID, NS_IMSGFOLDERCACHE_IID_STR }, +#endif +#ifdef NS_IMSGFOLDERCACHEELEMENT_IID_STR + { &kMsgFolderCacheElementIID, NS_IMSGFOLDERCACHEELEMENT_IID_STR }, +#endif +#ifdef NS_IMSGFOLDERCOMPACTOR_IID_STR + { &kMsgFolderCompactorIID, NS_IMSGFOLDERCOMPACTOR_IID_STR }, +#endif +#ifdef NS_IMSGGROUPRECORD_IID_STR + { &kMsgGroupRecordIID, NS_IMSGGROUPRECORD_IID_STR }, +#endif +#ifdef NS_IMSGHDR_IID_STR + { &kMsgHdrIID, NS_IMSGHDR_IID_STR }, +#endif +#ifdef NS_IMSGHEADERPARSER_IID_STR + { &kMsgHeaderParserIID, NS_IMSGHEADERPARSER_IID_STR }, +#endif +#ifdef NS_IMSGHOST_IID_STR + { &kMsgHostIID, NS_IMSGHOST_IID_STR }, +#endif +#ifdef NS_IMSGIDENTITY_IID_STR + { &kMsgIdentityIID, NS_IMSGIDENTITY_IID_STR }, +#endif +#ifdef NS_IMSGIMAPMAILFOLDER_IID_STR + { &kMsgImapMailFolderIID, NS_IMSGIMAPMAILFOLDER_IID_STR }, +#endif +#ifdef NS_IMSGINCOMINGSERVER_IID_STR + { &kMsgIncomingServerIID, NS_IMSGINCOMINGSERVER_IID_STR }, +#endif +#ifdef NS_IMSGLOCALMAILFOLDER_IID_STR + { &kMsgLocalMailFolderIID, NS_IMSGLOCALMAILFOLDER_IID_STR }, +#endif +#ifdef NS_IMSGLOGONREDIRECTOR_IID_STR + { &kMsgLogonRedirectorIID, NS_IMSGLOGONREDIRECTOR_IID_STR }, +#endif +#ifdef NS_IMSGMAILNEWSURL_IID_STR + { &kMsgMailNewsUrlIID, NS_IMSGMAILNEWSURL_IID_STR }, +#endif +#ifdef NS_IMSGMAILSESSION_IID_STR + { &kMsgMailSessionIID, NS_IMSGMAILSESSION_IID_STR }, +#endif +#ifdef NS_IMSGMAILVIEW_IID_STR + { &kMsgMailViewIID, NS_IMSGMAILVIEW_IID_STR }, +#endif +#ifdef NS_IMSGMAILVIEWLIST_IID_STR + { &kMsgMailViewListIID, NS_IMSGMAILVIEWLIST_IID_STR }, +#endif +#ifdef NS_IMSGMDNGENERATOR_IID_STR + { &kMsgMdnGeneratorIID, NS_IMSGMDNGENERATOR_IID_STR }, +#endif +#ifdef NS_IMSGMESSAGESERVICE_IID_STR + { &kMsgMessageServiceIID, NS_IMSGMESSAGESERVICE_IID_STR }, +#endif +#ifdef NS_IMSGNEWSFOLDER_IID_STR + { &kMsgNewsFolderIID, NS_IMSGNEWSFOLDER_IID_STR }, +#endif +#ifdef NS_IMSGOFFLINEIMAPOPERATION_IID_STR + { &kMsgOfflineImapOperationIID, NS_IMSGOFFLINEIMAPOPERATION_IID_STR }, +#endif +#ifdef NS_IMSGOFFLINEMANAGER_IID_STR + { &kMsgOfflineManagerIID, NS_IMSGOFFLINEMANAGER_IID_STR }, +#endif +#ifdef NS_IMSGOFFLINENEWSSTATE_IID_STR + { &kMsgOfflineNewsStateIID, NS_IMSGOFFLINENEWSSTATE_IID_STR }, +#endif +#ifdef NS_IMSGPARSEMAILMSGSTATE_IID_STR + { &kMsgParseMailMsgStateIID, NS_IMSGPARSEMAILMSGSTATE_IID_STR }, +#endif +#ifdef NS_IMSGPRINTENGINE_IID_STR + { &kMsgPrintEngineIID, NS_IMSGPRINTENGINE_IID_STR }, +#endif +#ifdef NS_IMSGPROGRESS_IID_STR + { &kMsgProgressIID, NS_IMSGPROGRESS_IID_STR }, +#endif +#ifdef NS_IMSGPROTOCOLINFO_IID_STR + { &kMsgProtocolInfoIID, NS_IMSGPROTOCOLINFO_IID_STR }, +#endif +#ifdef NS_IMSGPURGESERVICE_IID_STR + { &kMsgPurgeServiceIID, NS_IMSGPURGESERVICE_IID_STR }, +#endif +#ifdef NS_IMSGQUOTE_IID_STR + { &kMsgQuoteIID, NS_IMSGQUOTE_IID_STR }, +#endif +#ifdef NS_IMSGRDFDATASOURCE_IID_STR + { &kMsgRDFDataSourceIID, NS_IMSGRDFDATASOURCE_IID_STR }, +#endif +#ifdef NS_IMSGRECIPIENTARRAY_IID_STR + { &kMsgRecipientArrayIID, NS_IMSGRECIPIENTARRAY_IID_STR }, +#endif +#ifdef NS_IMSGSEARCHADAPTER_IID_STR + { &kMsgSearchAdapterIID, NS_IMSGSEARCHADAPTER_IID_STR }, +#endif +#ifdef NS_IMSGSEARCHNOTIFY_IID_STR + { &kMsgSearchNotifyIID, NS_IMSGSEARCHNOTIFY_IID_STR }, +#endif +#ifdef NS_IMSGSEARCHSCOPETERM_IID_STR + { &kMsgSearchScopeTermIID, NS_IMSGSEARCHSCOPETERM_IID_STR }, +#endif +#ifdef NS_IMSGSEARCHSESSION_IID_STR + { &kMsgSearchSessionIID, NS_IMSGSEARCHSESSION_IID_STR }, +#endif +#ifdef NS_IMSGSEARCHTERM_IID_STR + { &kMsgSearchTermIID, NS_IMSGSEARCHTERM_IID_STR }, +#endif +#ifdef NS_IMSGSEARCHVALIDITYMANAGER_IID_STR + { &kMsgSearchValidityManagerIID, NS_IMSGSEARCHVALIDITYMANAGER_IID_STR }, +#endif +#ifdef NS_IMSGSEARCHVALIDITYTABLE_IID_STR + { &kMsgSearchValidityTableIID, NS_IMSGSEARCHVALIDITYTABLE_IID_STR }, +#endif +#ifdef NS_IMSGSEARCHVALUE_IID_STR + { &kMsgSearchValueIID, NS_IMSGSEARCHVALUE_IID_STR }, +#endif +#ifdef NS_IMSGSEND_IID_STR + { &kMsgSendIID, NS_IMSGSEND_IID_STR }, +#endif +#ifdef NS_IMSGSENDLATER_IID_STR + { &kMsgSendLaterIID, NS_IMSGSENDLATER_IID_STR }, +#endif +#ifdef NS_IMSGSENDLATERLISTENER_IID_STR + { &kMsgSendLaterListenerIID, NS_IMSGSENDLATERLISTENER_IID_STR }, +#endif +#ifdef NS_IMSGSENDLISTENER_IID_STR + { &kMsgSendListenerIID, NS_IMSGSENDLISTENER_IID_STR }, +#endif +#ifdef NS_IMSGSENDREPORT_IID_STR + { &kMsgSendReportIID, NS_IMSGSENDREPORT_IID_STR }, +#endif +#ifdef NS_IMSGSIGNATURE_IID_STR + { &kMsgSignatureIID, NS_IMSGSIGNATURE_IID_STR }, +#endif +#ifdef NS_IMSGSMIMECOMPFIELDS_IID_STR + { &kMsgSMIMECompFieldsIID, NS_IMSGSMIMECOMPFIELDS_IID_STR }, +#endif +#ifdef NS_IMSGSMIMEHEADERSINK_IID_STR + { &kMsgSMIMEHeaderSinkIID, NS_IMSGSMIMEHEADERSINK_IID_STR }, +#endif +#ifdef NS_IMSGSTATUSFEEDBACK_IID_STR + { &kMsgStatusFeedbackIID, NS_IMSGSTATUSFEEDBACK_IID_STR }, +#endif +#ifdef NS_IMSGSTRINGSERVICE_IID_STR + { &kMsgStringServiceIID, NS_IMSGSTRINGSERVICE_IID_STR }, +#endif +#ifdef NS_IMSGTHREAD_IID_STR + { &kMsgThreadIID, NS_IMSGTHREAD_IID_STR }, +#endif +#ifdef NS_IMSGVCARD_IID_STR + { &kMsgVCardIID, NS_IMSGVCARD_IID_STR }, +#endif +#ifdef NS_IMSGWINDOW_IID_STR + { &kMsgWindowIID, NS_IMSGWINDOW_IID_STR }, +#endif +#ifdef NS_IMULTIPARTCHANNEL_IID_STR + { &kMultiPartChannelIID, NS_IMULTIPARTCHANNEL_IID_STR }, +#endif +#ifdef NS_IMULTIPLEXINPUTSTREAM_IID_STR + { &kMultiplexInputStreamIID, NS_IMULTIPLEXINPUTSTREAM_IID_STR }, +#endif +#ifdef NS_INATIVEAPPSUPPORT_IID_STR + { &kNativeAppSupportIID, NS_INATIVEAPPSUPPORT_IID_STR }, +#endif +#ifdef NS_INATIVECOMPONENTLOADER_IID_STR + { &kNativeComponentLoaderIID, NS_INATIVECOMPONENTLOADER_IID_STR }, +#endif +#ifdef NS_INATIVESCROLLBAR_IID_STR + { &kNativeScrollbarIID, NS_INATIVESCROLLBAR_IID_STR }, +#endif +#ifdef NS_INETMODREGENTRY_IID_STR + { &kNetModRegEntryIID, NS_INETMODREGENTRY_IID_STR }, +#endif +#ifdef NS_INETMODULEMGR_IID_STR + { &kNetModuleMgrIID, NS_INETMODULEMGR_IID_STR }, +#endif +#ifdef NS_INETNOTIFY_IID_STR + { &kNetNotifyIID, NS_INETNOTIFY_IID_STR }, +#endif +#ifdef NS_INEWSDATABASE_IID_STR + { &kNewsDatabaseIID, NS_INEWSDATABASE_IID_STR }, +#endif +#ifdef NS_INEWSDOWNLOADDIALOGARGS_IID_STR + { &kNewsDownloadDialogArgsIID, NS_INEWSDOWNLOADDIALOGARGS_IID_STR }, +#endif +#ifdef NS_INNTPARTICLELIST_IID_STR + { &kNNTPArticleListIID, NS_INNTPARTICLELIST_IID_STR }, +#endif +#ifdef NS_INNTPINCOMINGSERVER_IID_STR + { &kNntpIncomingServerIID, NS_INNTPINCOMINGSERVER_IID_STR }, +#endif +#ifdef NS_INNTPNEWSGROUPLIST_IID_STR + { &kNNTPNewsgroupListIID, NS_INNTPNEWSGROUPLIST_IID_STR }, +#endif +#ifdef NS_INNTPNEWSGROUPPOST_IID_STR + { &kNNTPNewsgroupPostIID, NS_INNTPNEWSGROUPPOST_IID_STR }, +#endif +#ifdef NS_INNTPPROTOCOL_IID_STR + { &kNNTPProtocolIID, NS_INNTPPROTOCOL_IID_STR }, +#endif +#ifdef NS_INNTPSERVICE_IID_STR + { &kNntpServiceIID, NS_INNTPSERVICE_IID_STR }, +#endif +#ifdef NS_INNTPURL_IID_STR + { &kNntpUrlIID, NS_INNTPURL_IID_STR }, +#endif +#ifdef NS_INOINCOMINGSERVER_IID_STR + { &kNoIncomingServerIID, NS_INOINCOMINGSERVER_IID_STR }, +#endif +#ifdef NS_INONESERVICE_IID_STR + { &kNoneServiceIID, NS_INONESERVICE_IID_STR }, +#endif +#ifdef NS_INSSCERTCACHE_IID_STR + { &kNSSCertCacheIID, NS_INSSCERTCACHE_IID_STR }, +#endif +#ifdef NS_IOBJECTINPUTSTREAM_IID_STR + { &kObjectInputStreamIID, NS_IOBJECTINPUTSTREAM_IID_STR }, +#endif +#ifdef NS_IOBJECTOUTPUTSTREAM_IID_STR + { &kObjectOutputStreamIID, NS_IOBJECTOUTPUTSTREAM_IID_STR }, +#endif +#ifdef NS_IOBSERVER_IID_STR + { &kObserverIID, NS_IOBSERVER_IID_STR }, +#endif +#ifdef NS_IOBSERVERSERVICE_IID_STR + { &kObserverServiceIID, NS_IOBSERVERSERVICE_IID_STR }, +#endif +#ifdef NS_IOCSPRESPONDER_IID_STR + { &kOCSPResponderIID, NS_IOCSPRESPONDER_IID_STR }, +#endif +#ifdef NS_IOUTPUTSTREAM_IID_STR + { &kOutputStreamIID, NS_IOUTPUTSTREAM_IID_STR }, +#endif +#ifdef NS_IPASSWORD_IID_STR + { &kPasswordIID, NS_IPASSWORD_IID_STR }, +#endif +#ifdef NS_IPASSWORDMANAGER_IID_STR + { &kPasswordManagerIID, NS_IPASSWORDMANAGER_IID_STR }, +#endif +#ifdef NS_IPASSWORDMANAGERINTERNAL_IID_STR + { &kPasswordManagerInternalIID, NS_IPASSWORDMANAGERINTERNAL_IID_STR }, +#endif +#ifdef NS_IPASSWORDSINK_IID_STR + { &kPasswordSinkIID, NS_IPASSWORDSINK_IID_STR }, +#endif +#ifdef NS_IPERMISSION_IID_STR + { &kPermissionIID, NS_IPERMISSION_IID_STR }, +#endif +#ifdef NS_IPERMISSIONMANAGER_IID_STR + { &kPermissionManagerIID, NS_IPERMISSIONMANAGER_IID_STR }, +#endif +#ifdef NS_IPERSISTENTPROPERTIES2_IID_STR + { &kPersistentProperties2IID, NS_IPERSISTENTPROPERTIES2_IID_STR }, +#endif +#ifdef NS_IPHONETIC_IID_STR + { &kPhoneticIID, NS_IPHONETIC_IID_STR }, +#endif +#ifdef NS_IPIPE_IID_STR + { &kPipeIID, NS_IPIPE_IID_STR }, +#endif +#ifdef NS_IPK11TOKEN_IID_STR + { &kPK11TokenIID, NS_IPK11TOKEN_IID_STR }, +#endif +#ifdef NS_IPK11TOKENDB_IID_STR + { &kPK11TokenDBIID, NS_IPK11TOKENDB_IID_STR }, +#endif +#ifdef NS_IPKCS11MODULE_IID_STR + { &kPKCS11ModuleIID, NS_IPKCS11MODULE_IID_STR }, +#endif +#ifdef NS_IPKCS11MODULEDB_IID_STR + { &kPKCS11ModuleDBIID, NS_IPKCS11MODULEDB_IID_STR }, +#endif +#ifdef NS_IPKCS11SLOT_IID_STR + { &kPKCS11SlotIID, NS_IPKCS11SLOT_IID_STR }, +#endif +#ifdef NS_IPKIPARAMBLOCK_IID_STR + { &kPKIParamBlockIID, NS_IPKIPARAMBLOCK_IID_STR }, +#endif +#ifdef NS_IPLAINTEXTEDITOR_IID_STR + { &kPlaintextEditorIID, NS_IPLAINTEXTEDITOR_IID_STR }, +#endif +#ifdef NS_IPLUGIN_IID_STR + { &kPluginIID, NS_IPLUGIN_IID_STR }, +#endif +#ifdef NS_IPLUGINHOST_IID_STR + { &kPluginHostIID, NS_IPLUGINHOST_IID_STR }, +#endif +#ifdef NS_IPLUGININPUTSTREAM_IID_STR + { &kPluginInputStreamIID, NS_IPLUGININPUTSTREAM_IID_STR }, +#endif +#ifdef NS_IPLUGININSTANCE_IID_STR + { &kPluginInstanceIID, NS_IPLUGININSTANCE_IID_STR }, +#endif +#ifdef NS_IPLUGININSTANCEOWNER_IID_STR + { &kPluginInstanceOwnerIID, NS_IPLUGININSTANCEOWNER_IID_STR }, +#endif +#ifdef NS_IPLUGININSTANCEPEER_IID_STR + { &kPluginInstancePeerIID, NS_IPLUGININSTANCEPEER_IID_STR }, +#endif +#ifdef NS_IPLUGININSTANCEPEER2_IID_STR + { &kPluginInstancePeer2IID, NS_IPLUGININSTANCEPEER2_IID_STR }, +#endif +#ifdef NS_IPLUGINMANAGER_IID_STR + { &kPluginManagerIID, NS_IPLUGINMANAGER_IID_STR }, +#endif +#ifdef NS_IPLUGINMANAGER2_IID_STR + { &kPluginManager2IID, NS_IPLUGINMANAGER2_IID_STR }, +#endif +#ifdef NS_IPLUGINSTREAMINFO_IID_STR + { &kPluginStreamInfoIID, NS_IPLUGINSTREAMINFO_IID_STR }, +#endif +#ifdef NS_IPLUGINSTREAMLISTENER_IID_STR + { &kPluginStreamListenerIID, NS_IPLUGINSTREAMLISTENER_IID_STR }, +#endif +#ifdef NS_IPLUGINTAGINFO_IID_STR + { &kPluginTagInfoIID, NS_IPLUGINTAGINFO_IID_STR }, +#endif +#ifdef NS_IPLUGINTAGINFO2_IID_STR + { &kPluginTagInfo2IID, NS_IPLUGINTAGINFO2_IID_STR }, +#endif +#ifdef NS_IPLUGINVIEWER_IID_STR + { &kPluginViewerIID, NS_IPLUGINVIEWER_IID_STR }, +#endif +#ifdef NS_IPOP3INCOMINGSERVER_IID_STR + { &kPop3IncomingServerIID, NS_IPOP3INCOMINGSERVER_IID_STR }, +#endif +#ifdef NS_IPOP3SERVICE_IID_STR + { &kPop3ServiceIID, NS_IPOP3SERVICE_IID_STR }, +#endif +#ifdef NS_IPOP3SINK_IID_STR + { &kPop3SinkIID, NS_IPOP3SINK_IID_STR }, +#endif +#ifdef NS_IPOP3URL_IID_STR + { &kPop3URLIID, NS_IPOP3URL_IID_STR }, +#endif +#ifdef NS_IPOPUPBOXOBJECT_IID_STR + { &kPopupBoxObjectIID, NS_IPOPUPBOXOBJECT_IID_STR }, +#endif +#ifdef NS_IPOPUPWINDOWMANAGER_IID_STR + { &kPopupWindowManagerIID, NS_IPOPUPWINDOWMANAGER_IID_STR }, +#endif +#ifdef NS_IPREF_IID_STR + { &kPrefIID, NS_IPREF_IID_STR }, +#endif +#ifdef NS_IPREFBRANCH_IID_STR + { &kPrefBranchIID, NS_IPREFBRANCH_IID_STR }, +#endif +#ifdef NS_IPREFBRANCHINTERNAL_IID_STR + { &kPrefBranchInternalIID, NS_IPREFBRANCHINTERNAL_IID_STR }, +#endif +#ifdef NS_IPREFETCHSERVICE_IID_STR + { &kPrefetchServiceIID, NS_IPREFETCHSERVICE_IID_STR }, +#endif +#ifdef NS_IPREFLOCALIZEDSTRING_IID_STR + { &kPrefLocalizedStringIID, NS_IPREFLOCALIZEDSTRING_IID_STR }, +#endif +#ifdef NS_IPREFMIGRATION_IID_STR + { &kPrefMigrationIID, NS_IPREFMIGRATION_IID_STR }, +#endif +#ifdef NS_IPREFMIGRATIONPROGRESS_IID_STR + { &kPrefMigrationProgressIID, NS_IPREFMIGRATIONPROGRESS_IID_STR }, +#endif +#ifdef NS_IPREFSERVICE_IID_STR + { &kPrefServiceIID, NS_IPREFSERVICE_IID_STR }, +#endif +#ifdef NS_IPRINCIPAL_IID_STR + { &kPrincipalIID, NS_IPRINCIPAL_IID_STR }, +#endif +#ifdef NS_IPRINTINGPROMPT_IID_STR + { &kPrintingPromptIID, NS_IPRINTINGPROMPT_IID_STR }, +#endif +#ifdef NS_IPRINTINGPROMPTSERVICE_IID_STR + { &kPrintingPromptServiceIID, NS_IPRINTINGPROMPTSERVICE_IID_STR }, +#endif +#ifdef NS_IPRINTOPTIONS_IID_STR + { &kPrintOptionsIID, NS_IPRINTOPTIONS_IID_STR }, +#endif +#ifdef NS_IPRINTPROGRESS_IID_STR + { &kPrintProgressIID, NS_IPRINTPROGRESS_IID_STR }, +#endif +#ifdef NS_IPRINTPROGRESSPARAMS_IID_STR + { &kPrintProgressParamsIID, NS_IPRINTPROGRESSPARAMS_IID_STR }, +#endif +#ifdef NS_IPRINTSESSION_IID_STR + { &kPrintSessionIID, NS_IPRINTSESSION_IID_STR }, +#endif +#ifdef NS_IPRINTSETTINGS_IID_STR + { &kPrintSettingsIID, NS_IPRINTSETTINGS_IID_STR }, +#endif +#ifdef NS_IPRINTSETTINGSSERVICE_IID_STR + { &kPrintSettingsServiceIID, NS_IPRINTSETTINGSSERVICE_IID_STR }, +#endif +#ifdef NS_IPRINTSTATUSFEEDBACK_IID_STR + { &kPrintStatusFeedbackIID, NS_IPRINTSTATUSFEEDBACK_IID_STR }, +#endif +#ifdef NS_IPROCESS_IID_STR + { &kProcessIID, NS_IPROCESS_IID_STR }, +#endif +#ifdef NS_IPROFILE_IID_STR + { &kProfileIID, NS_IPROFILE_IID_STR }, +#endif +#ifdef NS_IPROFILECHANGESTATUS_IID_STR + { &kProfileChangeStatusIID, NS_IPROFILECHANGESTATUS_IID_STR }, +#endif +#ifdef NS_IPROFILEINTERNAL_IID_STR + { &kProfileInternalIID, NS_IPROFILEINTERNAL_IID_STR }, +#endif +#ifdef NS_IPROFILESTARTUPLISTENER_IID_STR + { &kProfileStartupListenerIID, NS_IPROFILESTARTUPLISTENER_IID_STR }, +#endif +#ifdef NS_IPROGRAMMINGLANGUAGE_IID_STR + { &kProgrammingLanguageIID, NS_IPROGRAMMINGLANGUAGE_IID_STR }, +#endif +#ifdef NS_IPROGRESSDIALOG_IID_STR + { &kProgressDialogIID, NS_IPROGRESSDIALOG_IID_STR }, +#endif +#ifdef NS_IPROGRESSEVENTSINK_IID_STR + { &kProgressEventSinkIID, NS_IPROGRESSEVENTSINK_IID_STR }, +#endif +#ifdef NS_IPROMPT_IID_STR + { &kPromptIID, NS_IPROMPT_IID_STR }, +#endif +#ifdef NS_IPROMPTSERVICE_IID_STR + { &kPromptServiceIID, NS_IPROMPTSERVICE_IID_STR }, +#endif +#ifdef NS_IPROPERTIES_IID_STR + { &kPropertiesIID, NS_IPROPERTIES_IID_STR }, +#endif +#ifdef NS_IPROPERTYBAG_IID_STR + { &kPropertyBagIID, NS_IPROPERTYBAG_IID_STR }, +#endif +#ifdef NS_IPROTOCOLHANDLER_IID_STR + { &kProtocolHandlerIID, NS_IPROTOCOLHANDLER_IID_STR }, +#endif +#ifdef NS_IPROTOCOLPROXYSERVICE_IID_STR + { &kProtocolProxyServiceIID, NS_IPROTOCOLPROXYSERVICE_IID_STR }, +#endif +#ifdef NS_IPROXIEDPROTOCOLHANDLER_IID_STR + { &kProxiedProtocolHandlerIID, NS_IPROXIEDPROTOCOLHANDLER_IID_STR }, +#endif +#ifdef NS_IPROXY_IID_STR + { &kProxyIID, NS_IPROXY_IID_STR }, +#endif +#ifdef NS_IPROXYAUTOCONFIG_IID_STR + { &kProxyAutoConfigIID, NS_IPROXYAUTOCONFIG_IID_STR }, +#endif +#ifdef NS_IPROXYCREATEINSTANCE_IID_STR + { &kProxyCreateInstanceIID, NS_IPROXYCREATEINSTANCE_IID_STR }, +#endif +#ifdef NS_IPROXYINFO_IID_STR + { &kProxyInfoIID, NS_IPROXYINFO_IID_STR }, +#endif +#ifdef NS_IPROXYOBJECTMANAGER_IID_STR + { &kProxyObjectManagerIID, NS_IPROXYOBJECTMANAGER_IID_STR }, +#endif +#ifdef NS_IRDFCOMPOSITEDATASOURCE_IID_STR + { &kRDFCompositeDataSourceIID, NS_IRDFCOMPOSITEDATASOURCE_IID_STR }, +#endif +#ifdef NS_IRDFCONTAINER_IID_STR + { &kRDFContainerIID, NS_IRDFCONTAINER_IID_STR }, +#endif +#ifdef NS_IRDFCONTAINERUTILS_IID_STR + { &kRDFContainerUtilsIID, NS_IRDFCONTAINERUTILS_IID_STR }, +#endif +#ifdef NS_IRDFDATASOURCE_IID_STR + { &kRDFDataSourceIID, NS_IRDFDATASOURCE_IID_STR }, +#endif +#ifdef NS_IRDFDELEGATEFACTORY_IID_STR + { &kRDFDelegateFactoryIID, NS_IRDFDELEGATEFACTORY_IID_STR }, +#endif +#ifdef NS_IRDFINMEMORYDATASOURCE_IID_STR + { &kRDFInMemoryDataSourceIID, NS_IRDFINMEMORYDATASOURCE_IID_STR }, +#endif +#ifdef NS_IRDFLITERAL_IID_STR + { &kRDFLiteralIID, NS_IRDFLITERAL_IID_STR }, +#endif +#ifdef NS_IRDFNODE_IID_STR + { &kRDFNodeIID, NS_IRDFNODE_IID_STR }, +#endif +#ifdef NS_IRDFOBSERVER_IID_STR + { &kRDFObserverIID, NS_IRDFOBSERVER_IID_STR }, +#endif +#ifdef NS_IRDFPURGEABLEDATASOURCE_IID_STR + { &kRDFPurgeableDataSourceIID, NS_IRDFPURGEABLEDATASOURCE_IID_STR }, +#endif +#ifdef NS_IRDFREMOTEDATASOURCE_IID_STR + { &kRDFRemoteDataSourceIID, NS_IRDFREMOTEDATASOURCE_IID_STR }, +#endif +#ifdef NS_IRDFRESOURCE_IID_STR + { &kRDFResourceIID, NS_IRDFRESOURCE_IID_STR }, +#endif +#ifdef NS_IRDFSERVICE_IID_STR + { &kRDFServiceIID, NS_IRDFSERVICE_IID_STR }, +#endif +#ifdef NS_IRDFXMLPARSER_IID_STR + { &kRDFXMLParserIID, NS_IRDFXMLPARSER_IID_STR }, +#endif +#ifdef NS_IRDFXMLSERIALIZER_IID_STR + { &kRDFXMLSerializerIID, NS_IRDFXMLSERIALIZER_IID_STR }, +#endif +#ifdef NS_IRDFXMLSINK_IID_STR + { &kRDFXMLSinkIID, NS_IRDFXMLSINK_IID_STR }, +#endif +#ifdef NS_IRDFXMLSOURCE_IID_STR + { &kRDFXMLSourceIID, NS_IRDFXMLSOURCE_IID_STR }, +#endif +#ifdef NS_IREADCONFIG_IID_STR + { &kReadConfigIID, NS_IREADCONFIG_IID_STR }, +#endif +#ifdef NS_IRECYCLINGALLOCATOR_IID_STR + { &kRecyclingAllocatorIID, NS_IRECYCLINGALLOCATOR_IID_STR }, +#endif +#ifdef NS_IREFRESHURI_IID_STR + { &kRefreshURIIID, NS_IREFRESHURI_IID_STR }, +#endif +#ifdef NS_IREGISTRY_IID_STR + { &kRegistryIID, NS_IREGISTRY_IID_STR }, +#endif +#ifdef NS_IRELATEDLINKSHANDLER_IID_STR + { &kRelatedLinksHandlerIID, NS_IRELATEDLINKSHANDLER_IID_STR }, +#endif +#ifdef NS_IRELATIVEFILEPREF_IID_STR + { &kRelativeFilePrefIID, NS_IRELATIVEFILEPREF_IID_STR }, +#endif +#ifdef NS_IREQUEST_IID_STR + { &kRequestIID, NS_IREQUEST_IID_STR }, +#endif +#ifdef NS_IREQUESTOBSERVER_IID_STR + { &kRequestObserverIID, NS_IREQUESTOBSERVER_IID_STR }, +#endif +#ifdef NS_IREQUESTOBSERVERPROXY_IID_STR + { &kRequestObserverProxyIID, NS_IREQUESTOBSERVERPROXY_IID_STR }, +#endif +#ifdef NS_IRESPROTOCOLHANDLER_IID_STR + { &kResProtocolHandlerIID, NS_IRESPROTOCOLHANDLER_IID_STR }, +#endif +#ifdef NS_IRESUMABLECHANNEL_IID_STR + { &kResumableChannelIID, NS_IRESUMABLECHANNEL_IID_STR }, +#endif +#ifdef NS_IRESUMABLEENTITYID_IID_STR + { &kResumableEntityIDIID, NS_IRESUMABLEENTITYID_IID_STR }, +#endif +#ifdef NS_IROLLUPLISTENER_IID_STR + { &kRollupListenerIID, NS_IROLLUPLISTENER_IID_STR }, +#endif +#ifdef NS_IRUNNABLE_IID_STR + { &kRunnableIID, NS_IRUNNABLE_IID_STR }, +#endif +#ifdef NS_ISAMPLE_IID_STR + { &kSampleIID, NS_ISAMPLE_IID_STR }, +#endif +#ifdef NS_ISAVEASCHARSET_IID_STR + { &kSaveAsCharsetIID, NS_ISAVEASCHARSET_IID_STR }, +#endif +#ifdef NS_ISCHEMA_IID_STR + { &kSchemaIID, NS_ISCHEMA_IID_STR }, +#endif +#ifdef NS_ISCHEMALOADER_IID_STR + { &kSchemaLoaderIID, NS_ISCHEMALOADER_IID_STR }, +#endif +#ifdef NS_ISCREEN_IID_STR + { &kScreenIID, NS_ISCREEN_IID_STR }, +#endif +#ifdef NS_ISCREENMANAGER_IID_STR + { &kScreenManagerIID, NS_ISCREENMANAGER_IID_STR }, +#endif +#ifdef NS_ISCRIPTABLEDATEFORMAT_IID_STR + { &kScriptableDateFormatIID, NS_ISCRIPTABLEDATEFORMAT_IID_STR }, +#endif +#ifdef NS_ISCRIPTABLEINPUTSTREAM_IID_STR + { &kScriptableInputStreamIID, NS_ISCRIPTABLEINPUTSTREAM_IID_STR }, +#endif +#ifdef NS_ISCRIPTABLEINTERFACES_IID_STR + { &kScriptableInterfacesIID, NS_ISCRIPTABLEINTERFACES_IID_STR }, +#endif +#ifdef NS_ISCRIPTABLEPLUGIN_IID_STR + { &kScriptablePluginIID, NS_ISCRIPTABLEPLUGIN_IID_STR }, +#endif +#ifdef NS_ISCRIPTABLEREGION_IID_STR + { &kScriptableRegionIID, NS_ISCRIPTABLEREGION_IID_STR }, +#endif +#ifdef NS_ISCRIPTABLEUCONV_IID_STR + { &kScriptableUConvIID, NS_ISCRIPTABLEUCONV_IID_STR }, +#endif +#ifdef NS_ISCRIPTCONTEXTOWNER_IID_STR + { &kScriptContextOwnerIID, NS_ISCRIPTCONTEXTOWNER_IID_STR }, +#endif +#ifdef NS_ISCRIPTERROR_IID_STR + { &kScriptErrorIID, NS_ISCRIPTERROR_IID_STR }, +#endif +#ifdef NS_ISCRIPTEVENTHANDLER_IID_STR + { &kScriptEventHandlerIID, NS_ISCRIPTEVENTHANDLER_IID_STR }, +#endif +#ifdef NS_ISCRIPTEVENTMANAGER_IID_STR + { &kScriptEventManagerIID, NS_ISCRIPTEVENTMANAGER_IID_STR }, +#endif +#ifdef NS_ISCRIPTGLOBALOBJECTOWNER_IID_STR + { &kScriptGlobalObjectOwnerIID, NS_ISCRIPTGLOBALOBJECTOWNER_IID_STR }, +#endif +#ifdef NS_ISCRIPTLOADER_IID_STR + { &kScriptLoaderIID, NS_ISCRIPTLOADER_IID_STR }, +#endif +#ifdef NS_ISCRIPTLOADEROBSERVER_IID_STR + { &kScriptLoaderObserverIID, NS_ISCRIPTLOADEROBSERVER_IID_STR }, +#endif +#ifdef NS_ISCRIPTSECURITYMANAGER_IID_STR + { &kScriptSecurityManagerIID, NS_ISCRIPTSECURITYMANAGER_IID_STR }, +#endif +#ifdef NS_ISCROLLABLE_IID_STR + { &kScrollableIID, NS_ISCROLLABLE_IID_STR }, +#endif +#ifdef NS_ISCROLLBOXOBJECT_IID_STR + { &kScrollBoxObjectIID, NS_ISCROLLBOXOBJECT_IID_STR }, +#endif +#ifdef NS_ISEARCHCONTEXT_IID_STR + { &kSearchContextIID, NS_ISEARCHCONTEXT_IID_STR }, +#endif +#ifdef NS_ISEARCHSERVICE_IID_STR + { &kSearchServiceIID, NS_ISEARCHSERVICE_IID_STR }, +#endif +#ifdef NS_ISECRETDECODERRING_IID_STR + { &kSecretDecoderRingIID, NS_ISECRETDECODERRING_IID_STR }, +#endif +#ifdef NS_ISECUREBROWSERUI_IID_STR + { &kSecureBrowserUIIID, NS_ISECUREBROWSERUI_IID_STR }, +#endif +#ifdef NS_ISECURITYCHECKEDCOMPONENT_IID_STR + { &kSecurityCheckedComponentIID, NS_ISECURITYCHECKEDCOMPONENT_IID_STR }, +#endif +#ifdef NS_ISECURITYEVENTSINK_IID_STR + { &kSecurityEventSinkIID, NS_ISECURITYEVENTSINK_IID_STR }, +#endif +#ifdef NS_ISECURITYPREF_IID_STR + { &kSecurityPrefIID, NS_ISECURITYPREF_IID_STR }, +#endif +#ifdef NS_ISECURITYWARNINGDIALOGS_IID_STR + { &kSecurityWarningDialogsIID, NS_ISECURITYWARNINGDIALOGS_IID_STR }, +#endif +#ifdef NS_ISEEKABLESTREAM_IID_STR + { &kSeekableStreamIID, NS_ISEEKABLESTREAM_IID_STR }, +#endif +#ifdef NS_ISELECTELEMENT_IID_STR + { &kSelectElementIID, NS_ISELECTELEMENT_IID_STR }, +#endif +#ifdef NS_ISELECTION_IID_STR + { &kSelectionIID, NS_ISELECTION_IID_STR }, +#endif +#ifdef NS_ISELECTIONCONTROLLER_IID_STR + { &kSelectionControllerIID, NS_ISELECTIONCONTROLLER_IID_STR }, +#endif +#ifdef NS_ISELECTIONDISPLAY_IID_STR + { &kSelectionDisplayIID, NS_ISELECTIONDISPLAY_IID_STR }, +#endif +#ifdef NS_ISELECTIONIMAGESERVICE_IID_STR + { &kSelectionImageServiceIID, NS_ISELECTIONIMAGESERVICE_IID_STR }, +#endif +#ifdef NS_ISELECTIONLISTENER_IID_STR + { &kSelectionListenerIID, NS_ISELECTIONLISTENER_IID_STR }, +#endif +#ifdef NS_ISELECTIONPRIVATE_IID_STR + { &kSelectionPrivateIID, NS_ISELECTIONPRIVATE_IID_STR }, +#endif +#ifdef NS_ISEMANTICUNITSCANNER_IID_STR + { &kSemanticUnitScannerIID, NS_ISEMANTICUNITSCANNER_IID_STR }, +#endif +#ifdef NS_ISERIALIZABLE_IID_STR + { &kSerializableIID, NS_ISERIALIZABLE_IID_STR }, +#endif +#ifdef NS_ISERVICEMANAGER_IID_STR + { &kServiceManagerIID, NS_ISERVICEMANAGER_IID_STR }, +#endif +#ifdef NS_ISHCONTAINER_IID_STR + { &kSHContainerIID, NS_ISHCONTAINER_IID_STR }, +#endif +#ifdef NS_ISHENTRY_IID_STR + { &kSHEntryIID, NS_ISHENTRY_IID_STR }, +#endif +#ifdef NS_ISHISTORY_IID_STR + { &kSHistoryIID, NS_ISHISTORY_IID_STR }, +#endif +#ifdef NS_ISHISTORYINTERNAL_IID_STR + { &kSHistoryInternalIID, NS_ISHISTORYINTERNAL_IID_STR }, +#endif +#ifdef NS_ISHISTORYLISTENER_IID_STR + { &kSHistoryListenerIID, NS_ISHISTORYLISTENER_IID_STR }, +#endif +#ifdef NS_ISHTRANSACTION_IID_STR + { &kSHTransactionIID, NS_ISHTRANSACTION_IID_STR }, +#endif +#ifdef NS_ISIDEBAR_IID_STR + { &kSidebarIID, NS_ISIDEBAR_IID_STR }, +#endif +#ifdef NS_ISIGNATUREVERIFIER_IID_STR + { &kSignatureVerifierIID, NS_ISIGNATUREVERIFIER_IID_STR }, +#endif +#ifdef NS_ISIGNONVIEWER_IID_STR + { &kSignonViewerIID, NS_ISIGNONVIEWER_IID_STR }, +#endif +#ifdef NS_ISIMPLEENUMERATOR_IID_STR + { &kSimpleEnumeratorIID, NS_ISIMPLEENUMERATOR_IID_STR }, +#endif +#ifdef NS_ISIMPLESTREAMLISTENER_IID_STR + { &kSimpleStreamListenerIID, NS_ISIMPLESTREAMLISTENER_IID_STR }, +#endif +#ifdef NS_ISMIMECERT_IID_STR + { &kSMimeCertIID, NS_ISMIMECERT_IID_STR }, +#endif +#ifdef NS_ISMIMEJSHELPER_IID_STR + { &kSMimeJSHelperIID, NS_ISMIMEJSHELPER_IID_STR }, +#endif +#ifdef NS_ISMTPSERVER_IID_STR + { &kSmtpServerIID, NS_ISMTPSERVER_IID_STR }, +#endif +#ifdef NS_ISMTPSERVICE_IID_STR + { &kSmtpServiceIID, NS_ISMTPSERVICE_IID_STR }, +#endif +#ifdef NS_ISMTPURL_IID_STR + { &kSmtpUrlIID, NS_ISMTPURL_IID_STR }, +#endif +#ifdef NS_ISOAPATTACHMENTS_IID_STR + { &kSOAPAttachmentsIID, NS_ISOAPATTACHMENTS_IID_STR }, +#endif +#ifdef NS_ISOAPBLOCK_IID_STR + { &kSOAPBlockIID, NS_ISOAPBLOCK_IID_STR }, +#endif +#ifdef NS_ISOAPCALL_IID_STR + { &kSOAPCallIID, NS_ISOAPCALL_IID_STR }, +#endif +#ifdef NS_ISOAPCALLCOMPLETION_IID_STR + { &kSOAPCallCompletionIID, NS_ISOAPCALLCOMPLETION_IID_STR }, +#endif +#ifdef NS_ISOAPDECODER_IID_STR + { &kSOAPDecoderIID, NS_ISOAPDECODER_IID_STR }, +#endif +#ifdef NS_ISOAPENCODER_IID_STR + { &kSOAPEncoderIID, NS_ISOAPENCODER_IID_STR }, +#endif +#ifdef NS_ISOAPENCODING_IID_STR + { &kSOAPEncodingIID, NS_ISOAPENCODING_IID_STR }, +#endif +#ifdef NS_ISOAPFAULT_IID_STR + { &kSOAPFaultIID, NS_ISOAPFAULT_IID_STR }, +#endif +#ifdef NS_ISOAPHEADERBLOCK_IID_STR + { &kSOAPHeaderBlockIID, NS_ISOAPHEADERBLOCK_IID_STR }, +#endif +#ifdef NS_ISOAPMESSAGE_IID_STR + { &kSOAPMessageIID, NS_ISOAPMESSAGE_IID_STR }, +#endif +#ifdef NS_ISOAPPARAMETER_IID_STR + { &kSOAPParameterIID, NS_ISOAPPARAMETER_IID_STR }, +#endif +#ifdef NS_ISOAPPROPERTYBAGMUTATOR_IID_STR + { &kSOAPPropertyBagMutatorIID, NS_ISOAPPROPERTYBAGMUTATOR_IID_STR }, +#endif +#ifdef NS_ISOAPRESPONSE_IID_STR + { &kSOAPResponseIID, NS_ISOAPRESPONSE_IID_STR }, +#endif +#ifdef NS_ISOAPRESPONSELISTENER_IID_STR + { &kSOAPResponseListenerIID, NS_ISOAPRESPONSELISTENER_IID_STR }, +#endif +#ifdef NS_ISOAPSERVICE_IID_STR + { &kSOAPServiceIID, NS_ISOAPSERVICE_IID_STR }, +#endif +#ifdef NS_ISOAPSERVICEREGISTRY_IID_STR + { &kSOAPServiceRegistryIID, NS_ISOAPSERVICEREGISTRY_IID_STR }, +#endif +#ifdef NS_ISOAPTRANSPORT_IID_STR + { &kSOAPTransportIID, NS_ISOAPTRANSPORT_IID_STR }, +#endif +#ifdef NS_ISOAPTRANSPORTLISTENER_IID_STR + { &kSOAPTransportListenerIID, NS_ISOAPTRANSPORTLISTENER_IID_STR }, +#endif +#ifdef NS_ISOCKETPROVIDER_IID_STR + { &kSocketProviderIID, NS_ISOCKETPROVIDER_IID_STR }, +#endif +#ifdef NS_ISOCKETPROVIDERSERVICE_IID_STR + { &kSocketProviderServiceIID, NS_ISOCKETPROVIDERSERVICE_IID_STR }, +#endif +#ifdef NS_ISOCKETTRANSPORT_IID_STR + { &kSocketTransportIID, NS_ISOCKETTRANSPORT_IID_STR }, +#endif +#ifdef NS_ISOCKETTRANSPORTSERVICE_IID_STR + { &kSocketTransportServiceIID, NS_ISOCKETTRANSPORTSERVICE_IID_STR }, +#endif +#ifdef NS_ISOCKS4SOCKETINFO_IID_STR + { &kSOCKS4SocketInfoIID, NS_ISOCKS4SOCKETINFO_IID_STR }, +#endif +#ifdef NS_ISOCKS4SOCKETPROVIDER_IID_STR + { &kSOCKS4SocketProviderIID, NS_ISOCKS4SOCKETPROVIDER_IID_STR }, +#endif +#ifdef NS_ISOCKSSOCKETINFO_IID_STR + { &kSOCKSSocketInfoIID, NS_ISOCKSSOCKETINFO_IID_STR }, +#endif +#ifdef NS_ISOCKSSOCKETPROVIDER_IID_STR + { &kSOCKSSocketProviderIID, NS_ISOCKSSOCKETPROVIDER_IID_STR }, +#endif +#ifdef NS_ISOUND_IID_STR + { &kSoundIID, NS_ISOUND_IID_STR }, +#endif +#ifdef NS_ISPAMSETTINGS_IID_STR + { &kSpamSettingsIID, NS_ISPAMSETTINGS_IID_STR }, +#endif +#ifdef NS_ISSLSOCKETCONTROL_IID_STR + { &kSSLSocketControlIID, NS_ISSLSOCKETCONTROL_IID_STR }, +#endif +#ifdef NS_ISSLSOCKETPROVIDER_IID_STR + { &kSSLSocketProviderIID, NS_ISSLSOCKETPROVIDER_IID_STR }, +#endif +#ifdef NS_ISSLSTATUS_IID_STR + { &kSSLStatusIID, NS_ISSLSTATUS_IID_STR }, +#endif +#ifdef NS_ISSLSTATUSPROVIDER_IID_STR + { &kSSLStatusProviderIID, NS_ISSLSTATUSPROVIDER_IID_STR }, +#endif +#ifdef NS_ISTANDARDURL_IID_STR + { &kStandardURLIID, NS_ISTANDARDURL_IID_STR }, +#endif +#ifdef NS_ISTORAGESTREAM_IID_STR + { &kStorageStreamIID, NS_ISTORAGESTREAM_IID_STR }, +#endif +#ifdef NS_ISTREAMBUFFERACCESS_IID_STR + { &kStreamBufferAccessIID, NS_ISTREAMBUFFERACCESS_IID_STR }, +#endif +#ifdef NS_ISTREAMCONVERTER_IID_STR + { &kStreamConverterIID, NS_ISTREAMCONVERTER_IID_STR }, +#endif +#ifdef NS_ISTREAMCONVERTERSERVICE_IID_STR + { &kStreamConverterServiceIID, NS_ISTREAMCONVERTERSERVICE_IID_STR }, +#endif +#ifdef NS_ISTREAMLISTENER_IID_STR + { &kStreamListenerIID, NS_ISTREAMLISTENER_IID_STR }, +#endif +#ifdef NS_ISTREAMLISTENERPROXY_IID_STR + { &kStreamListenerProxyIID, NS_ISTREAMLISTENERPROXY_IID_STR }, +#endif +#ifdef NS_ISTREAMLISTENERTEE_IID_STR + { &kStreamListenerTeeIID, NS_ISTREAMLISTENERTEE_IID_STR }, +#endif +#ifdef NS_ISTREAMLOADER_IID_STR + { &kStreamLoaderIID, NS_ISTREAMLOADER_IID_STR }, +#endif +#ifdef NS_ISTREAMTRANSPORTSERVICE_IID_STR + { &kStreamTransportServiceIID, NS_ISTREAMTRANSPORTSERVICE_IID_STR }, +#endif +#ifdef NS_ISTRINGBUNDLE_IID_STR + { &kStringBundleIID, NS_ISTRINGBUNDLE_IID_STR }, +#endif +#ifdef NS_ISTRINGBUNDLEOVERRIDE_IID_STR + { &kStringBundleOverrideIID, NS_ISTRINGBUNDLEOVERRIDE_IID_STR }, +#endif +#ifdef NS_ISTRINGSERVICE_IID_STR + { &kStringServiceIID, NS_ISTRINGSERVICE_IID_STR }, +#endif +#ifdef NS_ISTRINGSTREAM_IID_STR + { &kStringStreamIID, NS_ISTRINGSTREAM_IID_STR }, +#endif +#ifdef NS_ISUBSCRIBABLESERVER_IID_STR + { &kSubscribableServerIID, NS_ISUBSCRIBABLESERVER_IID_STR }, +#endif +#ifdef NS_ISUPPORTS_IID_STR + { &kSupportsIID, NS_ISUPPORTS_IID_STR }, +#endif +#ifdef NS_ISUPPORTSARRAY_IID_STR + { &kSupportsArrayIID, NS_ISUPPORTSARRAY_IID_STR }, +#endif +#ifdef NS_ISUPPORTSITERATORS_IID_STR + { &kSupportsIteratorsIID, NS_ISUPPORTSITERATORS_IID_STR }, +#endif +#ifdef NS_ISUPPORTSPRIMITIVES_IID_STR + { &kSupportsPrimitivesIID, NS_ISUPPORTSPRIMITIVES_IID_STR }, +#endif +#ifdef NS_ISYNCLOADDOMSERVICE_IID_STR + { &kSyncLoadDOMServiceIID, NS_ISYNCLOADDOMSERVICE_IID_STR }, +#endif +#ifdef NS_ITABLEEDITOR_IID_STR + { &kTableEditorIID, NS_ITABLEEDITOR_IID_STR }, +#endif +#ifdef NS_ITESTPROXY_IID_STR + { &kTestProxyIID, NS_ITESTPROXY_IID_STR }, +#endif +#ifdef NS_ITEXTAREAELEMENT_IID_STR + { &kTextAreaElementIID, NS_ITEXTAREAELEMENT_IID_STR }, +#endif +#ifdef NS_ITEXTSCROLL_IID_STR + { &kTextScrollIID, NS_ITEXTSCROLL_IID_STR }, +#endif +#ifdef NS_ITEXTSERVICESFILTER_IID_STR + { &kTextServicesFilterIID, NS_ITEXTSERVICESFILTER_IID_STR }, +#endif +#ifdef NS_ITEXTTOSUBURI_IID_STR + { &kTextToSubURIIID, NS_ITEXTTOSUBURI_IID_STR }, +#endif +#ifdef NS_ITHREAD_IID_STR + { &kThreadIID, NS_ITHREAD_IID_STR }, +#endif +#ifdef NS_ITHREADPOOL_IID_STR + { &kThreadPoolIID, NS_ITHREADPOOL_IID_STR }, +#endif +#ifdef NS_ITIMEBOMB_IID_STR + { &kTimeBombIID, NS_ITIMEBOMB_IID_STR }, +#endif +#ifdef NS_ITIMELINESERVICE_IID_STR + { &kTimelineServiceIID, NS_ITIMELINESERVICE_IID_STR }, +#endif +#ifdef NS_ITIMER_IID_STR + { &kTimerIID, NS_ITIMER_IID_STR }, +#endif +#ifdef NS_ITIMERECORDER_IID_STR + { &kTimeRecorderIID, NS_ITIMERECORDER_IID_STR }, +#endif +#ifdef NS_ITIMERINTERNAL_IID_STR + { &kTimerInternalIID, NS_ITIMERINTERNAL_IID_STR }, +#endif +#ifdef NS_ITIMERMANAGER_IID_STR + { &kTimerManagerIID, NS_ITIMERMANAGER_IID_STR }, +#endif +#ifdef NS_ITIMINGSERVICE_IID_STR + { &kTimingServiceIID, NS_ITIMINGSERVICE_IID_STR }, +#endif +#ifdef NS_ITOKENDIALOGS_IID_STR + { &kTokenDialogsIID, NS_ITOKENDIALOGS_IID_STR }, +#endif +#ifdef NS_ITOKENPASSWORDDIALOGS_IID_STR + { &kTokenPasswordDialogsIID, NS_ITOKENPASSWORDDIALOGS_IID_STR }, +#endif +#ifdef NS_ITOOLKIT_IID_STR + { &kToolkitIID, NS_ITOOLKIT_IID_STR }, +#endif +#ifdef NS_ITOOLTIPLISTENER_IID_STR + { &kTooltipListenerIID, NS_ITOOLTIPLISTENER_IID_STR }, +#endif +#ifdef NS_ITOOLTIPTEXTPROVIDER_IID_STR + { &kTooltipTextProviderIID, NS_ITOOLTIPTEXTPROVIDER_IID_STR }, +#endif +#ifdef NS_ITRANSACTION_IID_STR + { &kTransactionIID, NS_ITRANSACTION_IID_STR }, +#endif +#ifdef NS_ITRANSACTIONLIST_IID_STR + { &kTransactionListIID, NS_ITRANSACTIONLIST_IID_STR }, +#endif +#ifdef NS_ITRANSACTIONLISTENER_IID_STR + { &kTransactionListenerIID, NS_ITRANSACTIONLISTENER_IID_STR }, +#endif +#ifdef NS_ITRANSACTIONMANAGER_IID_STR + { &kTransactionManagerIID, NS_ITRANSACTIONMANAGER_IID_STR }, +#endif +#ifdef NS_ITRANSFERABLE_IID_STR + { &kTransferableIID, NS_ITRANSFERABLE_IID_STR }, +#endif +#ifdef NS_ITRANSPORT_IID_STR + { &kTransportIID, NS_ITRANSPORT_IID_STR }, +#endif +#ifdef NS_ITRANSPORTSECURITYINFO_IID_STR + { &kTransportSecurityInfoIID, NS_ITRANSPORTSECURITYINFO_IID_STR }, +#endif +#ifdef NS_ITREEBOXOBJECT_IID_STR + { &kTreeBoxObjectIID, NS_ITREEBOXOBJECT_IID_STR }, +#endif +#ifdef NS_ITREECONTENTVIEW_IID_STR + { &kTreeContentViewIID, NS_ITREECONTENTVIEW_IID_STR }, +#endif +#ifdef NS_ITREESELECTION_IID_STR + { &kTreeSelectionIID, NS_ITREESELECTION_IID_STR }, +#endif +#ifdef NS_ITREEVIEW_IID_STR + { &kTreeViewIID, NS_ITREEVIEW_IID_STR }, +#endif +#ifdef NS_ITXTTOHTMLCONV_IID_STR + { &kTXTToHTMLConvIID, NS_ITXTTOHTMLCONV_IID_STR }, +#endif +#ifdef NS_ITYPEAHEADFIND_IID_STR + { &kTypeAheadFindIID, NS_ITYPEAHEADFIND_IID_STR }, +#endif +#ifdef NS_IUNICHARSTREAMLOADER_IID_STR + { &kUnicharStreamLoaderIID, NS_IUNICHARSTREAMLOADER_IID_STR }, +#endif +#ifdef NS_IUNICODENORMALIZER_IID_STR + { &kUnicodeNormalizerIID, NS_IUNICODENORMALIZER_IID_STR }, +#endif +#ifdef NS_IUPLOADCHANNEL_IID_STR + { &kUploadChannelIID, NS_IUPLOADCHANNEL_IID_STR }, +#endif +#ifdef NS_IURI_IID_STR + { &kURIIID, NS_IURI_IID_STR }, +#endif +#ifdef NS_IURICHECKER_IID_STR + { &kURICheckerIID, NS_IURICHECKER_IID_STR }, +#endif +#ifdef NS_IURICONTENTLISTENER_IID_STR + { &kURIContentListenerIID, NS_IURICONTENTLISTENER_IID_STR }, +#endif +#ifdef NS_IURIFIXUP_IID_STR + { &kURIFixupIID, NS_IURIFIXUP_IID_STR }, +#endif +#ifdef NS_IURILOADER_IID_STR + { &kURILoaderIID, NS_IURILOADER_IID_STR }, +#endif +#ifdef NS_IURIREFOBJECT_IID_STR + { &kURIRefObjectIID, NS_IURIREFOBJECT_IID_STR }, +#endif +#ifdef NS_IURL_IID_STR + { &kURLIID, NS_IURL_IID_STR }, +#endif +#ifdef NS_IURLBARHISTORY_IID_STR + { &kUrlbarHistoryIID, NS_IURLBARHISTORY_IID_STR }, +#endif +#ifdef NS_IURLFETCHER_IID_STR + { &kURLFetcherIID, NS_IURLFETCHER_IID_STR }, +#endif +#ifdef NS_IURLLISTENER_IID_STR + { &kUrlListenerIID, NS_IURLLISTENER_IID_STR }, +#endif +#ifdef NS_IURLLISTENERMANAGER_IID_STR + { &kUrlListenerManagerIID, NS_IURLLISTENERMANAGER_IID_STR }, +#endif +#ifdef NS_IURLPARSER_IID_STR + { &kURLParserIID, NS_IURLPARSER_IID_STR }, +#endif +#ifdef NS_IUSERCERTPICKER_IID_STR + { &kUserCertPickerIID, NS_IUSERCERTPICKER_IID_STR }, +#endif +#ifdef NS_IUSERINFO_IID_STR + { &kUserInfoIID, NS_IUSERINFO_IID_STR }, +#endif +#ifdef NS_IVARIANT_IID_STR + { &kVariantIID, NS_IVARIANT_IID_STR }, +#endif +#ifdef NS_IVIEWSOURCECHANNEL_IID_STR + { &kViewSourceChannelIID, NS_IVIEWSOURCECHANNEL_IID_STR }, +#endif +#ifdef NS_IWALLETEDITOR_IID_STR + { &kWalletEditorIID, NS_IWALLETEDITOR_IID_STR }, +#endif +#ifdef NS_IWALLETPREVIEW_IID_STR + { &kWalletPreviewIID, NS_IWALLETPREVIEW_IID_STR }, +#endif +#ifdef NS_IWALLETSERVICE_IID_STR + { &kWalletServiceIID, NS_IWALLETSERVICE_IID_STR }, +#endif +#ifdef NS_IWEAKREFERENCE_IID_STR + { &kWeakReferenceIID, NS_IWEAKREFERENCE_IID_STR }, +#endif +#ifdef NS_IWEBBROWSER_IID_STR + { &kWebBrowserIID, NS_IWEBBROWSER_IID_STR }, +#endif +#ifdef NS_IWEBBROWSERCHROME_IID_STR + { &kWebBrowserChromeIID, NS_IWEBBROWSERCHROME_IID_STR }, +#endif +#ifdef NS_IWEBBROWSERCHROMEFOCUS_IID_STR + { &kWebBrowserChromeFocusIID, NS_IWEBBROWSERCHROMEFOCUS_IID_STR }, +#endif +#ifdef NS_IWEBBROWSERFIND_IID_STR + { &kWebBrowserFindIID, NS_IWEBBROWSERFIND_IID_STR }, +#endif +#ifdef NS_IWEBBROWSERFOCUS_IID_STR + { &kWebBrowserFocusIID, NS_IWEBBROWSERFOCUS_IID_STR }, +#endif +#ifdef NS_IWEBBROWSERPERSIST_IID_STR + { &kWebBrowserPersistIID, NS_IWEBBROWSERPERSIST_IID_STR }, +#endif +#ifdef NS_IWEBBROWSERPRINT_IID_STR + { &kWebBrowserPrintIID, NS_IWEBBROWSERPRINT_IID_STR }, +#endif +#ifdef NS_IWEBBROWSERSETUP_IID_STR + { &kWebBrowserSetupIID, NS_IWEBBROWSERSETUP_IID_STR }, +#endif +#ifdef NS_IWEBNAVIGATION_IID_STR + { &kWebNavigationIID, NS_IWEBNAVIGATION_IID_STR }, +#endif +#ifdef NS_IWEBPAGEDESCRIPTOR_IID_STR + { &kWebPageDescriptorIID, NS_IWEBPAGEDESCRIPTOR_IID_STR }, +#endif +#ifdef NS_IWEBPROGRESS_IID_STR + { &kWebProgressIID, NS_IWEBPROGRESS_IID_STR }, +#endif +#ifdef NS_IWEBPROGRESSLISTENER_IID_STR + { &kWebProgressListenerIID, NS_IWEBPROGRESSLISTENER_IID_STR }, +#endif +#ifdef NS_IWINDOWCREATOR_IID_STR + { &kWindowCreatorIID, NS_IWINDOWCREATOR_IID_STR }, +#endif +#ifdef NS_IWINDOWCREATOR2_IID_STR + { &kWindowCreator2IID, NS_IWINDOWCREATOR2_IID_STR }, +#endif +#ifdef NS_IWINDOWDATASOURCE_IID_STR + { &kWindowDataSourceIID, NS_IWINDOWDATASOURCE_IID_STR }, +#endif +#ifdef NS_IWINDOWLESSPLUGINSTPEER_IID_STR + { &kWindowlessPlugInstPeerIID, NS_IWINDOWLESSPLUGINSTPEER_IID_STR }, +#endif +#ifdef NS_IWINDOWMEDIATOR_IID_STR + { &kWindowMediatorIID, NS_IWINDOWMEDIATOR_IID_STR }, +#endif +#ifdef NS_IWINDOWMEDIATORLISTENER_IID_STR + { &kWindowMediatorListenerIID, NS_IWINDOWMEDIATORLISTENER_IID_STR }, +#endif +#ifdef NS_IWINDOWWATCHER_IID_STR + { &kWindowWatcherIID, NS_IWINDOWWATCHER_IID_STR }, +#endif +#ifdef NS_IWYCIWYGCHANNEL_IID_STR + { &kWyciwygChannelIID, NS_IWYCIWYGCHANNEL_IID_STR }, +#endif +#ifdef NS_IX509CERT_IID_STR + { &kX509CertIID, NS_IX509CERT_IID_STR }, +#endif +#ifdef NS_IX509CERTDB_IID_STR + { &kX509CertDBIID, NS_IX509CERTDB_IID_STR }, +#endif +#ifdef NS_IX509CERTVALIDITY_IID_STR + { &kX509CertValidityIID, NS_IX509CERTVALIDITY_IID_STR }, +#endif +#ifdef NS_IXMLHTTPREQUEST_IID_STR + { &kXMLHttpRequestIID, NS_IXMLHTTPREQUEST_IID_STR }, +#endif +#ifdef NS_IXMLRPCCLIENT_IID_STR + { &kXmlRpcClientIID, NS_IXMLRPCCLIENT_IID_STR }, +#endif +#ifdef NS_IXMLRPCCLIENTLISTENER_IID_STR + { &kXmlRpcClientListenerIID, NS_IXMLRPCCLIENTLISTENER_IID_STR }, +#endif +#ifdef NS_IXPCONNECT_IID_STR + { &kXPConnectIID, NS_IXPCONNECT_IID_STR }, +#endif +#ifdef NS_IXPCSCRIPTABLE_IID_STR + { &kXPCScriptableIID, NS_IXPCSCRIPTABLE_IID_STR }, +#endif +#ifdef NS_IXPCSCRIPTNOTIFY_IID_STR + { &kXPCScriptNotifyIID, NS_IXPCSCRIPTNOTIFY_IID_STR }, +#endif +#ifdef NS_IXPCSECURITYMANAGER_IID_STR + { &kXPCSecurityManagerIID, NS_IXPCSECURITYMANAGER_IID_STR }, +#endif +#ifdef NS_IXPIDIALOGSERVICE_IID_STR + { &kXPIDialogServiceIID, NS_IXPIDIALOGSERVICE_IID_STR }, +#endif +#ifdef NS_IXPINOTIFIER_IID_STR + { &kXPINotifierIID, NS_IXPINOTIFIER_IID_STR }, +#endif +#ifdef NS_IXPIPROGRESSDIALOG_IID_STR + { &kXPIProgressDialogIID, NS_IXPIPROGRESSDIALOG_IID_STR }, +#endif +#ifdef NS_IXPTLOADER_IID_STR + { &kXPTLoaderIID, NS_IXPTLOADER_IID_STR }, +#endif +#ifdef NS_IXREMOTECLIENT_IID_STR + { &kXRemoteClientIID, NS_IXREMOTECLIENT_IID_STR }, +#endif +#ifdef NS_IXSLTEXCEPTION_IID_STR + { &kXSLTExceptionIID, NS_IXSLTEXCEPTION_IID_STR }, +#endif +#ifdef NS_IXSLTPROCESSOR_IID_STR + { &kXSLTProcessorIID, NS_IXSLTPROCESSOR_IID_STR }, +#endif +#ifdef NS_IXSLTPROCESSOROBSOLETE_IID_STR + { &kXSLTProcessorObsoleteIID, NS_IXSLTPROCESSOROBSOLETE_IID_STR }, +#endif +#ifdef NS_IXULBROWSERWINDOW_IID_STR + { &kXULBrowserWindowIID, NS_IXULBROWSERWINDOW_IID_STR }, +#endif +#ifdef NS_IXULSORTSERVICE_IID_STR + { &kXULSortServiceIID, NS_IXULSORTSERVICE_IID_STR }, +#endif +#ifdef NS_IXULTEMPLATEBUILDER_IID_STR + { &kXULTemplateBuilderIID, NS_IXULTEMPLATEBUILDER_IID_STR }, +#endif +#ifdef NS_IXULWINDOW_IID_STR + { &kXULWindowIID, NS_IXULWINDOW_IID_STR }, +#endif +#ifdef NS_IZIPREADER_IID_STR + { &kZipReaderIID, NS_IZIPREADER_IID_STR }, +#endif +#ifdef NS_IJRIPLUGIN_IID_STR + { &kJRIPluginIID, NS_IJRIPLUGIN_IID_STR }, +#endif +#ifdef NS_IJVMCONSOLE_IID_STR + { &kJVMConsoleIID, NS_IJVMCONSOLE_IID_STR }, +#endif +#ifdef NS_IJVMMANAGER_IID_STR + { &kJVMManagerIID, NS_IJVMMANAGER_IID_STR }, +#endif +#ifdef NS_IJVMPLUGIN_IID_STR + { &kJVMPluginIID, NS_IJVMPLUGIN_IID_STR }, +#endif +#ifdef NS_IJVMPLUGININSTANCE_IID_STR + { &kJVMPluginInstanceIID, NS_IJVMPLUGININSTANCE_IID_STR }, +#endif +#ifdef NS_IJVMPLUGINTAGINFO_IID_STR + { &kJVMPluginTagInfoIID, NS_IJVMPLUGINTAGINFO_IID_STR }, +#endif +#ifdef NS_IJVMPREFSWINDOW_IID_STR + { &kJVMPrefsWindowIID, NS_IJVMPREFSWINDOW_IID_STR }, +#endif +#ifdef NS_IJVMWINDOW_IID_STR + { &kJVMWindowIID, NS_IJVMWINDOW_IID_STR }, +#endif +#ifdef NS_ILIVECONNECTMANAGER_IID_STR + { &kLiveConnectManagerIID, NS_ILIVECONNECTMANAGER_IID_STR }, +#endif +#ifdef NS_ISECUREENV_IID_STR + { &kSecureEnvIID, NS_ISECUREENV_IID_STR }, +#endif +#ifdef NS_ISYMANTECDEBUGGER_IID_STR + { &kSymantecDebuggerIID, NS_ISYMANTECDEBUGGER_IID_STR }, +#endif +#ifdef NS_ISYMANTECDEBUGMANAGER_IID_STR + { &kSymantecDebugManagerIID, NS_ISYMANTECDEBUGMANAGER_IID_STR }, +#endif +#ifdef NS_IREADMANAGER_IID_STR + { &kreadManagerIID, NS_IREADMANAGER_IID_STR }, +#endif +#ifdef NS_JVM_IID_STR + { &kjvmIID, NS_JVM_IID_STR }, +#endif +#ifdef NS_JVMMANAGER_IID_STR + { &kJVMManagerIID, NS_JVMMANAGER_IID_STR }, +#endif +#ifdef NS_JVMMANAGER_CID_STR + { &kJVMManagerCID, NS_JVMMANAGER_CID_STR }, +#endif +#ifdef NS_JVMPLUGINTAGINFO_IID_STR + { &kJVMPluginTagInfoIID, NS_JVMPLUGINTAGINFO_IID_STR }, +#endif +#ifdef NS_ILIVECONNECT_IID_STR + { &kLiveconnectIID, NS_ILIVECONNECT_IID_STR }, +#endif +#ifdef NS_ISECURELIVECONNECT_IID_STR + { &kSecureLiveconnectIID, NS_ISECURELIVECONNECT_IID_STR }, +#endif +#ifdef NS_ISECURITYCONTEXT_IID_STR + { &kSecurityContextIID, NS_ISECURITYCONTEXT_IID_STR }, +#endif +#ifdef NS_ISHUTDOWNLISTENER_IID_STR + { &kShutdownListenerIID, NS_ISHUTDOWNLISTENER_IID_STR }, +#endif +#ifdef NS_ISERVICEMANAGER_OBSOLETE_IID_STR + { &kServiceManagerObsoleteIID, NS_ISERVICEMANAGER_OBSOLETE_IID_STR }, +#endif +#ifdef NS_IJVMTHREADMANAGER_IID_STR + { &kJVMThreadManagerIID, NS_IJVMTHREADMANAGER_IID_STR }, +#endif +#ifdef FLASH_IOBJECT7_IID_STR + { &kFlashIObject7IID, FLASH_IOBJECT7_IID_STR }, +#endif +#ifdef FLASH_ISCRIPTABLEPLUGIN7_IID_STR + { &kFlashIScriptablePlugin7IID, FLASH_ISCRIPTABLEPLUGIN7_IID_STR }, +#endif +#ifdef NS_IFLASH5_IID_STR + { &kFlash5IID, NS_IFLASH5_IID_STR }, +#endif +}; +#endif + diff --git a/mozilla/modules/plugin/os2wrapper/moz_IDs_Input.lst b/mozilla/modules/plugin/os2wrapper/moz_IDs_Input.lst new file mode 100644 index 00000000000..1648f4cba88 --- /dev/null +++ b/mozilla/modules/plugin/os2wrapper/moz_IDs_Input.lst @@ -0,0 +1,980 @@ +#idl dir +nsCDefaultURIFixup +nsCDocShell +nsCExternalHandlerService +nsCURILoader +nsCWebBrowser +nsCWebBrowserPersist +nsIAbAddressCollecter +nsIAbAutoCompleteSession +nsIAbBase +nsIAbBooleanExpression +nsIAbCard +nsIAbDirectory +nsIAbDirectoryQuery +nsIAbDirectoryQueryProxy +nsIAbDirectorySearch +nsIAbDirFactory +nsIAbDirFactoryService +nsIAbLDAPAutoCompFormatter +nsIAbLDAPReplicationData +nsIAbLDAPReplicationQuery +nsIAbLDAPReplicationService +nsIAbListener +nsIAbMDBCard +nsIAbMDBDirectory +nsIAboutModule +nsIAbUpgrader +nsIAbView +nsIAccessibilityService +nsIAccessible +nsIAccessibleAction +nsIAccessibleCaret +nsIAccessibleDocument +nsIAccessibleEditableText +nsIAccessibleEventListener +nsIAccessibleEventReceiver +nsIAccessibleHyperLink +nsIAccessibleHyperText +nsIAccessibleProvider +nsIAccessibleSelectable +nsIAccessibleTable +nsIAccessibleText +nsIAccessibleValue +nsIAccessibleWin32Object +nsIAddbookUrl +nsIAddrBookSession +nsIAddrDatabase +nsIAddrDBAnnouncer +nsIAddrDBListener +nsIAddressBook +nsIAggregatePrincipal +nsIAppShell +nsIAppShellService +nsIArray +nsIASN1Object +nsIASN1PrintableItem +nsIASN1Sequence +nsIASN1Tree +nsIAsyncInputStream +nsIAsyncOutputStream +nsIAsyncStreamCopier +nsIAtom +nsIAtomService +nsIAuthPrompt +nsIAuthPromptWrapper +nsIAutoCompleteListener +nsIAutoCompleteResults +nsIAutoCompleteSession +nsIAutoConfig +nsIBadCertListener +nsIBaseWindow +nsIBidiKeyboard +nsIBinaryInputStream +nsIBinaryOutputStream +nsIBookmarksService +nsIBoxLayoutManager +nsIBoxObject +nsIBoxPaintManager +nsIBrowserBoxObject +nsIBrowserHistory +nsIBrowserInstance +nsIBufEntropyCollector +nsIBufferedStreams +nsIByteArrayInputStream +nsIByteRangeRequest +nsICache +nsICacheEntryDescriptor +nsICacheListener +nsICacheService +nsICacheSession +nsICacheVisitor +nsICachingChannel +nsICategoryManager +nsICertificateDialogs +nsICertificatePrincipal +nsICertPickDialogs +nsICertSelect +nsICertTree +nsIChannel +nsICharsetConverterManager2 +nsIChromeEventHandler +nsIChromeRegistry +nsICipherInfo +nsICiter +nsIClassicPluginFactory +nsIClassInfo +nsIClientAuthDialogs +nsIClipboard +nsIClipboardCommands +nsIClipboardHelper +nsIClipboardOwner +nsICloseAllWindows +nsICmdLineHandler +nsICmdLineService +nsICMSDecoder +nsICMSEncoder +nsICMSMessage +nsICMSMessageErrors +nsICMSSecureMessage +nsICodebasePrincipal +nsICollection +nsIComm4xProfile +nsICommandHandler +nsICommandManager +nsICommandParams +nsIComponentLoader +nsIComponentLoaderManager +nsIComponentManager +nsIComponentManagerObsolete +nsIComponentRegistrar +nsIConsoleListener +nsIConsoleMessage +nsIConsoleService +nsIContentHandler +nsIContentPolicy +nsIContentViewer +nsIContentViewerContainer +nsIContentViewerEdit +nsIContentViewerFile +nsIContextMenuListener +nsIContextMenuListener2 +nsIController +nsIControllerCommand +nsIControllerCommandManager +nsIControllerContext +nsIControllers +nsICookie +nsICookieAcceptDialog +nsICookieConsent +nsICookieManager +nsICookieManager2 +nsICookiePromptService +nsICookieService +nsICookieStorage +nsICopyMessageListener +nsICopyMsgStreamListener +nsICRLInfo +nsICRLManager +nsICurrentCharsetListener +nsIDataChannel +nsIDBChangeAnnouncer +nsIDBChangeListener +nsIDBFolderInfo +nsIDialogParamBlock +nsIDictionary +nsIDirectoryListing +nsIDirectoryService +nsIDirIndex +nsIDirIndexListener +nsIDNSListener +nsIDNSService +nsIDocCharset +nsIDocShell +nsIDocShellHistory +nsIDocShellLoadInfo +nsIDocShellTreeItem +nsIDocShellTreeNode +nsIDocShellTreeOwner +nsIDocumentCharsetInfo +nsIDocumentLoader +nsIDocumentLoaderFactory +nsIDocumentStateListener +nsIDOM3DocumentEvent +nsIDOM3EventTarget +nsIDOM3Node +nsIDOMAbstractView +nsIDOMAttr +nsIDOMBarProp +nsIDOMCDATASection +nsIDOMCharacterData +nsIDOMChromeWindow +nsIDOMComment +nsIDOMCounter +nsIDOMCRMFObject +nsIDOMCrypto +nsIDOMCryptoDialogs +nsIDOMCSS2Properties +nsIDOMCSSCharsetRule +nsIDOMCSSFontFaceRule +nsIDOMCSSImportRule +nsIDOMCSSMediaRule +nsIDOMCSSPageRule +nsIDOMCSSPrimitiveValue +nsIDOMCSSRule +nsIDOMCSSRuleList +nsIDOMCSSStyleDeclaration +nsIDOMCSSStyleRule +nsIDOMCSSStyleSheet +nsIDOMCSSUnknownRule +nsIDOMCSSValue +nsIDOMCSSValueList +nsIDOMCustomEvent +nsIDOMDocument +nsIDOMDocumentCSS +nsIDOMDocumentEvent +nsIDOMDocumentFragment +nsIDOMDocumentRange +nsIDOMDocumentStyle +nsIDOMDocumentTraversal +nsIDOMDocumentType +nsIDOMDocumentView +nsIDOMDocumentXBL +nsIDOMDOMException +nsIDOMDOMImplementation +nsIDOMElement +nsIDOMElementCSSInlineStyle +nsIDOMEntity +nsIDOMEntityReference +nsIDOMEvent +nsIDOMEventGroup +nsIDOMEventListener +nsIDOMEventTarget +nsIDOMHistory +nsIDOMHTMLAnchorElement +nsIDOMHTMLAppletElement +nsIDOMHTMLAreaElement +nsIDOMHTMLBaseElement +nsIDOMHTMLBaseFontElement +nsIDOMHTMLBodyElement +nsIDOMHTMLBRElement +nsIDOMHTMLButtonElement +nsIDOMHTMLCollection +nsIDOMHTMLDirectoryElement +nsIDOMHTMLDivElement +nsIDOMHTMLDListElement +nsIDOMHTMLDocument +nsIDOMHTMLElement +nsIDOMHTMLEmbedElement +nsIDOMHTMLFieldSetElement +nsIDOMHTMLFontElement +nsIDOMHTMLFormElement +nsIDOMHTMLFrameElement +nsIDOMHTMLFrameSetElement +nsIDOMHTMLHeadElement +nsIDOMHTMLHeadingElement +nsIDOMHTMLHRElement +nsIDOMHTMLHtmlElement +nsIDOMHTMLIFrameElement +nsIDOMHTMLImageElement +nsIDOMHTMLInputElement +nsIDOMHTMLIsIndexElement +nsIDOMHTMLLabelElement +nsIDOMHTMLLegendElement +nsIDOMHTMLLIElement +nsIDOMHTMLLinkElement +nsIDOMHTMLMapElement +nsIDOMHTMLMenuElement +nsIDOMHTMLMetaElement +nsIDOMHTMLModElement +nsIDOMHTMLObjectElement +nsIDOMHTMLOListElement +nsIDOMHTMLOptGroupElement +nsIDOMHTMLOptionElement +nsIDOMHTMLParagraphElement +nsIDOMHTMLParamElement +nsIDOMHTMLPreElement +nsIDOMHTMLQuoteElement +nsIDOMHTMLScriptElement +nsIDOMHTMLSelectElement +nsIDOMHTMLStyleElement +nsIDOMHTMLTableCaptionElem +nsIDOMHTMLTableCellElement +nsIDOMHTMLTableColElement +nsIDOMHTMLTableElement +nsIDOMHTMLTableRowElement +nsIDOMHTMLTableSectionElem +nsIDOMHTMLTextAreaElement +nsIDOMHTMLTitleElement +nsIDOMHTMLUListElement +nsIDOMJSWindow +nsIDOMKeyEvent +nsIDOMLinkStyle +nsIDOMLocation +nsIDOMMediaList +nsIDOMMimeType +nsIDOMMimeTypeArray +nsIDOMMouseEvent +nsIDOMMutationEvent +nsIDOMNamedNodeMap +nsIDOMNavigator +nsIDOMNode +nsIDOMNodeFilter +nsIDOMNodeIterator +nsIDOMNodeList +nsIDOMNotation +nsIDOMNSDocument +nsIDOMNSEvent +nsIDOMNSHistory +nsIDOMNSHTMLAnchorElement +nsIDOMNSHTMLAreaElement +nsIDOMNSHTMLButtonElement +nsIDOMNSHTMLDocument +nsIDOMNSHTMLElement +nsIDOMNSHTMLFormControlList +nsIDOMNSHTMLFormElement +nsIDOMNSHTMLFrameElement +nsIDOMNSHTMLImageElement +nsIDOMNSHTMLInputElement +nsIDOMNSHTMLOptionCollectn +nsIDOMNSHTMLSelectElement +nsIDOMNSHTMLTextAreaElement +nsIDOMNSLocation +nsIDOMNSRange +nsIDOMNSUIEvent +nsIDOMNSXBLFormControl +nsIDOMParser +nsIDOMPkcs11 +nsIDOMPlugin +nsIDOMPluginArray +nsIDOMProcessingInstruction +nsIDOMRange +nsIDOMRangeException +nsIDOMRect +nsIDOMRGBColor +nsIDOMScreen +nsIDOMSerializer +nsIDOMStyleSheet +nsIDOMStyleSheetList +nsIDOMText +nsIDOMTreeWalker +nsIDOMUIEvent +nsIDOMViewCSS +nsIDOMWindow +nsIDOMWindowCollection +nsIDOMWindowInternal +nsIDOMXMLDocument +nsIDOMXPathEvaluator +nsIDOMXPathException +nsIDOMXPathExpression +nsIDOMXPathNamespace +nsIDOMXPathNSResolver +nsIDOMXPathResult +nsIDOMXULButtonElement +nsIDOMXULCheckboxElement +nsIDOMXULCommandDispatcher +nsIDOMXULControlElement +nsIDOMXULDescriptionElement +nsIDOMXULDocument +nsIDOMXULElement +nsIDOMXULImageElement +nsIDOMXULLabeledControlEl +nsIDOMXULLabelElement +nsIDOMXULMenuListElement +nsIDOMXULMultSelectCntrlEl +nsIDOMXULPopupElement +nsIDOMXULSelectCntrlEl +nsIDOMXULSelectCntrlItemEl +nsIDownload +nsIDownloader +nsIDownloadManager +nsIDownloadProgressListener +nsIDragDropHandler +nsIDragDropOverride +nsIDragService +nsIDragSession +nsIDragTracker +nsIEditActionListener +nsIEditingSession +nsIEditor +nsIEditorBoxObject +nsIEditorDocShell +nsIEditorIMESupport +nsIEditorLogging +nsIEditorMailSupport +nsIEditorObserver +nsIEditorSpellCheck +nsIEditorStyleSheets +nsIEmbeddingSiteWindow +nsIEmbeddingSiteWindow2 +nsIEncodedChannel +nsIEncryptedSMIMEURIsSrvc +nsIEntityConverter +nsIEntropyCollector +nsIEnumerator +nsIErrorService +nsIEvaluateStringProxy +nsIEventHandler +nsIEventQueue +nsIEventQueueService +nsIException +nsIExceptionService +nsIExpatSink +nsIExternalHelperAppService +nsIExternalProtocolHandler +nsIExternalProtocolService +nsIFactory +nsIFastLoadFileControl +nsIFastLoadService +nsIFile +nsIFileChannel +nsIFilePicker +nsIFileProtocolHandler +nsIFileSpec +nsIFileStreams +nsIFileURL +nsIFileUtilities +nsIFind +nsIFindService +nsIFolder +nsIFolderListener +nsIFontCatalogService +nsIFontEnumerator +nsIFontList +nsIFontPackageHandler +nsIFontPackageProxy +nsIFontPackageService +nsIFormatConverter +nsIFreeType2 +nsIFTPChannel +nsIFullScreen +nsIGenKeypairInfoDlg +nsIGlobalHistory +nsIGraphics +nsIHash +nsIHelperAppLauncherDialog +nsIHistoryEntry +nsIHTMLEditor +nsIHTMLObjectResizer +nsIHttpAuthenticator +nsIHttpChannel +nsIHttpChannelInternal +nsIHttpEventSink +nsIHTTPHeaderListener +nsIHttpHeaderVisitor +nsIHTTPIndex +nsIHttpNotify +nsIHttpProtocolHandler +nsIIconURI +nsIIDNService +nsIIFrameBoxObject +nsIImageDocument +nsIImapFlagAndUidState +nsIImapHeaderXferInfo +nsIImapIncomingServer +nsIImapMailFolderSink +nsIImapMessageSink +nsIImapMockChannel +nsIImapProtocol +nsIImapServerSink +nsIImapService +nsIImapUrl +nsIImgManager +nsIImportABDescriptor +nsIImportAddressBooks +nsIImportFieldMap +nsIImportGeneric +nsIImportMail +nsIImportMailboxDescriptor +nsIImportMimeEncode +nsIImportModule +nsIImportService +nsIImportSettings +nsIIncomingServerListener +nsIInputStream +nsIInputStreamChannel +nsIInputStreamPump +nsIInputStreamTee +nsIInterfaceInfo +nsIInterfaceInfoManager +nsIInterfaceRequestor +nsIIOService +nsIJAR +nsIJARChannel +nsIJARProtocolHandler +nsIJARURI +nsIJRILiveConnectPIPeer +nsIJRILiveConnectPlugin +nsIJSConsoleService +nsIJSContextStack +nsIJSRuntimeService +nsIKeyedStreamGenerator +nsIKeygenThread +nsILanguageAtom +nsILanguageAtomService +nsILDAPAutoCompFormatter +nsILDAPAutoCompleteSession +nsILDAPBERValue +nsILDAPConnection +nsILDAPErrors +nsILDAPMessage +nsILDAPMessageListener +nsILDAPOperation +nsILDAPPrefsService +nsILDAPServer +nsILDAPService +nsILDAPSyncQuery +nsILDAPURL +nsILineInputStream +nsIListBoxObject +nsILoadGroup +nsILocale +nsILocaleService +nsILocalFile +nsILocalMailIncomingServer +nsIMailboxService +nsIMailboxSpec +nsIMailboxUrl +nsIMarkupDocumentViewer +nsIMemory +nsIMenuBoxObject +nsIMenuRollup +nsIMessenger +nsIMessengerMigrator +nsIMessengerOSIntegration +nsIMessengerWindowService +nsIMimeEmitter +nsIMimeHeaders +nsIMIMEInfo +nsIMIMEInputStream +nsIMimeMiscStatus +nsIMIMEService +nsIMimeStreamConverter +nsIModule +nsIMsgAccount +nsIMsgAccountManager +nsIMsgAttachment +nsIMsgBiffManager +nsIMsgCompFields +nsIMsgCompose +nsIMsgComposeParams +nsIMsgComposeProgressParams +nsIMsgComposeSecure +nsIMsgComposeService +nsIMsgCompUtils +nsIMsgCopyService +nsIMsgCopyServiceListener +nsIMsgDatabase +nsIMsgDBView +nsIMsgDraft +nsIMsgFilter +nsIMsgFilterHitNotify +nsIMsgFilterList +nsIMsgFilterPlugin +nsIMsgFilterService +nsIMsgFolder +nsIMsgFolderCache +nsIMsgFolderCacheElement +nsIMsgFolderCompactor +nsIMsgGroupRecord +nsIMsgHdr +nsIMsgHeaderParser +nsIMsgHost +nsIMsgIdentity +nsIMsgImapMailFolder +nsIMsgIncomingServer +nsIMsgLocalMailFolder +nsIMsgLogonRedirector +nsIMsgMailNewsUrl +nsIMsgMailSession +nsIMsgMailView +nsIMsgMailViewList +nsIMsgMdnGenerator +nsIMsgMessageService +nsIMsgNewsFolder +nsIMsgOfflineImapOperation +nsIMsgOfflineManager +nsIMsgOfflineNewsState +nsIMsgParseMailMsgState +nsIMsgPrintEngine +nsIMsgProgress +nsIMsgProtocolInfo +nsIMsgPurgeService +nsIMsgQuote +nsIMsgRDFDataSource +nsIMsgRecipientArray +nsIMsgSearchAdapter +nsIMsgSearchNotify +nsIMsgSearchScopeTerm +nsIMsgSearchSession +nsIMsgSearchTerm +nsIMsgSearchValidityManager +nsIMsgSearchValidityTable +nsIMsgSearchValue +nsIMsgSend +nsIMsgSendLater +nsIMsgSendLaterListener +nsIMsgSendListener +nsIMsgSendReport +nsIMsgSignature +nsIMsgSMIMECompFields +nsIMsgSMIMEHeaderSink +nsIMsgStatusFeedback +nsIMsgStringService +nsIMsgThread +nsIMsgVCard +nsIMsgWindow +nsIMultiPartChannel +nsIMultiplexInputStream +nsINativeAppSupport +nsINativeComponentLoader +nsINativeScrollbar +nsINetModRegEntry +nsINetModuleMgr +nsINetNotify +nsINewsDatabase +nsINewsDownloadDialogArgs +nsINNTPArticleList +nsINntpIncomingServer +nsINNTPNewsgroupList +nsINNTPNewsgroupPost +nsINNTPProtocol +nsINntpService +nsINntpUrl +nsINoIncomingServer +nsINoneService +nsINSSCertCache +nsIObjectInputStream +nsIObjectOutputStream +nsIObserver +nsIObserverService +nsIOCSPResponder +nsIOutputStream +nsIPassword +nsIPasswordManager +nsIPasswordManagerInternal +nsIPasswordSink +nsIPermission +nsIPermissionManager +nsIPersistentProperties2 +nsIPhonetic +nsIPipe +nsIPK11Token +nsIPK11TokenDB +nsIPKCS11Module +nsIPKCS11ModuleDB +nsIPKCS11Slot +nsIPKIParamBlock +nsIPlaintextEditor +nsIPlugin +nsIPluginHost +nsIPluginInputStream +nsIPluginInstance +nsIPluginInstanceOwner +nsIPluginInstancePeer +nsIPluginInstancePeer2 +nsIPluginManager +nsIPluginManager2 +nsIPluginStreamInfo +nsIPluginStreamListener +nsIPluginTagInfo +nsIPluginTagInfo2 +nsIPluginViewer +nsIPop3IncomingServer +nsIPop3Service +nsIPop3Sink +nsIPop3URL +nsIPopupBoxObject +nsIPopupWindowManager +nsIPref +nsIPrefBranch +nsIPrefBranchInternal +nsIPrefetchService +nsIPrefLocalizedString +nsIPrefMigration +nsIPrefMigrationProgress +nsIPrefService +nsIPrincipal +nsIPrintingPrompt +nsIPrintingPromptService +nsIPrintOptions +nsIPrintProgress +nsIPrintProgressParams +nsIPrintSession +nsIPrintSettings +nsIPrintSettingsService +nsIPrintStatusFeedback +nsIProcess +nsIProfile +nsIProfileChangeStatus +nsIProfileInternal +nsIProfileStartupListener +nsIProgrammingLanguage +nsIProgressDialog +nsIProgressEventSink +nsIPrompt +nsIPromptService +nsIProperties +nsIPropertyBag +nsIProtocolHandler +nsIProtocolProxyService +nsIProxiedProtocolHandler +nsIProxy +nsIProxyAutoConfig +nsIProxyCreateInstance +nsIProxyInfo +nsIProxyObjectManager +nsIRDFCompositeDataSource +nsIRDFContainer +nsIRDFContainerUtils +nsIRDFDataSource +nsIRDFDelegateFactory +nsIRDFInMemoryDataSource +nsIRDFLiteral +nsIRDFNode +nsIRDFObserver +nsIRDFPurgeableDataSource +nsIRDFRemoteDataSource +nsIRDFResource +nsIRDFService +nsIRDFXMLParser +nsIRDFXMLSerializer +nsIRDFXMLSink +nsIRDFXMLSource +nsIReadConfig +nsIRecyclingAllocator +nsIRefreshURI +nsIRegistry +nsIRelatedLinksHandler +nsIRelativeFilePref +nsIRequest +nsIRequestObserver +nsIRequestObserverProxy +nsIResProtocolHandler +nsIResumableChannel +nsIResumableEntityID +nsIRollupListener +nsIRunnable +nsISample +nsISaveAsCharset +nsISchema +nsISchemaLoader +nsIScreen +nsIScreenManager +nsIScriptableDateFormat +nsIScriptableInputStream +nsIScriptableInterfaces +nsIScriptablePlugin +nsIScriptableRegion +nsIScriptableUConv +nsIScriptContextOwner +nsIScriptError +nsIScriptEventHandler +nsIScriptEventManager +nsIScriptGlobalObjectOwner +nsIScriptLoader +nsIScriptLoaderObserver +nsIScriptSecurityManager +nsIScrollable +nsIScrollBoxObject +nsISearchContext +nsISearchService +nsISecretDecoderRing +nsISecureBrowserUI +nsISecurityCheckedComponent +nsISecurityEventSink +nsISecurityPref +nsISecurityWarningDialogs +nsISeekableStream +nsISelectElement +nsISelection +nsISelectionController +nsISelectionDisplay +nsISelectionImageService +nsISelectionListener +nsISelectionPrivate +nsISemanticUnitScanner +nsISerializable +nsIServiceManager +nsISHContainer +nsISHEntry +nsISHistory +nsISHistoryInternal +nsISHistoryListener +nsISHTransaction +nsISidebar +nsISignatureVerifier +nsISignonViewer +nsISimpleEnumerator +nsISimpleStreamListener +nsISMimeCert +nsISMimeJSHelper +nsISmtpServer +nsISmtpService +nsISmtpUrl +nsISOAPAttachments +nsISOAPBlock +nsISOAPCall +nsISOAPCallCompletion +nsISOAPDecoder +nsISOAPEncoder +nsISOAPEncoding +nsISOAPFault +nsISOAPHeaderBlock +nsISOAPMessage +nsISOAPParameter +nsISOAPPropertyBagMutator +nsISOAPResponse +nsISOAPResponseListener +nsISOAPService +nsISOAPServiceRegistry +nsISOAPTransport +nsISOAPTransportListener +nsISocketProvider +nsISocketProviderService +nsISocketTransport +nsISocketTransportService +nsISOCKS4SocketInfo +nsISOCKS4SocketProvider +nsISOCKSSocketInfo +nsISOCKSSocketProvider +nsISound +nsISpamSettings +nsISSLSocketControl +nsISSLSocketProvider +nsISSLStatus +nsISSLStatusProvider +nsIStandardURL +nsIStorageStream +nsIStreamBufferAccess +nsIStreamConverter +nsIStreamConverterService +nsIStreamListener +nsIStreamListenerProxy +nsIStreamListenerTee +nsIStreamLoader +nsIStreamTransportService +nsIStringBundle +nsIStringBundleOverride +nsIStringService +nsIStringStream +nsISubscribableServer +nsISupports +nsISupportsArray +nsISupportsIterators +nsISupportsPrimitives +nsISyncLoadDOMService +nsITableEditor +nsITestProxy +nsITextAreaElement +nsITextScroll +nsITextServicesFilter +nsITextToSubURI +nsIThread +nsIThreadPool +nsITimeBomb +nsITimelineService +nsITimer +nsITimeRecorder +nsITimerInternal +nsITimerManager +nsITimingService +nsITokenDialogs +nsITokenPasswordDialogs +nsIToolkit +nsITooltipListener +nsITooltipTextProvider +nsITransaction +nsITransactionList +nsITransactionListener +nsITransactionManager +nsITransferable +nsITransport +nsITransportSecurityInfo +nsITreeBoxObject +nsITreeContentView +nsITreeSelection +nsITreeView +nsITXTToHTMLConv +nsITypeAheadFind +nsIUnicharStreamLoader +nsIUnicodeNormalizer +nsIUploadChannel +nsIURI +nsIURIChecker +nsIURIContentListener +nsIURIFixup +nsIURILoader +nsIURIRefObject +nsIURL +nsIUrlbarHistory +nsIURLFetcher +nsIUrlListener +nsIUrlListenerManager +nsIURLParser +nsIUserCertPicker +nsIUserInfo +nsIVariant +nsIViewSourceChannel +nsIWalletEditor +nsIWalletPreview +nsIWalletService +nsIWeakReference +nsIWebBrowser +nsIWebBrowserChrome +nsIWebBrowserChromeFocus +nsIWebBrowserFind +nsIWebBrowserFocus +nsIWebBrowserPersist +nsIWebBrowserPrint +nsIWebBrowserSetup +nsIWebNavigation +nsIWebPageDescriptor +nsIWebProgress +nsIWebProgressListener +nsIWindowCreator +nsIWindowCreator2 +nsIWindowDataSource +nsIWindowlessPlugInstPeer +nsIWindowMediator +nsIWindowMediatorListener +nsIWindowWatcher +nsIWyciwygChannel +nsIX509Cert +nsIX509CertDB +nsIX509CertValidity +nsIXMLHttpRequest +nsIXmlRpcClient +nsIXmlRpcClientListener +nsIXPConnect +nsIXPCScriptable +nsIXPCScriptNotify +nsIXPCSecurityManager +nsIXPIDialogService +nsIXPINotifier +nsIXPIProgressDialog +nsIXPTLoader +nsIXRemoteClient +nsIXSLTException +nsIXSLTProcessor +nsIXSLTProcessorObsolete +nsIXULBrowserWindow +nsIXULSortService +nsIXULTemplateBuilder +nsIXULWindow +nsIZipReader +# +# oji *.h +nsIJRIPlugin +nsIJVMConsole +nsIJVMManager +nsIJVMPlugin +nsIJVMPluginInstance +nsIJVMPluginTagInfo +nsIJVMPrefsWindow +nsIJVMWindow +nsILiveConnectManager +nsISecureEnv +nsISymantecDebugger +nsISymantecDebugManager +nsIreadManager +nsjvm +nsJVMManager +nsJVMManager NS_JVMMANAGER_CID kJVMManagerCID +nsJVMPluginTagInfo +# +# liveconnect *.h +nsILiveconnect +nsISecureLiveconnect +nsISecurityContext +# +# added +nsIShutdownListener +nsIServiceManagerObsolete NS_ISERVICEMANAGER_OBSOLETE_IID +nsIJVMThreadManager +# +# private +FlashIObject7 FLASH_IOBJECT7_IID +FlashIScriptablePlugin7 FLASH_ISCRIPTABLEPLUGIN7_IID +nsIFlash5 + diff --git a/mozilla/modules/plugin/os2wrapper/nsInnoTekPluginWrapper.h b/mozilla/modules/plugin/os2wrapper/nsInnoTekPluginWrapper.h new file mode 100644 index 00000000000..08c86e39b9a --- /dev/null +++ b/mozilla/modules/plugin/os2wrapper/nsInnoTekPluginWrapper.h @@ -0,0 +1,109 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is InnoTek Plugin Wrapper code. + * + * The Initial Developer of the Original Code is + * InnoTek Systemberatung GmbH. + * Portions created by the Initial Developer are Copyright (C) 2003-2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * InnoTek Systemberatung GmbH / Knut St. Osmundsen + * Peter Weilbacher + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/* + * ipluginw main header. + */ + +#ifndef __nsInnoTekPluginWrapper_h__ +#define __nsInnoTekPluginWrapper_h__ + +/******************************************************************************* +* Defined Constants And Macros * +*******************************************************************************/ +/** Valid Pointer? */ +#define VALID_PTR(pv) \ + ( ((unsigned)(pv)) >= (unsigned)0x10000L /* 64KB */ \ + && ((unsigned)(pv)) < (unsigned)0xc0000000L /* 3GB */ \ + ) + +/** Valid Reference? */ +#define VALID_REF(ref) VALID_PTR(&(ref)) + +/** Debug printf */ +#undef dprintf +#ifdef DEBUG + #define dprintf(a) npdprintf a +#else + #define dprintf(a) do { } while (0) +#endif + +/** Debug Interrupt. */ +#ifdef DEBUG + #define DebugInt3() asm("int $3") +#else + #define DebugInt3() do { } while (0) +#endif + +/** Exception chain verify - debug only. */ +#ifdef DEBUG + #define VERIFY_EXCEPTION_CHAIN() npVerifyExcptChain() +#else + #define VERIFY_EXCEPTION_CHAIN() do { } while (0) +#endif + + +/******************************************************************************* +* Functions * +*******************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif +int npdprintf(const char *pszFormat, ...); +void _Optlink ReleaseInt3(unsigned uEAX, unsigned uEDX, unsigned uECX); +#ifndef INCL_DEBUGONLY +void npXPCOMInitSems(); +nsresult npXPCOMGenericGetFactory(nsIServiceManagerObsolete *aServMgr, REFNSIID aClass, const char *aClassName, + const char *aContractID, PRLibrary * aLibrary, nsIPlugin **aResult); +nsresult npXPCOMGenericMaybeWrap(REFNSIID aIID, nsISupports *aIn, nsISupports **aOut); +#endif + +#ifdef __cplusplus +} +nsresult downCreateWrapper(void **ppvResult, const void *pvVFT, nsresult rc); +nsresult downCreateWrapper(void **ppvResult, REFNSIID aIID, nsresult rc); +extern "C" { +nsresult upCreateWrapper(void **ppvResult, REFNSIID aIID, nsresult rc); +const char * getIIDCIDName(REFNSIID aIID); +const nsID * getIIDCIDFromName(const char *pszStrID); +#endif + +#ifdef __cplusplus +} +#endif +#endif diff --git a/mozilla/modules/plugin/os2wrapper/nsInnoTekPluginWrapperModule.cpp b/mozilla/modules/plugin/os2wrapper/nsInnoTekPluginWrapperModule.cpp new file mode 100644 index 00000000000..2c81da99acc --- /dev/null +++ b/mozilla/modules/plugin/os2wrapper/nsInnoTekPluginWrapperModule.cpp @@ -0,0 +1,363 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is InnoTek Plugin Wrapper code. + * + * The Initial Developer of the Original Code is + * InnoTek Systemberatung GmbH. + * Portions created by the Initial Developer are Copyright (C) 2003-2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * InnoTek Systemberatung GmbH / Knut St. Osmundsen + * Peter Weilbacher + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/******************************************************************************* +* Defined Constants And Macros * +*******************************************************************************/ +/** define this to make a completely freestanding module (i.e. no XPCOM imports). + * This is handy when making new builds for existing browsers since this + * doesn't require to have the .libs for the browser in question. + * + * - bird 2004-11-02: This must be enabled to support 1.7 / 1.8+! + */ +#ifndef _NO_XPCOMDLL_ +# ifdef IPLUGINW_OUTOFTREE +# define _NO_XPCOMDLL_ 1 +# endif +#endif +/** define this to have minimal dependencies on XPCOM. */ +#ifndef _MINIMAL_XPCOMDLL_ +# ifdef _NO_XPCOMDLL_ +# define _MINIMAL_XPCOMDLL_ 1 +# endif +#endif + + +/******************************************************************************* +* Header Files * +*******************************************************************************/ +#ifdef _NO_XPCOMDLL_ +#define INCL_BASE +#include +#endif +#ifdef DEBUG +#include +#endif +#include "nsCOMPtr.h" +#include "nsIPlugin.h" +#include "nsIGenericFactory.h" +#include "nsILegacyPluginWrapperOS2.h" +#include "nsInnoTekPluginWrapper.h" + + +/******************************************************************************* +* Global Variables * +*******************************************************************************/ +static NS_DEFINE_CID(kPluginCID, NS_PLUGIN_CID); +static NS_DEFINE_CID(kSupportsIID, NS_ISUPPORTS_IID); +static NS_DEFINE_CID(kLegacyPluginWrapperIID, NS_ILEGACYPLUGINWRAPPEROS2_IID); + + +/** + * Implements a plugin wrapper factory. + */ +class nsInnoTekPluginWrapper : public nsILegacyPluginWrapperOS2 +{ +#ifdef _MINIMAL_XPCOMDLL_ +public: + NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr); + NS_IMETHOD_(nsrefcnt) AddRef(void); + NS_IMETHOD_(nsrefcnt) Release(void); + +protected: + nsAutoRefCnt mRefCnt; +#else + NS_DECL_ISUPPORTS +#endif + +public: + nsInnoTekPluginWrapper(); + static nsresult Create(nsISupports* aOuter, REFNSIID aIID, void** aResult); + + /** + * PR_FindSymbol(,"NSGetFactory") + NSGetFactory(). + */ + /* void getFactory (in nsIServiceManagerObsolete aServMgr, in REFNSIID aClass, in string aClassName, in string aContractID, in PRLibraryPtr aLibrary, out nsIPlugin aResult); */ + NS_IMETHOD GetFactory(nsIServiceManagerObsolete *aServMgr, REFNSIID aClass, const char *aClassName, const char *aContractID, PRLibrary * aLibrary, nsIPlugin **aResult); + + /** + * Create a wrapper for the given interface if it's a legacy interface. + * @returns NS_OK on success. + * @returns NS_ERROR_INTERFACE if aIID isn't supported. aOut is nsnull. + * @returns NS_ERROR_FAILURE on other error. aOut undefined. + * @param aIID Interface Identifier of aIn and aOut. + * @param aIn Interface of type aIID which may be a legacy interface + * requiring a wrapper. + * @param aOut The native interface. + * If aIn is a legacy interface, this will be a wrappre. + * If aIn is not a legacy interface, this is aIn. + */ + /* void maybeWrap (in REFNSIID aIID, in nsISupports aIn, out nsISupports aOut); */ + NS_IMETHOD MaybeWrap(REFNSIID aIID, nsISupports *aIn, nsISupports **aOut); +}; + + + +#ifdef _MINIMAL_XPCOMDLL_ +NS_IMETHODIMP_(nsrefcnt) nsInnoTekPluginWrapper::AddRef(void) +{ + return ++mRefCnt; +} + +NS_IMETHODIMP_(nsrefcnt) nsInnoTekPluginWrapper::Release(void) +{ + --mRefCnt; + if (mRefCnt == 0) + { + mRefCnt = 1; /* stabilize */ + delete this; + return 0; + } + return mRefCnt; +} + +NS_IMETHODIMP nsInnoTekPluginWrapper::QueryInterface(REFNSIID aIID, void** aInstancePtr) +{ + if (aIID.Equals(kLegacyPluginWrapperIID)) + { + *aInstancePtr = static_cast< nsILegacyPluginWrapperOS2 * > (this); + AddRef(); + return NS_OK; + } + + if (aIID.Equals(kSupportsIID)) + { + *aInstancePtr = static_cast< nsISupports * > (this); + AddRef(); + return NS_OK; + } + + *aInstancePtr = nsnull; + return NS_ERROR_NO_INTERFACE; +} + +#else +NS_IMPL_ISUPPORTS1(nsInnoTekPluginWrapper, nsILegacyPluginWrapperOS2) +#endif + + + +/** Factory Constructor Object - do nothing. */ +nsInnoTekPluginWrapper::nsInnoTekPluginWrapper() +{ + /* Create semaphores at a safe time */ + npXPCOMInitSems(); +} + +/** + * Create the factory. + * @returns NS_OK on success, with aResult containing the requested interface. + * @returns NS_ERROR_* on failure, aResult is nsnull. + */ +nsresult nsInnoTekPluginWrapper::Create(nsISupports* aOuter, REFNSIID aIID, void** aResult) +{ + *aResult = nsnull; +#ifndef _MINIMAL_XPCOMDLL_ + NS_PRECONDITION(aOuter == nsnull, "no aggregation"); +#endif + if (aOuter) + return NS_ERROR_NO_AGGREGATION; + +#ifdef _MINIMAL_XPCOMDLL_ + nsILegacyPluginWrapperOS2 * +#else + nsCOMPtr +#endif + factory = new nsInnoTekPluginWrapper(); + if (!factory) + return NS_ERROR_OUT_OF_MEMORY; + + return factory->QueryInterface(aIID, aResult); +} + + +/** + * This is where we create the initial wrapper. + */ +NS_IMETHODIMP nsInnoTekPluginWrapper::GetFactory(nsIServiceManagerObsolete *aServMgr, + REFNSIID aClass, + const char *aClassName, + const char *aContractID, + PRLibrary * aLibrary, + nsIPlugin **aResult) +{ + nsresult rc; + dprintf(("nsInnoTekPluginWrapper::CreatePlugin: enter")); + + /* + * Do NSGetFactory. + */ + rc = npXPCOMGenericGetFactory(aServMgr, aClass, aClassName, aContractID, aLibrary, aResult); + dprintf(("nsInnoTekPluginWrapper::CreatePlugin: npXPCOMGenericGetFactory -> rc=%d and *aResult=%x", + rc, *aResult)); + + return rc; +} + + +/** + * Create a wrapper for the given interface if it's a legacy interface. + * @returns NS_OK on success. + * @returns NS_ERROR_NO_INTERFACE if aIID isn't supported. aOut is nsnull. + * @returns NS_ERROR_FAILURE on other error. aOut undefined. + * @param aIID Interface Identifier of aIn and aOut. + * @param aIn Interface of type aIID which may be a legacy interface + * requiring a wrapper. + * @param aOut The native interface. + * If aIn is a legacy interface, this will be a wrappre. + * If aIn is not a legacy interface, this is aIn. + * @remark Typically used for the flash plugin. + */ +NS_IMETHODIMP nsInnoTekPluginWrapper::MaybeWrap(REFNSIID aIID, nsISupports *aIn, nsISupports **aOut) +{ + return npXPCOMGenericMaybeWrap(aIID, aIn, aOut); +} + + + + +/** Component Info */ +static const nsModuleComponentInfo gComponentInfo[] = +{ + { + "InnoTek Legacy XPCOM Plugin Wrapper", + NS_LEGACY_PLUGIN_WRAPPER_CID, + NS_LEGACY_PLUGIN_WRAPPER_CONTRACTID, + nsInnoTekPluginWrapper::Create + } +}; + + + +/** NSGetModule(); */ +NS_IMPL_NSGETMODULE(nsInnoTekPluginWrapperModule, gComponentInfo) + + +#ifdef _NO_XPCOMDLL_ +/** + * Find the start of the filename. + * + * @returns pointer to start of filename. + * @param pszPath Path to examin. + */ +static char *GetBasename(char *pszPath) +{ + char *pszName; + char *psz; + + pszName = strrchr(pszPath, '\\'); + psz = strrchr(pszName ? pszName : pszPath, '/'); + if (psz) + pszName = psz; + if (!pszName) + pszName = strchr(pszPath, ':'); + if (pszName) + pszName++; + else + pszName = pszPath; + + return pszName; +} + +nsresult NS_NewGenericModule2(nsModuleInfo *info, nsIModule* *result) +{ + HMODULE hmod; + nsresult rc = NS_ERROR_UNEXPECTED; + APIRET rc2; + + /* + * Because of the LIBPATHSTRICT feature we have to specific the full path + * of the DLL to make sure we get the right handle. + * (We're of course making assumptions about the executable and the XPCOM.DLL + * begin at the same location.) + */ + char szXPCOM[CCHMAXPATH]; + char * pszName; + PPIB ppib; + PTIB ptib; + DosGetInfoBlocks(&ptib, &ppib); + pszName = GetBasename(strcpy(szXPCOM, ppib->pib_pchcmd)); + strcpy(pszName, "XPCOM.DLL"); + rc2 = DosLoadModule(NULL, 0, (PCSZ)szXPCOM, &hmod); + if (!rc2) + { + NS_COM nsresult (* pfnNS_NewGenericModule2)(nsModuleInfo *info, nsIModule* *result); + + /* demangled name: NS_NewGenericModule2(nsModuleInfo*, nsIModule**) */ + rc2 = DosQueryProcAddr(hmod, 0, (PCSZ)"__Z20NS_NewGenericModule2P12nsModuleInfoPP9nsIModule", + (PFN*)&pfnNS_NewGenericModule2); + if (rc2) + /* demangled name: NS_NewGenericModule2(const nsModuleInfo*, nsIModule**) */ + rc2 = DosQueryProcAddr(hmod, 0, (PCSZ)"__Z20NS_NewGenericModule2PK12nsModuleInfoPP9nsIModule", + (PFN*)&pfnNS_NewGenericModule2); + if (rc2) + { + /* The mozilla guys have splitt up XPCOM.DLL in 1.8 just to make life difficult. :-) */ + DosFreeModule(hmod); + strcpy(pszName, "XPCOMCOR.DLL"); + rc2 = DosLoadModule(NULL, 0, (PCSZ)szXPCOM, &hmod); + if (!rc2) + { + rc2 = DosQueryProcAddr(hmod, 0, (PCSZ)"__Z20NS_NewGenericModule2P12nsModuleInfoPP9nsIModule", + (PFN*)&pfnNS_NewGenericModule2); + if (rc2) + /* demangled name: NS_NewGenericModule2(const nsModuleInfo*, nsIModule**) */ + rc2 = DosQueryProcAddr(hmod, 0, (PCSZ)"__Z20NS_NewGenericModule2PK12nsModuleInfoPP9nsIModule", + (PFN*)&pfnNS_NewGenericModule2); + } + } + if (!rc2) + rc = pfnNS_NewGenericModule2(info, result); + #ifdef DEBUG + else + fprintf(stderr, "ipluginw: DosQueryProcAddr -> %ld\n", rc2); + #endif + DosFreeModule(hmod); + } + #ifdef DEBUG + else + fprintf(stderr, "ipluginw: DosLoadModule -> %ld\n", rc2); + if (rc) + fprintf(stderr, "ipluginw: NS_NewGenericModule2 -> %#x\n", rc); + #endif + + return rc; +} +#endif + + diff --git a/mozilla/modules/plugin/os2wrapper/util_debug.c b/mozilla/modules/plugin/os2wrapper/util_debug.c new file mode 100644 index 00000000000..27c09f53891 --- /dev/null +++ b/mozilla/modules/plugin/os2wrapper/util_debug.c @@ -0,0 +1,132 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is InnoTek Plugin Wrapper code. + * + * The Initial Developer of the Original Code is + * InnoTek Systemberatung GmbH. + * Portions created by the Initial Developer are Copyright (C) 2003-2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * InnoTek Systemberatung GmbH / Knut St. Osmundsen + * Peter Weilbacher + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/* + * Debug Stuff. + */ + +/******************************************************************************* +* Header Files * +*******************************************************************************/ +#include +#include +#include +#include +#ifdef __IBMC__ +#include +#endif + +#define INCL_BASE +#include + +#define INCL_DEBUGONLY +#include "nsInnoTekPluginWrapper.h" + +/******************************************************************************* +* Header Files * +*******************************************************************************/ +static const char szPrefix[] = "ipluginw: "; + + +/** + * Writes to log. + */ +int npdprintf(const char *pszFormat, ...) +{ + static int fInited = 0; + static FILE * phFile; + char szMsg[4096]; + int rc; + va_list args; + + strcpy(szMsg, szPrefix); + rc = strlen(szMsg); + va_start(args, pszFormat); + rc += vsprintf(&szMsg[rc], pszFormat, args); + va_end(args); + if (rc > (int)sizeof(szMsg) - 32) + { + /* we're most likely toasted now. */ +#ifdef __IBMC__ + _interrupt(3); +#else + asm("int $3"); +#endif + } + + if (rc > 0 && szMsg[rc - 1] != '\n') + { + szMsg[rc++] = '\n'; + szMsg[rc] = '\0'; + } + + fwrite(&szMsg[0], 1, rc, stderr); + if (!fInited) + { + fInited = 1; + phFile = fopen("ipluginw.log", "w"); + if (phFile) + { + DATETIME dt; + DosGetDateTime(&dt); + fprintf(phFile, "*** Log Opened on %04d-%02d-%02d %02d:%02d:%02d ***\n", + dt.year, dt.month, dt.day, dt.hours, dt.minutes, dt.seconds); + fprintf(phFile, "*** Build Date: " __DATE__ " " __TIME__ " ***\n"); + } + } + if (phFile) + { + fwrite(&szMsg[0], 1, rc, phFile); + fflush(phFile); + } + + return rc; +} + + +/** + * Release int 3. + */ +void _Optlink ReleaseInt3(unsigned uEAX, unsigned uEDX, unsigned uECX) +{ +#ifdef __IBMC__ + _interrupt(3); +#else + asm("int $3"); +#endif +} diff --git a/mozilla/modules/plugin/os2wrapper/wrap_VFTs.h b/mozilla/modules/plugin/os2wrapper/wrap_VFTs.h new file mode 100644 index 00000000000..115e618d145 --- /dev/null +++ b/mozilla/modules/plugin/os2wrapper/wrap_VFTs.h @@ -0,0 +1,1229 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is InnoTek Plugin Wrapper code. + * + * The Initial Developer of the Original Code is + * InnoTek Systemberatung GmbH. + * Portions created by the Initial Developer are Copyright (C) 2003-2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * InnoTek Systemberatung GmbH / Knut St. Osmundsen + * Peter Weilbacher + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/* + * VFTable declarations. + */ + +#ifndef __npVFTs_h__ +#define __npVFTs_h__ + + +/******************************************************************************* +* Defined Constants And Macros * +*******************************************************************************/ + +/** @group Visual Age for C++ v3.6.5 target (OS/2). + * @{ */ +/** Indicate Visual Age for C++ v3.6.5 target */ +#define VFT_VAC365 1 +/** VFTable/Interface Calling Convention for Win32. */ +#define VFTCALL _Optlink +/** First Entry which VAC uses. */ +#define VFTFIRST_DECL unsigned uFirst[2]; +#define VFTFIRST_VAL() {0, 0}, +/** This deltas which VAC uses. */ +#define VFTDELTA_DECL(n) unsigned uDelta##n; +#define VFTDELTA_VAL() 0, +/** This calculates the this value to be used when calling a virtual function. */ +#define VFTTHIS(pVFT, function, pvThis) ((char*)(pvThis) + (pVFT)->uDelta##function) +/** @} */ + + + + + +/** @group Macros for calling virtual functions. + * @{ */ +#define VFTCALL0(pVFT, function, pvThis) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis)) +#define VFTCALL1(pVFT, function, pvThis, arg1) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1) +#define VFTCALL2(pVFT, function, pvThis, arg1, arg2) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1, arg2) +#define VFTCALL3(pVFT, function, pvThis, arg1, arg2, arg3) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1, arg2, arg3) +#define VFTCALL4(pVFT, function, pvThis, arg1, arg2, arg3, arg4) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1, arg2, arg3, arg4) +#define VFTCALL5(pVFT, function, pvThis, arg1, arg2, arg3, arg4, arg5) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1, arg2, arg3, arg4, arg5) +#define VFTCALL6(pVFT, function, pvThis, arg1, arg2, arg3, arg4, arg5, arg6) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1, arg2, arg3, arg4, arg5, arg6) +#define VFTCALL7(pVFT, function, pvThis, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1, arg2, arg3, arg4, arg5, arg6, arg7) +#define VFTCALL8(pVFT, function, pvThis, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) +#define VFTCALL9(pVFT, function, pvThis, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) +#define VFTCALL10(pVFT, function, pvThis, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) +#define VFTCALL11(pVFT, function, pvThis, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11) +#define VFTCALL12(pVFT, function, pvThis, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12) +#define VFTCALL13(pVFT, function, pvThis, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13) +#define VFTCALL14(pVFT, function, pvThis, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14) +#define VFTCALL15(pVFT, function, pvThis, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15) +#define VFTCALL16(pVFT, function, pvThis, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) \ + (pVFT)->function(VFTTHIS(pVFT, function, pvThis), arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16) +/** @} */ + + +/******************************************************************************* +* Structures and Typedefs * +*******************************************************************************/ +/** @name VFTs + * @{ + */ + +/** + * nsISupports vftable. + */ +typedef struct vftable_nsISupports +{ + VFTFIRST_DECL + nsresult (*VFTCALL QueryInterface)(void *pvThis, REFNSIID aIID, void** aInstancePtr); + VFTDELTA_DECL(QueryInterface) + nsrefcnt (*VFTCALL AddRef)(void *pvThis); + VFTDELTA_DECL(AddRef) + nsrefcnt (*VFTCALL Release)(void *pvThis); + VFTDELTA_DECL(Release) +} VFTnsISupports; + + +/** + * nsIServiceManager vftable. + */ +typedef struct vftable_nsIServiceManager +{ + VFTnsISupports base; + nsresult (*VFTCALL GetService)(void *pvThis, const nsCID & aClass, const nsIID & aIID, void * *result); + VFTDELTA_DECL(GetService) + nsresult (*VFTCALL GetServiceByContractID)(void *pvThis, const char *aContractID, const nsIID & aIID, void * *result); + VFTDELTA_DECL(GetServiceByContractID) + nsresult (*VFTCALL IsServiceInstantiated)(void *pvThis, const nsCID & aClass, const nsIID & aIID, int *_retval); + VFTDELTA_DECL(IsServiceInstantiated) + nsresult (*VFTCALL IsServiceInstantiatedByContractID)(void *pvThis, const char *aContractID, const nsIID & aIID, int *_retval); + VFTDELTA_DECL(IsServiceInstantiatedByContractID) +} VFTnsIServiceManager; + + +/** + * nsIServiceManagerObsolete vftable. + */ +typedef struct vftable_nsIServiceManagerObsolete +{ + VFTnsISupports base; + #ifdef VFT_VAC365 + nsresult (*VFTCALL RegisterService)(void *pvThis, const nsCID& aClass, nsISupports* aService); + VFTDELTA_DECL(RegisterService) + nsresult (*VFTCALL RegisterServiceByContractID)(void *pvThis, const char* aContractID, nsISupports* aService); + VFTDELTA_DECL(RegisterServiceByContractID) + nsresult (*VFTCALL UnregisterService)(void *pvThis, const nsCID& aClass); + VFTDELTA_DECL(UnregisterService) + nsresult (*VFTCALL UnregisterServiceByContractID)(void *pvThis, const char* aContractID); + VFTDELTA_DECL(UnregisterServiceByContractID) + nsresult (*VFTCALL GetService)(void *pvThis, const nsCID& aClass, const nsIID& aIID, nsISupports* *result, nsIShutdownListener* shutdownListener = nsnull); + VFTDELTA_DECL(GetService) + nsresult (*VFTCALL GetServiceByContractID)(void *pvThis, const char* aContractID, const nsIID& aIID, nsISupports* *result, nsIShutdownListener* shutdownListener = nsnull); + VFTDELTA_DECL(GetServiceByContractID) + nsresult (*VFTCALL ReleaseService)(void *pvThis, const nsCID& aClass, nsISupports* service, nsIShutdownListener* shutdownListener = nsnull); + VFTDELTA_DECL(ReleaseService) + nsresult (*VFTCALL ReleaseServiceByContractID)(void *pvThis, const char* aContractID, nsISupports* service, nsIShutdownListener* shutdownListener = nsnull); + VFTDELTA_DECL(ReleaseServiceByContractID) + #else + nsresult (*VFTCALL RegisterServiceByContractID)(void *pvThis, const char* aContractID, nsISupports* aService); + VFTDELTA_DECL(RegisterServiceByContractID) + nsresult (*VFTCALL RegisterService)(void *pvThis, const nsCID& aClass, nsISupports* aService); + VFTDELTA_DECL(RegisterService) + nsresult (*VFTCALL UnregisterServiceByContractID)(void *pvThis, const char* aContractID); + VFTDELTA_DECL(UnregisterServiceByContractID) + nsresult (*VFTCALL UnregisterService)(void *pvThis, const nsCID& aClass); + VFTDELTA_DECL(UnregisterService) + nsresult (*VFTCALL GetServiceByContractID)(void *pvThis, const char* aContractID, const nsIID& aIID, nsISupports* *result, nsIShutdownListener* shutdownListener = nsnull); + VFTDELTA_DECL(GetServiceByContractID) + nsresult (*VFTCALL GetService)(void *pvThis, const nsCID& aClass, const nsIID& aIID, nsISupports* *result, nsIShutdownListener* shutdownListener = nsnull); + VFTDELTA_DECL(GetService) + nsresult (*VFTCALL ReleaseServiceByContractID)(void *pvThis, const char* aContractID, nsISupports* service, nsIShutdownListener* shutdownListener = nsnull); + VFTDELTA_DECL(ReleaseServiceByContractID) + nsresult (*VFTCALL ReleaseService)(void *pvThis, const nsCID& aClass, nsISupports* service, nsIShutdownListener* shutdownListener = nsnull); + VFTDELTA_DECL(ReleaseService) + #endif +} VFTnsIServiceManagerObsolete; + +/** + * nsIFactory + */ +typedef struct vftable_nsIFactory +{ + VFTnsISupports base; + nsresult (*VFTCALL CreateInstance)(void *pvThis, nsISupports *aOuter, const nsIID & iid, void * *result); + VFTDELTA_DECL(CreateInstance) + nsresult (*VFTCALL LockFactory)(void *pvThis, PRBool lock); + VFTDELTA_DECL(LockFactory) +} VFTnsIFactory; + + +/** + * nsIPlugin + */ +typedef struct vftable_nsIPlugin +{ + VFTnsIFactory base; + nsresult (*VFTCALL CreatePluginInstance)(void *pvThis, nsISupports *aOuter, const nsIID & aIID, const char *aPluginMIMEType, void * *aResult); + VFTDELTA_DECL(CreatePluginInstance) + nsresult (*VFTCALL Initialize)(void *pvThis); + VFTDELTA_DECL(Initialize) + nsresult (*VFTCALL Shutdown)(void *pvThis); + VFTDELTA_DECL(Shutdown) + nsresult (*VFTCALL GetMIMEDescription)(void *pvThis, const char * *aMIMEDescription); + VFTDELTA_DECL(GetMIMEDescription) + nsresult (*VFTCALL GetValue)(void *pvThis, nsPluginVariable aVariable, void * aValue); + VFTDELTA_DECL(GetValue) +} VFTnsIPlugin; + + +/** + * nsIPluginManager + */ +typedef struct vftable_nsIPluginManager +{ + VFTnsISupports base; + nsresult (*VFTCALL GetValue)(void *pvThis, nsPluginManagerVariable variable, void * value); + VFTDELTA_DECL(GetValue) + nsresult (*VFTCALL ReloadPlugins)(void *pvThis, PRBool reloadPages); + VFTDELTA_DECL(ReloadPlugins) + nsresult (*VFTCALL UserAgent)(void *pvThis, const char * * resultingAgentString); + VFTDELTA_DECL(UserAgent) + nsresult (*VFTCALL GetURL)(void *pvThis, nsISupports* pluginInst, const char* url, const char* target = NULL, + nsIPluginStreamListener* streamListener = NULL, const char* altHost = NULL, const char* referrer = NULL, + PRBool forceJSEnabled = PR_FALSE); + VFTDELTA_DECL(GetURL) + nsresult (*VFTCALL PostURL)(void *pvThis, nsISupports* pluginInst, const char* url, PRUint32 postDataLen, const char* postData, + PRBool isFile = PR_FALSE, const char* target = NULL, nsIPluginStreamListener* streamListener = NULL, + const char* altHost = NULL, const char* referrer = NULL, PRBool forceJSEnabled = PR_FALSE, + PRUint32 postHeadersLength = 0, const char* postHeaders = NULL); + VFTDELTA_DECL(PostURL) + nsresult (*VFTCALL RegisterPlugin)(void *pvThis, REFNSIID aCID, const char *aPluginName, const char *aDescription, const char * * aMimeTypes, + const char * * aMimeDescriptions, const char * * aFileExtensions, PRInt32 aCount); + VFTDELTA_DECL(RegisterPlugin) + nsresult (*VFTCALL UnregisterPlugin)(void *pvThis, REFNSIID aCID); + VFTDELTA_DECL(UnregisterPlugin) + nsresult (*VFTCALL GetURLWithHeaders)(void *pvThis, nsISupports* pluginInst, const char* url, const char* target = NULL, + nsIPluginStreamListener* streamListener = NULL, const char* altHost = NULL, const char* referrer = NULL, + PRBool forceJSEnabled = PR_FALSE, PRUint32 getHeadersLength = 0, const char* getHeaders = NULL); + VFTDELTA_DECL(GetURLWithHeaders) +} VFTnsIPluginManager; + + +/** + * nsIJVMPlugin + */ +typedef struct vftable_nsIJVMPlugin +{ + VFTnsISupports base; + nsresult (*VFTCALL AddToClassPath)(void *pvThis, const char* dirPath); + VFTDELTA_DECL(AddToClassPath) + nsresult (*VFTCALL RemoveFromClassPath)(void *pvThis, const char* dirPath); + VFTDELTA_DECL(RemoveFromClassPath) + nsresult (*VFTCALL GetClassPath)(void *pvThis, const char* *result); + VFTDELTA_DECL(GetClassPath) + nsresult (*VFTCALL GetJavaWrapper)(void *pvThis, JNIEnv* jenv, jint obj, jobject *jobj); + VFTDELTA_DECL(GetJavaWrapper) + nsresult (*VFTCALL CreateSecureEnv)(void *pvThis, JNIEnv* proxyEnv, nsISecureEnv* *outSecureEnv); + VFTDELTA_DECL(CreateSecureEnv) + nsresult (*VFTCALL SpendTime)(void *pvThis, PRUint32 timeMillis); + VFTDELTA_DECL(SpendTime) + nsresult (*VFTCALL UnwrapJavaWrapper)(void *pvThis, JNIEnv* jenv, jobject jobj, jint* obj); + VFTDELTA_DECL(UnwrapJavaWrapper) +} VFTnsIJVMPlugin; + + +/** + * nsILiveconnect + */ +typedef struct vftable_nsILiveconnect +{ + VFTnsISupports base; + nsresult (*VFTCALL GetMember)(void *pvThis, JNIEnv *jEnv, jsobject jsobj, const jchar *name, jsize length, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports, jobject *pjobj); + VFTDELTA_DECL(GetMember) + nsresult (*VFTCALL GetSlot)(void *pvThis, JNIEnv *jEnv, jsobject jsobj, jint slot, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports, jobject *pjobj); + VFTDELTA_DECL(GetSlot) + nsresult (*VFTCALL SetMember)(void *pvThis, JNIEnv *jEnv, jsobject jsobj, const jchar* name, jsize length, jobject jobj, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports); + VFTDELTA_DECL(SetMember) + nsresult (*VFTCALL SetSlot)(void *pvThis, JNIEnv *jEnv, jsobject jsobj, jint slot, jobject jobj, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports); + VFTDELTA_DECL(SetSlot) + nsresult (*VFTCALL RemoveMember)(void *pvThis, JNIEnv *jEnv, jsobject jsobj, const jchar* name, jsize length, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports); + VFTDELTA_DECL(RemoveMember) + nsresult (*VFTCALL Call)(void *pvThis, JNIEnv *jEnv, jsobject jsobj, const jchar* name, jsize length, jobjectArray jobjArr, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports, jobject *pjobj); + VFTDELTA_DECL(Call) + nsresult (*VFTCALL Eval)(void *pvThis, JNIEnv *jEnv, jsobject obj, const jchar *script, jsize length, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports, jobject *pjobj); + VFTDELTA_DECL(Eval) + nsresult (*VFTCALL GetWindow)(void *pvThis, JNIEnv *jEnv, void *pJavaObject, void* principalsArray[], int numPrincipals, + nsISupports *securitySupports, jsobject *pobj); + VFTDELTA_DECL(GetWindow) + nsresult (*VFTCALL FinalizeJSObject)(void *pvThis, JNIEnv *jEnv, jsobject jsobj); + VFTDELTA_DECL(FinalizeJSObject) + nsresult (*VFTCALL ToString)(void *pvThis, JNIEnv *jEnv, jsobject obj, jstring *pjstring); + VFTDELTA_DECL(ToString) +} VFTnsILiveconnect; + + +/** + * nsISecureLiveconnect + */ +typedef struct vftable_nsISecureLiveconnect +{ + VFTnsISupports base; + nsresult (*VFTCALL Eval)(void *pvThis, JNIEnv *jEnv, jsobject obj, const jchar *script, jsize length, void **pNSIPrincipaArray, + int numPrincipals, void *pNSISecurityContext, jobject *pjobj); + VFTDELTA_DECL(Eval) +} VFTnsISecureLiveconnect; + + +/** + * nsIComponentManagerObsolete + */ +typedef struct vftable_nsIComponentManagerObsolete +{ + VFTnsISupports base; + nsresult (*VFTCALL FindFactory)(void *pvThis, const nsCID & aClass, nsIFactory **_retval); + VFTDELTA_DECL(FindFactory) + nsresult (*VFTCALL GetClassObject)(void *pvThis, const nsCID & aClass, const nsIID & aIID, void * *_retval); + VFTDELTA_DECL(GetClassObject) + nsresult (*VFTCALL ContractIDToClassID)(void *pvThis, const char *aContractID, nsCID *aClass); + VFTDELTA_DECL(ContractIDToClassID) + nsresult (*VFTCALL CLSIDToContractID)(void *pvThis, const nsCID & aClass, char **aClassName, char **_retval); + VFTDELTA_DECL(CLSIDToContractID) + nsresult (*VFTCALL CreateInstance)(void *pvThis, const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *_retval); + VFTDELTA_DECL(CreateInstance) + nsresult (*VFTCALL CreateInstanceByContractID)(void *pvThis, const char *aContractID, nsISupports *aDelegate, const nsIID & IID, void * *_retval); + VFTDELTA_DECL(CreateInstanceByContractID) + nsresult (*VFTCALL RegistryLocationForSpec)(void *pvThis, nsIFile *aSpec, char **_retval); + VFTDELTA_DECL(RegistryLocationForSpec) + nsresult (*VFTCALL SpecForRegistryLocation)(void *pvThis, const char *aLocation, nsIFile **_retval); + VFTDELTA_DECL(SpecForRegistryLocation) + nsresult (*VFTCALL RegisterFactory)(void *pvThis, const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFactory *aFactory, PRBool aReplace); + VFTDELTA_DECL(RegisterFactory) + nsresult (*VFTCALL RegisterComponent)(void *pvThis, const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aLocation, PRBool aReplace, PRBool aPersist); + VFTDELTA_DECL(RegisterComponent) + nsresult (*VFTCALL RegisterComponentWithType)(void *pvThis, const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aSpec, const char *aLocation, PRBool aReplace, PRBool aPersist, const char *aType); + VFTDELTA_DECL(RegisterComponentWithType) + nsresult (*VFTCALL RegisterComponentSpec)(void *pvThis, const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aLibrary, PRBool aReplace, PRBool aPersist); + VFTDELTA_DECL(RegisterComponentSpec) + nsresult (*VFTCALL RegisterComponentLib)(void *pvThis, const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aDllName, PRBool aReplace, PRBool aPersist); + VFTDELTA_DECL(RegisterComponentLib) + nsresult (*VFTCALL UnregisterFactory)(void *pvThis, const nsCID & aClass, nsIFactory *aFactory); + VFTDELTA_DECL(UnregisterFactory) + nsresult (*VFTCALL UnregisterComponent)(void *pvThis, const nsCID & aClass, const char *aLocation); + VFTDELTA_DECL(UnregisterComponent) + nsresult (*VFTCALL UnregisterComponentSpec)(void *pvThis, const nsCID & aClass, nsIFile *aLibrarySpec); + VFTDELTA_DECL(UnregisterComponentSpec) + nsresult (*VFTCALL FreeLibraries)(void *pvThis); + VFTDELTA_DECL(FreeLibraries) + nsresult (*VFTCALL AutoRegister)(void *pvThis, PRInt32 when, nsIFile *directory); + VFTDELTA_DECL(AutoRegister) + nsresult (*VFTCALL AutoRegisterComponent)(void *pvThis, PRInt32 when, nsIFile *aFileLocation); + VFTDELTA_DECL(AutoRegisterComponent) + nsresult (*VFTCALL AutoUnregisterComponent)(void *pvThis, PRInt32 when, nsIFile *aFileLocation); + VFTDELTA_DECL(AutoUnregisterComponent) + nsresult (*VFTCALL IsRegistered)(void *pvThis, const nsCID & aClass, PRBool *_retval); + VFTDELTA_DECL(IsRegistered) + nsresult (*VFTCALL EnumerateCLSIDs)(void *pvThis, nsIEnumerator **_retval); + VFTDELTA_DECL(EnumerateCLSIDs) + nsresult (*VFTCALL EnumerateContractIDs)(void *pvThis, nsIEnumerator **_retval); + VFTDELTA_DECL(EnumerateContractIDs) +} VFTnsIComponentManagerObsolete; + + +/** + * nsComponentManager. + */ +typedef struct vftable_nsIComponentManager +{ + VFTnsISupports base; + nsresult (*VFTCALL GetClassObject)(void *pvThis, const nsCID & aClass, const nsIID & aIID, void * *result); + VFTDELTA_DECL(GetClassObject) + nsresult (*VFTCALL GetClassObjectByContractID)(void *pvThis, const char *aContractID, const nsIID & aIID, void * *result); + VFTDELTA_DECL(GetClassObjectByContractID) + nsresult (*VFTCALL CreateInstance)(void *pvThis, const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result); + VFTDELTA_DECL(CreateInstance) + nsresult (*VFTCALL CreateInstanceByContractID)(void *pvThis, const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result); + VFTDELTA_DECL(CreateInstanceByContractID) +} VFTnsIComponentManager; + + +/** + * nsISecureEnv + */ +typedef struct vftable_nsISecureEnv +{ + VFTnsISupports base; + nsresult (*VFTCALL NewObject)(void *pvThis, jclass clazz, jmethodID methodID, jvalue *args, jobject* result, nsISecurityContext* ctx = NULL); + VFTDELTA_DECL(NewObject) + nsresult (*VFTCALL CallMethod)(void *pvThis, jni_type type, jobject obj, jmethodID methodID, jvalue *args, jvalue* result, nsISecurityContext* ctx = NULL); + VFTDELTA_DECL(CallMethod) + nsresult (*VFTCALL CallNonvirtualMethod)(void *pvThis, jni_type type, jobject obj, jclass clazz, jmethodID methodID, jvalue *args, jvalue* result, nsISecurityContext* ctx = NULL); + VFTDELTA_DECL(CallNonvirtualMethod) + nsresult (*VFTCALL GetField)(void *pvThis, jni_type type, jobject obj, jfieldID fieldID, jvalue* result, nsISecurityContext* ctx = NULL); + VFTDELTA_DECL(GetField) + nsresult (*VFTCALL SetField)(void *pvThis, jni_type type, jobject obj, jfieldID fieldID, jvalue val, nsISecurityContext* ctx = NULL); + VFTDELTA_DECL(SetField) + nsresult (*VFTCALL CallStaticMethod)(void *pvThis, jni_type type, jclass clazz, jmethodID methodID, jvalue *args, jvalue* result, nsISecurityContext* ctx = NULL); + VFTDELTA_DECL(CallStaticMethod) + nsresult (*VFTCALL GetStaticField)(void *pvThis, jni_type type, jclass clazz, jfieldID fieldID, jvalue* result, nsISecurityContext* ctx = NULL); + VFTDELTA_DECL(GetStaticField) + nsresult (*VFTCALL SetStaticField)(void *pvThis, jni_type type, jclass clazz, jfieldID fieldID, jvalue val, nsISecurityContext* ctx = NULL); + VFTDELTA_DECL(SetStaticField) + nsresult (*VFTCALL GetVersion)(void *pvThis, jint* version); + VFTDELTA_DECL(GetVersion) + nsresult (*VFTCALL DefineClass)(void *pvThis, const char* name, jobject loader, const jbyte *buf, jsize len, jclass* clazz); + VFTDELTA_DECL(DefineClass) + nsresult (*VFTCALL FindClass)(void *pvThis, const char* name, jclass* clazz); + VFTDELTA_DECL(FindClass) + nsresult (*VFTCALL GetSuperclass)(void *pvThis, jclass sub, jclass* super); + VFTDELTA_DECL(GetSuperclass) + nsresult (*VFTCALL IsAssignableFrom)(void *pvThis, jclass sub, jclass super, jboolean* result); + VFTDELTA_DECL(IsAssignableFrom) + nsresult (*VFTCALL Throw)(void *pvThis, jthrowable obj, jint* result); + VFTDELTA_DECL(Throw) + nsresult (*VFTCALL ThrowNew)(void *pvThis, jclass clazz, const char *msg, jint* result); + VFTDELTA_DECL(ThrowNew) + nsresult (*VFTCALL ExceptionOccurred)(void *pvThis, jthrowable* result); + VFTDELTA_DECL(ExceptionOccurred) + nsresult (*VFTCALL ExceptionDescribe)(void *pvThis); + VFTDELTA_DECL(ExceptionDescribe) + nsresult (*VFTCALL ExceptionClear)(void *pvThis); + VFTDELTA_DECL(ExceptionClear) + nsresult (*VFTCALL FatalError)(void *pvThis, const char* msg); + VFTDELTA_DECL(FatalError) + nsresult (*VFTCALL NewGlobalRef)(void *pvThis, jobject lobj, jobject* result); + VFTDELTA_DECL(NewGlobalRef) + nsresult (*VFTCALL DeleteGlobalRef)(void *pvThis, jobject gref); + VFTDELTA_DECL(DeleteGlobalRef) + nsresult (*VFTCALL DeleteLocalRef)(void *pvThis, jobject obj); + VFTDELTA_DECL(DeleteLocalRef) + nsresult (*VFTCALL IsSameObject)(void *pvThis, jobject obj1, jobject obj2, jboolean* result); + VFTDELTA_DECL(IsSameObject) + nsresult (*VFTCALL AllocObject)(void *pvThis, jclass clazz, jobject* result); + VFTDELTA_DECL(AllocObject) + nsresult (*VFTCALL GetObjectClass)(void *pvThis, jobject obj, jclass* result); + VFTDELTA_DECL(GetObjectClass) + nsresult (*VFTCALL IsInstanceOf)(void *pvThis, jobject obj, jclass clazz, jboolean* result); + VFTDELTA_DECL(IsInstanceOf) + nsresult (*VFTCALL GetMethodID)(void *pvThis, jclass clazz, const char* name, const char* sig, jmethodID* id); + VFTDELTA_DECL(GetMethodID) + nsresult (*VFTCALL GetFieldID)(void *pvThis, jclass clazz, const char* name, const char* sig, jfieldID* id); + VFTDELTA_DECL(GetFieldID) + nsresult (*VFTCALL GetStaticMethodID)(void *pvThis, jclass clazz, const char* name, const char* sig, jmethodID* id); + VFTDELTA_DECL(GetStaticMethodID) + nsresult (*VFTCALL GetStaticFieldID)(void *pvThis, jclass clazz, const char* name, const char* sig, jfieldID* id); + VFTDELTA_DECL(GetStaticFieldID) + nsresult (*VFTCALL NewString)(void *pvThis, const jchar* unicode, jsize len, jstring* result); + VFTDELTA_DECL(NewString) + nsresult (*VFTCALL GetStringLength)(void *pvThis, jstring str, jsize* result); + VFTDELTA_DECL(GetStringLength) + nsresult (*VFTCALL GetStringChars)(void *pvThis, jstring str, jboolean *isCopy, const jchar** result); + VFTDELTA_DECL(GetStringChars) + nsresult (*VFTCALL ReleaseStringChars)(void *pvThis, jstring str, const jchar *chars); + VFTDELTA_DECL(ReleaseStringChars) + nsresult (*VFTCALL NewStringUTF)(void *pvThis, const char *utf, jstring* result); + VFTDELTA_DECL(NewStringUTF) + nsresult (*VFTCALL GetStringUTFLength)(void *pvThis, jstring str, jsize* result); + VFTDELTA_DECL(GetStringUTFLength) + nsresult (*VFTCALL GetStringUTFChars)(void *pvThis, jstring str, jboolean *isCopy, const char** result); + VFTDELTA_DECL(GetStringUTFChars) + nsresult (*VFTCALL ReleaseStringUTFChars)(void *pvThis, jstring str, const char *chars); + VFTDELTA_DECL(ReleaseStringUTFChars) + nsresult (*VFTCALL GetArrayLength)(void *pvThis, jarray array, jsize* result); + VFTDELTA_DECL(GetArrayLength) + nsresult (*VFTCALL NewObjectArray)(void *pvThis, jsize len, jclass clazz, jobject init, jobjectArray* result); + VFTDELTA_DECL(NewObjectArray) + nsresult (*VFTCALL GetObjectArrayElement)(void *pvThis, jobjectArray array, jsize index, jobject* result); + VFTDELTA_DECL(GetObjectArrayElement) + nsresult (*VFTCALL SetObjectArrayElement)(void *pvThis, jobjectArray array, jsize index, jobject val); + VFTDELTA_DECL(SetObjectArrayElement) + nsresult (*VFTCALL NewArray)(void *pvThis, jni_type element_type, jsize len, jarray* result); + VFTDELTA_DECL(NewArray) + nsresult (*VFTCALL GetArrayElements)(void *pvThis, jni_type type, jarray array, jboolean *isCopy, void* result); + VFTDELTA_DECL(GetArrayElements) + nsresult (*VFTCALL ReleaseArrayElements)(void *pvThis, jni_type type, jarray array, void *elems, jint mode); + VFTDELTA_DECL(ReleaseArrayElements) + nsresult (*VFTCALL GetArrayRegion)(void *pvThis, jni_type type, jarray array, jsize start, jsize len, void* buf); + VFTDELTA_DECL(GetArrayRegion) + nsresult (*VFTCALL SetArrayRegion)(void *pvThis, jni_type type, jarray array, jsize start, jsize len, void* buf); + VFTDELTA_DECL(SetArrayRegion) + nsresult (*VFTCALL RegisterNatives)(void *pvThis, jclass clazz, const JNINativeMethod *methods, jint nMethods, jint* result); + VFTDELTA_DECL(RegisterNatives) + nsresult (*VFTCALL UnregisterNatives)(void *pvThis, jclass clazz, jint* result); + VFTDELTA_DECL(UnregisterNatives) + nsresult (*VFTCALL MonitorEnter)(void *pvThis, jobject obj, jint* result); + VFTDELTA_DECL(MonitorEnter) + nsresult (*VFTCALL MonitorExit)(void *pvThis, jobject obj, jint* result); + VFTDELTA_DECL(MonitorExit) + nsresult (*VFTCALL GetJavaVM)(void *pvThis, JavaVM **vm, jint* result); + VFTDELTA_DECL(GetJavaVM) +} VFTnsISecureEnv; + + +/** + * nsIPluginInstance + */ +typedef struct vftable_nsIPluginInstance +{ + VFTnsISupports base; + nsresult (*VFTCALL Initialize)(void *pvThis, nsIPluginInstancePeer *aPeer); + VFTDELTA_DECL(Initialize) + nsresult (*VFTCALL GetPeer)(void *pvThis, nsIPluginInstancePeer * *aPeer); + VFTDELTA_DECL(GetPeer) + nsresult (*VFTCALL Start)(void *pvThis); + VFTDELTA_DECL(Start) + nsresult (*VFTCALL Stop)(void *pvThis); + VFTDELTA_DECL(Stop) + nsresult (*VFTCALL Destroy)(void *pvThis); + VFTDELTA_DECL(Destroy) + nsresult (*VFTCALL SetWindow)(void *pvThis, nsPluginWindow * aWindow); + VFTDELTA_DECL(SetWindow) + nsresult (*VFTCALL NewStream)(void *pvThis, nsIPluginStreamListener **aListener); + VFTDELTA_DECL(NewStream) + nsresult (*VFTCALL Print)(void *pvThis, nsPluginPrint * aPlatformPrint); + VFTDELTA_DECL(Print) + nsresult (*VFTCALL GetValue)(void *pvThis, nsPluginInstanceVariable aVariable, void * aValue); + VFTDELTA_DECL(GetValue) + nsresult (*VFTCALL HandleEvent)(void *pvThis, nsPluginEvent * aEvent, PRBool *aHandled); + VFTDELTA_DECL(HandleEvent) +} VFTnsIPluginInstance; + + +/** + * nsIPluginInstancePeer + */ +typedef struct vftable_nsIPluginInstancePeer +{ + VFTnsISupports base; + nsresult (*VFTCALL GetValue)(void *pvThis, nsPluginInstancePeerVariable aVariable, void * aValue); + VFTDELTA_DECL(GetValue) + nsresult (*VFTCALL GetMIMEType)(void *pvThis, nsMIMEType *aMIMEType); + VFTDELTA_DECL(GetMIMEType) + nsresult (*VFTCALL GetMode)(void *pvThis, nsPluginMode *aMode); + VFTDELTA_DECL(GetMode) + nsresult (*VFTCALL NewStream)(void *pvThis, nsMIMEType aType, const char *aTarget, nsIOutputStream **aResult); + VFTDELTA_DECL(NewStream) + nsresult (*VFTCALL ShowStatus)(void *pvThis, const char *aMessage); + VFTDELTA_DECL(ShowStatus) + nsresult (*VFTCALL SetWindowSize)(void *pvThis, PRUint32 aWidth, PRUint32 aHeight); + VFTDELTA_DECL(SetWindowSize) +} VFTnsIPluginInstancePeer; + + +/** + * nsIPluginInstancePeer2 + */ +typedef struct vftable_nsIPluginInstancePeer2 +{ + VFTnsIPluginInstancePeer base; + nsresult (*VFTCALL GetJSWindow)(void *pvThis, JSObject * *aJSWindow); + VFTDELTA_DECL(GetJSWindow) + nsresult (*VFTCALL GetJSThread)(void *pvThis, PRUint32 *aJSThread); + VFTDELTA_DECL(GetJSThread) + nsresult (*VFTCALL GetJSContext)(void *pvThis, JSContext * *aJSContext); + VFTDELTA_DECL(GetJSContext) +} VFTnsIPluginInstancePeer2; + + +/** + * nsIInputStream + */ +typedef struct vftable_nsIInputStream +{ + VFTnsISupports base; + nsresult (*VFTCALL Close)(void *pvThis); + VFTDELTA_DECL(Close) + nsresult (*VFTCALL Available)(void *pvThis, PRUint32 *_retval); + VFTDELTA_DECL(Available) + nsresult (*VFTCALL Read)(void *pvThis, char * aBuf, PRUint32 aCount, PRUint32 *_retval); + VFTDELTA_DECL(Read) + nsresult (*VFTCALL ReadSegments)(void *pvThis, nsWriteSegmentFun aWriter, void * aClosure, PRUint32 aCount, PRUint32 *_retval); + VFTDELTA_DECL(ReadSegments) + nsresult (*VFTCALL IsNonBlocking)(void *pvThis, PRBool *_retval); + VFTDELTA_DECL(IsNonBlocking) +} VFTnsIInputStream; + + +/** + * nsIOutputStream + */ +typedef struct vftable_nsIOutputStream +{ + VFTnsISupports base; + nsresult (*VFTCALL Close)(void *pvThis); + VFTDELTA_DECL(Close) + nsresult (*VFTCALL Flush)(void *pvThis); + VFTDELTA_DECL(Flush) + nsresult (*VFTCALL Write)(void *pvThis, const char *aBuf, PRUint32 aCount, PRUint32 *_retval); + VFTDELTA_DECL(Write) + nsresult (*VFTCALL WriteFrom)(void *pvThis, nsIInputStream *aFromStream, PRUint32 aCount, PRUint32 *_retval); + VFTDELTA_DECL(WriteFrom) + nsresult (*VFTCALL WriteSegments)(void *pvThis, nsReadSegmentFun aReader, void * aClosure, PRUint32 aCount, PRUint32 *_retval); + VFTDELTA_DECL(WriteSegments) + nsresult (*VFTCALL IsNonBlocking)(void *pvThis, PRBool *_retval); + VFTDELTA_DECL(IsNonBlocking) +} VFTnsIOutputStream; + + + +/** + * nsIPluginTagInfo + */ +typedef struct vftable_nsIPluginTagInfo +{ + VFTnsISupports base; + nsresult (*VFTCALL GetAttributes)(void *pvThis, PRUint16 & aCount, const char* const* & aNames, const char* const* & aValues); + VFTDELTA_DECL(GetAttributes) + nsresult (*VFTCALL GetAttribute)(void *pvThis, const char *aName, const char * *aResult); + VFTDELTA_DECL(GetAttribute) +} VFTnsIPluginTagInfo; + +/** + * nsIPluginTagInfo2 + */ +typedef struct vftable_nsIPluginTagInfo2 +{ + VFTnsIPluginTagInfo base; + nsresult (*VFTCALL GetTagType)(void *pvThis, nsPluginTagType *aTagType); + VFTDELTA_DECL(GetTagType) + nsresult (*VFTCALL GetTagText)(void *pvThis, const char * *aTagText); + VFTDELTA_DECL(GetTagText) + nsresult (*VFTCALL GetParameters)(void *pvThis, PRUint16 & aCount, const char* const* & aNames, const char* const* & aValues); + VFTDELTA_DECL(GetParameters) + nsresult (*VFTCALL GetParameter)(void *pvThis, const char *aName, const char * *aResult); + VFTDELTA_DECL(GetParameter) + nsresult (*VFTCALL GetDocumentBase)(void *pvThis, const char * *aDocumentBase); + VFTDELTA_DECL(GetDocumentBase) + nsresult (*VFTCALL GetDocumentEncoding)(void *pvThis, const char * *aDocumentEncoding); + VFTDELTA_DECL(GetDocumentEncoding) + nsresult (*VFTCALL GetAlignment)(void *pvThis, const char * *aElignment); + VFTDELTA_DECL(GetAlignment) + nsresult (*VFTCALL GetWidth)(void *pvThis, PRUint32 *aWidth); + VFTDELTA_DECL(GetWidth) + nsresult (*VFTCALL GetHeight)(void *pvThis, PRUint32 *aHeight); + VFTDELTA_DECL(GetHeight) + nsresult (*VFTCALL GetBorderVertSpace)(void *pvThis, PRUint32 *aBorderVertSpace); + VFTDELTA_DECL(GetBorderVertSpace) + nsresult (*VFTCALL GetBorderHorizSpace)(void *pvThis, PRUint32 *aBorderHorizSpace); + VFTDELTA_DECL(GetBorderHorizSpace) + nsresult (*VFTCALL GetUniqueID)(void *pvThis, PRUint32 *aUniqueID); + VFTDELTA_DECL(GetUniqueID) + nsresult (*VFTCALL GetDOMElement)(void *pvThis, nsIDOMElement * *aDOMElement); + VFTDELTA_DECL(GetDOMElement) +} VFTnsIPluginTagInfo2; + + +/** + * nsIJVMWindow + */ +typedef struct vftable_nsIJVMWindow +{ + VFTnsISupports base; + nsresult (*VFTCALL Show)(void *pvThis); + VFTDELTA_DECL(Show) + nsresult (*VFTCALL Hide)(void *pvThis); + VFTDELTA_DECL(Hide) + nsresult (*VFTCALL IsVisible)(void *pvThis, PRBool *result); + VFTDELTA_DECL(IsVisible) +} VFTnsIJVMWindow; + + +/** + * nsIJVMConsole + */ +typedef struct vftable_nsIJVMConsole +{ + VFTnsIJVMWindow base; + /* This these are not duplicated even if duplicated in the interface. + nsresult (*VFTCALL Show)(void *pvThis); + nsresult (*VFTCALL Hide)(void *pvThis); + nsresult (*VFTCALL IsVisible)(void *pvThis, PRBool *result); + */ + nsresult (*VFTCALL Print)(void *pvThis, const char* msg, const char* encodingName = NULL); + VFTDELTA_DECL(Print) +} VFTnsIJVMConsole; + + +/** + * nsIJVMPluginInstance + */ +typedef struct vftable_nsIJVMPluginInstance +{ + VFTnsISupports base; + nsresult (*VFTCALL GetJavaObject)(void *pvThis, jobject *result); + VFTDELTA_DECL(GetJavaObject) + nsresult (*VFTCALL GetText)(void *pvThis, const char ** result); + VFTDELTA_DECL(GetText) +} VFTnsIJVMPluginInstance; + + +/** + * nsIPluginManager2 + */ +typedef struct vtable_nsIPluginManager2 +{ + VFTnsIPluginManager base; + nsresult (*VFTCALL BeginWaitCursor)(void *pvThis); + VFTDELTA_DECL(BeginWaitCursor) + nsresult (*VFTCALL EndWaitCursor)(void *pvThis); + VFTDELTA_DECL(EndWaitCursor) + nsresult (*VFTCALL SupportsURLProtocol)(void *pvThis, const char *aProtocol, PRBool *aResult); + VFTDELTA_DECL(SupportsURLProtocol) + nsresult (*VFTCALL NotifyStatusChange)(void *pvThis, nsIPlugin *aPlugin, nsresult aStatus); + VFTDELTA_DECL(NotifyStatusChange) + nsresult (*VFTCALL FindProxyForURL)(void *pvThis, const char *aURL, char **aResult); + VFTDELTA_DECL(FindProxyForURL) + nsresult (*VFTCALL RegisterWindow)(void *pvThis, nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow); + VFTDELTA_DECL(RegisterWindow) + nsresult (*VFTCALL UnregisterWindow)(void *pvThis, nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow); + VFTDELTA_DECL(UnregisterWindow) + nsresult (*VFTCALL AllocateMenuID)(void *pvThis, nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult); + VFTDELTA_DECL(AllocateMenuID) + nsresult (*VFTCALL DeallocateMenuID)(void *pvThis, nsIEventHandler *aHandler, PRInt16 aMenuID); + VFTDELTA_DECL(DeallocateMenuID) + nsresult (*VFTCALL HasAllocatedMenuID)(void *pvThis, nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult); + VFTDELTA_DECL(HasAllocatedMenuID) +} VFTnsIPluginManager2; + + +/** + * nsICookieStorage + */ +typedef struct vtable_nsICookieStorage +{ + VFTnsISupports base; + nsresult (*VFTCALL GetCookie)(void *pvThis, const char *aCookieURL, void * aCookieBuffer, PRUint32 & aCookieSize); + VFTDELTA_DECL(GetCookie) + nsresult (*VFTCALL SetCookie)(void *pvThis, const char *aCookieURL, const void * aCookieBuffer, PRUint32 aCookieSize); + VFTDELTA_DECL(SetCookie) +} VFTnsICookieStorage; + + +/** + * nsIEventHandler + */ +typedef struct vtable_nsIEventHandler +{ + VFTnsISupports base; + nsresult (*VFTCALL HandleEvent)(void *pvThis, nsPluginEvent * aEvent, PRBool *aHandled); + VFTDELTA_DECL(HandleEvent) +} VFTnsIEventHandler; + + +/** + * nsIJVMThreadManager + */ +typedef struct vtable_nsIJVMThreadManager +{ + VFTnsISupports base; +#ifdef IPLUGINW_OUTOFTREE + nsresult (*VFTCALL GetCurrentThread)(void *pvThis, nsPluginThread* *threadID); +#else + nsresult (*VFTCALL GetCurrentThread)(void *pvThis, PRThread **threadID); +#endif + VFTDELTA_DECL(GetCurrentThread) + nsresult (*VFTCALL Sleep)(void *pvThis, PRUint32 milli/* = 0*/); + VFTDELTA_DECL(Sleep) + nsresult (*VFTCALL EnterMonitor)(void *pvThis, void* address); + VFTDELTA_DECL(EnterMonitor) + nsresult (*VFTCALL ExitMonitor)(void *pvThis, void* address); + VFTDELTA_DECL(ExitMonitor) + nsresult (*VFTCALL Wait)(void *pvThis, void* address, PRUint32 milli/* = 0*/); + VFTDELTA_DECL(Wait) + nsresult (*VFTCALL Notify)(void *pvThis, void* address); + VFTDELTA_DECL(Notify) + nsresult (*VFTCALL NotifyAll)(void *pvThis, void* address); + VFTDELTA_DECL(NotifyAll) +#ifdef IPLUGINW_OUTOFTREE + nsresult (*VFTCALL CreateThread)(void *pvThis, PRUint32* threadID, nsIRunnable* runnable); +#else + nsresult (*VFTCALL CreateThread)(void *pvThis, PRThread **threadID, nsIRunnable* runnable); +#endif + VFTDELTA_DECL(CreateThread) +#ifdef IPLUGINW_OUTOFTREE + nsresult (*VFTCALL PostEvent)(void *pvThis, PRUint32 threadID, nsIRunnable* runnable, PRBool async); +#else + nsresult (*VFTCALL PostEvent)(void *pvThis, PRThread *threadID, nsIRunnable* runnable, PRBool async); +#endif + VFTDELTA_DECL(PostEvent) +} VFTnsIJVMThreadManager; + + +/** + * nsIJVMManager + */ +typedef struct vtable_nsIJVMManager +{ + VFTnsISupports base; + nsresult (*VFTCALL CreateProxyJNI)(void *pvThis, nsISecureEnv *secureEnv, JNIEnv * *outProxyEnv); + VFTDELTA_DECL(CreateProxyJNI) + nsresult (*VFTCALL GetProxyJNI)(void *pvThis, JNIEnv * *outProxyEnv); + VFTDELTA_DECL(GetProxyJNI) + nsresult (*VFTCALL ShowJavaConsole)(void *pvThis); + VFTDELTA_DECL(ShowJavaConsole) + nsresult (*VFTCALL IsAllPermissionGranted)(void *pvThis, const char *lastFingerprint, const char *lastCommonName, const char *rootFingerprint, const char *rootCommonName, PRBool *_retval); + VFTDELTA_DECL(IsAllPermissionGranted) + nsresult (*VFTCALL IsAppletTrusted)(void *pvThis, const char *aRSABuf, PRUint32 aRSABufLen, const char *aPlaintext, PRUint32 aPlaintextLen, PRBool *isTrusted, nsIPrincipal **_retval); + VFTDELTA_DECL(IsAppletTrusted) + nsresult (*VFTCALL GetJavaEnabled)(void *pvThis, PRBool *aJavaEnabled); + VFTDELTA_DECL(GetJavaEnabled) +} VFTnsIJVMManager; + + +/** + * nsIRunnable + */ +typedef struct vtable_nsIRunnable +{ + VFTnsISupports base; + nsresult (*VFTCALL Run)(void *pvThis); + VFTDELTA_DECL(Run) +} VFTnsIRunnable; + + +/** + * nsISecurityContext + */ +typedef struct vftable_nsISecurityContext +{ + VFTnsISupports base; + nsresult (*VFTCALL Implies)(void *pvThis, const char* target, const char* action, PRBool *bAllowedAccess); + VFTDELTA_DECL(Implies) + nsresult (*VFTCALL GetOrigin)(void *pvThis, char* buf, int len); + VFTDELTA_DECL(GetOrigin) + nsresult (*VFTCALL GetCertificateID)(void *pvThis, char* buf, int len); + VFTDELTA_DECL(GetCertificateID) +} VFTnsISecurityContext; + + +/** + * nsIRequest + */ +typedef struct vftable_nsIRequest +{ + VFTnsISupports base; + nsresult (*VFTCALL GetName)(void *pvThis, nsACString & aName); + VFTDELTA_DECL(GetName) + nsresult (*VFTCALL IsPending)(void *pvThis, PRBool *_retval); + VFTDELTA_DECL(IsPending) + nsresult (*VFTCALL GetStatus)(void *pvThis, nsresult *aStatus); + VFTDELTA_DECL(GetStatus) + nsresult (*VFTCALL Cancel)(void *pvThis, nsresult aStatus); + VFTDELTA_DECL(Cancel) + nsresult (*VFTCALL Suspend)(void *pvThis); + VFTDELTA_DECL(Suspend) + nsresult (*VFTCALL Resume)(void *pvThis); + VFTDELTA_DECL(Resume) + nsresult (*VFTCALL GetLoadGroup)(void *pvThis, nsILoadGroup * *aLoadGroup); + VFTDELTA_DECL(GetLoadGroup) + nsresult (*VFTCALL SetLoadGroup)(void *pvThis, nsILoadGroup * aLoadGroup); + VFTDELTA_DECL(SetLoadGroup) + nsresult (*VFTCALL GetLoadFlags)(void *pvThis, nsLoadFlags *aLoadFlags); + VFTDELTA_DECL(GetLoadFlags) + nsresult (*VFTCALL SetLoadFlags)(void *pvThis, nsLoadFlags aLoadFlags); + VFTDELTA_DECL(SetLoadFlags) +} VFTnsIRequest; + + +/** + * nsILoadGroup + */ +typedef struct vftable_nsILoadGroup +{ + VFTnsIRequest base; + nsresult (*VFTCALL GetGroupObserver)(void *pvThis, nsIRequestObserver * *aGroupObserver); + VFTDELTA_DECL(GetGroupObserver) + nsresult (*VFTCALL SetGroupObserver)(void *pvThis, nsIRequestObserver * aGroupObserver); + VFTDELTA_DECL(SetGroupObserver) + nsresult (*VFTCALL GetDefaultLoadRequest)(void *pvThis, nsIRequest * *aDefaultLoadRequest); + VFTDELTA_DECL(GetDefaultLoadRequest) + nsresult (*VFTCALL SetDefaultLoadRequest)(void *pvThis, nsIRequest * aDefaultLoadRequest); + VFTDELTA_DECL(SetDefaultLoadRequest) + nsresult (*VFTCALL AddRequest)(void *pvThis, nsIRequest *aRequest, nsISupports *aContext); + VFTDELTA_DECL(AddRequest) + nsresult (*VFTCALL RemoveRequest)(void *pvThis, nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus); + VFTDELTA_DECL(RemoveRequest) + nsresult (*VFTCALL GetRequests)(void *pvThis, nsISimpleEnumerator * *aRequests); + VFTDELTA_DECL(GetRequests) + nsresult (*VFTCALL GetActiveCount)(void *pvThis, PRUint32 *aActiveCount); + VFTDELTA_DECL(GetActiveCount) + nsresult (*VFTCALL GetNotificationCallbacks)(void *pvThis, nsIInterfaceRequestor * *aNotificationCallbacks); + VFTDELTA_DECL(GetNotificationCallbacks) + nsresult (*VFTCALL SetNotificationCallbacks)(void *pvThis, nsIInterfaceRequestor * aNotificationCallbacks); + VFTDELTA_DECL(SetNotificationCallbacks) +} VFTnsILoadGroup; + + +/** + * nsIRequestObserver + */ +typedef struct vftable_nsIRequestObserver +{ + VFTnsISupports base; + nsresult (*VFTCALL OnStartRequest)(void *pvThis, nsIRequest *aRequest, nsISupports *aContext); + VFTDELTA_DECL(OnStartRequest) + nsresult (*VFTCALL OnStopRequest)(void *pvThis, nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode); + VFTDELTA_DECL(OnStopRequest) +} VFTnsIRequestObserver; + + +/** + * nsIStreamListener + */ +typedef struct vftable_nsIStreamListener +{ + VFTnsIRequestObserver base; + nsresult (*VFTCALL OnDataAvailable)(void *pvThis, nsIRequest *aRequest, nsISupports *aContext, nsIInputStream *aInputStream, PRUint32 aOffset, PRUint32 aCount); + VFTDELTA_DECL(OnDataAvailable) +} VFTnsIStreamListener; + + +/** + * nsISimpleEnumerator + */ +typedef struct vftable_nsISimpleEnumerator +{ + VFTnsISupports base; + nsresult (*VFTCALL HasMoreElements)(void *pvThis, PRBool *_retval); + VFTDELTA_DECL(HasMoreElements) + nsresult (*VFTCALL GetNext)(void *pvThis, nsISupports **_retval); + VFTDELTA_DECL(GetNext) +} VFTnsISimpleEnumerator; + + +/** + * nsIInterfaceRequestor + */ +typedef struct vftable_nsIInterfaceRequestor +{ + VFTnsISupports base; + nsresult (*VFTCALL GetInterface)(void *pvThis, const nsIID & uuid, void * *result); + VFTDELTA_DECL(GetInterface) +} VFTnsIInterfaceRequestor; + + +/** + * nsIPluginStreamListener + */ +typedef struct vftable_nsIPluginStreamListener +{ + VFTnsISupports base; + nsresult (*VFTCALL OnStartBinding)(void *pvThis, nsIPluginStreamInfo *aPluginInfo); + VFTDELTA_DECL(OnStartBinding) + nsresult (*VFTCALL OnDataAvailable)(void *pvThis, nsIPluginStreamInfo *aPluginInfo, nsIInputStream *aInputStream, PRUint32 aLength); + VFTDELTA_DECL(OnDataAvailable) + nsresult (*VFTCALL OnFileAvailable)(void *pvThis, nsIPluginStreamInfo *aPluginInfo, const char *aFileName); + VFTDELTA_DECL(OnFileAvailable) + nsresult (*VFTCALL OnStopBinding)(void *pvThis, nsIPluginStreamInfo *aPluginInfo, nsresult aStatus); + VFTDELTA_DECL(OnStopBinding) + nsresult (*VFTCALL GetStreamType)(void *pvThis, nsPluginStreamType *aStreamType); + VFTDELTA_DECL(GetStreamType) +} VFTnsIPluginStreamListener; + + + +/** + * nsIEnumerator + */ +typedef struct vftable_nsIEnumerator +{ + VFTnsISupports base; + nsresult (*VFTCALL First)(void *pvThis); + VFTDELTA_DECL(First) + nsresult (*VFTCALL Next)(void *pvThis); + VFTDELTA_DECL(Next) + nsresult (*VFTCALL CurrentItem)(void *pvThis, nsISupports **_retval); + VFTDELTA_DECL(CurrentItem) + nsresult (*VFTCALL IsDone)(void *pvThis); + VFTDELTA_DECL(IsDone) +} VFTnsIEnumerator; + + +/** + * nsIPluginStreamInfo + */ +typedef struct vftable_nsIPluginStreamInfo +{ + VFTnsISupports base; + nsresult (*VFTCALL GetContentType)(void *pvThis, nsMIMEType *aContentType); + VFTDELTA_DECL(GetContentType) + nsresult (*VFTCALL IsSeekable)(void *pvThis, PRBool *aSeekable); + VFTDELTA_DECL(IsSeekable) + nsresult (*VFTCALL GetLength)(void *pvThis, PRUint32 *aLength); + VFTDELTA_DECL(GetLength) + nsresult (*VFTCALL GetLastModified)(void *pvThis, PRUint32 *aLastModified); + VFTDELTA_DECL(GetLastModified) + nsresult (*VFTCALL GetURL)(void *pvThis, const char * *aURL); + VFTDELTA_DECL(GetURL) + nsresult (*VFTCALL RequestRead)(void *pvThis, nsByteRange * aRangeList); + VFTDELTA_DECL(RequestRead) + nsresult (*VFTCALL GetStreamOffset)(void *pvThis, PRInt32 *aStreamOffset); + VFTDELTA_DECL(GetStreamOffset) + nsresult (*VFTCALL SetStreamOffset)(void *pvThis, PRInt32 aStreamOffset); + VFTDELTA_DECL(SetStreamOffset) +} VFTnsIPluginStreamInfo; + + +class FlashIObject7; +/** + * FlashIObject (42b1d5a4-6c2b-11d6-8063-0005029bc257) + * Flash version 7r14 + */ +typedef struct vftable_FlashIObject7 +{ + VFTnsISupports base; + nsresult (*VFTCALL Evaluate)(void *pvThis, const char *aString, FlashIObject7 ** aFlashObject); + VFTDELTA_DECL(Evaluate) +} VFTFlashIObject7; + + +/** + * FlashIScriptablePlugin (d458fe9c-518c-11d6-84cb-0005029bc257) + * Flash version 7r14 + */ +typedef struct vftable_FlashIScriptablePlugin7 +{ + VFTnsISupports base; + nsresult (*VFTCALL IsPlaying)(void *pvThis, PRBool *aretval); + VFTDELTA_DECL(IsPlaying) + nsresult (*VFTCALL Play)(void *pvThis); + VFTDELTA_DECL(Play) + nsresult (*VFTCALL StopPlay)(void *pvThis); + VFTDELTA_DECL(StopPlay) + nsresult (*VFTCALL TotalFrames)(void *pvThis, PRInt32 *aretval); + VFTDELTA_DECL(TotalFrames) + nsresult (*VFTCALL CurrentFrame)(void *pvThis, PRInt32 *aretval); + VFTDELTA_DECL(CurrentFrame) + nsresult (*VFTCALL GotoFrame)(void *pvThis, PRInt32 aFrame); + VFTDELTA_DECL(GotoFrame) + nsresult (*VFTCALL Rewind)(void *pvThis); + VFTDELTA_DECL(Rewind) + nsresult (*VFTCALL Back)(void *pvThis); + VFTDELTA_DECL(Back) + nsresult (*VFTCALL Forward)(void *pvThis); + VFTDELTA_DECL(Forward) + nsresult (*VFTCALL Pan)(void *pvThis, PRInt32 aX, PRInt32 aY, PRInt32 aMode); + VFTDELTA_DECL(Pan) + nsresult (*VFTCALL PercentLoaded)(void *pvThis, PRInt32 *aretval); + VFTDELTA_DECL(PercentLoaded) + nsresult (*VFTCALL FrameLoaded)(void *pvThis, PRInt32 aFrame, PRBool *aretval); + VFTDELTA_DECL(FrameLoaded) + nsresult (*VFTCALL FlashVersion)(void *pvThis, PRInt32 *aretval); + VFTDELTA_DECL(FlashVersion) + nsresult (*VFTCALL Zoom)(void *pvThis, PRInt32 aZoom); + VFTDELTA_DECL(Zoom) + nsresult (*VFTCALL SetZoomRect)(void *pvThis, PRInt32 aLeft, PRInt32 aTop, PRInt32 aRight, PRInt32 aBottom); + VFTDELTA_DECL(SetZoomRect) + nsresult (*VFTCALL LoadMovie)(void *pvThis, PRInt32 aLayer, PRUnichar *aURL); + VFTDELTA_DECL(LoadMovie) + nsresult (*VFTCALL TGotoFrame)(void *pvThis, PRUnichar *aTarget, PRInt32 aFrameNumber); + VFTDELTA_DECL(TGotoFrame) + nsresult (*VFTCALL TGotoLabel)(void *pvThis, PRUnichar *aTarget, PRUnichar *aLabel); + VFTDELTA_DECL(TGotoLabel) + nsresult (*VFTCALL TCurrentFrame)(void *pvThis, PRUnichar *aTarget, PRInt32 *aretval); + VFTDELTA_DECL(TCurrentFrame) + /* ??? wonder if this is right! */ + nsresult (*VFTCALL TCurrentLabel)(void *pvThis, PRUnichar *aTarget, PRUnichar **aretval); + VFTDELTA_DECL(TCurrentLabel) + nsresult (*VFTCALL TPlay)(void *pvThis, PRUnichar *aTarget); + VFTDELTA_DECL(TPlay) + nsresult (*VFTCALL TStopPlay)(void *pvThis, PRUnichar *aTarget); + VFTDELTA_DECL(TStopPlay) + nsresult (*VFTCALL SetVariable)(void *pvThis, PRUnichar *aVariable, PRUnichar *aValue); + VFTDELTA_DECL(SetVariable) + nsresult (*VFTCALL GetVariable)(void *pvThis, PRUnichar *aVariable, PRUnichar **aretval); + VFTDELTA_DECL(GetVariable) + nsresult (*VFTCALL TSetProperty)(void *pvThis, PRUnichar *aTarget, PRInt32 aProperty, PRUnichar *aValue); + VFTDELTA_DECL(TSetProperty) + nsresult (*VFTCALL TGetProperty)(void *pvThis, PRUnichar *aTarget, PRInt32 aProperty, PRUnichar **aretval); + VFTDELTA_DECL(TGetProperty) + /* ??? check this!? */ + nsresult (*VFTCALL TGetPropertyAsNumber)(void *pvThis, PRUnichar *aTarget, PRInt32 aProperty, double **aretval); + VFTDELTA_DECL(TGetPropertyAsNumber) + nsresult (*VFTCALL TCallLabel)(void *pvThis, PRUnichar *aTarget, PRUnichar *aLabel); + VFTDELTA_DECL(TCallLabel) + nsresult (*VFTCALL TCallFrame)(void *pvThis, PRUnichar *aTarget, PRInt32 aFrameNumber); + VFTDELTA_DECL(TCallFrame) + nsresult (*VFTCALL SetWindow)(void *pvThis, FlashIObject7 *aFlashObject, PRInt32 a1); + VFTDELTA_DECL(SetWindow) +} VFTFlashIScriptablePlugin7; + + +/** + * nsIPlugin5 (d27cdb6e-ae6d-11cf-96b8-444553540000) + * Flash 5 rXY for OS/2 + */ +typedef struct vftable_nsIFlash5 +{ + VFTnsISupports base; + nsresult (*VFTCALL IsPlaying)(void *pvThis, PRBool *aretval); + VFTDELTA_DECL(IsPlaying) + nsresult (*VFTCALL Play)(void *pvThis); + VFTDELTA_DECL(Play) + nsresult (*VFTCALL StopPlay)(void *pvThis); + VFTDELTA_DECL(StopPlay) + nsresult (*VFTCALL TotalFrames)(void *pvThis, PRInt32 *aretval); + VFTDELTA_DECL(TotalFrames) + nsresult (*VFTCALL CurrentFrame)(void *pvThis, PRInt32 *aretval); + VFTDELTA_DECL(CurrentFrame) + nsresult (*VFTCALL GotoFrame)(void *pvThis, PRInt32 aPosition); + VFTDELTA_DECL(GotoFrame) + nsresult (*VFTCALL Rewind)(void *pvThis); + VFTDELTA_DECL(Rewind) + nsresult (*VFTCALL Back)(void *pvThis); + VFTDELTA_DECL(Back) + nsresult (*VFTCALL Forward)(void *pvThis); + VFTDELTA_DECL(Forward) + nsresult (*VFTCALL PercentLoaded)(void *pvThis, PRInt32 *aretval); + VFTDELTA_DECL(PercentLoaded) + nsresult (*VFTCALL FrameLoaded)(void *pvThis, PRInt32 aFrame, PRBool *aretval); + VFTDELTA_DECL(FrameLoaded) + nsresult (*VFTCALL FlashVersion)(void *pvThis, PRInt32 *aretval); + VFTDELTA_DECL(FlashVersion) + nsresult (*VFTCALL Pan)(void *pvThis, PRInt32 aX, PRInt32 aY, PRInt32 aMode); + VFTDELTA_DECL(Pan) + nsresult (*VFTCALL Zoom)(void *pvThis, PRInt32 aPercent); + VFTDELTA_DECL(Zoom) + nsresult (*VFTCALL SetZoomRect)(void *pvThis, PRInt32 aLeft, PRInt32 aTop, PRInt32 aRight, PRInt32 aBottom); + VFTDELTA_DECL(SetZoomRect) + nsresult (*VFTCALL LoadMovie)(void *pvThis, PRInt32 aLayer, const char *aURL); + VFTDELTA_DECL(LoadMovie) + nsresult (*VFTCALL TGotoFrame)(void *pvThis, const char *aTarget, PRInt32 frameNum); + VFTDELTA_DECL(TGotoFrame) + nsresult (*VFTCALL TGotoLabel)(void *pvThis, const char *aTarget, const char *aLabel); + VFTDELTA_DECL(TGotoLabel) + nsresult (*VFTCALL TCurrentFrame)(void *pvThis, const char *aTarget, PRInt32 *aretval); + VFTDELTA_DECL(TCurrentFrame) + nsresult (*VFTCALL TCurrentLabel)(void *pvThis, const char *aTarget, char **aretval); + VFTDELTA_DECL(TCurrentLabel) + nsresult (*VFTCALL TPlay)(void *pvThis, const char *aTarget); + VFTDELTA_DECL(TPlay) + nsresult (*VFTCALL TStopPlay)(void *pvThis, const char *aTarget); + VFTDELTA_DECL(TStopPlay) + nsresult (*VFTCALL SetVariable)(void *pvThis, const char *aName, const char *aValue); + VFTDELTA_DECL(SetVariable) + nsresult (*VFTCALL GetVariable)(void *pvThis, const char *aName, char **aretval); + VFTDELTA_DECL(GetVariable) + nsresult (*VFTCALL TSetProperty)(void *pvThis, const char *aTarget, PRInt32 aProperty, const char *value); + VFTDELTA_DECL(TSetProperty) + nsresult (*VFTCALL TGetProperty)(void *pvThis, const char *aTarget, PRInt32 aProperty, char **aretval); + VFTDELTA_DECL(TGetProperty) + nsresult (*VFTCALL TCallFrame)(void *pvThis, const char *aTarget, PRInt32 aFrame); + VFTDELTA_DECL(TCallFrame) + nsresult (*VFTCALL TCallLabel)(void *pvThis, const char *aTarget, const char *aLabel); + VFTDELTA_DECL(TCallLabel) + nsresult (*VFTCALL TGetPropertyAsNumber)(void *pvThis, const char *aTarget, PRInt32 aProperty, double *aretval); + VFTDELTA_DECL(TGetPropertyAsNumber) + nsresult (*VFTCALL TSetPropertyAsNumber)(void *pvThis, const char *aTarget, PRInt32 aProperty, double aValue); + VFTDELTA_DECL(TSetPropertyAsNumber) +} VFTnsIFlash5; + + + +/** + * nsIClassInfo + */ +typedef struct vftable_nsIClassInfo +{ + VFTnsISupports base; + nsresult (*VFTCALL GetInterfaces)(void *pvThis, PRUint32 *count, nsIID * **array); + VFTDELTA_DECL(GetInterfaces) + nsresult (*VFTCALL GetHelperForLanguage)(void *pvThis, PRUint32 language, nsISupports **_retval); + VFTDELTA_DECL(GetHelperForLanguage) + nsresult (*VFTCALL GetContractID)(void *pvThis, char * *aContractID); + VFTDELTA_DECL(GetContractID) + nsresult (*VFTCALL GetClassDescription)(void *pvThis, char * *aClassDescription); + VFTDELTA_DECL(GetClassDescription) + nsresult (*VFTCALL GetClassID)(void *pvThis, nsCID * *aClassID); + VFTDELTA_DECL(GetClassID) + nsresult (*VFTCALL GetImplementationLanguage)(void *pvThis, PRUint32 *aImplementationLanguage); + VFTDELTA_DECL(GetImplementationLanguage) + nsresult (*VFTCALL GetFlags)(void *pvThis, PRUint32 *aFlags); + VFTDELTA_DECL(GetFlags) + nsresult (*VFTCALL GetClassIDNoAlloc)(void *pvThis, nsCID *aClassIDNoAlloc); + VFTDELTA_DECL(GetClassIDNoAlloc) +} VFTnsIClassInfo; + + +/** + * nsIHTTPHeaderListener + */ +typedef struct vftable_nsIHTTPHeaderListener +{ + VFTnsISupports base; + nsresult (*VFTCALL NewResponseHeader)(void *pvThis, const char *headerName, const char *headerValue); + VFTDELTA_DECL(NewResponseHeader) +} VFTnsIHTTPHeaderListener; + + +/** + * nsIMemory + */ +typedef struct vftable_nsIMemory +{ + VFTnsISupports base; + void * (*VFTCALL Alloc)(void *pvThis, size_t size); + VFTDELTA_DECL(Alloc) + void * (*VFTCALL Realloc)(void *pvThis, void * ptr, size_t newSize); + VFTDELTA_DECL(Realloc) + void (*VFTCALL Free)(void *pvThis, void * ptr); + VFTDELTA_DECL(Free) + nsresult (*VFTCALL HeapMinimize)(void *pvThis, PRBool immediate); + VFTDELTA_DECL(HeapMinimize) + nsresult (*VFTCALL IsLowMemory)(void *pvThis, PRBool *_retval); + VFTDELTA_DECL(IsLowMemory) +} VFTnsIMemory; + +//@} +#endif diff --git a/mozilla/modules/plugin/os2wrapper/wrap_XPCOM.cpp b/mozilla/modules/plugin/os2wrapper/wrap_XPCOM.cpp new file mode 100644 index 00000000000..1dce718f53b --- /dev/null +++ b/mozilla/modules/plugin/os2wrapper/wrap_XPCOM.cpp @@ -0,0 +1,11338 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is InnoTek Plugin Wrapper code. + * + * The Initial Developer of the Original Code is + * InnoTek Systemberatung GmbH. + * Portions created by the Initial Developer are Copyright (C) 2003-2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * InnoTek Systemberatung GmbH / Knut St. Osmundsen + * Peter Weilbacher + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/* + * XPCOM Plugin Interface + */ + +/******************************************************************************* +* Header Files * +*******************************************************************************/ +# ifdef IPLUGINW_OUTOFTREE +# ifdef __IBMCPP__ +# include "moz_VACDefines.h" +# else +# include "moz_GCCDefines.h" +# endif +# endif + + +#define INCL_DOSSEMAPHORES +#define INCL_DOSMODULEMGR +#define INCL_ERRORS +#define INCL_PM +#include +#include + + +/* the headers */ +#include "npapi.h" +#include "npupp.h" + +#include "nscore.h" +#include "nsError.h" +#include "nsDebug.h" +#include "nsID.h" +#include "nsrootidl.h" +#include "nsISupports.h" +#include "nsISupportsBase.h" +#include "nsISupportsImpl.h" +#include "nsISupportsUtils.h" +#include "nsIClassInfo.h" +#include "nsIFile.h" +#include "nsIEnumerator.h" +#include "nsCOMPtr.h" + +#include "nsIServiceManager.h" +#include "nsIServiceManagerObsolete.h" +#include "nsIComponentManagerObsolete.h" +#include "nsIComponentManager.h" +#include "nsIFactory.h" +#include "nsIMemory.h" +#include "nsIOutputStream.h" +#include "nsIRequestObserver.h" +#include "nsIStreamListener.h" +#include "nspluginroot.h" +#include "nsplugindefs.h" +#include "nsIPlugin.h" +#include "nsIPluginManager.h" +#include "nsIEventHandler.h" +#include "nsIPluginManager2.h" +#include "nsIPluginStreamInfo.h" +#include "nsIPluginStreamListener.h" +#include "nsIPluginInstance.h" +#include "nsIPluginInstancePeer.h" +#include "nsIPluginInstancePeer2.h" +#include "nsIPluginTagInfo.h" +#include "nsIPluginTagInfo2.h" +#include "nsICookieStorage.h" +#include "nsIHTTPHeaderListener.h" + +#include "nsIJRIPlugin.h" +#include "nsIJVMPluginInstance.h" +#include "nsIJVMManager.h" +#include "nsIJVMWindow.h" +#include "nsIJVMConsole.h" +#include "nsISerializable.h" +#include "nsIPrincipal.h" +#include "nsIJVMPlugin.h" +#include "nsIJVMPluginTagInfo.h" +#include "nsIJVMPrefsWindow.h" +#include "nsILiveConnectManager.h" +#include "nsISecurityContext.h" +#include "nsILiveConnect.h" +#include "nsISecureLiveConnect.h" +#include "nsISecureEnv.h" +#include "nsISymantecDebugger.h" +#include "nsISymantecDebugManager.h" +#include "nsIJVMThreadManager.h" +#include "nsIRunnable.h" +#include "nsIJVMConsole.h" + +#include "nsILoadGroup.h" +#include "nsIInterfaceRequestor.h" + +#ifdef IPLUGINW_OUTOFTREE +#include "nsStringDefines.h" +#include "nsStringFwd.h" +#include "nsBufferHandle.h" +#include "nsStringIteratorUtils.h" +#include "nsCharTraits.h" +#include "nsStringFragment.h" +#include "nsCharTraits.h" +#include "nsStringTraits.h" +#include "nsAlgorithm.h" +#include "nsStringIterator.h" +#include "nsAString.h" +#endif +#include "domstubs.h" +#include "nsIDOM3Node.h" +#include "nsIDOMNode.h" +#include "nsIDOMElement.h" + +#include "prlink.h" + +#include "nsInnoTekPluginWrapper.h" + +#include "wrap_XPCOM_3rdparty.h" +#include "wrap_VFTs.h" + + +/******************************************************************************* +* Defined Constants And Macros * +*******************************************************************************/ +/** Define DO_EXTRA_FAILURE_HANDLING and we'll zero some return buffers. */ +#define DO_EXTRA_FAILURE_HANDLING + +/** Breakpoing macro */ +#ifdef __IBMCPP__ +# define BREAK_POINT() __interrupt(3) +#else +# define BREAK_POINT() asm("int $3") +#endif + +/** Global breakpoint trigger. */ +#ifdef DEBUG +# define DEBUG_GLOBAL_BREAKPOINT(cond) do { if (gfGlobalBreakPoint && (cond)) BREAK_POINT(); } while (0) +#else +# define DEBUG_GLOBAL_BREAKPOINT(cond) do {} while (0) +#endif + +/** Function define to use. */ +#ifdef __IBMCPP__ +#define XPFUNCTION __FUNCTION__ +#else +#define XPFUNCTION __PRETTY_FUNCTION__ +#endif + +/** Function name variable. */ +#ifdef DEBUG +# define DEBUG_FUNCTIONNAME() static const char *pszFunction = XPFUNCTION +#else +# define DEBUG_FUNCTIONNAME() do {} while (0) +#endif + + +/** Creates a 'safe' VFT, meaning we add a bunch of empty entries at the end + * of the VFT just in case someone is trying to access them. + */ +#define MAKE_SAFE_VFT(VFTType, name) \ + const struct VFTType##WithPaddings \ + { \ + const VFTType vft; \ + unsigned aulNulls[10]; \ + } name = { + +/** The NULL padding of the safe VFT. */ +//#define SAFE_VFT_ZEROS() 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +#define SAFE_VFT_ZEROS() ,{ 0x81000001, 0x81000002, 0x81000003, 0x81000004, \ + 0x81000005, 0x81000006, 0x81000007, 0x81000008, 0x81000009, 0x8100000a} } + + +/** dprintf a nsID structure (reference to such). */ +#define DPRINTF_NSID(refID) \ + if (VALID_REF(refID)) \ + dprintf(("%s: %s={%08x,%04x,%04x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x} %s (%p)", \ + pszFunction, #refID, (refID).m0, (refID).m1, (refID).m2, (refID).m3[0], (refID).m3[1], \ + (refID).m3[2], (refID).m3[3], (refID).m3[4], (refID).m3[5], (refID).m3[6], (refID).m3[7], \ + getIIDCIDName(refID), &(refID))); \ + else \ + dprintf(("%s: %s=%p (illegal pointer!!!)", pszFunction, #refID, &(refID))) + +/** dprintf a contract ID. */ +#define DPRINTF_CONTRACTID(pszContractID) \ + DPRINTF_STR(pszContractID) + +/** safely dprintf a string. */ +#define DPRINTF_STR(pszStr) \ + do \ + { \ + if (VALID_PTR(pszStr)) \ + dprintf(("%s: %s='%s' (%p)", pszFunction, #pszStr, pszStr, pszStr)); \ + else if (pszStr) \ + dprintf(("%s: %s=%p (illegal pointer!!!)", pszFunction, #pszStr, pszStr));\ + else \ + dprintf(("%s: %s=", pszFunction, #pszStr)); \ + } while (0) + +/** safely dprintf a string, if it's NULL it will be ignored. */ +#define DPRINTF_STRNULL(pszStr) \ + do \ + { \ + if (VALID_PTR(pszStr)) \ + dprintf(("%s: %s='%s' (%p)", pszFunction, #pszStr, pszStr, pszStr)); \ + else if (pszStr) \ + dprintf(("%s: %s=%p (illegal pointer!!!)", pszFunction, #pszStr, pszStr)); \ + } while (0) + + +/** Debugging thing for stack corruption. */ +#if defined(DEBUG) && 0 +#define DEBUG_STACK_ENTER() \ + void * pvStackGuard = memset(alloca(sizeof(achDebugStack)), 'k', sizeof(achDebugStack)) +#else +#define DEBUG_STACK_ENTER() do {} while (0) +#endif + +/** Debugging thing for stack corruption. */ +#if defined(DEBUG) && 0 +static char achDebugStack[0x1000]; +#define DEBUG_STACK_LEAVE() \ + do { \ + if (achDebugStack[0] != 'k') \ + memset(achDebugStack, 'k', sizeof(achDebugStack)); \ + if (memcmp(achDebugStack, pvStackGuard, sizeof(achDebugStack))) \ + { \ + dprintf(("%s: ARRRRRRRRRGGGGGGGGGGG!!!!!!!! Stack is f**ked !!!", pszFunction)); \ + DebugInt3(); \ + } \ + } while (0) +#else +#define DEBUG_STACK_LEAVE() do {} while (0) +#endif + + +/** Save the FPU control word. */ +#define SAVELOAD_FPU_CW(usNewCw) \ + unsigned short usSavedCw = _control87(usNewCw, 0xffff) + +/** Restore the FPU control word. */ +#define RESTORE_FPU_CW() \ + _control87(usSavedCw, 0xffff) + + +/** Make a interface pointer pMozI from a DOWNTHIS pointer. */ +#define DOWN_MAKE_pMozI(interface, pvDownThis) \ + interface *pMozI = (interface *)((PDOWNTHIS)pvDownThis)->pvThis + +/** Test and assert that the down this pointer is valid. */ +#define DOWN_VALID(pvDownThis) \ + ( VALID_PTR(pvDownThis) \ + && !memcmp(&((PDOWNTHIS)(pvDownThis))->achMagic[0], gszDownMagicString, sizeof(gszDownMagicString)) ) + +/** Validate the down this pointer, complaing and returning error code if invalid. */ +#define DOWN_VALIDATE_RET(pvDownThis) \ + if (!DOWN_VALID(pvDownThis)) \ + { \ + dprintf(("%s: invalid this pointer %p!", pszFunction, pvDownThis)); \ + DebugInt3(); \ + DOWN_TRACE_LEAVE_INT(pvDownThis, NS_ERROR_INVALID_POINTER); \ + return NS_ERROR_INVALID_POINTER; \ + } + +/** Validate the down this pointer, complaing and returning error code if invalid. */ +#define DOWN_VALIDATE_NORET(pvDownThis) \ + if (!DOWN_VALID(pvDownThis)) \ + { \ + dprintf(("%s: invalid this pointer %p!", pszFunction, pvDownThis)); \ + DebugInt3(); \ + } + + +/** Enter a DOWN worker. */ +#define DOWN_TRACE_ENTER(pvDownThis) \ + dprintf(("%s: enter this=%p (down)", pszFunction, pvDownThis)); + +/** Default DOWN enter code. */ +#define DOWN_ENTER(pvDownThis, interface) \ + DEBUG_STACK_ENTER(); \ + DEBUG_FUNCTIONNAME(); \ + DOWN_TRACE_ENTER(pvDownThis); \ + DOWN_VALIDATE_RET(pvDownThis); \ + DOWN_MAKE_pMozI(interface, pvDownThis); \ + DEBUG_GLOBAL_BREAKPOINT(1); + +/** No-return DOWN enter code. */ +#define DOWN_ENTER_NORET(pvDownThis, interface) \ + DEBUG_STACK_ENTER(); \ + DEBUG_FUNCTIONNAME(); \ + DOWN_TRACE_ENTER(pvDownThis); \ + DOWN_VALIDATE_NORET(pvDownThis); \ + DOWN_MAKE_pMozI(interface, pvDownThis); \ + DEBUG_GLOBAL_BREAKPOINT(1); + +/** Default DOWN enter code, with default rc declaration. */ +#define DOWN_ENTER_RC(pvDownThis, interface) \ + DOWN_ENTER(pvDownThis, interface); \ + nsresult rc = NS_ERROR_UNEXPECTED + + +/** Leave a DOWN worker. */ +#define DOWN_TRACE_LEAVE(pvDownThis) \ + dprintf(("%s: leave this=%p (down)", pszFunction, pvDownThis)) + +/** Leave a DOWN worker with INT rc. */ +#define DOWN_TRACE_LEAVE_INT(pvDownThis, rc) \ + dprintf(("%s: leave this=%p rc=%x (down)", pszFunction, pvDownThis, rc)) + +/** Leave a DOWN worker. */ +#define DOWN_LEAVE(pvDownThis) \ + DOWN_TRACE_LEAVE(pvDownThis); \ + DEBUG_GLOBAL_BREAKPOINT(1); \ + DEBUG_STACK_LEAVE(); + +/** Leave a DOWN worker with INT rc. */ +#define DOWN_LEAVE_INT(pvDownThis, rc) \ + DOWN_TRACE_LEAVE_INT(pvDownThis, rc); \ + DEBUG_GLOBAL_BREAKPOINT(1); \ + DEBUG_STACK_LEAVE(); + +/** Magic string. */ +#define DOWN_MAGIC_STRING "DownMagicString" + +/** Lock the down list. */ +#define DOWN_LOCK() downLock() + +/** UnLock the down list. */ +#define DOWN_UNLOCK() downUnLock() + + +/** Validates a UP object. */ +#define UP_VALID() \ + (*(void**)mpvThis == mpvVFTable) + +/** Validates a UP object and returns NS_ERROR_UNEXPECTED if invalid. */ +#define UP_VALIDATE_RET() \ + if (*(void**)mpvThis != mpvVFTable) \ + { \ + dprintf(("%s: invalid object!!! VFTable entery have changed! %x != %x", \ + pszFunction, *(void**)mpvThis, mpvVFTable)); \ + DebugInt3(); \ + return NS_ERROR_UNEXPECTED; \ + } + +/** Enter a UP worker. */ +#define UP_TRACE_ENTER() \ + dprintf(("%s: enter this=%p (up)", pszFunction, mpvThis)); + + +/** Default UP enter code. */ +#define UP_ENTER__(fGDB) \ + DEBUG_FUNCTIONNAME(); \ + UP_TRACE_ENTER(); \ + DEBUG_GLOBAL_BREAKPOINT(fGDB) + +/** Default UP enter code with default rc declaration. */ +#define UP_ENTER_RC__(fGDB) \ + DEBUG_FUNCTIONNAME(); \ + UP_TRACE_ENTER(); \ + nsresult rc = NS_ERROR_UNEXPECTED; \ + UP_VALIDATE_RET(); \ + DEBUG_GLOBAL_BREAKPOINT(fGDB) + + +/** Default UP enter code. */ +#define UP_ENTER() \ + UP_ENTER__(1) + +/** Default UP enter code - no global breakpoint. */ +#define UP_ENTER_NODBGBRK() \ + UP_ENTER__(0) + +/** Default UP enter code, with default rc declaration. */ +#define UP_ENTER_RC() \ + UP_ENTER_RC__(1) + +/** Default UP enter code, with default rc declaration - no global breakpoint. */ +#define UP_ENTER_RC_NODBGBRK() \ + UP_ENTER_RC__(0) + + + +/** Leave a UP worker. */ +#define UP_TRACE_LEAVE() \ + dprintf(("%s: leave this=%p (up)", pszFunction, mpvThis)); + +/** Leave a UP worker with INT rc. */ +#define UP_TRACE_LEAVE_INT(rc) \ + dprintf(("%s: leave this=%p rc=%x (up)", pszFunction, mpvThis, rc)); + + +/** Leave a UP worker. */ +#define UP_LEAVE() \ + UP_TRACE_LEAVE(); \ + DEBUG_GLOBAL_BREAKPOINT(1); \ + DEBUG_STACK_LEAVE() + +/** Leave a UP worker with INT rc. */ +#define UP_LEAVE_INT(rc) \ + UP_TRACE_LEAVE_INT(rc); \ + DEBUG_GLOBAL_BREAKPOINT(1); \ + DEBUG_STACK_LEAVE() + +/** Leave a UP worker with INT rc. */ +#define UP_LEAVE_INT_NODBGBRK(rc) \ + UP_TRACE_LEAVE_INT(rc); \ + DEBUG_STACK_LEAVE() + +/** Implements the nsISupports Interface. */ +#define UP_IMPL_NSISUPPORTS() \ + NS_IMETHOD QueryInterface(REFNSIID aIID, void **aInstancePtr) { return hlpQueryInterface(aIID, aInstancePtr); } \ + NS_IMETHOD_(nsrefcnt) AddRef(void) { return hlpAddRef(); } \ + NS_IMETHOD_(nsrefcnt) Release(void) { return hlpRelease(); } \ + // + +/** Implements the nsISupports Interface. */ +#define UP_IMPL_NSISUPPORTS_NOT_RELEASE() \ + NS_IMETHOD QueryInterface(REFNSIID aIID, void **aInstancePtr) { return hlpQueryInterface(aIID, aInstancePtr); } \ + NS_IMETHOD_(nsrefcnt) AddRef(void) { return hlpAddRef(); } \ + // + +/** Implements the nsIFactory Interface. */ +#define UP_IMPL_NSIFACTORY() \ + NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & aIID, void * *result) \ + { return hlpCreateInstance(aOuter, aIID, result); } \ + NS_IMETHOD LockFactory(PRBool lock) \ + { return hlpLockFactory(lock); } \ + // + +/** Implements the nsIJVMWindow Interface. */ +#define UP_IMPL_NSIJVMWINDOW() \ + NS_IMETHOD Show(void) \ + { return hlpShow(); } \ + NS_IMETHOD Hide(void) \ + { return hlpHide(); } \ + NS_IMETHOD IsVisible(PRBool *result) \ + { return hlpIsVisible(result); } \ + // + +/** Implements the nsIPluginInstnacePeer Interface. */ +#define UP_IMPL_NSIPLUGININSTANCEPEER() \ + NS_IMETHOD GetValue(nsPluginInstancePeerVariable aVariable, void * aValue) \ + { return hlpGetValue(aVariable, aValue); } \ + NS_IMETHOD GetMIMEType(nsMIMEType *aMIMEType) \ + { return hlpGetMIMEType(aMIMEType); } \ + NS_IMETHOD GetMode(nsPluginMode *aMode) \ + { return hlpGetMode(aMode); } \ + NS_IMETHOD NewStream(nsMIMEType aType, const char *aTarget, nsIOutputStream **aResult) \ + { return hlpNewStream(aType, aTarget, aResult); } \ + NS_IMETHOD ShowStatus(const char *aMessage) \ + { return hlpShowStatus(aMessage); } \ + NS_IMETHOD SetWindowSize(PRUint32 aWidth, PRUint32 aHeight) \ + { return hlpSetWindowSize(aWidth, aHeight); } \ + // + +/** Implements the nsIRequestObserver Interface. */ +#define UP_IMPL_NSIREQUESTOBSERVER() \ + NS_IMETHOD OnStartRequest(nsIRequest *aRequest, nsISupports *aContext) \ + { return hlpOnStartRequest(aRequest, aContext); } \ + NS_IMETHOD OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode) \ + { return hlpOnStopRequest(aRequest, aContext, aStatusCode); } \ + // + +/** Implements the nsIRequest Interface. */ +#define UP_IMPL_NSIREQUEST() \ + NS_IMETHOD GetName(nsACString & aName) \ + { return hlpGetName(aName); } \ + NS_IMETHOD IsPending(PRBool *_retval) \ + { return hlpIsPending(_retval); } \ + NS_IMETHOD GetStatus(nsresult *aStatus) \ + { return hlpGetStatus(aStatus); } \ + NS_IMETHOD Cancel(nsresult aStatus) \ + { return hlpCancel(aStatus); } \ + NS_IMETHOD Suspend(void) \ + { return hlpSuspend(); } \ + NS_IMETHOD Resume(void) \ + { return hlpResume(); } \ + NS_IMETHOD GetLoadGroup(nsILoadGroup * *aLoadGroup) \ + { return hlpGetLoadGroup(aLoadGroup); } \ + NS_IMETHOD SetLoadGroup(nsILoadGroup * aLoadGroup) \ + { return hlpSetLoadGroup(aLoadGroup); } \ + NS_IMETHOD GetLoadFlags(nsLoadFlags *aLoadFlags) \ + { return hlpGetLoadFlags(aLoadFlags); } \ + NS_IMETHOD SetLoadFlags(nsLoadFlags aLoadFlags) \ + { return hlpSetLoadFlags(aLoadFlags); } \ + // + +/** Clears a java value. */ +#if 1 +#define ZERO_JAVAVALUE(value, type) memset(&value, 0, sizeof(jvalue)) +#else +#define ZERO_JAVAVALUE(value, type) \ + do \ + { \ + switch (type) \ + { \ + case jobject_type: (value).l = 0; break; \ + case jboolean_type: (value).z = 0; break; \ + case jbyte_type: (value).b = 0; break; \ + case jchar_type: (value).c = 0; break; \ + case jshort_type: (value).s = 0; break; \ + case jint_type: (value).i = 0; break; \ + case jlong_type: (value).j = 0; break; \ + case jfloat_type: (value).f = 0; break; \ + case jdouble_type: (value).d = 0; break; \ + } \ + } while (0) +#endif + + + +/******************************************************************************* +* Structures and Typedefs * +*******************************************************************************/ +/* forward references */ +struct DownThis; +class UpWrapperBase; + +/** + * Linked list node. + */ +typedef struct WrapperNode +{ + /** Wrapper type. */ + enum enmWrapperType + { enmDown, enmUp } + enmType; + + /** Next */ + volatile struct WrapperNode *pNext; + + /** The this pointer they're wrapping. */ + void *pvThis; + + /** Pointer to the wrapper. */ + union WrapperPointer + { + struct DownThis * pDown; + UpWrapperBase * pUp; + } u; +} WNODE, *PWNODE; + + +/** + * What the pvThis pointer points at when the plugin calls back thru a 'down' + * wrapper. (This is a struct really and I don't care that it's not proper C++.) + */ +typedef struct DownThis +{ + /** @name Public Data + * @{ + */ + /** Pointer to virtual function table. */ + const void * pvVFT; + + /** Some zero padding. (paranoia) */ +#ifdef DEBUG + char achZeros[12 + 256]; +#else + char achZeros[12 + 16]; +#endif + + /** Pointer to the original class. */ + void * pvThis; + + /** Magic */ + char achMagic[16]; + + /** Next pointer */ + volatile struct DownThis * pNext; + //@} + + /** + * Initalize the struct. + */ + inline void initialize(void *zpvThis, const void *zpvVFT) + { + this->pvVFT = zpvVFT; + memset(&achZeros[0], 0, sizeof(achZeros)); + for (unsigned i = 0; i < sizeof(achZeros) / sizeof(unsigned); i += sizeof(unsigned)) + achZeros[i] = 0xC0000000 | i; + this->pvThis = zpvThis; + memcpy(achMagic, DOWN_MAGIC_STRING, sizeof(achMagic)); + } +} DOWNTHIS, *PDOWNTHIS; + + +/******************************************************************************* +* Global Variables * +*******************************************************************************/ +/** This variable is used to drag in XPCOM in the linking of a primary wrapper. */ +int giXPCOM; + +/** Global flag for triggering breakpoing on enter and leave of wrapper methods. + * DEBUG ONLY for use in the Debugger. + */ +#ifdef DEBUG +int gfGlobalBreakPoint = FALSE; +#endif + +/** @name Constants + * @{ + */ +/** Magic of the DOWNTHIS structure. */ +const char gszDownMagicString[16] = DOWN_MAGIC_STRING; +//@} + + +/** Down Wrapper List. + * Protected by gmtxDown. + */ +volatile struct DownThis * gpDownHead = NULL; + +/** Down Wrapper Mutex. */ +HMTX ghmtxDown = NULLHANDLE; + + +/* + * Include the IDs and make them materialize here. + * Include twice to get the right definition. + */ +#include "moz_IDs_Generated.h" +#undef NP_DEF_ID +#define NP_DEF_ID NS_DEFINE_IID +#define NP_INCL_LOOKUP +#include "moz_IDs_Generated.h" + + +/******************************************************************************* +* Internal Functions * +*******************************************************************************/ +const void * downIsSupportedInterface(REFNSIID aIID); +nsresult downCreateWrapper(void **ppvResult, const void *pvVFT, nsresult rc); +nsresult downCreateWrapper(void **ppvResult, REFNSIID aIID, nsresult rc); +void downLock(void); +void downUnLock(void); +BOOL upIsSupportedInterface(REFNSIID aIID); +nsresult upCreateWrapper(void **ppvResult, REFNSIID aIID, nsresult rc); +int downCreateJNIEnvWrapper(JNIEnv **ppJNIEnv, int rc); +int upCreateJNIEnvWrapper(JNIEnv **ppJNIEnv, int rc); +void verifyAndFixUTF8String(const char *pszString, const char *pszFunction); + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP Base Classes +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * Base class for all 'up' wrappers - meaning up to mozilla. + */ +class UpWrapperBase +{ +protected: + /** This pointer of the Win32 object. */ + void * mpvThis; + + /** This pointer of the Win32 class vftable. + * This is actually an duplicate but it's ok for the purpose of list key. */ + void * mpvVFTable; + + /** Interface ID. Also needed for the list stuff.*/ + REFNSIID miid; + + /** Pointer to the interface we implement. + * This is kind of required to get the right pointer when searching existing + * wrappers without having to perform a bunch of stupid IID compares to find + * the proper casing. (C++ rulez!) + */ + void * mpvInterface; + + /** Next wrapper */ + volatile UpWrapperBase * mpNext; + + /** List of UP wrappers. + * Protected by hmtx. + */ + static volatile UpWrapperBase * mpHead; + + /** Our The mutex protecting this wrapper list. */ + static HMTX mhmtx; + + +protected: + /** + * Constructor. + * + * @param pvThis Pointer to the Win32 class. + * @param pvInterface Pointer to the interface we implement. Meaning + * what's returned on a query interface. + * @param iid The Interface ID of the wrapped interface. + */ + UpWrapperBase(void *pvThis, void *pvInterface, REFNSIID iid) : + mpvThis(pvThis), mpvVFTable(*(void**)pvThis), miid(iid), mpvInterface(pvInterface), mpNext(NULL) + { + } +public: + /** + * Destructor. + */ + virtual ~UpWrapperBase() + { + } + + + /** + * Inserts the wrapper into the linked list of wrappers. + * We hold the lock at entry. + */ + void upInsertWrapper(void) + { + mpNext = mpHead; + mpHead = this; + } + + + /** + * Remove this wrapper from the linked list. + * We hold the lock at entry. + * @returns 1 if successfully removed it. + * @returns 0 on failure. + */ + int upRemoveWrapper(void) + { + int fUnchained; + UpWrapperBase * pUp, *pUpPrev; + for (pUp = (UpWrapperBase*)mpHead, pUpPrev = NULL, fUnchained = 0; + pUp; + pUpPrev = pUp, pUp = (UpWrapperBase*)pUp->mpNext) + { + if (pUp->mpvThis == mpvThis) + { + if (pUpPrev) + pUpPrev->mpNext = pUp->mpNext; + else + mpHead = pUp->mpNext; + + #ifdef DEBUG + /* paranoid as always */ + if (fUnchained) + { + dprintf(("upRemoveWrapper: this=%x is linked twice !!!", this)); + DebugInt3(); + } + fUnchained = 1; + #else + fUnchained = 1; + break; + #endif + } + } + + if (fUnchained) + this->mpNext = NULL; + return fUnchained; + } + + + /** + * Gets the interface pointer. + */ + void * getInterfacePointer() + { + return mpvInterface; + } + + /** + * Gets the Win32 this pointer. + */ + void * getThis() + { + return mpvThis; + } + + /** + * Gets the Win32 VFT pointer. + */ + void * getVFT() + { + return mpvVFTable; + } + + /** + * Locks the linked list of up wrappers. + */ + static void upLock(void) + { + DEBUG_FUNCTIONNAME(); + + if (!mhmtx) + { + int rc = DosCreateMutexSem(NULL, &mhmtx, 0, TRUE); + if (rc) + { + dprintf(("%s: DosCreateMutexSem failed with rc=%d.", pszFunction, rc)); + ReleaseInt3(0xdeadbee1, 0xe000, rc); + } + } + else + { + int rc = DosRequestMutexSem(mhmtx, SEM_INDEFINITE_WAIT); + if (rc) + { + dprintf(("%s: DosRequestMutexSem failed with rc=%d.", pszFunction, rc)); + ReleaseInt3(0xdeadbee1, 0xe001, rc); + } + //@todo handle cases with the holder dies. + } + } + + /** + * Unlocks the linked list of up wrappers. + */ + static void upUnLock() + { + DEBUG_FUNCTIONNAME(); + + int rc = DosReleaseMutexSem(mhmtx); + if (rc) + { + dprintf(("%s: DosRequestMutexSem failed with rc=%d.", pszFunction, rc)); + ReleaseInt3(0xdeadbee1, 0xe002, rc); + } + //@todo handle cases with the holder dies. + } + + /** + * Try find an existing wrapper. + * + * The list is locked on entry and exit. + * + * @returns Pointer to existing wrapper if found. + * @returns NULL if not found. + * @param pvThis Pointer to the Win32 class. + * @param iid The Interface ID of the wrapped interface. + */ + static UpWrapperBase * findUpWrapper(void *pvThis, REFNSIID iid) + { + DEBUG_FUNCTIONNAME(); + + /* + * Walk the list and look... + */ + for (UpWrapperBase * pUp = (UpWrapperBase*)mpHead; pUp; pUp = (UpWrapperBase*)pUp->mpNext) + if (pUp->mpvThis == pvThis) + { + if (pUp->mpvVFTable == *((void**)pvThis)) + { + if (iid.Equals(pUp->miid) || iid.Equals(kSupportsIID)) + { + dprintf(("%s: Found existing UP wrapper %p/%p for %p.", + pszFunction, pUp, pUp->mpvInterface, pvThis)); + return pUp; + } + else + { + dprintf(("%s: Found wrapper %p/%p for %p, but iid's wasn't matching.", + pszFunction, pUp, pUp->getInterfacePointer(), pvThis)); + DPRINTF_NSID(iid); + DPRINTF_NSID(pUp->miid); + } + } + else + { + dprintf(("%s: Seems like an object have been release and reused again... (pvThis=%x)", + pszFunction, pvThis)); + /* + * This happens with the IBM java. + * I think we safely can remove this wrapper and reuse it. + */ + if (pUp->upRemoveWrapper()) + pUp = (UpWrapperBase*)mpHead; + } + } + + + /** @todo remove from list and such. */ + return NULL; + } + + /** + * Try find an existing up wrapper before creating a down wrapper. + * + * See findDownWrapper() for explanation. + * + * @returns Pointer to existing wrapper if found. + * @returns NULL if not found. + * @param pvThis Pointer to the Mozilla interface object which + * may actually be an UpWrapperBase pointer. + */ + static void * findUpWrapper(void *pvThis) + { + DEBUG_FUNCTIONNAME(); + + /* + * Walk the list and look. + */ + upLock(); + for (UpWrapperBase * pUp = (UpWrapperBase *)mpHead; pUp; pUp = (UpWrapperBase *)pUp->mpNext) + if ((void*)pUp == pvThis) + { + void *pvRet = pUp->mpvThis; + upUnLock(); + dprintf(("%s: pvThis(=%x) was pointing to an up wrapper. Returning pointer to real object(=%x)", + pszFunction, pvThis, pvRet)); + return pvRet; + } + upUnLock(); + + /* No luck... */ + return NULL; + } + + + + /** + * Try find an down wrapper for the desired up wrapper. + * + * This is the first thing we'll try when creating an up wrapper. The + * object might actually have been created by mozilla and is sent down + * to the plugin, like the nsIPluginInstancePeer, and is later queried + * by mozilla. It is inefficient to wrap the object twice, also it's + * potentially dangerous to do so. + * + * @returns Pointer to real object if it was sent down. + * @returns NULL if not found. + * @param pvThis Pointer to the Win32 class. + */ + static void * findDownWrapper(void *pvThis) + { + DEBUG_FUNCTIONNAME(); + + /* + * Walk the list and look. + */ + DOWN_LOCK(); + for (PDOWNTHIS pDown = (PDOWNTHIS)gpDownHead; pDown; pDown = (PDOWNTHIS)pDown->pNext) + if (pDown == pvThis) + { + void *pvRet = pDown->pvThis; + DOWN_UNLOCK(); + dprintf(("%s: pvThis(=%x) was pointing to a down wrapper. Returning pointer to real object(=%x)", + pszFunction, pvThis, pvRet)); + return pvRet; + } + DOWN_UNLOCK(); + + /* No luck... */ + return NULL; + } + +}; + +volatile UpWrapperBase * UpWrapperBase::mpHead = NULL; +HMTX UpWrapperBase::mhmtx = NULLHANDLE; + + + +/** + * This class implements helpers for the nsISupports interface. + * + * Because of the way C++ treats multiple inheritance we cannot implement + * nsISupports here and inherit the implementation automagically when + * wrapping an interface subclassing nsISupports. Therefore we implement + * helpers here with different names which can be called from the subclasses. + */ +class UpSupportsBase : public UpWrapperBase +{ +protected: + /** + * Constructor. + * + * @param pvThis Pointer to the Win32 class. + * @param pvInterface Pointer to the interface we implement. Meaning + * what's returned on a query interface. + * @param iid The Interface ID of the wrapped interface. + */ + UpSupportsBase(void *pvThis, void *pvInterface, REFNSIID iid) : + UpWrapperBase(pvThis, pvInterface, iid) + { + } + + /** + * A run time mechanism for interface discovery. + * @param aIID [in] A requested interface IID + * @param aInstancePtr [out] A pointer to an interface pointer to + * receive the result. + * @return NS_OK if the interface is supported by the associated + * instance, NS_NOINTERFACE if it is not. + * NS_ERROR_INVALID_POINTER if aInstancePtr is NULL. + */ + nsresult hlpQueryInterface(REFNSIID aIID, void **aInstancePtr) + { + UP_ENTER_RC_NODBGBRK(); + DPRINTF_NSID(aIID); + + rc = VFTCALL2((VFTnsISupports*)mpvVFTable, QueryInterface, mpvThis, aIID, aInstancePtr); + rc = upCreateWrapper(aInstancePtr, aIID, rc); + + UP_LEAVE_INT_NODBGBRK(rc); + return rc; + } + + /** + * Increases the reference count for this interface. + * The associated instance will not be deleted unless + * the reference count is returned to zero. + * + * @return The resulting reference count. + */ + nsrefcnt hlpAddRef() + { + UP_ENTER_NODBGBRK(); + nsrefcnt c = 0; + if (UP_VALID()) + c = VFTCALL0((VFTnsISupports*)mpvVFTable, AddRef, mpvThis); + else + { + dprintf(("%s: Invalid object!", pszFunction)); + DebugInt3(); + } + UP_LEAVE_INT_NODBGBRK(c); + return c; + } + + /** + * Decreases the reference count for this interface. + * Generally, if the reference count returns to zero, + * the associated instance is deleted. + * + * @return The resulting reference count. + */ + nsrefcnt hlpRelease() + { + UP_ENTER_NODBGBRK(); + nsrefcnt c = 0; + if (UP_VALID()) + { + c = VFTCALL0((VFTnsISupports*)mpvVFTable, Release, mpvThis); + if (!c) + { + dprintf(("%s: the reference count is zero! Delete this wrapper", pszFunction)); + /* (This is prohibitted by german law I think, suicide that is.) */ + UP_LEAVE_INT_NODBGBRK(0); /* exit odin context *first* */ + + #ifdef DO_DELETE + /* + * First unchain this object. + */ + upLock(); + if (upRemoveWrapper()) + { + upUnLock(); + /** @todo Make a list of wrapper which is scheduled for lazy destruction. + * We can then easily check if we get a call to a dead object. + */ + delete this; + } + else + { + upUnLock(); + /* + * Allready unchained? This shouldn't ever happen... + * The only possible case is that two threads calls hlpRelease() + * a the same time. So, we will *not* touch this node now. + */ + dprintf(("%s: pvThis=%p not found in the list !!!!", pszFunction, mpvThis)); + DebugInt3(); + } + #endif + return 0; + } + } + else + { + dprintf(("%s: Invalid object!", pszFunction)); + DebugInt3(); + } + UP_LEAVE_INT_NODBGBRK(c); + return c; + } +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsISupports +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * nsISupports wrapper. + * @remark No, you are NOT gonna inherit anything from this. Use UpSupportsBase. + */ +class UpSupports : public nsISupports, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + /** + * Constructor + */ + UpSupports(void *pvThis) : + UpSupportsBase(pvThis, (nsISupports*)this, kSupportsIID) + { + } +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIFactory +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +class UpFactoryBase : public UpSupportsBase +{ +protected: + /** + * Creates an instance of a component. + * + * @param aOuter Pointer to a component that wishes to be aggregated + * in the resulting instance. This will be nsnull if no + * aggregation is requested. + * @param iid The IID of the interface being requested in + * the component which is being currently created. + * @param result [out] Pointer to the newly created instance, if successful. + * @return NS_OK - Component successfully created and the interface + * being requested was successfully returned in result. + * NS_NOINTERFACE - Interface not accessible. + * NS_ERROR_NO_AGGREGATION - if an 'outer' object is supplied, but the + * component is not aggregatable. + * NS_ERROR* - Method failure. + */ + /* void createInstance (in nsISupports aOuter, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */ + NS_IMETHOD hlpCreateInstance(nsISupports *aOuter, const nsIID & aIID, void * *result) + { + UP_ENTER_RC(); + DPRINTF_NSID(aIID); + + /* + * Supported interface requested? + */ + if (upIsSupportedInterface(aIID)) + { + /* + * Wrap the outer. + */ + nsISupports * pDownOuter = aOuter; + rc = downCreateWrapper((void**)&pDownOuter, downIsSupportedInterface(kSupportsIID), NS_OK); + if (rc == NS_OK) + { + rc = VFTCALL3((VFTnsIFactory*)mpvVFTable, CreateInstance, mpvThis, pDownOuter, aIID, result); + rc = upCreateWrapper(result, aIID, rc); + } + else + { + dprintf(("%s: downCreateWrapper failed for nsISupports/aOuter. rc=%x", pszFunction, rc)); + DebugInt3(); + } + } + else + { + dprintf(("%s: Unsupported interface!!!", pszFunction)); + rc = NS_NOINTERFACE; + ReleaseInt3(0xbaddbeef, 7, aIID.m0); + } + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * LockFactory provides the client a way to keep the component + * in memory until it is finished with it. The client can call + * LockFactory(PR_TRUE) to lock the factory and LockFactory(PR_FALSE) + * to release the factory. + * + * @param lock - Must be PR_TRUE or PR_FALSE + * @return NS_OK - If the lock operation was successful. + * NS_ERROR* - Method failure. + */ + /* void lockFactory (in PRBool lock); */ + NS_IMETHOD hlpLockFactory(PRBool lock) + { + UP_ENTER_RC(); + dprintf(("%s: lock=%d", pszFunction, lock)); + rc = VFTCALL1((VFTnsIFactory*)mpvVFTable, LockFactory, mpvThis, lock); + UP_LEAVE_INT(rc); + return rc; + } + + + /** Constructor. */ + UpFactoryBase(void *pvThis, void *pvInterface, REFNSIID iid = kFactoryIID) : + UpSupportsBase(pvThis, pvInterface, iid) + { + } + +}; + +/** + * nsIFactory wrapper. + */ +class UpFactory : public nsIFactory, public UpFactoryBase +{ +public: + UP_IMPL_NSISUPPORTS(); + UP_IMPL_NSIFACTORY(); + + + /** Constructor. */ + UpFactory(void *pvThis) : + UpFactoryBase(pvThis, (nsIFactory*)this, kFactoryIID) + { + } +}; + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIPlugin +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * nsIPlugin wrapper. + */ +class UpPlugin : public nsIPlugin, public UpFactoryBase +{ +public: + UP_IMPL_NSISUPPORTS(); + UP_IMPL_NSIFACTORY(); + + /** + * Creates a new plugin instance, based on a MIME type. This + * allows different impelementations to be created depending on + * the specified MIME type. + */ + /* void createPluginInstance (in nsISupports aOuter, in nsIIDRef aIID, in string aPluginMIMEType, [iid_is (aIID), retval] out nsQIResult aResult); */ + NS_IMETHOD CreatePluginInstance(nsISupports *aOuter, const nsIID & aIID, const char *aPluginMIMEType, void * *aResult) + { + UP_ENTER_RC(); + DPRINTF_NSID(aIID); + DPRINTF_STR(aPluginMIMEType); + + /* + * Supported interface requested? + */ + if (upIsSupportedInterface(aIID)) + { + /* + * Wrap the outer. + */ + nsISupports * pDownOuter = aOuter; + rc = downCreateWrapper((void**)&pDownOuter, downIsSupportedInterface(kSupportsIID), NS_OK); + if (rc == NS_OK) + { + rc = VFTCALL4((VFTnsIPlugin*)mpvVFTable, CreatePluginInstance, mpvThis, aOuter, aIID, aPluginMIMEType, aResult); + rc = upCreateWrapper(aResult, aIID, rc); + } + else + { + dprintf(("%s: downCreateWrapper failed for nsISupports/aOuter. rc=%x", pszFunction, rc)); + DebugInt3(); + } + } + else + { + dprintf(("%s: Unsupported interface!!!", pszFunction)); + rc = NS_NOINTERFACE; + ReleaseInt3(0xbaddbeef, 8, aIID.m0); + } + + UP_LEAVE_INT(rc); + return rc; + } + + + /** + * Initializes the plugin and will be called before any new instances are + * created. It is passed browserInterfaces on which QueryInterface + * may be used to obtain an nsIPluginManager, and other interfaces. + * + * @param browserInterfaces - an object that allows access to other browser + * interfaces via QueryInterface + * @result - NS_OK if this operation was successful + */ + /* void initialize (); */ + NS_IMETHOD Initialize(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIPlugin*)mpvVFTable, Initialize, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Called when the browser is done with the plugin factory, or when + * the plugin is disabled by the user. + * + * (Corresponds to NPP_Shutdown.) + * + * @result - NS_OK if this operation was successful + */ + /* void shutdown (); */ + NS_IMETHOD Shutdown(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIPlugin*)mpvVFTable, Shutdown, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Returns the MIME description for the plugin. The MIME description + * is a colon-separated string containg the plugin MIME type, plugin + * data file extension, and plugin name, e.g.: + * + * "application/x-simple-plugin:smp:Simple LiveConnect Sample Plug-in" + * + * (Corresponds to NPP_GetMIMEDescription.) + * + * @param aMIMEDescription - the resulting MIME description + * @result - NS_OK if this operation was successful + */ + /* void getMIMEDescription (out constCharPtr aMIMEDescription); */ + NS_IMETHOD GetMIMEDescription(const char * *aMIMEDescription) + { + //@todo TEXT: aMIMEDescription? Doesn't apply to java plugin, and probably not called by OS/2. + UP_ENTER_RC(); + dprintf(("%s: aMIMEDescription=%x", pszFunction, aMIMEDescription)); + rc = VFTCALL1((VFTnsIPlugin*)mpvVFTable, GetMIMEDescription, mpvThis, aMIMEDescription); + if (NS_SUCCEEDED(rc) && VALID_PTR(aMIMEDescription)) + DPRINTF_STR(*aMIMEDescription); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Returns the value of a variable associated with the plugin. + * + * (Corresponds to NPP_GetValue.) + * + * @param aVariable - the plugin variable to get + * @param aValue - the address of where to store the resulting value + * @result - NS_OK if this operation was successful + */ + /* void getValue (in nsPluginVariable aVariable, in voidPtr aValue); */ + NS_IMETHOD GetValue(nsPluginVariable aVariable, void * aValue) + { + UP_ENTER_RC(); + dprintf(("%s: aVariable=%d aValue=%x", pszFunction, aVariable, aValue)); + rc = VFTCALL2((VFTnsIPlugin*)mpvVFTable, GetValue, mpvThis, aVariable, aValue); + UP_LEAVE_INT(rc); + return rc; + } + + + /** + * Constructor + */ + UpPlugin(void *pvThis) : + UpFactoryBase(pvThis, (nsIPlugin*)this, kPluginIID) + { + } +}; + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIJVMPlugin +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +class UpJVMPlugin : public nsIJVMPlugin, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + // Causes the JVM to append a new directory to its classpath. + // If the JVM doesn't support this operation, an error is returned. + NS_IMETHOD AddToClassPath(const char* dirPath) + { + UP_ENTER_RC(); + DPRINTF_STR(dirPath); + rc = VFTCALL1((VFTnsIJVMPlugin*)mpvVFTable, AddToClassPath, mpvThis, dirPath); + UP_LEAVE_INT(rc); + return rc; + } + + // Causes the JVM to remove a directory from its classpath. + // If the JVM doesn't support this operation, an error is returned. + NS_IMETHOD RemoveFromClassPath(const char* dirPath) + { + UP_ENTER_RC(); + DPRINTF_STR(dirPath); + rc = VFTCALL1((VFTnsIJVMPlugin*)mpvVFTable, RemoveFromClassPath, mpvThis, dirPath); + UP_LEAVE_INT(rc); + return rc; + } + + // Returns the current classpath in use by the JVM. + NS_IMETHOD GetClassPath(const char* *result) + { + UP_ENTER_RC(); + dprintf(("%s: result=%p", pszFunction, result)); + rc = VFTCALL1((VFTnsIJVMPlugin*)mpvVFTable, GetClassPath, mpvThis, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + DPRINTF_STR(*result); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetJavaWrapper(JNIEnv* jenv, jint obj, jobject *jobj) + { + UP_ENTER_RC(); + dprintf(("%s: jenv=%p obj=%p jobj=%p", pszFunction, jenv, obj, jobj)); + rc = VFTCALL3((VFTnsIJVMPlugin*)mpvVFTable, GetJavaWrapper, mpvThis, jenv, obj, jobj); + if (NS_SUCCEEDED(rc) && VALID_PTR(jobj)) + dprintf(("%s: *jobj=%x", pszFunction, jobj)); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * This creates a new secure communication channel with Java. The second parameter, + * nativeEnv, if non-NULL, will be the actual thread for Java communication. + * Otherwise, a new thread should be created. + * @param proxyEnv the env to be used by all clients on the browser side + * @return outSecureEnv the secure environment used by the proxyEnv + */ + NS_IMETHOD CreateSecureEnv(JNIEnv* proxyEnv, nsISecureEnv* *outSecureEnv) + { + UP_ENTER_RC(); + dprintf(("%s: proxyEnv=%x outSecureEnv=%x", pszFunction, proxyEnv, outSecureEnv)); + JNIEnv *pdownProxyEnv = proxyEnv; + rc = downCreateJNIEnvWrapper(&pdownProxyEnv, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = VFTCALL2((VFTnsIJVMPlugin*)mpvVFTable, CreateSecureEnv, mpvThis, pdownProxyEnv, outSecureEnv); + rc = upCreateWrapper((void**)outSecureEnv, kSecureEnvIID, rc); + } + else + dprintf(("%s: Failed to make JNIEnv down wrapper!!!", pszFunction)); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Gives time to the JVM from the main event loop of the browser. This is + * necessary when there aren't any plugin instances around, but Java threads exist. + */ + NS_IMETHOD SpendTime(PRUint32 timeMillis) + { + UP_ENTER_RC(); + dprintf(("%s: timeMillis=%d", pszFunction, timeMillis)); + rc = VFTCALL1((VFTnsIJVMPlugin*)mpvVFTable, SpendTime, mpvThis, timeMillis); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD UnwrapJavaWrapper(JNIEnv* jenv, jobject jobj, jint* obj) + { + UP_ENTER_RC(); + dprintf(("%s: jenv=%p jobj=%p obj=%p", pszFunction, jenv, jobj, obj)); + rc = VFTCALL3((VFTnsIJVMPlugin*)mpvVFTable, UnwrapJavaWrapper, mpvThis, jenv, jobj, obj); + if (NS_SUCCEEDED(rc) && VALID_PTR(jobj)) + dprintf(("%s: *jobj=%p", pszFunction, jobj)); + UP_LEAVE_INT(rc); + return rc; + } + + + /** + * Constructor + */ + UpJVMPlugin(void *pvThis) : + UpSupportsBase(pvThis, (nsIJVMPlugin*)this, kJVMPluginIID) + { + } + +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIJVMPluginInstance +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +/** + * nsIJVMPluginInstance + */ +class UpJVMPluginInstance : public nsIJVMPluginInstance, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + + /* [noscript] void GetJavaObject (out jobject result); */ + NS_IMETHOD GetJavaObject(jobject *result) + { + UP_ENTER_RC(); + rc = VFTCALL1((VFTnsIJVMPluginInstance*)mpvVFTable, GetJavaObject, mpvThis, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + /* [noscript] void GetText (in nChar result); */ + NS_IMETHOD GetText(const char ** result) + { + //@todo TEXT: result? Don't know, can't find anyone calling this... + UP_ENTER_RC(); + rc = VFTCALL1((VFTnsIJVMPluginInstance*)mpvVFTable, GetText, mpvThis, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result) && VALID_PTR(*result)) + DPRINTF_STR(*result); + UP_LEAVE_INT(rc); + return rc; + } + + /** Constructor */ + UpJVMPluginInstance(void *pvThis) : + UpSupportsBase(pvThis, (nsIJVMWindow*)this, kJVMPluginInstanceIID) + { + } + +}; + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsISecureEnv +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * nsISecureEnv Wrapper. + */ +class UpSecureEnv : public nsISecureEnv, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + /** + * Create new Java object in LiveConnect. + * + * @param clazz -- Java Class object. + * @param methodID -- Method id + * @param args -- arguments for invoking the constructor. + * @param result -- return new Java object. + * @param ctx -- security context + */ + NS_IMETHOD NewObject(/*[in]*/ jclass clazz, + /*[in]*/ jmethodID methodID, + /*[in]*/ jvalue *args, + /*[out]*/ jobject* result, + /*[in]*/ nsISecurityContext* ctx = NULL) + { + UP_ENTER_RC(); + dprintf(("%s: clazz=%p methodID=%p args=%p result=%p ctx=%p", pszFunction, clazz, methodID, args, result, ctx)); + + nsISecurityContext *pDownCtx = ctx; + rc = downCreateWrapper((void**)&pDownCtx, downIsSupportedInterface(kSecurityContextIID), NS_OK); + if (rc == NS_OK) + { + rc = VFTCALL5((VFTnsISecureEnv*)mpvVFTable, NewObject, mpvThis, clazz, methodID, args, result, pDownCtx); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, result)); + } + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Invoke method on Java object in LiveConnect. + * + * @param type -- Return type + * @param obj -- Java object. + * @param methodID -- method id + * @param args -- arguments for invoking the constructor. + * @param result -- return result of invocation. + * @param ctx -- security context + */ + NS_IMETHOD CallMethod(/*[in]*/ jni_type type, + /*[in]*/ jobject obj, + /*[in]*/ jmethodID methodID, + /*[in]*/ jvalue *args, + /*[out]*/ jvalue* result, + /*[in]*/ nsISecurityContext* ctx = NULL) + { + UP_ENTER_RC(); + dprintf(("%s: type=%x obj=%p methodID=%p args=%p result=%p ctx=%p", pszFunction, type, obj, methodID, args, result, ctx)); + + nsISecurityContext *pDownCtx = ctx; + rc = downCreateWrapper((void**)&pDownCtx, downIsSupportedInterface(kSecurityContextIID), NS_OK); + if (rc == NS_OK) + { + rc = VFTCALL6((VFTnsISecureEnv*)mpvVFTable, CallMethod, mpvThis, type, obj, methodID, args, result, pDownCtx); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=0x%08x", pszFunction, *(int*)result)); + #ifdef DO_EXTRA_FAILURE_HANDLING + else if (VALID_PTR(result)) + ZERO_JAVAVALUE(*result, type); + #endif + } + UP_LEAVE_INT(rc); + return rc; + } + + + /** + * Invoke non-virtual method on Java object in LiveConnect. + * + * @param type -- Return type + * @param obj -- Java object. + * @param clazz -- Class object + * @param methodID -- method id + * @param args -- arguments for invoking the constructor. + * @param ctx -- security context + * @param result -- return result of invocation. + */ + NS_IMETHOD CallNonvirtualMethod(/*[in]*/ jni_type type, + /*[in]*/ jobject obj, + /*[in]*/ jclass clazz, + /*[in]*/ jmethodID methodID, + /*[in]*/ jvalue *args, + /*[out]*/ jvalue* result, + /*[in]*/ nsISecurityContext* ctx = NULL) + { + UP_ENTER_RC(); + dprintf(("%s: type=%x obj=%p clazz=%p methodID=%p args=%p result=%p ctx=%p", pszFunction, type, obj, clazz, methodID, args, result, ctx)); + + nsISecurityContext *pDownCtx = ctx; + rc = downCreateWrapper((void**)&pDownCtx, downIsSupportedInterface(kSecurityContextIID), NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = VFTCALL7((VFTnsISecureEnv*)mpvVFTable, CallNonvirtualMethod, mpvThis, type, obj, clazz, methodID, args, result, pDownCtx); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=0x%08x (int)", pszFunction, *(int*)result)); + #ifdef DO_EXTRA_FAILURE_HANDLING + else if (VALID_PTR(result)) + ZERO_JAVAVALUE(*result, type); + #endif + } + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Get a field on Java object in LiveConnect. + * + * @param type -- Return type + * @param obj -- Java object. + * @param fieldID -- field id + * @param result -- return field value + * @param ctx -- security context + */ + NS_IMETHOD GetField(/*[in]*/ jni_type type, + /*[in]*/ jobject obj, + /*[in]*/ jfieldID fieldID, + /*[out]*/ jvalue* result, + /*[in]*/ nsISecurityContext* ctx = NULL) + { + UP_ENTER_RC(); + dprintf(("%s: type=%x obj=%p fieldID= result=%p ctx=%p", pszFunction, type, fieldID, result, ctx)); + + nsISecurityContext *pDownCtx = ctx; + rc = downCreateWrapper((void**)&pDownCtx, downIsSupportedInterface(kSecurityContextIID), NS_OK); + if (rc == NS_OK) + { + rc = VFTCALL5((VFTnsISecureEnv*)mpvVFTable, GetField, mpvThis, type, obj, fieldID, result, pDownCtx); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=0x%08x (int)", pszFunction, *(int*)result)); + } + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Set a field on Java object in LiveConnect. + * + * @param type -- Return type + * @param obj -- Java object. + * @param fieldID -- field id + * @param val -- field value to set + * @param ctx -- security context + */ + NS_IMETHOD SetField(/*[in]*/ jni_type type, + /*[in]*/ jobject obj, + /*[in]*/ jfieldID fieldID, + /*[in]*/ jvalue val, + /*[in]*/ nsISecurityContext* ctx = NULL) + { + UP_ENTER_RC(); + dprintf(("%s: type=%x, obj=%p fieldID=%p val=0x%08x (int) ctx=%p", pszFunction, type, obj, fieldID, val.i, ctx)); + + nsISecurityContext *pDownCtx = ctx; + rc = downCreateWrapper((void**)&pDownCtx, downIsSupportedInterface(kSecurityContextIID), NS_OK); + if (rc == NS_OK) + rc = VFTCALL5((VFTnsISecureEnv*)mpvVFTable, SetField, mpvThis, type, obj, fieldID, val, pDownCtx); + UP_LEAVE_INT(rc); + return rc; + } + + + /** + * Invoke static method on Java object in LiveConnect. + * + * @param type -- Return type + * @param clazz -- Class object. + * @param methodID -- method id + * @param args -- arguments for invoking the constructor. + * @param result -- return result of invocation. + * @param ctx -- security context + */ + NS_IMETHOD CallStaticMethod(/*[in]*/ jni_type type, + /*[in]*/ jclass clazz, + /*[in]*/ jmethodID methodID, + /*[in]*/ jvalue *args, + /*[out]*/ jvalue* result, + /*[in]*/ nsISecurityContext* ctx = NULL) + { + UP_ENTER_RC(); + dprintf(("%s: type=%d clazz=%#x methodID=%#x args=%p result=%p ctx=%p", pszFunction, type, clazz, methodID, args, result, ctx)); + + nsISecurityContext *pDownCtx = ctx; + rc = downCreateWrapper((void**)&pDownCtx, downIsSupportedInterface(kSecurityContextIID), NS_OK); + if (rc == NS_OK) + { + rc = VFTCALL6((VFTnsISecureEnv*)mpvVFTable, CallStaticMethod, mpvThis, type, clazz, methodID, args, result, pDownCtx); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=0x%08x (int)", pszFunction, *(int*)result)); + #ifdef DO_EXTRA_FAILURE_HANDLING + else if (VALID_PTR(result)) + ZERO_JAVAVALUE(*result, type); + #endif + } + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Get a static field on Java object in LiveConnect. + * + * @param type -- Return type + * @param clazz -- Class object. + * @param fieldID -- field id + * @param result -- return field value + * @param ctx -- security context + */ + NS_IMETHOD GetStaticField(/*[in]*/ jni_type type, + /*[in]*/ jclass clazz, + /*[in]*/ jfieldID fieldID, + /*[out]*/ jvalue* result, + /*[in]*/ nsISecurityContext* ctx = NULL) + { + UP_ENTER_RC(); + dprintf(("%s: type=%d clazz=%#x fieldID=%#x result=%p ctx=%p", pszFunction, type, clazz, fieldID, result, ctx)); + + nsISecurityContext *pDownCtx = ctx; + rc = downCreateWrapper((void**)&pDownCtx, kSecurityContextIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = VFTCALL5((VFTnsISecureEnv*)mpvVFTable, GetStaticField, mpvThis, type, clazz, fieldID, result, pDownCtx); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=0x%08x (int)", pszFunction, *(int*)result)); + } + + UP_LEAVE_INT(rc); + return rc; + } + + + /** + * Set a static field on Java object in LiveConnect. + * + * @param type -- Return type + * @param clazz -- Class object. + * @param fieldID -- field id + * @param val -- field value to set + * @param ctx -- security context + */ + NS_IMETHOD SetStaticField(/*[in]*/ jni_type type, + /*[in]*/ jclass clazz, + /*[in]*/ jfieldID fieldID, + /*[in]*/ jvalue val, + /*[in]*/ nsISecurityContext* ctx = NULL) + { + UP_ENTER_RC(); + dprintf(("%s: type=%x, clazz=%p fieldID=%p val=0x%08x (int) ctx=%p", pszFunction, type, clazz, fieldID, val.i, ctx)); + + nsISecurityContext *pDownCtx = ctx; + rc = downCreateWrapper((void**)&pDownCtx, downIsSupportedInterface(kSecurityContextIID), NS_OK); + if (rc == NS_OK) + rc = VFTCALL5((VFTnsISecureEnv*)mpvVFTable, SetStaticField, mpvThis, type, clazz, fieldID, val, pDownCtx); + UP_LEAVE_INT(rc); + return rc; + } + + + NS_IMETHOD GetVersion(/*[out]*/ jint* version) + { + UP_ENTER_RC(); + rc = VFTCALL1((VFTnsISecureEnv*)mpvVFTable, GetVersion, mpvThis, version); + if (NS_SUCCEEDED(rc) && VALID_PTR(version)) + dprintf(("%s: *version=%d", pszFunction, *version)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD DefineClass(/*[in]*/ const char* name, + /*[in]*/ jobject loader, + /*[in]*/ const jbyte *buf, + /*[in]*/ jsize len, + /*[out]*/ jclass* clazz) + { + UP_ENTER_RC(); + DPRINTF_STR(name); + rc = VFTCALL5((VFTnsISecureEnv*)mpvVFTable, DefineClass, mpvThis, name, loader, buf, len, clazz); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD FindClass(/*[in]*/ const char* name, + /*[out]*/ jclass* clazz) + { + UP_ENTER_RC(); + DPRINTF_STR(name); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, FindClass, mpvThis, name, clazz); + if (NS_SUCCEEDED(rc) && VALID_PTR(clazz)) + dprintf(("%s: *clazz=%p", pszFunction, *clazz)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetSuperclass(/*[in]*/ jclass sub, + /*[out]*/ jclass* super) + { + UP_ENTER_RC(); + dprintf(("%s: sub=%p super=%p", pszFunction, sub, super)); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, GetSuperclass, mpvThis, sub, super); + if (NS_SUCCEEDED(rc) && VALID_PTR(super)) + dprintf(("%s: *super=%p", pszFunction, *super)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD IsAssignableFrom(/*[in]*/ jclass sub, + /*[in]*/ jclass super, + /*[out]*/ jboolean* result) + { + UP_ENTER_RC(); + dprintf(("%s: sub=%p super=%p result=%p", pszFunction, sub, super, result)); + rc = VFTCALL3((VFTnsISecureEnv*)mpvVFTable, IsAssignableFrom, mpvThis, sub, super, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%d", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + + NS_IMETHOD Throw(/*[in]*/ jthrowable obj, + /*[out]*/ jint* result) + { + UP_ENTER_RC(); + dprintf(("%s: obj=%p result=%p", pszFunction, obj, result)); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, Throw, mpvThis, obj, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD ThrowNew(/*[in]*/ jclass clazz, + /*[in]*/ const char *msg, + /*[out]*/ jint* result) + { + //@todo TEXT: msg?? Don't think we care to much about this. :) + UP_ENTER_RC(); + dprintf(("%s: clazz=%p msg=%p result=%p", pszFunction, clazz, msg, result)); + DPRINTF_STR(msg); + rc = VFTCALL3((VFTnsISecureEnv*)mpvVFTable, ThrowNew, mpvThis, clazz, msg, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD ExceptionOccurred(/*[out]*/ jthrowable* result) + { + UP_ENTER_RC(); + rc = VFTCALL1((VFTnsISecureEnv*)mpvVFTable, ExceptionOccurred, mpvThis, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD ExceptionDescribe(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsISecureEnv*)mpvVFTable, ExceptionDescribe, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD ExceptionClear(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsISecureEnv*)mpvVFTable, ExceptionClear, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD FatalError(/*[in]*/ const char* msg) + { + UP_ENTER_RC(); + DPRINTF_STR(msg); + rc = VFTCALL1((VFTnsISecureEnv*)mpvVFTable, FatalError, mpvThis, msg); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD NewGlobalRef(/*[in]*/ jobject lobj, + /*[out]*/ jobject* result) + { + UP_ENTER_RC(); + dprintf(("%s: lobj=%p result=%p", pszFunction, lobj, result)); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, NewGlobalRef, mpvThis, lobj, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD DeleteGlobalRef(/*[in]*/ jobject gref) + { + UP_ENTER_RC(); + dprintf(("%s: gref=%p", pszFunction, gref)); + rc = VFTCALL1((VFTnsISecureEnv*)mpvVFTable, DeleteGlobalRef, mpvThis, gref); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD DeleteLocalRef(/*[in]*/ jobject obj) + { + UP_ENTER_RC(); + dprintf(("%s: obj=%p", pszFunction, obj)); + rc = VFTCALL1((VFTnsISecureEnv*)mpvVFTable, DeleteLocalRef, mpvThis, obj); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD IsSameObject(/*[in]*/ jobject obj1, + /*[in]*/ jobject obj2, + /*[out]*/ jboolean* result) + { + UP_ENTER_RC(); + dprintf(("%s: obj1=%p obj2=%p result=%p", pszFunction, obj1, obj2, result)); + rc = VFTCALL3((VFTnsISecureEnv*)mpvVFTable, IsSameObject, mpvThis, obj1, obj2, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%d", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD AllocObject(/*[in]*/ jclass clazz, + /*[out]*/ jobject* result) + { + UP_ENTER_RC(); + dprintf(("%s: clazz=%p result=%p", pszFunction, clazz, result)); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, AllocObject, mpvThis, clazz, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetObjectClass(/*[in]*/ jobject obj, + /*[out]*/ jclass* result) + { + UP_ENTER_RC(); + dprintf(("%s: obj=%p result=%p", pszFunction, obj, result)); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, GetObjectClass, mpvThis, obj, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=0x%08x (int)", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD IsInstanceOf(/*[in]*/ jobject obj, + /*[in]*/ jclass clazz, + /*[out]*/ jboolean* result) + { + UP_ENTER_RC(); + dprintf(("%s: obj=%p clazz=%p result=%p", pszFunction, obj, clazz, result)); + rc = VFTCALL3((VFTnsISecureEnv*)mpvVFTable, IsInstanceOf, mpvThis, obj, clazz, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%d", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetMethodID(/*[in]*/ jclass clazz, + /*[in]*/ const char* name, + /*[in]*/ const char* sig, + /*[out]*/ jmethodID* id) + { + UP_ENTER_RC(); + dprintf(("%s: clazz=%#x name=%p sig=%p id=%p", pszFunction, clazz, name, sig, id)); + DPRINTF_STR(name); + DPRINTF_STR(sig); + rc = VFTCALL4((VFTnsISecureEnv*)mpvVFTable, GetMethodID, mpvThis, clazz, name, sig, id); + if (NS_SUCCEEDED(rc) && VALID_PTR(id)) + dprintf(("%s: *id=%#x", pszFunction, *id)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetFieldID(/*[in]*/ jclass clazz, + /*[in]*/ const char* name, + /*[in]*/ const char* sig, + /*[out]*/ jfieldID* id) + { + UP_ENTER_RC(); + dprintf(("%s: clazz=%#x id=%p", pszFunction, clazz, id)); + DPRINTF_STR(name); + DPRINTF_STR(sig); + rc = VFTCALL4((VFTnsISecureEnv*)mpvVFTable, GetFieldID, mpvThis, clazz, name, sig, id); + if (NS_SUCCEEDED(rc) && VALID_PTR(id)) + dprintf(("%s: *id=%#x", pszFunction, *id)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetStaticMethodID(/*[in]*/ jclass clazz, + /*[in]*/ const char* name, + /*[in]*/ const char* sig, + /*[out]*/ jmethodID* id) + { + UP_ENTER_RC(); + dprintf(("%s: clazz=%#x id=%p", pszFunction, clazz, id)); + DPRINTF_STR(name); + DPRINTF_STR(sig); + rc = VFTCALL4((VFTnsISecureEnv*)mpvVFTable, GetStaticMethodID, mpvThis, clazz, name, sig, id); + if (NS_SUCCEEDED(rc) && VALID_PTR(id)) + dprintf(("%s: *id=%#x", pszFunction, *id)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetStaticFieldID(/*[in]*/ jclass clazz, + /*[in]*/ const char* name, + /*[in]*/ const char* sig, + /*[out]*/ jfieldID* id) + { + UP_ENTER_RC(); + dprintf(("%s: clazz=%#x id=%p", pszFunction, clazz, id)); + DPRINTF_STR(name); + DPRINTF_STR(sig); + rc = VFTCALL4((VFTnsISecureEnv*)mpvVFTable, GetStaticFieldID, mpvThis, clazz, name, sig, id); + if (NS_SUCCEEDED(rc) && VALID_PTR(id)) + dprintf(("%s: *id=%#x", pszFunction, *id)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD NewString(/*[in]*/ const jchar* unicode, + /*[in]*/ jsize len, + /*[out]*/ jstring* result) + { + UP_ENTER_RC(); + rc = VFTCALL3((VFTnsISecureEnv*)mpvVFTable, NewString, mpvThis, unicode, len, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetStringLength(/*[in]*/ jstring str, + /*[out]*/ jsize* result) + { + UP_ENTER_RC(); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, GetStringLength, mpvThis, str, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%d", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetStringChars(/*[in]*/ jstring str, + /*[in]*/ jboolean *isCopy, + /*[out]*/ const jchar** result) + { + UP_ENTER_RC(); + rc = VFTCALL3((VFTnsISecureEnv*)mpvVFTable, GetStringChars, mpvThis, str, isCopy, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD ReleaseStringChars(/*[in]*/ jstring str, + /*[in]*/ const jchar *chars) + { + UP_ENTER_RC(); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, ReleaseStringChars, mpvThis, str, chars); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD NewStringUTF(/*[in]*/ const char *utf, + /*[out]*/ jstring* result) + { + UP_ENTER_RC(); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, NewStringUTF, mpvThis, utf, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetStringUTFLength(/*[in]*/ jstring str, + /*[out]*/ jsize* result) + { + UP_ENTER_RC(); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, GetStringUTFLength, mpvThis, str, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%d", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetStringUTFChars(/*[in]*/ jstring str, + /*[in]*/ jboolean *isCopy, + /*[out]*/ const char** result) + { + UP_ENTER_RC(); + dprintf(("%s: str=%p isCopy=%p result=%p", pszFunction, str, isCopy, result)); + rc = VFTCALL3((VFTnsISecureEnv*)mpvVFTable, GetStringUTFChars, mpvThis, str, isCopy, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD ReleaseStringUTFChars(/*[in]*/ jstring str, + /*[in]*/ const char *chars) + { + UP_ENTER_RC(); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, ReleaseStringUTFChars, mpvThis, str, chars); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetArrayLength(/*[in]*/ jarray array, + /*[out]*/ jsize* result) + { + UP_ENTER_RC(); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, GetArrayLength, mpvThis, array, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%d", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD NewObjectArray(/*[in]*/ jsize len, + /*[in]*/ jclass clazz, + /*[in]*/ jobject init, + /*[out]*/ jobjectArray* result) + { + UP_ENTER_RC(); + rc = VFTCALL4((VFTnsISecureEnv*)mpvVFTable, NewObjectArray, mpvThis, len, clazz, init, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetObjectArrayElement(/*[in]*/ jobjectArray array, + /*[in]*/ jsize index, + /*[out]*/ jobject* result) + { + UP_ENTER_RC(); + rc = VFTCALL3((VFTnsISecureEnv*)mpvVFTable, GetObjectArrayElement, mpvThis, array, index, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD SetObjectArrayElement(/*[in]*/ jobjectArray array, + /*[in]*/ jsize index, + /*[in]*/ jobject val) + { + UP_ENTER_RC(); + rc = VFTCALL3((VFTnsISecureEnv*)mpvVFTable, SetObjectArrayElement, mpvThis, array, index, val); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD NewArray(/*[in]*/ jni_type element_type, + /*[in]*/ jsize len, + /*[out]*/ jarray* result) + { + UP_ENTER_RC(); + rc = VFTCALL3((VFTnsISecureEnv*)mpvVFTable, NewArray, mpvThis, element_type, len, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetArrayElements(/*[in]*/ jni_type type, + /*[in]*/ jarray array, + /*[in]*/ jboolean *isCopy, + /*[out]*/ void* result) + { + UP_ENTER_RC(); + rc = VFTCALL4((VFTnsISecureEnv*)mpvVFTable, GetArrayElements, mpvThis, type, array, isCopy, result); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD ReleaseArrayElements(/*[in]*/ jni_type type, + /*[in]*/ jarray array, + /*[in]*/ void *elems, + /*[in]*/ jint mode) + { + UP_ENTER_RC(); + rc = VFTCALL4((VFTnsISecureEnv*)mpvVFTable, ReleaseArrayElements, mpvThis, type, array, elems, mode); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetArrayRegion(/*[in]*/ jni_type type, + /*[in]*/ jarray array, + /*[in]*/ jsize start, + /*[in]*/ jsize len, + /*[out]*/ void* buf) + { + UP_ENTER_RC(); + rc = VFTCALL5((VFTnsISecureEnv*)mpvVFTable, GetArrayRegion, mpvThis, type, array, start, len, buf); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD SetArrayRegion(/*[in]*/ jni_type type, + /*[in]*/ jarray array, + /*[in]*/ jsize start, + /*[in]*/ jsize len, + /*[in]*/ void* buf) + { + UP_ENTER_RC(); + rc = VFTCALL5((VFTnsISecureEnv*)mpvVFTable, SetArrayRegion, mpvThis, type, array, start, len, buf); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD RegisterNatives(/*[in]*/ jclass clazz, + /*[in]*/ const JNINativeMethod *methods, + /*[in]*/ jint nMethods, + /*[out]*/ jint* result) + { + UP_ENTER_RC(); + rc = VFTCALL4((VFTnsISecureEnv*)mpvVFTable, RegisterNatives, mpvThis, clazz, methods, nMethods, result); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD UnregisterNatives(/*[in]*/ jclass clazz, + /*[out]*/ jint* result) + { + UP_ENTER_RC(); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, UnregisterNatives, mpvThis, clazz, result); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD MonitorEnter(/*[in]*/ jobject obj, + /*[out]*/ jint* result) + { + UP_ENTER_RC(); + dprintf(("%s: obj=%p result=%p", pszFunction, obj, result)); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, MonitorEnter, mpvThis, obj, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD MonitorExit(/*[in]*/ jobject obj, + /*[out]*/ jint* result) + { + UP_ENTER_RC(); + dprintf(("%s: obj=%p result=%p", pszFunction, obj, result)); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, MonitorExit, mpvThis, obj, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%p", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetJavaVM(/*[in]*/ JavaVM **vm, + /*[out]*/ jint* result) + { + UP_ENTER_RC(); + rc = VFTCALL2((VFTnsISecureEnv*)mpvVFTable, GetJavaVM, mpvThis, vm, result); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Constructor + */ + UpSecureEnv(void *pvThis) : + UpSupportsBase(pvThis, (nsISecureEnv*)this, kSecureEnvIID) + { + } + +}; + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIPluginInstance +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +class UpPluginInstance : public nsIPluginInstance, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + /** + * Initializes a newly created plugin instance, passing to it the plugin + * instance peer which it should use for all communication back to the browser. + * + * @param aPeer - the corresponding plugin instance peer + * @result - NS_OK if this operation was successful + */ + /* void initialize (in nsIPluginInstancePeer aPeer); */ + NS_IMETHOD Initialize(nsIPluginInstancePeer *aPeer) + { + UP_ENTER_RC(); + nsIPluginInstancePeer *pDownPeer = aPeer; + rc = downCreateWrapper((void**)&pDownPeer, kPluginInstancePeerIID, NS_OK); + if (rc == NS_OK) + rc = VFTCALL1((VFTnsIPluginInstance*)mpvVFTable, Initialize, mpvThis, pDownPeer); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Returns a reference back to the plugin instance peer. This method is + * used whenever the browser needs to obtain the peer back from a plugin + * instance. The implementation of this method should be sure to increment + * the reference count on the peer by calling AddRef. + * + * @param aPeer - the resulting plugin instance peer + * @result - NS_OK if this operation was successful + */ + /* readonly attribute nsIPluginInstancePeer peer; */ + NS_IMETHOD GetPeer(nsIPluginInstancePeer * *aPeer) + { + UP_ENTER_RC(); + rc = VFTCALL1((VFTnsIPluginInstance*)mpvVFTable, GetPeer, mpvThis, aPeer); + rc = upCreateWrapper((void**)aPeer, kPluginInstancePeerIID, rc); + UP_LEAVE_INT(rc); + return rc; + } + + + /** + * Called to instruct the plugin instance to start. This will be called after + * the plugin is first created and initialized, and may be called after the + * plugin is stopped (via the Stop method) if the plugin instance is returned + * to in the browser window's history. + * + * @result - NS_OK if this operation was successful + */ + /* void start (); */ + NS_IMETHOD Start(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIPluginInstance*)mpvVFTable, Start, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Called to instruct the plugin instance to stop, thereby suspending its state. + * This method will be called whenever the browser window goes on to display + * another page and the page containing the plugin goes into the window's history + * list. + * + * @result - NS_OK if this operation was successful + */ + /* void stop (); */ + NS_IMETHOD Stop(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIPluginInstance*)mpvVFTable, Stop, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Called to instruct the plugin instance to destroy itself. This is called when + * it become no longer possible to return to the plugin instance, either because + * the browser window's history list of pages is being trimmed, or because the + * window containing this page in the history is being closed. + * + * @result - NS_OK if this operation was successful + */ + /* void destroy (); */ + NS_IMETHOD Destroy(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIPluginInstance*)mpvVFTable, Destroy, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Called when the window containing the plugin instance changes. + * + * (Corresponds to NPP_SetWindow.) + * + * @param aWindow - the plugin window structure + * @result - NS_OK if this operation was successful + */ + /* void setWindow (in nsPluginWindowPtr aWindow); */ + NS_IMETHOD SetWindow(nsPluginWindow * aWindow) + { + UP_ENTER_RC(); + rc = VFTCALL1((VFTnsIPluginInstance*)mpvVFTable, SetWindow, mpvThis, aWindow); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Called to tell the plugin that the initial src/data stream is + * ready. Expects the plugin to return a nsIPluginStreamListener. + * + * (Corresponds to NPP_NewStream.) + * + * @param aListener - listener the browser will use to give the plugin the data + * @result - NS_OK if this operation was successful + */ + /* void newStream (out nsIPluginStreamListener aListener); */ + NS_IMETHOD NewStream(nsIPluginStreamListener **aListener) + { + UP_ENTER_RC(); + rc = VFTCALL1((VFTnsIPluginInstance*)mpvVFTable, NewStream, mpvThis, aListener); + rc = upCreateWrapper((void**)aListener, kPluginStreamListenerIID, rc); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Called to instruct the plugin instance to print itself to a printer. + * + * (Corresponds to NPP_Print.) + * + * @param aPlatformPrint - platform-specific printing information + * @result - NS_OK if this operation was successful + */ + /* void print (in nsPluginPrintPtr aPlatformPrint); */ + NS_IMETHOD Print(nsPluginPrint * aPlatformPrint) + { + UP_ENTER_RC(); + dprintf(("%s: aPlatformPrint=%p", pszFunction, aPlatformPrint)); + if (aPlatformPrint) + { + if (aPlatformPrint->mode == nsPluginMode_Embedded) + dprintf(("%s: Embed: platformPrint=%08x windows: windows=%08x, (x,y,width,height)=(%d,%d,%d,%d) type=%d", + pszFunction, + aPlatformPrint->print.embedPrint.platformPrint, + aPlatformPrint->print.embedPrint.window.window, + aPlatformPrint->print.embedPrint.window.x, + aPlatformPrint->print.embedPrint.window.y, + aPlatformPrint->print.embedPrint.window.width, + aPlatformPrint->print.embedPrint.window.height, + aPlatformPrint->print.embedPrint.window.type)); + else if (aPlatformPrint->mode == nsPluginMode_Full) + dprintf(("%s: Full: platformPrint=%08x pluginPrinted=%d printOne=%d", + pszFunction, + aPlatformPrint->print.fullPrint.platformPrint, + aPlatformPrint->print.fullPrint.pluginPrinted, + aPlatformPrint->print.fullPrint.printOne)); + else + dprintf(("%s: Unknown mode!", pszFunction)); + } + + rc = VFTCALL1((VFTnsIPluginInstance*)mpvVFTable, Print, mpvThis, aPlatformPrint); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Returns the value of a variable associated with the plugin instance. + * + * @param aVariable - the plugin instance variable to get + * @param aValue - the address of where to store the resulting value + * @result - NS_OK if this operation was successful + */ + /* void getValue (in nsPluginInstanceVariable aVariable, in voidPtr aValue); */ + NS_IMETHOD GetValue(nsPluginInstanceVariable aVariable, void * aValue) + { + UP_ENTER_RC(); + dprintf(("%s: aVariable=%d, aValue=%p", pszFunction, aVariable, aValue)); + rc = VFTCALL2((VFTnsIPluginInstance*)mpvVFTable, GetValue, mpvThis, aVariable, aValue); + if (VALID_PTR(aValue)) + dprintf(("%s: *aValue=%p", pszFunction, *(void**)aValue)); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Handles an event. An nsIEventHandler can also get registered with with + * nsIPluginManager2::RegisterWindow and will be called whenever an event + * comes in for that window. + * + * Note that for Unix and Mac the nsPluginEvent structure is different + * from the old NPEvent structure -- it's no longer the native event + * record, but is instead a struct. This was done for future extensibility, + * and so that the Mac could receive the window argument too. For Windows + * and OS2, it's always been a struct, so there's no change for them. + * + * (Corresponds to NPP_HandleEvent.) + * + * @param aEvent - the event to be handled + * @param aHandled - set to PR_TRUE if event was handled + * @result - NS_OK if this operation was successful + */ + /* void handleEvent (in nsPluginEventPtr aEvent, out boolean aHandled); */ + NS_IMETHOD HandleEvent(nsPluginEvent * aEvent, PRBool *aHandled) + { + UP_ENTER_RC(); + dprintf(("%s: aEvent=%p, aHandled=%p", pszFunction, aEvent, aHandled)); + rc = VFTCALL2((VFTnsIPluginInstance*)mpvVFTable, HandleEvent, mpvThis, aEvent, aHandled); + if (VALID_PTR(aHandled)) + dprintf(("%s: *aHandled=%d", pszFunction, *aHandled)); + UP_LEAVE_INT(rc); + return rc; + } + + + /** + * Constructor. + */ + UpPluginInstance(void *pvThis) : + UpSupportsBase(pvThis, (nsIPluginInstance*)this, kPluginInstanceIID) + { + } + + /** + * Destructor. + */ + ~UpPluginInstance() + { + } +}; + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIPluginInstancePeer +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * nsIPluginInstancePeer Base Wrapper + */ +class UpPluginInstancePeerBase : public UpSupportsBase +{ +protected: + /** + * Returns the value of a variable associated with the plugin manager. + * + * (Corresponds to NPN_GetValue.) + * + * @param aVariable - the plugin manager variable to get + * @param aValue - the address of where to store the resulting value + * @result - NS_OK if this operation was successful + */ + /* void getValue (in nsPluginInstancePeerVariable aVariable, in voidPtr aValue); */ + NS_IMETHOD hlpGetValue(nsPluginInstancePeerVariable aVariable, void * aValue) + { + UP_ENTER_RC(); + dprintf(("%s: aVariable=%d, aValue=%p", pszFunction, aVariable, aValue)); + rc = VFTCALL2((VFTnsIPluginInstancePeer*)mpvVFTable, GetValue, mpvThis, aVariable, aValue); + if (VALID_PTR(aValue)) + dprintf(("%s: *aValue=%p", pszFunction, aValue)); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Returns the MIME type of the plugin instance. + * + * (Corresponds to NPP_New's MIMEType argument.) + * + * @param aMIMEType - resulting MIME type + * @result - NS_OK if this operation was successful + */ + /* readonly attribute nsMIMEType MIMEType; */ + NS_IMETHOD hlpGetMIMEType(nsMIMEType *aMIMEType) + { + UP_ENTER_RC(); + dprintf(("%s: aMIMEType=%p", pszFunction, aMIMEType)); + rc = VFTCALL1((VFTnsIPluginInstancePeer*)mpvVFTable, GetMIMEType, mpvThis, aMIMEType); + if (NS_SUCCEEDED(rc) && VALID_PTR(aMIMEType) && VALID_PTR(*aMIMEType)) + DPRINTF_STR(*aMIMEType); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Returns the mode of the plugin instance, i.e. whether the plugin is + * embedded in the html, or full page. + * + * (Corresponds to NPP_New's mode argument.) + * + * @param result - the resulting mode + * @result - NS_OK if this operation was successful + */ + /* readonly attribute nsPluginMode mode; */ + NS_IMETHOD hlpGetMode(nsPluginMode *aMode) + { + UP_ENTER_RC(); + dprintf(("%s: aMode=%p", pszFunction, aMode)); + rc = VFTCALL1((VFTnsIPluginInstancePeer*)mpvVFTable, GetMode, mpvThis, aMode); + if (NS_SUCCEEDED(rc) && VALID_PTR(aMode)) + dprintf(("%s: *aMode=%d", pszFunction, aMode)); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * This operation is called by the plugin instance when it wishes to send + * a stream of data to the browser. It constructs a new output stream to which + * the plugin may send the data. When complete, the Close and Release methods + * should be called on the output stream. + * + * (Corresponds to NPN_NewStream.) + * + * @param aType - MIME type of the stream to create + * @param aTarget - the target window name to receive the data + * @param aResult - the resulting output stream + * @result - NS_OK if this operation was successful + */ + /* void newStream (in nsMIMEType aType, in string aTarget, out nsIOutputStream aResult); */ + NS_IMETHOD hlpNewStream(nsMIMEType aType, const char *aTarget, nsIOutputStream **aResult) + { + //@todo TEXT: aTarget? Doesn't apply to java plugin I think. + UP_ENTER_RC(); + dprintf(("%s: aResult=%p", pszFunction, aResult)); + DPRINTF_STR(aTarget); + DPRINTF_STR(aType); + + rc = VFTCALL3((VFTnsIPluginInstancePeer*)mpvVFTable, NewStream, mpvThis, aType, aTarget, aResult); + rc = upCreateWrapper((void**)aResult, kOutputStreamIID, rc); + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * This operation causes status information to be displayed on the window + * associated with the plugin instance. + * + * (Corresponds to NPN_Status.) + * + * @param aMessage - the status message to display + * @result - NS_OK if this operation was successful + */ + /* void showStatus (in string aMessage); */ + NS_IMETHOD hlpShowStatus(const char *aMessage) + { + //@todo TEXT: aMessage? This must be further tested! + UP_ENTER_RC(); + DPRINTF_STR(aMessage); + rc = VFTCALL1((VFTnsIPluginInstancePeer*)mpvVFTable, ShowStatus, mpvThis, aMessage); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Set the desired size of the window in which the plugin instance lives. + * + * @param aWidth - new window width + * @param aHeight - new window height + * @result - NS_OK if this operation was successful + */ + /* void setWindowSize (in unsigned long aWidth, in unsigned long aHeight); */ + NS_IMETHOD hlpSetWindowSize(PRUint32 aWidth, PRUint32 aHeight) + { + UP_ENTER_RC(); + dprintf(("%s: aWidth=%d, aHeight=%d", pszFunction, aWidth, aHeight)); + rc = VFTCALL2((VFTnsIPluginInstancePeer*)mpvVFTable, SetWindowSize, mpvThis, aWidth, aHeight); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Constructor. + * + * @param pvThis Pointer to the Win32 class. + * @param pvInterface Pointer to the interface we implement. Meaning + * what's returned on a query interface. + * @param iid The Interface ID of the wrapped interface. + */ + UpPluginInstancePeerBase(void *pvThis, void *pvInterface, REFNSIID iid) : + UpSupportsBase(pvThis, pvInterface, iid) + { + } +}; + + +/** + * nsIPluginInstancePeer Wrapper + */ +class UpPluginInstancePeer : public nsIPluginInstancePeer, public UpPluginInstancePeerBase +{ +public: + UP_IMPL_NSISUPPORTS(); + UP_IMPL_NSIPLUGININSTANCEPEER(); + + /** + * Constructor + */ + UpPluginInstancePeer(void *pvThis) : + UpPluginInstancePeerBase(pvThis, (nsIPluginInstancePeer*)this, kPluginInstancePeerIID) + { + } + + +}; + + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIPluginInstancePeer2 +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +/** + * nsIPluginInstancePeer2 Wrapper + */ +class UpPluginInstancePeer2 : public nsIPluginInstancePeer2, public UpPluginInstancePeerBase +{ +public: + UP_IMPL_NSISUPPORTS(); + UP_IMPL_NSIPLUGININSTANCEPEER(); + + + /** + * Get the JavaScript window object corresponding to this plugin instance. + * + * @param aJSWindow - the resulting JavaScript window object + * @result - NS_OK if this operation was successful + */ + /* readonly attribute JSObjectPtr JSWindow; */ + NS_IMETHOD GetJSWindow(JSObject * *aJSWindow) + { + UP_ENTER_RC(); + rc = VFTCALL1((VFTnsIPluginInstancePeer2*)mpvVFTable, GetJSWindow, mpvThis, aJSWindow); + if (NS_SUCCEEDED(rc) && VALID_PTR(aJSWindow)) + { + //@todo wrap aJSWindow? YES (*aJSWindow)->map->ops must be wrapped. + // struct JSObjectOps in jsapi.h defines that vtable. + dprintf(("%s: aJSWindow=%p - JS Wrapping !!!", pszFunction, aJSWindow)); + DebugInt3(); + } + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Get the JavaScript execution thread corresponding to this plugin instance. + * + * @param aJSThread - the resulting JavaScript thread id + * @result - NS_OK if this operation was successful + */ + /* readonly attribute unsigned long JSThread; */ + NS_IMETHOD GetJSThread(PRUint32 *aJSThread) + { + UP_ENTER_RC(); + rc = VFTCALL1((VFTnsIPluginInstancePeer2*)mpvVFTable, GetJSThread, mpvThis, aJSThread); + if (NS_SUCCEEDED(rc) && VALID_PTR(aJSThread)) + dprintf(("%s: aJSThread=%u", pszFunction, aJSThread)); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Get the JavaScript context to this plugin instance. + * + * @param aJSContext - the resulting JavaScript context + * @result - NS_OK if this operation was successful + */ + /* readonly attribute JSContextPtr JSContext; */ + NS_IMETHOD GetJSContext(JSContext * *aJSContext) + { + UP_ENTER_RC(); + rc = VFTCALL1((VFTnsIPluginInstancePeer2*)mpvVFTable, GetJSContext, mpvThis, aJSContext); + if (NS_SUCCEEDED(rc) && VALID_PTR(aJSContext)) + { + //@todo wrap aJSContext? YES YES YES YES + // struct JSObjectOps in jsapi.h defines that vtable. + dprintf(("%s: aJSContext=%p - JS Wrapping !!!", pszFunction, aJSContext)); + DebugInt3(); + } + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Constructor + */ + UpPluginInstancePeer2(void *pvThis) : + UpPluginInstancePeerBase(pvThis, (nsIPluginInstancePeer2*)this, kPluginInstancePeer2IID) + { + } + + +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIPluginTagInfo +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +class UpPluginTagInfo : public nsIPluginTagInfo, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + /** + * QueryInterface on nsIPluginInstancePeer to get this. + * + * (Corresponds to NPP_New's argc, argn, and argv arguments.) + * Get a ptr to the paired list of attribute names and values, + * returns the length of the array. + * + * Each name or value is a null-terminated string. + */ + /* void getAttributes (in PRUint16Ref aCount, in constCharStarConstStar aNames, in constCharStarConstStar aValues); */ + NS_IMETHOD GetAttributes(PRUint16 & aCount, const char* const* & aNames, const char* const* & aValues) + { + UP_ENTER_RC(); + rc = VFTCALL3((VFTnsIPluginTagInfo*)mpvVFTable, GetAttributes, mpvThis, aCount, aNames, aValues); + if (NS_SUCCEEDED(rc)) + { + dprintf(("%s: aCount=%d", pszFunction, aCount)); + for (int i = 0; i < aCount; i++) + dprintf(("%s: aNames[%d]='%s' (%p) aValues[%d]='%s' (%p)", pszFunction, + i, aNames[i], aNames[i], i, aValues[i], aValues[i])); + } + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Gets the value for the named attribute. + * + * @param aName - the name of the attribute to find + * @param aResult - the resulting attribute + * @result - NS_OK if this operation was successful, NS_ERROR_FAILURE if + * this operation failed. result is set to NULL if the attribute is not found + * else to the found value. + */ + /* void getAttribute (in string aName, out constCharPtr aResult); */ + NS_IMETHOD GetAttribute(const char *aName, const char * *aResult) + { + //@todo TEXT: aName? aResult? I believe that this one works as the text format is that of the document. + UP_ENTER_RC(); + rc = VFTCALL2((VFTnsIPluginTagInfo*)mpvVFTable, GetAttribute, mpvThis, aName, aResult); + if (NS_SUCCEEDED(rc) && VALID_PTR(aResult) && VALID_PTR(*aResult)) + DPRINTF_STR(*aResult); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Constructor. + */ + UpPluginTagInfo(void *pvThis) : + UpSupportsBase(pvThis, (nsIPluginTagInfo*)pvThis, kPluginTagInfoIID) + { + } +}; + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIJVMWindow +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * Base class for nsIJVMWindow decendants. + */ +class UpJVMWindowBase : public UpSupportsBase +{ +protected: + NS_IMETHOD hlpShow(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIJVMWindow*)mpvVFTable, Show, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD hlpHide(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIJVMWindow*)mpvVFTable, Hide, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD hlpIsVisible(PRBool *result) + { + UP_ENTER_RC(); + rc = VFTCALL1((VFTnsIJVMWindow*)mpvVFTable, IsVisible, mpvThis, result); + if (NS_SUCCEEDED(rc) && VALID_PTR(result)) + dprintf(("%s: *result=%d", pszFunction, *result)); + UP_LEAVE_INT(rc); + return rc; + } + + /** Constructor */ + UpJVMWindowBase(void *pvThis, void *pvInterface, REFNSIID aIID) : + UpSupportsBase(pvThis, pvInterface, aIID) + { + } +}; + +/** + * nsIJVMWindow + */ +class UpJVMWindow : public nsIJVMWindow, public UpJVMWindowBase +{ +public: + UP_IMPL_NSISUPPORTS(); + UP_IMPL_NSIJVMWINDOW(); + + /** Constructor */ + UpJVMWindow(void *pvThis) : + UpJVMWindowBase(pvThis, (nsIJVMWindow*)this, kJVMWindowIID) + { + } +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIJVMConsole +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +/** + * nsIJVMConsole + */ +class UpJVMConsole : public nsIJVMConsole, public UpJVMWindowBase +{ +public: + UP_IMPL_NSISUPPORTS(); + UP_IMPL_NSIJVMWINDOW(); + + + // Prints a message to the Java console. The encodingName specifies the + // encoding of the message, and if NULL, specifies the default platform + // encoding. + NS_IMETHOD Print(const char* msg, const char* encodingName = NULL) + { + UP_ENTER_RC(); + DPRINTF_STR(msg); + DPRINTF_STRNULL(encodingName); + rc = VFTCALL2((VFTnsIJVMConsole*)mpvVFTable, Print, mpvThis, msg, encodingName); + UP_LEAVE_INT(rc); + return rc; + } + + + /** Constructor */ + UpJVMConsole(void *pvThis) : + UpJVMWindowBase(pvThis, (nsIJVMWindow*)this, kJVMConsoleIID) + { + } +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIEventHandler +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * nsIEventHandler + */ +class UpEventHandler : public nsIEventHandler, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + /** + * Handles an event. An nsIEventHandler can also get registered with with + * nsIPluginManager2::RegisterWindow and will be called whenever an event + * comes in for that window. + * + * Note that for Unix and Mac the nsPluginEvent structure is different + * from the old NPEvent structure -- it's no longer the native event + * record, but is instead a struct. This was done for future extensibility, + * and so that the Mac could receive the window argument too. For Windows + * and OS2, it's always been a struct, so there's no change for them. + * + * (Corresponds to NPP_HandleEvent.) + * + * @param aEvent - the event to be handled + * @param aHandled - set to PR_TRUE if event was handled + * @result - NS_OK if this operation was successful + */ + /* void handleEvent (in nsPluginEventPtr aEvent, out boolean aHandled); */ + NS_IMETHOD HandleEvent(nsPluginEvent *aEvent, PRBool *aHandled) + { + UP_ENTER_RC(); + rc = VFTCALL2((VFTnsIEventHandler*)mpvVFTable, HandleEvent, mpvThis, aEvent, aHandled); + if (NS_SUCCEEDED(rc) && VALID_PTR(aHandled)) + dprintf(("%s: *aHandled=%d", pszFunction, *aHandled)); + UP_LEAVE_INT(rc); + return rc; + } + + /** Constructor */ + UpEventHandler(void *pvThis) : + UpSupportsBase(pvThis, (nsIEventHandler*)this, kEventHandlerIID) + { + } +}; + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIRunnable +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * nsIRunnable + */ +class UpRunnable : public nsIRunnable, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + /** + * Defines an entry point for a newly created thread. + */ + NS_IMETHOD Run() + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIRunnable*)mpvVFTable, Run, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + /** Constructor */ + UpRunnable(void *pvThis) : + UpSupportsBase(pvThis, (nsIRunnable*)this, kRunnableIID) + { + } +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: UpSecurityContext +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * UpSecurityContext + */ +class UpSecurityContext : public nsISecurityContext, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + + /** + * Get the security context to be used in LiveConnect. + * This is used for JavaScript <--> Java. + * + * @param target -- Possible target. + * @param action -- Possible action on the target. + * @return -- NS_OK if the target and action is permitted on the security context. + * -- NS_FALSE otherwise. + */ + NS_IMETHOD Implies(const char* target, const char* action, PRBool *bAllowedAccess) + { + UP_ENTER_RC(); + dprintf(("%s: target=%p action=%p bAllowedAccess=%p", pszFunction, target, action, bAllowedAccess)); + DPRINTF_STR(target); + DPRINTF_STR(action); + rc = VFTCALL3((VFTnsISecurityContext*)mpvVFTable, Implies, mpvThis, target, action, bAllowedAccess); + if (NS_SUCCEEDED(rc) && VALID_PTR(bAllowedAccess)) + dprintf(("%s: *bAllowedAccess=%d", pszFunction, *bAllowedAccess)); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Get the origin associated with the context. + * + * @param buf -- Result buffer (managed by the caller.) + * @param len -- Buffer length. + * @return -- NS_OK if the codebase string was obtained. + * -- NS_FALSE otherwise. + */ + NS_IMETHOD GetOrigin(char* buf, int len) + { + UP_ENTER_RC(); + dprintf(("%s: buf=%p len=%d ", pszFunction, buf, len)); + rc = VFTCALL2((VFTnsISecurityContext*)mpvVFTable, GetOrigin, mpvThis, buf, len); + if (NS_SUCCEEDED(rc) && VALID_PTR(buf)) + DPRINTF_STR(buf); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Get the certificate associated with the context. + * + * @param buf -- Result buffer (managed by the caller.) + * @param len -- Buffer length. + * @return -- NS_OK if the codebase string was obtained. + * -- NS_FALSE otherwise. + */ + NS_IMETHOD GetCertificateID(char* buf, int len) + { + UP_ENTER_RC(); + dprintf(("%s: buf=%p len=%d ", pszFunction, buf, len)); + rc = VFTCALL2((VFTnsISecurityContext*)mpvVFTable, GetCertificateID, mpvThis, buf, len); + if (NS_SUCCEEDED(rc) && VALID_PTR(buf)) + DPRINTF_STR(*buf); + UP_LEAVE_INT(rc); + return rc; + } + + /** Constructor */ + UpSecurityContext(void *pvThis) : + UpSupportsBase(pvThis, (nsISecurityContext*)this, kSecurityContextIID) + { + } +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIRequestObserver +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * Base class for nsIJVMWindow decendants. + */ +class UpRequestObserverBase : public UpSupportsBase +{ +protected: + /** + * Called to signify the beginning of an asynchronous request. + * + * @param aRequest request being observed + * @param aContext user defined context + * + * An exception thrown from onStartRequest has the side-effect of + * causing the request to be canceled. + */ + /* void onStartRequest (in nsIRequest aRequest, in nsISupports aContext); */ + NS_IMETHOD hlpOnStartRequest(nsIRequest *aRequest, nsISupports *aContext) + { + UP_ENTER_RC(); + dprintf(("%s: aRequest=%p aContext=%p", pszFunction, aRequest, aContext)); + + nsIRequest *pDownRequest = aRequest; + rc = downCreateWrapper((void**)&pDownRequest, kRequestIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports *pDownSupports = aContext; + rc = downCreateWrapper((void**)&pDownSupports, kSupportsIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = VFTCALL2((VFTnsIRequestObserver*)mpvVFTable, OnStartRequest, mpvThis, pDownRequest, pDownSupports); + } + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Called to signify the end of an asynchronous request. This + * call is always preceded by a call to onStartRequest. + * + * @param aRequest request being observed + * @param aContext user defined context + * @param aStatusCode reason for stopping (NS_OK if completed successfully) + * + * An exception thrown from onStopRequest is generally ignored. + */ + /* void onStopRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatusCode); */ + NS_IMETHOD hlpOnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode) + { + UP_ENTER_RC(); + dprintf(("%s: aRequest=%p aContext=%p aStatusCode", pszFunction, aRequest, aContext, aStatusCode)); + + nsIRequest *pDownRequest = aRequest; + rc = downCreateWrapper((void**)&pDownRequest, kRequestIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports *pDownSupports = aContext; + rc = downCreateWrapper((void**)&pDownSupports, kSupportsIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = VFTCALL3((VFTnsIRequestObserver*)mpvVFTable, OnStopRequest, mpvThis, pDownRequest, pDownSupports, aStatusCode); + } + + UP_LEAVE_INT(rc); + return rc; + } + + /** Constructor */ + UpRequestObserverBase(void *pvThis, void *pvInterface, REFNSIID aIID) : + UpSupportsBase(pvThis, pvInterface, aIID) + { + } +}; + + +/** + * nsRequestObserver + */ +class UpRequestObserver : public nsIRequestObserver, public UpRequestObserverBase +{ + public: + UP_IMPL_NSISUPPORTS(); + UP_IMPL_NSIREQUESTOBSERVER(); + + /** Constructor */ + UpRequestObserver(void *pvThis) : + UpRequestObserverBase(pvThis, (nsIRequestObserver*)this, kRequestObserverIID) + { + } +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIStreamListener +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * UpSecurityContext + */ +class UpStreamListener : public nsIStreamListener, public UpRequestObserverBase +{ +public: + UP_IMPL_NSISUPPORTS(); + UP_IMPL_NSIREQUESTOBSERVER(); + + /** + * Called when the next chunk of data (corresponding to the request) may + * be read without blocking the calling thread. The onDataAvailable impl + * must read exactly |aCount| bytes of data before returning. + * + * @param aRequest request corresponding to the source of the data + * @param aContext user defined context + * @param aInputStream input stream containing the data chunk + * @param aOffset current stream position + * @param aCount number of bytes available in the stream + * + * An exception thrown from onDataAvailable has the side-effect of + * causing the request to be canceled. + */ + /* void onDataAvailable (in nsIRequest aRequest, in nsISupports aContext, in nsIInputStream aInputStream, in unsigned long aOffset, in unsigned long aCount); */ + NS_IMETHOD OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext, nsIInputStream *aInputStream, PRUint32 aOffset, PRUint32 aCount) + { + UP_ENTER_RC(); + dprintf(("%s: aRequest=%p aContext=%p aInputStream=%p aOffset=%d aCount=%d", pszFunction, aRequest, aContext, aInputStream, aOffset, aCount)); + + nsIRequest *pDownRequest = aRequest; + rc = downCreateWrapper((void**)&pDownRequest, kRequestIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports *pDownSupports = aContext; + rc = downCreateWrapper((void**)&pDownSupports, kSupportsIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsIInputStream *pDownInputStream = aInputStream; + rc = downCreateWrapper((void**)&pDownInputStream, kInputStreamIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = VFTCALL5((VFTnsIStreamListener*)mpvVFTable, OnDataAvailable, mpvThis, + pDownRequest, pDownSupports, pDownInputStream, aOffset, aCount); + } + } + + UP_LEAVE_INT(rc); + return rc; + } + + + /** Constructor */ + UpStreamListener(void *pvThis) : + UpRequestObserverBase(pvThis, (nsIStreamListener*)this, kStreamListenerIID) + { + } +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIRequest +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * nsIRequest + */ +class UpRequestBase : public UpSupportsBase +{ +protected: + + /** + * The name of the request. Often this is the URI of the request. + */ + /* readonly attribute AUTF8String name; */ + NS_IMETHOD hlpGetName(nsACString & aName) + { + UP_ENTER_RC(); + dprintf(("%s: &aName=%p", pszFunction, &aName)); + /** @todo Wrap nsACString */ + dprintf(("%s: nsACString wrapping isn't supported.", pszFunction)); + ReleaseInt3(0xbaddbeef, 32, 0); + + rc = VFTCALL1((VFTnsIRequest*)mpvVFTable, GetName, mpvThis, aName); + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * @return TRUE if the request has yet to reach completion. + * @return FALSE if the request has reached completion (e.g., after + * OnStopRequest has fired). + * Suspended requests are still considered pending. + */ + /* boolean isPending (); */ + NS_IMETHOD hlpIsPending(PRBool *_retval) + { + UP_ENTER_RC(); + dprintf(("%s: _retval=%p", pszFunction, _retval)); + + rc = VFTCALL1((VFTnsIRequest*)mpvVFTable, IsPending, mpvThis, _retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d", pszFunction, *_retval)); + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * The error status associated with the request. + */ + /* readonly attribute nsresult status; */ + NS_IMETHOD hlpGetStatus(nsresult *aStatus) + { + UP_ENTER_RC(); + dprintf(("%s: aStatus=%p", pszFunction, aStatus)); + + rc = VFTCALL1((VFTnsIRequest*)mpvVFTable, GetStatus, mpvThis, aStatus); + if (VALID_PTR(aStatus)) + dprintf(("%s: *aStatus=%d", pszFunction, *aStatus)); + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Cancels the current request. This will close any open input or + * output streams and terminate any async requests. Users should + * normally pass NS_BINDING_ABORTED, although other errors may also + * be passed. The error passed in will become the value of the + * status attribute. + * + * @param aStatus the reason for canceling this request. + * + * NOTE: most nsIRequest implementations expect aStatus to be a + * failure code; however, some implementations may allow aStatus to + * be a success code such as NS_OK. In general, aStatus should be + * a failure code. + */ + /* void cancel (in nsresult aStatus); */ + NS_IMETHOD hlpCancel(nsresult aStatus) + { + UP_ENTER_RC(); + dprintf(("%s: aStatus=%p", pszFunction, aStatus)); + + rc = VFTCALL1((VFTnsIRequest*)mpvVFTable, Cancel, mpvThis, aStatus); + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Suspends the current request. This may have the effect of closing + * any underlying transport (in order to free up resources), although + * any open streams remain logically opened and will continue delivering + * data when the transport is resumed. + * + * NOTE: some implementations are unable to immediately suspend, and + * may continue to deliver events already posted to an event queue. In + * general, callers should be capable of handling events even after + * suspending a request. + */ + /* void suspend (); */ + NS_IMETHOD hlpSuspend(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIRequest*)mpvVFTable, Suspend, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Resumes the current request. This may have the effect of re-opening + * any underlying transport and will resume the delivery of data to + * any open streams. + */ + /* void resume (); */ + NS_IMETHOD hlpResume(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIRequest*)mpvVFTable, Resume, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * The load group of this request. While pending, the request is a + * member of the load group. It is the responsibility of the request + * to implement this policy. + */ + /* attribute nsILoadGroup loadGroup; */ + NS_IMETHOD hlpGetLoadGroup(nsILoadGroup * *aLoadGroup) + { + UP_ENTER_RC(); + dprintf(("%s: aLoadGroup=%p\n", pszFunction, aLoadGroup)); + + rc = VFTCALL1((VFTnsIRequest*)mpvVFTable, GetLoadGroup, mpvThis, aLoadGroup); + rc = upCreateWrapper((void**)aLoadGroup, kLoadGroupIID, rc); + + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD hlpSetLoadGroup(nsILoadGroup * aLoadGroup) + { + UP_ENTER_RC(); + dprintf(("%s: aLoadGroup=%p\n", pszFunction, aLoadGroup)); + + nsILoadGroup *pDownLoadGroup = aLoadGroup; + rc = downCreateWrapper((void**)&pDownLoadGroup, kLoadGroupIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = VFTCALL1((VFTnsIRequest*)mpvVFTable, SetLoadGroup, mpvThis, pDownLoadGroup); + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * The load flags of this request. Bits 0-15 are reserved. + * + * When added to a load group, this request's load flags are merged with + * the load flags of the load group. + */ + /* attribute nsLoadFlags loadFlags; */ + NS_IMETHOD hlpGetLoadFlags(nsLoadFlags *aLoadFlags) + { + UP_ENTER_RC(); + dprintf(("%s: aLoadFlags=%p\n", pszFunction, aLoadFlags)); + + rc = VFTCALL1((VFTnsIRequest*)mpvVFTable, GetLoadFlags, mpvThis, aLoadFlags); + if (VALID_PTR(aLoadFlags)) + dprintf(("%s: *aLoadFlags=%d", pszFunction, *aLoadFlags)); + + UP_LEAVE_INT(rc); + return rc; + } + + + NS_IMETHOD hlpSetLoadFlags(nsLoadFlags aLoadFlags) + { + UP_ENTER_RC(); + dprintf(("%s: aLoadFlags=%#x\n", pszFunction, aLoadFlags)); + + rc = VFTCALL1((VFTnsIRequest*)mpvVFTable, SetLoadFlags, mpvThis, aLoadFlags); + + UP_LEAVE_INT(rc); + return rc; + } + + /** Constructor */ + UpRequestBase(void *pvThis, void *pvInterface, REFNSIID aIID) : + UpSupportsBase(pvThis, pvInterface, aIID) + { + } + +}; + + +/** + * nsRequest + */ +class UpRequest : public nsIRequest, public UpRequestBase +{ +public: + UP_IMPL_NSISUPPORTS(); + UP_IMPL_NSIREQUEST(); + + /** Constructor */ + UpRequest(void *pvThis) : + UpRequestBase(pvThis, (nsIRequest*)this, kRequestIID) + { + } +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsILoadGroup +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * nsILoadGroup + */ +class UpLoadGroup : public nsILoadGroup, public UpRequestBase +{ +public: + UP_IMPL_NSISUPPORTS(); + UP_IMPL_NSIREQUEST(); + + /** + * The group observer is notified when requests are added to and removed + * from this load group. The groupObserver is weak referenced. + */ + /* attribute nsIRequestObserver groupObserver; */ + NS_IMETHOD GetGroupObserver(nsIRequestObserver * *aGroupObserver) + { + UP_ENTER_RC(); + dprintf(("%s: aGroupObserver=%p\n", pszFunction, aGroupObserver)); + + rc = VFTCALL1((VFTnsILoadGroup*)mpvVFTable, GetGroupObserver, mpvThis, aGroupObserver); + rc = upCreateWrapper((void**)aGroupObserver, kRequestObserverIID, rc); + + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD SetGroupObserver(nsIRequestObserver * aGroupObserver) + { + UP_ENTER_RC(); + dprintf(("%s: aGroupObserver=%p\n", pszFunction, aGroupObserver)); + + nsIRequestObserver *pDownGroupObserver = aGroupObserver; + rc = downCreateWrapper((void**)&pDownGroupObserver, kRequestObserverIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = VFTCALL1((VFTnsILoadGroup*)mpvVFTable, SetGroupObserver, mpvThis, pDownGroupObserver); + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Accesses the default load request for the group. Each time a number + * of requests are added to a group, the defaultLoadRequest may be set + * to indicate that all of the requests are related to a base request. + * + * The load group inherits its load flags from the default load request. + * If the default load request is NULL, then the group's load flags are + * not changed. + */ + /* attribute nsIRequest defaultLoadRequest; */ + NS_IMETHOD GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest) + { + UP_ENTER_RC(); + dprintf(("%s: aDefaultLoadRequest=%p\n", pszFunction, aDefaultLoadRequest)); + + rc = VFTCALL1((VFTnsILoadGroup*)mpvVFTable, GetDefaultLoadRequest, mpvThis, aDefaultLoadRequest); + rc = upCreateWrapper((void**)aDefaultLoadRequest, kRequestIID, rc); + + UP_LEAVE_INT(rc); + return rc; + } + NS_IMETHOD SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest) + { + UP_ENTER_RC(); + dprintf(("%s: aDefaultLoadRequest=%p\n", pszFunction, aDefaultLoadRequest)); + + nsIRequest *pDownDefaultLoadRequest = aDefaultLoadRequest; + rc = downCreateWrapper((void**)&pDownDefaultLoadRequest, kRequestIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = VFTCALL1((VFTnsILoadGroup*)mpvVFTable, SetDefaultLoadRequest, mpvThis, pDownDefaultLoadRequest); + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Adds a new request to the group. This will cause the default load + * flags to be applied to the request. If this is a foreground + * request then the groupObserver's onStartRequest will be called. + * + * If the request is the default load request or if the default load + * request is null, then the load group will inherit its load flags from + * the request. + */ + /* void addRequest (in nsIRequest aRequest, in nsISupports aContext); */ + NS_IMETHOD AddRequest(nsIRequest *aRequest, nsISupports *aContext) + { + UP_ENTER_RC(); + dprintf(("%s: aRequest=%p aContext=%p", pszFunction, aRequest, aContext)); + + nsIRequest *pDownRequest = aRequest; + rc = downCreateWrapper((void**)&pDownRequest, kRequestIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports *pDownSupports = aContext; + rc = downCreateWrapper((void**)&pDownSupports, kSupportsIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = VFTCALL2((VFTnsILoadGroup*)mpvVFTable, AddRequest, mpvThis, pDownRequest, pDownSupports); + } + + UP_LEAVE_INT(rc); + return rc; + } + + + /** + * Removes a request from the group. If this is a foreground request + * then the groupObserver's onStopRequest will be called. + */ + /* void removeRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatus); */ + NS_IMETHOD RemoveRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus) + { + UP_ENTER_RC(); + dprintf(("%s: aRequest=%p aContext=%p aStatus=%d", pszFunction, aRequest, aContext, aStatus)); + + nsIRequest *pDownRequest = aRequest; + rc = downCreateWrapper((void**)&pDownRequest, kRequestIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports *pDownSupports = aContext; + rc = downCreateWrapper((void**)&pDownSupports, kSupportsIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = VFTCALL3((VFTnsILoadGroup*)mpvVFTable, RemoveRequest, mpvThis, pDownRequest, pDownSupports, aStatus); + } + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Returns the requests contained directly in this group. + * Enumerator element type: nsIRequest. + */ + /* readonly attribute nsISimpleEnumerator requests; */ + NS_IMETHOD GetRequests(nsISimpleEnumerator * *aRequests) + { + UP_ENTER_RC(); + dprintf(("%s: aRequests=%p", pszFunction, aRequests)); + + rc = VFTCALL1((VFTnsILoadGroup*)mpvVFTable, GetRequests, mpvThis, aRequests); + rc = upCreateWrapper((void**)aRequests, kSimpleEnumeratorIID, rc); + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Returns the count of "active" requests (ie. requests without the + * LOAD_BACKGROUND bit set). + */ + /* readonly attribute unsigned long activeCount; */ + NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount) + { + UP_ENTER_RC(); + dprintf(("%s: aActiveCount=%p", pszFunction, aActiveCount)); + + rc = VFTCALL1((VFTnsILoadGroup*)mpvVFTable, GetActiveCount, mpvThis, aActiveCount); + if (VALID_PTR(aActiveCount)) + dprintf(("%s: *aActiveCount=%d", pszFunction, *aActiveCount)); + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Notification callbacks for the load group. + */ + /* attribute nsIInterfaceRequestor notificationCallbacks; */ + NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) + { + UP_ENTER_RC(); + dprintf(("%s: aNotificationCallbacks=%p", pszFunction, aNotificationCallbacks)); + + rc = VFTCALL1((VFTnsILoadGroup*)mpvVFTable, GetNotificationCallbacks, mpvThis, aNotificationCallbacks); + rc = upCreateWrapper((void**)aNotificationCallbacks, kInterfaceRequestorIID, rc); + + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) + { + UP_ENTER_RC(); + dprintf(("%s: aNotificationCallbacks=%p", pszFunction, aNotificationCallbacks)); + + nsIInterfaceRequestor *pDownNotificationCallbacks = aNotificationCallbacks; + rc = downCreateWrapper((void**)&pDownNotificationCallbacks, kInterfaceRequestorIID, rc); + if (NS_SUCCEEDED(rc)) + rc = VFTCALL1((VFTnsILoadGroup*)mpvVFTable, SetNotificationCallbacks, mpvThis, pDownNotificationCallbacks); + + UP_LEAVE_INT(rc); + return rc; + } + + /** Constructor */ + UpLoadGroup(void *pvThis) : + UpRequestBase(pvThis, (nsILoadGroup*)this, kLoadGroupIID) + { + } + +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsISimpleEnumerator +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * nsISimpleEnumerator + */ +class UpSimpleEnumerator : public nsISimpleEnumerator, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + /** + * Called to determine whether or not the enumerator has + * any elements that can be returned via getNext(). This method + * is generally used to determine whether or not to initiate or + * continue iteration over the enumerator, though it can be + * called without subsequent getNext() calls. Does not affect + * internal state of enumerator. + * + * @see getNext() + * @return PR_TRUE if there are remaining elements in the enumerator. + * PR_FALSE if there are no more elements in the enumerator. + */ + /* boolean hasMoreElements (); */ + NS_IMETHOD HasMoreElements(PRBool *_retval) + { + UP_ENTER_RC(); + dprintf(("%s: _retval=%p\n", pszFunction, _retval)); + + rc = VFTCALL1((VFTnsISimpleEnumerator*)mpvVFTable, HasMoreElements, mpvThis, _retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d", pszFunction, *_retval)); + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Called to retrieve the next element in the enumerator. The "next" + * element is the first element upon the first call. Must be + * pre-ceeded by a call to hasMoreElements() which returns PR_TRUE. + * This method is generally called within a loop to iterate over + * the elements in the enumerator. + * + * @see hasMoreElements() + * @return NS_OK if the call succeeded in returning a non-null + * value through the out parameter. + * NS_ERROR_FAILURE if there are no more elements + * to enumerate. + * @return the next element in the enumeration. + */ + /* nsISupports getNext (); */ + NS_IMETHOD GetNext(nsISupports **_retval) + { + UP_ENTER_RC(); + dprintf(("%s: _retval=%p", pszFunction, _retval)); + + rc = VFTCALL1((VFTnsISimpleEnumerator*)mpvVFTable, GetNext, mpvThis, _retval); + rc = upCreateWrapper((void**)_retval, kSupportsIID, rc); + + UP_LEAVE_INT(rc); + return rc; + } + + /** Constructor */ + UpSimpleEnumerator(void *pvThis) : + UpSupportsBase(pvThis, (nsISimpleEnumerator*)this, kSimpleEnumeratorIID) + { + } +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIInterfaceRequestor +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * nsIInterfaceRequstor + */ +class UpInterfaceRequestor : public nsIInterfaceRequestor, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + /** + * Retrieves the specified interface pointer. + * + * @param uuid The IID of the interface being requested. + * @param result [out] The interface pointer to be filled in if + * the interface is accessible. + * @return NS_OK - interface was successfully returned. + * NS_NOINTERFACE - interface not accessible. + * NS_ERROR* - method failure. + */ + /* void getInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */ + NS_IMETHOD GetInterface(const nsIID & uuid, void * *result) + { + UP_ENTER_RC(); + DPRINTF_NSID(uuid); + + rc = VFTCALL2((VFTnsIInterfaceRequestor*)mpvVFTable, GetInterface, mpvThis, uuid, result); + rc = upCreateWrapper(result, uuid, rc); + + UP_LEAVE_INT(rc); + return rc; + } + + /** Constructor */ + UpInterfaceRequestor(void *pvThis) : + UpSupportsBase(pvThis, (nsIInterfaceRequestor*)this, kInterfaceRequestorIID) + { + } +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIOutputStream +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * Special wrapper function which get called from a little stub we create + * in UpOutputStream::WriteSegments. The stub pushed the entry point of + * the original function before calling us. + */ +nsresult __cdecl UpOutputStream_nsReadSegmentWrapper(nsReadSegmentFun pfnOrg, void *pvRet, + nsIOutputStream *aOutStream, void *aClosure, char *aToSegment, + PRUint32 aFromOffset, PRUint32 aCount, PRUint32 *aReadCount) +{ + DEBUG_FUNCTIONNAME(); + nsresult rc; + dprintf(("%s: pfnOrg=%p pvRet=%p aOutStream=%p aClosure=%p aToSegment=%p aFromOffset=%d aCount=%d aReadCount=%p\n", + pszFunction, pfnOrg, pvRet, aOutStream, aClosure, aToSegment, aFromOffset, aCount, aReadCount)); + + nsIOutputStream * pupOutStream = aOutStream; + rc = upCreateWrapper((void**)&pupOutStream, kOutputStreamIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = pfnOrg(pupOutStream, aClosure, aToSegment, aFromOffset, aCount, aReadCount); + if (VALID_PTR(aReadCount)) + dprintf(("%s: *aReadCount=%d\n", pszFunction, *aReadCount)); + } + + dprintf(("%s: rc=%d\n", pszFunction, rc)); + return rc; +} + + +/** + * nsIOutputStream + */ +class UpOutputStream : public nsIOutputStream, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + /** + * Close the stream. Forces the output stream to flush any buffered data. + * + * @throws NS_BASE_STREAM_WOULD_BLOCK if unable to flush without blocking + * the calling thread (non-blocking mode only) + */ + /* void close (); */ + NS_IMETHOD Close(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIOutputStream*)mpvVFTable, Close, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Flush the stream. + * + * @throws NS_BASE_STREAM_WOULD_BLOCK if unable to flush without blocking + * the calling thread (non-blocking mode only) + */ + /* void flush (); */ + NS_IMETHOD Flush(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIOutputStream*)mpvVFTable, Flush, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Write data into the stream. + * + * @param aBuf the buffer containing the data to be written + * @param aCount the maximum number of bytes to be written + * + * @return number of bytes written (may be less than aCount) + * + * @throws NS_BASE_STREAM_WOULD_BLOCK if writing to the output stream would + * block the calling thread (non-blocking mode only) + * @throws on failure + */ + /* unsigned long write (in string aBuf, in unsigned long aCount); */ + NS_IMETHOD Write(const char *aBuf, PRUint32 aCount, PRUint32 *_retval) + { + UP_ENTER_RC(); + dprintf(("%s: aBuf=%p aCount=%d _retval=%p", pszFunction, aBuf, aCount, _retval)); + rc = VFTCALL3((VFTnsIOutputStream*)mpvVFTable, Write, mpvThis, aBuf, aCount, _retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d\n", pszFunction, *_retval)); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Writes data into the stream from an input stream. + * + * @param aFromStream the stream containing the data to be written + * @param aCount the maximum number of bytes to be written + * + * @return number of bytes written (may be less than aCount) + * + * @throws NS_BASE_STREAM_WOULD_BLOCK if writing to the output stream would + * block the calling thread (non-blocking mode only) + * @throws on failure + * + * NOTE: This method is defined by this interface in order to allow the + * output stream to efficiently copy the data from the input stream into + * its internal buffer (if any). If this method was provided as an external + * facility, a separate char* buffer would need to be used in order to call + * the output stream's other Write method. + */ + /* unsigned long writeFrom (in nsIInputStream aFromStream, in unsigned long aCount); */ + NS_IMETHOD WriteFrom(nsIInputStream *aFromStream, PRUint32 aCount, PRUint32 *_retval) + { + UP_ENTER_RC(); + dprintf(("%s: aFromStream=%p aCount=%d _retval=%p", pszFunction, aFromStream, aCount, _retval)); + + nsIInputStream *pDownFromStream = aFromStream; + rc = downCreateWrapper((void**)&pDownFromStream, kInputStreamIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = VFTCALL3((VFTnsIOutputStream*)mpvVFTable, WriteFrom, mpvThis, pDownFromStream, aCount, _retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d\n", pszFunction, *_retval)); + } + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Low-level write method that has access to the stream's underlying buffer. + * The reader function may be called multiple times for segmented buffers. + * WriteSegments is expected to keep calling the reader until either there + * is nothing left to write or the reader returns an error. WriteSegments + * should not call the reader with zero bytes to provide. + * + * @param aReader the "provider" of the data to be written + * @param aClosure opaque parameter passed to reader + * @param aCount the maximum number of bytes to be written + * + * @return number of bytes written (may be less than aCount) + * + * @throws NS_BASE_STREAM_WOULD_BLOCK if writing to the output stream would + * block the calling thread (non-blocking mode only) + * @throws on failure + * + * NOTE: this function may be unimplemented if a stream has no underlying + * buffer (e.g., socket output stream). + */ + /* [noscript] unsigned long writeSegments (in nsReadSegmentFun aReader, in voidPtr aClosure, in unsigned long aCount); */ + NS_IMETHOD WriteSegments(nsReadSegmentFun aReader, void * aClosure, PRUint32 aCount, PRUint32 *_retval) + { + UP_ENTER_RC(); + dprintf(("%s: aReader=%p aClosure=%p aCount=%d _retval=%p", pszFunction, aReader, aClosure, aCount, _retval)); + + int i; + char achWrapper[32]; + + /* push aReader */ + achWrapper[0] = 0x68; + *((unsigned*)&achWrapper[1]) = (unsigned)aReader; + i = 5; + +#if VFT_VAC365 + /* optlink - mov [ebp + 08h], eax */ + achWrapper[i++] = 0x89; + achWrapper[i++] = 0x45; + achWrapper[i++] = 0x08; + /* optlink - mov [ebp + 0ch], edx */ + achWrapper[i++] = 0x89; + achWrapper[i++] = 0x55; + achWrapper[i++] = 0x0c; + /* optlink - mov [ebp + 10h], ecx */ + achWrapper[i++] = 0x89; + achWrapper[i++] = 0x4d; + achWrapper[i++] = 0x10; +#endif + /* call UpOutputStream_nsReadSegmentWrapper */ + achWrapper[i] = 0xe8; + *((unsigned*)&achWrapper[i+1]) = (unsigned)UpOutputStream_nsReadSegmentWrapper - (unsigned)&achWrapper[i+5]; + i += 5; + + /* add esp, 4 */ + achWrapper[i++] = 0x83; + achWrapper[i++] = 0xc4; + achWrapper[i++] = 0x04; + +#if VFT_VAC365 + /* _Optlink - ret */ + achWrapper[i++] = 0xc3; +#elif VFT_VC60 + /* __stdcall - ret (6*4) */ + achWrapper[i++] = 0xc2; + achWrapper[i++] = 6*4; + achWrapper[i++] = 0; +#else +#error fixme! neither VFT_VC60 nor VFT_VAC365 was set. +#endif + achWrapper[i++] = 0xcc; + achWrapper[i] = 0xcc; + + /* do call - this better not be asynchronous stuff. */ + rc = VFTCALL4((VFTnsIOutputStream*)mpvVFTable, WriteSegments, mpvThis, + (nsReadSegmentFun)((void*)&achWrapper[0]), aClosure, aCount, _retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d\n", pszFunction, *_retval)); + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * @return true if stream is non-blocking + * + * NOTE: writing to a blocking output stream will block the calling thread + * until all given data can be consumed by the stream. + */ + /* boolean isNonBlocking (); */ + NS_IMETHOD IsNonBlocking(PRBool *_retval) + { + UP_ENTER_RC(); + dprintf(("%s: _retval=%p", pszFunction, _retval)); + + rc = VFTCALL1((VFTnsIOutputStream*)mpvVFTable, IsNonBlocking, mpvThis, _retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d\n", pszFunction, *_retval)); + + UP_LEAVE_INT(rc); + return rc; + } + + /** Constructor */ + UpOutputStream(void *pvThis) : + UpSupportsBase(pvThis, (nsIOutputStream*)this, kOutputStreamIID) + { + } +}; + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIPluginStreamListener +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * nsIPluginStreamListener + */ +class UpPluginStreamListener : public nsIPluginStreamListener, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + /** + * Notify the observer that the URL has started to load. This method is + * called only once, at the beginning of a URL load.

+ * + * @param aPluginInfo - plugin stream info + * @return - the return value is currently ignored, in the future + * it may be used to cancel the URL load.. + */ + /* void onStartBinding (in nsIPluginStreamInfo aPluginInfo); */ + NS_IMETHOD OnStartBinding(nsIPluginStreamInfo *aPluginInfo) + { + UP_ENTER_RC(); + dprintf(("%s: sPluginInfo=%p", pszFunction, aPluginInfo)); + + nsIPluginStreamInfo *pDownPluginInfo = aPluginInfo; + rc = downCreateWrapper((void**)&pDownPluginInfo, kPluginStreamInfoIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = VFTCALL1((VFTnsIPluginStreamListener*)mpvVFTable, OnStartBinding, mpvThis, pDownPluginInfo); + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Notify the client that data is available in the input stream. This + * method is called whenver data is written into the input stream by the + * networking library...

+ * + * @param aPluginInfo - plugin stream info + * @param aInputStream - the input stream containing the data. This stream can + * be either a blocking or non-blocking stream. + * @param aLength - the amount of data that was just pushed into the stream. + * @return - the return value is currently ignored. + */ + /* void onDataAvailable (in nsIPluginStreamInfo aPluginInfo, in nsIInputStream aInputStream, in unsigned long aLength); */ + NS_IMETHOD OnDataAvailable(nsIPluginStreamInfo *aPluginInfo, nsIInputStream *aInputStream, PRUint32 aLength) + { + UP_ENTER_RC(); + dprintf(("%s: sPluginInfo=%p aInputStream=%p aLength=%d", pszFunction, aPluginInfo, aInputStream, aLength)); + + nsIPluginStreamInfo *pDownPluginInfo = aPluginInfo; + rc = downCreateWrapper((void**)&pDownPluginInfo, kPluginStreamInfoIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsIInputStream *pDownInputStream = aInputStream; + rc = downCreateWrapper((void**)&pDownInputStream, kInputStreamIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = VFTCALL3((VFTnsIPluginStreamListener*)mpvVFTable, OnDataAvailable, mpvThis, pDownPluginInfo, pDownInputStream, aLength); + } + + UP_LEAVE_INT(rc); + return rc; + } + + + /** + * Notify the client that data is available in the file. + * + * @param aPluginInfo - plugin stream info + * @param aFileName - the name of the file containing the data + * @return - the return value is currently ignored. + */ + /* void onFileAvailable (in nsIPluginStreamInfo aPluginInfo, in string aFileName); */ + NS_IMETHOD OnFileAvailable(nsIPluginStreamInfo *aPluginInfo, const char *aFileName) + { + UP_ENTER_RC(); + /** @todo NLS/Codepage Text for aFileName. */ + dprintf(("%s: sPluginInfo=%p aFileName=%p", pszFunction, aPluginInfo, aFileName)); + DPRINTF_STR(aFileName); + + nsIPluginStreamInfo *pDownPluginInfo = aPluginInfo; + rc = downCreateWrapper((void**)&pDownPluginInfo, kPluginStreamInfoIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = VFTCALL2((VFTnsIPluginStreamListener*)mpvVFTable, OnFileAvailable, mpvThis, pDownPluginInfo, aFileName); + + UP_LEAVE_INT(rc); + return rc; + } + + + /** + * Notify the observer that the URL has finished loading. This method is + * called once when the networking library has finished processing the + * URL transaction initiatied via the nsINetService::Open(...) call.

+ * + * This method is called regardless of whether the URL loaded successfully.

+ * + * @param aPluginInfo - plugin stream info + * @param aStatus - reason why the stream has been terminated + * @return - the return value is currently ignored. + */ + /* void onStopBinding (in nsIPluginStreamInfo aPluginInfo, in nsresult aStatus); */ + NS_IMETHOD OnStopBinding(nsIPluginStreamInfo *aPluginInfo, nsresult aStatus) + { + UP_ENTER_RC(); + dprintf(("%s: sPluginInfo=%p aStatus=%d", pszFunction, aPluginInfo, aStatus)); + + nsIPluginStreamInfo *pDownPluginInfo = aPluginInfo; + rc = downCreateWrapper((void**)&pDownPluginInfo, kPluginStreamInfoIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = VFTCALL2((VFTnsIPluginStreamListener*)mpvVFTable, OnStopBinding, mpvThis, pDownPluginInfo, aStatus); + + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Gets the type of the stream + * + * @param aStreamType - the type of the stream + */ + /* readonly attribute nsPluginStreamType streamType; */ + NS_IMETHOD GetStreamType(nsPluginStreamType *aStreamType) + { + UP_ENTER_RC(); + dprintf(("%s: aStreamType=%p", pszFunction, aStreamType)); + + rc = VFTCALL1((VFTnsIPluginStreamListener*)mpvVFTable, GetStreamType, mpvThis, aStreamType); + if (VALID_PTR(aStreamType)) + dprintf(("%s: *aStreamType=%d\n", pszFunction, aStreamType)); + + UP_LEAVE_INT(rc); + return rc; + } + + /** Constructor */ + UpPluginStreamListener(void *pvThis) : + UpSupportsBase(pvThis, (nsIPluginStreamListener*)this, kPluginStreamListenerIID) + { + } +}; + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: FlashIObject7 +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + + +/** + * FlashIObject7 + */ +class UpFlashIObject7 : public FlashIObject7, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + /** + * Notify the observer that the URL has started to load. This method is + * called only once, at the beginning of a URL load.

+ * + * @param aPluginInfo - plugin stream info + * @return - the return value is currently ignored, in the future + * it may be used to cancel the URL load.. + */ + /* void onStartBinding (in nsIPluginStreamInfo aPluginInfo); */ + NS_IMETHOD Evaluate(const char *aString, FlashIObject7 **aFlashObject) + { + UP_ENTER_RC(); + dprintf(("%s: aString=%p aFlashObject=%p", pszFunction, aString, aFlashObject)); + DPRINTF_STR(aString); + + rc = VFTCALL2((VFTFlashIObject7*)mpvVFTable, Evaluate, mpvThis, aString, aFlashObject); + rc = upCreateWrapper((void**)aFlashObject, kFlashIObject7IID, NS_OK); + + UP_LEAVE_INT(rc); + return rc; + } + + /** Constructor */ + UpFlashIObject7(void *pvThis) : + UpSupportsBase(pvThis, (FlashIObject7*)this, kFlashIObject7IID) + { + } +}; + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: FlashIScriptablePlugin7 +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * FlashIScriptablePlugin (d458fe9c-518c-11d6-84cb-0005029bc257) + * Flash version 7r14 + */ +class UpFlashIScriptablePlugin7 : public FlashIScriptablePlugin7, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + NS_IMETHOD IsPlaying(PRBool *aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aretval=%p", pszFunction, aretval)); + rc = VFTCALL1((VFTFlashIScriptablePlugin7*)mpvVFTable, IsPlaying, mpvThis, aretval); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD Play(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTFlashIScriptablePlugin7*)mpvVFTable, Play, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD StopPlay(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTFlashIScriptablePlugin7*)mpvVFTable, StopPlay, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TotalFrames(PRInt32 *aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aretval=%p", pszFunction, aretval)); + rc = VFTCALL1((VFTFlashIScriptablePlugin7*)mpvVFTable, TotalFrames, mpvThis, aretval); + if (VALID_PTR(aretval)) + dprintf(("%s: *aretval=%d", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD CurrentFrame(PRInt32 *aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aretval=%p", pszFunction, aretval)); + rc = VFTCALL1((VFTFlashIScriptablePlugin7*)mpvVFTable, CurrentFrame, mpvThis, aretval); + if (VALID_PTR(aretval)) + dprintf(("%s: *aretval=%d", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GotoFrame(PRInt32 aFrame) + { + UP_ENTER_RC(); + dprintf(("%s: aFrame=%d", pszFunction, aFrame)); + rc = VFTCALL1((VFTFlashIScriptablePlugin7*)mpvVFTable, GotoFrame, mpvThis, aFrame); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD Rewind(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTFlashIScriptablePlugin7*)mpvVFTable, Rewind, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD Back(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTFlashIScriptablePlugin7*)mpvVFTable, Back, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD Forward(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTFlashIScriptablePlugin7*)mpvVFTable, Forward, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD Pan(PRInt32 aX, PRInt32 aY, PRInt32 aMode) + { + UP_ENTER_RC(); + dprintf(("%s: aX=%d aY=%d aMode=%d", pszFunction, aX, aY, aMode)); + rc = VFTCALL3((VFTFlashIScriptablePlugin7*)mpvVFTable, Pan, mpvThis, aX, aY, aMode); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD PercentLoaded(PRInt32 *aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aretval=%p", pszFunction, aretval)); + rc = VFTCALL1((VFTFlashIScriptablePlugin7*)mpvVFTable, PercentLoaded, mpvThis, aretval); + if (VALID_PTR(aretval)) + dprintf(("%s: *aretval=%d", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD FrameLoaded(PRInt32 aFrame, PRBool *aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aFrame=%d aretval=%p", pszFunction, aFrame, aretval)); + rc = VFTCALL2((VFTFlashIScriptablePlugin7*)mpvVFTable, FrameLoaded, mpvThis, aFrame, aretval); + if (VALID_PTR(aretval)) + dprintf(("%s: *aretval=%d", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD FlashVersion(PRInt32 *aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aretval=%p", pszFunction, aretval)); + rc = VFTCALL1((VFTFlashIScriptablePlugin7*)mpvVFTable, FlashVersion, mpvThis, aretval); + if (VALID_PTR(aretval)) + dprintf(("%s: *aretval=%d", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD Zoom(PRInt32 aZoom) + { + UP_ENTER_RC(); + dprintf(("%s: aZoom=%p", pszFunction, aZoom)); + rc = VFTCALL1((VFTFlashIScriptablePlugin7*)mpvVFTable, Zoom, mpvThis, aZoom); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD SetZoomRect(PRInt32 aLeft, PRInt32 aTop, PRInt32 aRight, PRInt32 aBottom) + { + UP_ENTER_RC(); + dprintf(("%s: aLeft=%d aTop=%d aRight=%d aBottom=%d", pszFunction, aLeft, aTop, aRight, aBottom)); + rc = VFTCALL4((VFTFlashIScriptablePlugin7*)mpvVFTable, SetZoomRect, mpvThis, aLeft, aTop, aRight, aBottom); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD LoadMovie(PRInt32 aLayer, PRUnichar *aURL) + { + UP_ENTER_RC(); + dprintf(("%s: aLayer=%d aURL=%ls", pszFunction, aLayer, aURL)); + rc = VFTCALL2((VFTFlashIScriptablePlugin7*)mpvVFTable, LoadMovie, mpvThis, aLayer, aURL); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TGotoFrame(PRUnichar *aTarget, PRInt32 aFrameNumber) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%ls aFrameNumber=%d", pszFunction, aTarget, aFrameNumber)); + rc = VFTCALL2((VFTFlashIScriptablePlugin7*)mpvVFTable, TGotoFrame, mpvThis, aTarget, aFrameNumber); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TGotoLabel(PRUnichar *aTarget, PRUnichar *aLabel) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%ls aLabel=%ls", pszFunction, aTarget, aLabel)); + rc = VFTCALL2((VFTFlashIScriptablePlugin7*)mpvVFTable, TGotoLabel, mpvThis, aTarget, aLabel); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TCurrentFrame(PRUnichar *aTarget, PRInt32 *aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%ls aretval=%p", pszFunction, aTarget, aretval)); + rc = VFTCALL2((VFTFlashIScriptablePlugin7*)mpvVFTable, TCurrentFrame, mpvThis, aTarget, aretval); + if (VALID_PTR(aretval)) + dprintf(("%s: *aretval=%d", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TCurrentLabel(PRUnichar *aTarget, PRUnichar **aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%ls aretval=%p", pszFunction, aTarget, aretval)); + rc = VFTCALL2((VFTFlashIScriptablePlugin7*)mpvVFTable, TCurrentLabel, mpvThis, aTarget, aretval); + if (VALID_PTR(aretval) && VALID_PTR(*aretval)) + dprintf(("%s: *aretval=%ls", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TPlay(PRUnichar *aTarget) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%ls", pszFunction, aTarget)); + rc = VFTCALL1((VFTFlashIScriptablePlugin7*)mpvVFTable, TPlay, mpvThis, aTarget); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TStopPlay(PRUnichar *aTarget) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%ls", pszFunction, aTarget)); + rc = VFTCALL1((VFTFlashIScriptablePlugin7*)mpvVFTable, TStopPlay, mpvThis, aTarget); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD SetVariable(PRUnichar *aVariable, PRUnichar *aValue) + { + UP_ENTER_RC(); + dprintf(("%s: aVariable=%ls aValue=%ls", pszFunction, aVariable, aValue)); + rc = VFTCALL2((VFTFlashIScriptablePlugin7*)mpvVFTable, SetVariable, mpvThis, aVariable, aValue); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetVariable(PRUnichar *aVariable, PRUnichar **aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aVariable=%ls aretval=%p", pszFunction, aVariable, aretval)); + rc = VFTCALL2((VFTFlashIScriptablePlugin7*)mpvVFTable, GetVariable, mpvThis, aVariable, aretval); + if (VALID_PTR(aretval) && VALID_PTR(*aretval)) + dprintf(("%s: *aretval=%ls", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TSetProperty(PRUnichar *aTarget, PRInt32 aProperty, PRUnichar *aValue) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%ls aProperty=%d aValue=%ls", pszFunction, aTarget, aProperty, aValue)); + rc = VFTCALL3((VFTFlashIScriptablePlugin7*)mpvVFTable, TSetProperty, mpvThis, aTarget, aProperty, aValue); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TGetProperty(PRUnichar *aTarget, PRInt32 aProperty, PRUnichar **aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%ls aProperty=%d aretval=%p", pszFunction, aTarget, aProperty, aretval)); + rc = VFTCALL3((VFTFlashIScriptablePlugin7*)mpvVFTable, TGetProperty, mpvThis, aTarget, aProperty, aretval); + if (VALID_PTR(aretval) && VALID_PTR(*aretval)) + dprintf(("%s: *aretval=%ls", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TGetPropertyAsNumber(PRUnichar *aTarget, PRInt32 aProperty, double **aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%ls aProperty=%d aretval=%p", pszFunction, aTarget, aProperty, aretval)); + rc = VFTCALL3((VFTFlashIScriptablePlugin7*)mpvVFTable, TGetPropertyAsNumber, mpvThis, aTarget, aProperty, aretval); + if (VALID_PTR(aretval)) + dprintf(("%s: *aretval=%f", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TCallLabel(PRUnichar *aTarget, PRUnichar *aLabel) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%ls aLabel=%ls", pszFunction, aTarget, aLabel)); + rc = VFTCALL2((VFTFlashIScriptablePlugin7*)mpvVFTable, TCallLabel, mpvThis, aTarget, aLabel); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TCallFrame(PRUnichar *aTarget, PRInt32 aFrameNumber) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%ls aFrameNumber=%d", pszFunction, aTarget, aFrameNumber)); + rc = VFTCALL2((VFTFlashIScriptablePlugin7*)mpvVFTable, TCallFrame, mpvThis, aTarget, aFrameNumber); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD SetWindow(FlashIObject7 *aFlashObject, PRInt32 a1) + { + UP_ENTER_RC(); + dprintf(("%s: aFlashObject=%p a1=%d", pszFunction, aFlashObject, a1)); + + FlashIObject7 *pDownFlashObject = aFlashObject; + rc = downCreateWrapper((void**)&pDownFlashObject, kFlashIObject7IID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = VFTCALL2((VFTFlashIScriptablePlugin7*)mpvVFTable, SetWindow, mpvThis, pDownFlashObject, a1); + + UP_LEAVE_INT(rc); + return rc; + } + + /** Constructor */ + UpFlashIScriptablePlugin7(void *pvThis) : + UpSupportsBase(pvThis, (FlashIScriptablePlugin7*)this, kFlashIScriptablePlugin7IID) + { + } +}; + + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIFlash5 +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * nsIPlugin5 (d27cdb6e-ae6d-11cf-96b8-444553540000) + * Flash 5 rXY for OS/2 + */ +class UpFlash5 : public nsIFlash5, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + NS_IMETHOD IsPlaying(PRBool *aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aretval=%p", pszFunction, aretval)); + rc = VFTCALL1((VFTnsIFlash5*)mpvVFTable, IsPlaying, mpvThis, aretval); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD Play(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIFlash5*)mpvVFTable, Play, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD StopPlay(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIFlash5*)mpvVFTable, StopPlay, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TotalFrames(PRInt32 *aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aretval=%p", pszFunction, aretval)); + rc = VFTCALL1((VFTnsIFlash5*)mpvVFTable, TotalFrames, mpvThis, aretval); + if (VALID_PTR(aretval)) + dprintf(("%s: *aretval=%d", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD CurrentFrame(PRInt32 *aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aretval=%p", pszFunction, aretval)); + rc = VFTCALL1((VFTnsIFlash5*)mpvVFTable, CurrentFrame, mpvThis, aretval); + if (VALID_PTR(aretval)) + dprintf(("%s: *aretval=%d", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GotoFrame(PRInt32 aFrame) + { + UP_ENTER_RC(); + dprintf(("%s: aFrame=%d", pszFunction, aFrame)); + rc = VFTCALL1((VFTnsIFlash5*)mpvVFTable, GotoFrame, mpvThis, aFrame); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD Rewind(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIFlash5*)mpvVFTable, Rewind, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD Back(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIFlash5*)mpvVFTable, Back, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD Forward(void) + { + UP_ENTER_RC(); + rc = VFTCALL0((VFTnsIFlash5*)mpvVFTable, Forward, mpvThis); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD PercentLoaded(PRInt32 *aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aretval=%p", pszFunction, aretval)); + rc = VFTCALL1((VFTnsIFlash5*)mpvVFTable, PercentLoaded, mpvThis, aretval); + if (VALID_PTR(aretval)) + dprintf(("%s: *aretval=%d", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD FrameLoaded(PRInt32 aFrame, PRBool *aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aFrame=%d aretval=%p", pszFunction, aFrame, aretval)); + rc = VFTCALL2((VFTnsIFlash5*)mpvVFTable, FrameLoaded, mpvThis, aFrame, aretval); + if (VALID_PTR(aretval)) + dprintf(("%s: *aretval=%d", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD FlashVersion(PRInt32 *aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aretval=%p", pszFunction, aretval)); + rc = VFTCALL1((VFTnsIFlash5*)mpvVFTable, FlashVersion, mpvThis, aretval); + if (VALID_PTR(aretval)) + dprintf(("%s: *aretval=%d", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD Pan(PRInt32 aX, PRInt32 aY, PRInt32 aMode) + { + UP_ENTER_RC(); + dprintf(("%s: aX=%d aY=%d aMode=%d", pszFunction, aX, aY, aMode)); + rc = VFTCALL3((VFTnsIFlash5*)mpvVFTable, Pan, mpvThis, aX, aY, aMode); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD Zoom(PRInt32 aZoom) + { + UP_ENTER_RC(); + dprintf(("%s: aZoom=%p", pszFunction, aZoom)); + rc = VFTCALL1((VFTnsIFlash5*)mpvVFTable, Zoom, mpvThis, aZoom); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD SetZoomRect(PRInt32 aLeft, PRInt32 aTop, PRInt32 aRight, PRInt32 aBottom) + { + UP_ENTER_RC(); + dprintf(("%s: aLeft=%d aTop=%d aRight=%d aBottom=%d", pszFunction, aLeft, aTop, aRight, aBottom)); + rc = VFTCALL4((VFTnsIFlash5*)mpvVFTable, SetZoomRect, mpvThis, aLeft, aTop, aRight, aBottom); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD LoadMovie(PRInt32 aLayer, const char *aURL) + { + UP_ENTER_RC(); + dprintf(("%s: aLayer=%d aURL=%p", pszFunction, aLayer, aURL)); + DPRINTF_STR(aURL); + rc = VFTCALL2((VFTnsIFlash5*)mpvVFTable, LoadMovie, mpvThis, aLayer, aURL); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TGotoFrame(const char *aTarget, PRInt32 aFrameNumber) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%p aFrameNumber=%d", pszFunction, aTarget, aFrameNumber)); + DPRINTF_STR(aTarget); + rc = VFTCALL2((VFTnsIFlash5*)mpvVFTable, TGotoFrame, mpvThis, aTarget, aFrameNumber); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TGotoLabel(const char *aTarget, const char *aLabel) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%p aLabel=%p", pszFunction, aTarget, aLabel)); + DPRINTF_STR(aTarget); + DPRINTF_STR(aLabel); + rc = VFTCALL2((VFTnsIFlash5*)mpvVFTable, TGotoLabel, mpvThis, aTarget, aLabel); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TCurrentFrame(const char *aTarget, PRInt32 *aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%p aretval=%p", pszFunction, aTarget, aretval)); + DPRINTF_STR(aTarget); + rc = VFTCALL2((VFTnsIFlash5*)mpvVFTable, TCurrentFrame, mpvThis, aTarget, aretval); + if (VALID_PTR(aretval)) + dprintf(("%s: *aretval=%d", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TCurrentLabel(const char *aTarget, char **aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%p aretval=%p", pszFunction, aTarget, aretval)); + DPRINTF_STR(aTarget); + rc = VFTCALL2((VFTnsIFlash5*)mpvVFTable, TCurrentLabel, mpvThis, aTarget, aretval); + if (VALID_PTR(aretval)) + DPRINTF_STR(*aretval); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TPlay(const char *aTarget) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%p", pszFunction, aTarget)); + DPRINTF_STR(aTarget); + rc = VFTCALL1((VFTnsIFlash5*)mpvVFTable, TPlay, mpvThis, aTarget); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TStopPlay(const char *aTarget) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%p", pszFunction, aTarget)); + DPRINTF_STR(aTarget); + rc = VFTCALL1((VFTnsIFlash5*)mpvVFTable, TStopPlay, mpvThis, aTarget); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD SetVariable(const char *aVariable, const char *aValue) + { + UP_ENTER_RC(); + dprintf(("%s: aVariable=%p aValue=%p", pszFunction, aVariable, aValue)); + DPRINTF_STR(aVariable); + DPRINTF_STR(aValue); + rc = VFTCALL2((VFTnsIFlash5*)mpvVFTable, SetVariable, mpvThis, aVariable, aValue); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD GetVariable(const char *aVariable, char **aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aVariable=%p aretval=%p", pszFunction, aVariable, aretval)); + DPRINTF_STR(aVariable); + rc = VFTCALL2((VFTnsIFlash5*)mpvVFTable, GetVariable, mpvThis, aVariable, aretval); + if (VALID_PTR(aretval) && VALID_PTR(*aretval)) + DPRINTF_STR(aretval); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TSetProperty(const char *aTarget, PRInt32 aProperty, const char *aValue) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%p aProperty=%d aValue=%p", pszFunction, aTarget, aProperty, aValue)); + DPRINTF_STR(aTarget); + DPRINTF_STR(aValue); + rc = VFTCALL3((VFTnsIFlash5*)mpvVFTable, TSetProperty, mpvThis, aTarget, aProperty, aValue); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TGetProperty(const char *aTarget, PRInt32 aProperty, char **aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%p aProperty=%d aretval=%p", pszFunction, aTarget, aProperty, aretval)); + DPRINTF_STR(aTarget); + rc = VFTCALL3((VFTnsIFlash5*)mpvVFTable, TGetProperty, mpvThis, aTarget, aProperty, aretval); + if (VALID_PTR(aretval)) + DPRINTF_STR(*aretval); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TCallFrame(const char *aTarget, PRInt32 aFrame) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%p aFrameNumber=%d", pszFunction, aTarget, aFrame)); + DPRINTF_STR(aTarget); + rc = VFTCALL2((VFTnsIFlash5*)mpvVFTable, TCallFrame, mpvThis, aTarget, aFrame); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TCallLabel(const char *aTarget, const char *aLabel) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%p aLabel=%p", pszFunction, aTarget, aLabel)); + DPRINTF_STR(aTarget); + DPRINTF_STR(aLabel); + rc = VFTCALL2((VFTnsIFlash5*)mpvVFTable, TCallLabel, mpvThis, aTarget, aLabel); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TGetPropertyAsNumber(const char *aTarget, PRInt32 aProperty, double *aretval) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%p aProperty=%d aretval=%p", pszFunction, aTarget, aProperty, aretval)); + DPRINTF_STR(aTarget); + rc = VFTCALL3((VFTnsIFlash5*)mpvVFTable, TGetPropertyAsNumber, mpvThis, aTarget, aProperty, aretval); + if (VALID_PTR(aretval)) + dprintf(("%s: *aretval=%f", pszFunction, *aretval)); + UP_LEAVE_INT(rc); + return rc; + } + + NS_IMETHOD TSetPropertyAsNumber(const char *aTarget, PRInt32 aProperty, double aValue) + { + UP_ENTER_RC(); + dprintf(("%s: aTarget=%p aProperty=%d aValue=%f", pszFunction, aTarget, aProperty, aValue)); + DPRINTF_STR(aTarget); + rc = VFTCALL3((VFTnsIFlash5*)mpvVFTable, TSetPropertyAsNumber, mpvThis, aTarget, aProperty, aValue); + UP_LEAVE_INT(rc); + return rc; + } + + /** Constructor */ + UpFlash5(void *pvThis) : + UpSupportsBase(pvThis, (nsIFlash5*)this, kFlash5IID) + { + } + +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIClassInfo +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * nsIClassInfo + */ +class UpClassInfo : public nsIClassInfo, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + /** + * Get an ordered list of the interface ids that instances of the class + * promise to implement. Note that nsISupports is an implicit member + * of any such list and need not be included. + * + * Should set *count = 0 and *array = null and return NS_OK if getting the + * list is not supported. + */ + /* void getInterfaces (out PRUint32 count, [array, size_is (count), retval] out nsIIDPtr array); */ + NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array) + { + UP_ENTER_RC(); + dprintf(("%s: count=%p array=%p", pszFunction, count, array)); + rc = VFTCALL2((VFTnsIClassInfo*)mpvVFTable, GetInterfaces, mpvThis, count, array); + if (NS_SUCCEEDED(rc) && VALID_PTR(count) && VALID_PTR(array) && VALID_PTR(*array)) + { + dprintf(("%s: *count=%d\n", *count)); + for (unsigned i = 0; i < *count; i++) + DPRINTF_NSID(*((*array)[i])); + } + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Get a language mapping specific helper object that may assist in using + * objects of this class in a specific lanaguage. For instance, if asked + * for the helper for nsIProgrammingLanguage::JAVASCRIPT this might return + * an object that can be QI'd into the nsIXPCScriptable interface to assist + * XPConnect in supplying JavaScript specific behavior to callers of the + * instance object. + * + * see: nsIProgrammingLanguage.idl + * + * Should return null if no helper available for given language. + */ + /* nsISupports getHelperForLanguage (in PRUint32 language); */ + NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval) + { + UP_ENTER_RC(); + dprintf(("%s: language=%d _retval=%p", pszFunction, language, _retval)); + rc = VFTCALL2((VFTnsIClassInfo*)mpvVFTable, GetHelperForLanguage, mpvThis, language, _retval); + rc = upCreateWrapper((void**)_retval, kSupportsIID, rc); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * A contract ID through which an instance of this class can be created + * (or accessed as a service, if |flags & SINGLETON|), or null. + */ + /* readonly attribute string contractID; */ + NS_IMETHOD GetContractID(char * *aContractID) + { + UP_ENTER_RC(); + dprintf(("%s: aContractID=%p", pszFunction, aContractID)); + rc = VFTCALL1((VFTnsIClassInfo*)mpvVFTable, GetContractID, mpvThis, aContractID); + DPRINTF_STRNULL(aContractID); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * A human readable string naming the class, or null. + */ + /* readonly attribute string classDescription; */ + NS_IMETHOD GetClassDescription(char * *aClassDescription) + { + UP_ENTER_RC(); + dprintf(("%s: aClassDescription=%p", pszFunction, aClassDescription)); + rc = VFTCALL1((VFTnsIClassInfo*)mpvVFTable, GetClassDescription, mpvThis, aClassDescription); + DPRINTF_STRNULL(aClassDescription); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * A class ID through which an instance of this class can be created + * (or accessed as a service, if |flags & SINGLETON|), or null. + */ + /* readonly attribute nsCIDPtr classID; */ + NS_IMETHOD GetClassID(nsCID * *aClassID) + { + UP_ENTER_RC(); + dprintf(("%s: aClassID=%p", pszFunction, aClassID)); + rc = VFTCALL1((VFTnsIClassInfo*)mpvVFTable, GetClassID, mpvThis, aClassID); + DPRINTF_NSID(**aClassID); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Return language type from list in nsIProgrammingLanguage + */ + /* readonly attribute PRUint32 implementationLanguage; */ + NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage) + { + UP_ENTER_RC(); + dprintf(("%s: aImplementationLanguage=%p", pszFunction, aImplementationLanguage)); + rc = VFTCALL1((VFTnsIClassInfo*)mpvVFTable, GetImplementationLanguage, mpvThis, aImplementationLanguage); + if (VALID_PTR(aImplementationLanguage)) + dprintf(("%s: *aImplementationLanguage=%d", pszFunction, *aImplementationLanguage)); + UP_LEAVE_INT(rc); + return rc; + } + + /* readonly attribute PRUint32 flags; */ + NS_IMETHOD GetFlags(PRUint32 *aFlags) + { + UP_ENTER_RC(); + dprintf(("%s: aFlags=%p", pszFunction, aFlags)); + rc = VFTCALL1((VFTnsIClassInfo*)mpvVFTable, GetFlags, mpvThis, aFlags); + if (VALID_PTR(aFlags)) + dprintf(("%s: *aFlags=%d", pszFunction, *aFlags)); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * Also a class ID through which an instance of this class can be created + * (or accessed as a service, if |flags & SINGLETON|). If the class does + * not have a CID, it should return NS_ERROR_NOT_AVAILABLE. This attribute + * exists so C++ callers can avoid allocating and freeing a CID, as would + * happen if they used classID. + */ + /* [notxpcom] readonly attribute nsCID classIDNoAlloc; */ + NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) + { + UP_ENTER_RC(); + dprintf(("%s: aClassIDNoAlloc=%p", pszFunction, aClassIDNoAlloc)); + rc = VFTCALL1((VFTnsIClassInfo*)mpvVFTable, GetClassIDNoAlloc, mpvThis, aClassIDNoAlloc); + DPRINTF_NSID(*aClassIDNoAlloc); + UP_LEAVE_INT(rc); + return rc; + } + + + /** Constructor */ + UpClassInfo(void *pvThis) : + UpSupportsBase(pvThis, (nsIClassInfo*)this, kClassInfoIID) + { + } +}; + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP: nsIHTTPHeaderListener +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +class UpHTTPHeaderListener : public nsIHTTPHeaderListener, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + /** + * Called for each HTTP Response header. + * NOTE: You must copy the values of the params. + */ + /* void newResponseHeader (in string headerName, in string headerValue); */ + NS_IMETHOD NewResponseHeader(const char *headerName, const char *headerValue) + { + UP_ENTER_RC(); + DPRINTF_STR(headerName); + DPRINTF_STR(headerValue); + rc = VFTCALL2((VFTnsIHTTPHeaderListener *)mpvVFTable, NewResponseHeader, mpvThis, headerName, headerValue); + UP_LEAVE_INT(rc); + return rc; + } + + + /** Constructor */ + UpHTTPHeaderListener(void *pvThis) : + UpSupportsBase(pvThis, (nsIHTTPHeaderListener *)this, kHTTPHeaderListenerIID) + { + } + + nsresult StatusLine(const char *line) { + return NS_ERROR_NOT_IMPLEMENTED; + } +}; + + +class UpMemory : public nsIMemory, public UpSupportsBase +{ +public: + UP_IMPL_NSISUPPORTS(); + + /** + * Allocates a block of memory of a particular size. If the memory + * cannot be allocated (because of an out-of-memory condition), null + * is returned. + * + * @param size - the size of the block to allocate + * @result the block of memory + */ + /* [noscript, notxpcom] voidPtr alloc (in size_t size); */ + NS_IMETHOD_(void *) Alloc(size_t size) + { + UP_ENTER(); + dprintf(("%s: size=%d", pszFunction, size)); + void * pv = VFTCALL1((VFTnsIMemory*)mpvVFTable, Alloc, mpvThis, size); + UP_LEAVE_INT((unsigned)pv); + return pv; + } + + /** + * Reallocates a block of memory to a new size. + * + * @param ptr - the block of memory to reallocate + * @param size - the new size + * @result the reallocated block of memory + * + * If ptr is null, this function behaves like malloc. + * If s is the size of the block to which ptr points, the first + * min(s, size) bytes of ptr's block are copied to the new block. + * If the allocation succeeds, ptr is freed and a pointer to the + * new block returned. If the allocation fails, ptr is not freed + * and null is returned. The returned value may be the same as ptr. + */ + /* [noscript, notxpcom] voidPtr realloc (in voidPtr ptr, in size_t newSize); */ + NS_IMETHOD_(void *) Realloc(void * ptr, size_t newSize) + { + UP_ENTER(); + dprintf(("%s: ptr=%p newSize=%d", pszFunction, ptr, newSize)); + void * pv = VFTCALL2((VFTnsIMemory*)mpvVFTable, Realloc, mpvThis, ptr, newSize); + UP_LEAVE_INT((unsigned)pv); + return pv; + } + + /** + * Frees a block of memory. Null is a permissible value, in which case + * nothing happens. + * + * @param ptr - the block of memory to free + */ + /* [noscript, notxpcom] void free (in voidPtr ptr); */ + NS_IMETHOD_(void) Free(void * ptr) + { + UP_ENTER(); + dprintf(("%s: ptr=%d", pszFunction, ptr)); + VFTCALL1((VFTnsIMemory*)mpvVFTable, Free, mpvThis, ptr); + UP_LEAVE(); + return; + } + + /** + * Attempts to shrink the heap. + * @param immediate - if true, heap minimization will occur + * immediately if the call was made on the main thread. If + * false, the flush will be scheduled to happen when the app is + * idle. + * @return NS_ERROR_FAILURE if 'immediate' is set an the call + * was not on the application's main thread. + */ + /* void heapMinimize (in boolean immediate); */ + NS_IMETHOD HeapMinimize(PRBool immediate) + { + UP_ENTER_RC(); + dprintf(("%s: immediate=%d", pszFunction, immediate)); + rc = VFTCALL1((VFTnsIMemory*)mpvVFTable, HeapMinimize, mpvThis, immediate); + UP_LEAVE_INT(rc); + return rc; + } + + /** + * This predicate can be used to determine if we're in a low-memory + * situation (what constitutes low-memory is platform dependent). This + * can be used to trigger the memory pressure observers. + */ + /* boolean isLowMemory (); */ + NS_IMETHOD IsLowMemory(PRBool *_retval) + { + UP_ENTER_RC(); + dprintf(("%s: immediate=%p", pszFunction, _retval)); + rc = VFTCALL1((VFTnsIMemory*)mpvVFTable, IsLowMemory, mpvThis, _retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d\n", *_retval)); + UP_LEAVE_INT(rc); + return rc; + } + + + /** Constructor */ + UpMemory(void *pvThis) : + UpSupportsBase(pvThis, (nsIMemory *)this, kMemoryIID) + { + } +}; + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// UP Helpers +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * Check if the specified interface is supported by the 'UP' type wrapper. + * @returns TRUE if supported. + * @returns FALSE if not supported. + * @param aIID Interface ID in question. + */ +BOOL upIsSupportedInterface(REFNSIID aIID) +{ + static const nsID * aIIDs[] = + { + &kSupportsIID, + &kFactoryIID, + &kPluginIID, + &kJVMPluginIID, + &kSecureEnvIID, + &kPluginInstanceIID, + &kPluginInstancePeerIID, + &kPluginInstancePeer2IID, + &kPluginTagInfoIID, + &kJVMWindowIID, + &kJVMConsoleIID, + &kEventHandlerIID, + &kJVMPluginInstanceIID, + &kRunnableIID, + &kSecurityContextIID, + &kRequestObserverIID, + &kStreamListenerIID, + &kRequestIID, + &kLoadGroupIID, + &kSimpleEnumeratorIID, + &kInterfaceRequestorIID, + &kOutputStreamIID, + &kPluginStreamListenerIID, + &kFlashIObject7IID, + &kFlashIScriptablePlugin7IID, + &kFlash5IID, + &kClassInfoIID, + &kHTTPHeaderListenerIID, + &kMemoryIID, + }; + + for (unsigned iInterface = 0; iInterface < sizeof(aIIDs) / sizeof(aIIDs[0]); iInterface++) + if (aIIDs[iInterface]->Equals(aIID)) + return TRUE; + return FALSE; +} + +/** + * Create a wrapper for an Interface. + * + * @returns Pointer to the crated interface wrapper. + * @returns NULL on if unsupported interface. + * @returns NULL on failure. + * @returns NULL if pvThis is NULL. + * @param pvThis Pointer to the interface. + * @param aIID Reference to Interface ID. + */ +nsresult upCreateWrapper(void **ppvResult, REFNSIID aIID, nsresult rc) +{ + DEBUG_FUNCTIONNAME(); + dprintf(("%s: pvvResult=%x,,rc=%x", pszFunction, ppvResult, rc)); + DPRINTF_NSID(aIID); + + if (VALID_PTR(ppvResult)) + { + if (VALID_PTR(*ppvResult)) + { + dprintf(("%s: *pvvResult=%x", pszFunction, *ppvResult)); + if (NS_SUCCEEDED(rc)) + { + void *pvThis = *ppvResult; + /* + * First try check if there is an existing down wrapper for + * this object, if so no wrapping is needed at all. + */ + void *pvNoWrapper = UpWrapperBase::findDownWrapper(pvThis); + if (pvNoWrapper) + { + dprintf(("%s: COOL! pvThis(%x) is an down wrapper, no wrapping needed. returns real obj=%x", + pszFunction, pvThis, pvNoWrapper)); + *ppvResult = pvNoWrapper; + return rc; + } + + #if 1 // did this to minimize heap access. + /* + * Now lock the list and search it for existing wrapper. + */ + UpWrapperBase::upLock(); + UpWrapperBase *pExisting = UpWrapperBase::findUpWrapper(pvThis, aIID); + UpWrapperBase::upUnLock(); + if (pExisting) + { + dprintf(("%s: Reusing existing wrapper %p/%p for %p!", pszFunction, pExisting, pExisting->getInterfacePointer(), pvThis)); + *ppvResult = pExisting->getInterfacePointer(); + return rc; + } + #endif + + /* + * Third, try check if we've allready have created a wrapper for this object. + * + * Now, to do make sure we will never see duplicates here, we will: + * + * Create a wrapper object. + * Lock the up list. + * Check if there is an existing wrapper. + * If so Then + * Use it. + * Destroy the one we've just created. + * Else + * Insert the wrapper we've created. + * EndIf + * Unlock the up list. + * return the resulting wrapper. + * + */ + + /* + * Create the wrapper. + * + * IMPORTANT!!! DON'T FORGET UPDATING THE TABLE IN upIsSupportedInterface() TOO!!!! + */ + BOOL fFound = TRUE; + UpWrapperBase * pWrapper = NULL; + if (aIID.Equals(kSupportsIID)) + pWrapper = new UpSupports(pvThis); + else if (aIID.Equals(kFactoryIID)) + pWrapper = new UpFactory(pvThis); + else if (aIID.Equals(kPluginIID)) + pWrapper = new UpPlugin(pvThis); + else if (aIID.Equals(kJVMPluginIID)) + pWrapper = new UpJVMPlugin(pvThis); + else if (aIID.Equals(kSecureEnvIID)) + pWrapper = new UpSecureEnv(pvThis); + else if (aIID.Equals(kPluginInstanceIID)) + pWrapper = new UpPluginInstance(pvThis); + else if (aIID.Equals(kPluginInstancePeerIID)) + pWrapper = new UpPluginInstancePeer(pvThis); + else if (aIID.Equals(kPluginInstancePeer2IID)) + pWrapper = new UpPluginInstancePeer2(pvThis); + else if (aIID.Equals(kPluginTagInfoIID)) + pWrapper = new UpPluginTagInfo(pvThis); + else if (aIID.Equals(kJVMWindowIID)) + pWrapper = new UpJVMWindow(pvThis); + else if (aIID.Equals(kJVMConsoleIID)) + pWrapper = new UpJVMConsole(pvThis); + else if (aIID.Equals(kEventHandlerIID)) + pWrapper = new UpEventHandler(pvThis); + else if (aIID.Equals(kJVMPluginInstanceIID)) + pWrapper = new UpJVMPluginInstance(pvThis); + else if (aIID.Equals(kRunnableIID)) + pWrapper = new UpRunnable(pvThis); + else if (aIID.Equals(kSecurityContextIID)) + pWrapper = new UpSecurityContext(pvThis); + else if (aIID.Equals(kRequestObserverIID)) + pWrapper = new UpRequestObserver(pvThis); + else if (aIID.Equals(kStreamListenerIID)) + pWrapper = new UpStreamListener(pvThis); + else if (aIID.Equals(kRequestIID)) + pWrapper = new UpRequest(pvThis); + else if (aIID.Equals(kLoadGroupIID)) + pWrapper = new UpLoadGroup(pvThis); + else if (aIID.Equals(kSimpleEnumeratorIID)) + pWrapper = new UpSimpleEnumerator(pvThis); + else if (aIID.Equals(kInterfaceRequestorIID)) + pWrapper = new UpInterfaceRequestor(pvThis); + else if (aIID.Equals(kOutputStreamIID)) + pWrapper = new UpOutputStream(pvThis); + else if (aIID.Equals(kPluginStreamListenerIID)) + pWrapper = new UpPluginStreamListener(pvThis); + else if (aIID.Equals(kFlashIScriptablePlugin7IID)) + pWrapper = new UpFlashIScriptablePlugin7(pvThis); + else if (aIID.Equals(kFlashIObject7IID)) + pWrapper = new UpFlashIObject7(pvThis); + else if (aIID.Equals(kFlash5IID)) + pWrapper = new UpFlash5(pvThis); + else if (aIID.Equals(kClassInfoIID)) + pWrapper = new UpClassInfo(pvThis); + else if (aIID.Equals(kHTTPHeaderListenerIID)) + pWrapper = new UpHTTPHeaderListener(pvThis); + else if (aIID.Equals(kMemoryIID)) + pWrapper = new UpMemory(pvThis); + else + fFound = FALSE; + + /* + * Successfully create wrapper? + */ + if (fFound && pWrapper) + { + /* + * Now lock the list and search it for existing wrapper. + */ + UpWrapperBase::upLock(); + UpWrapperBase *pExisting2 = UpWrapperBase::findUpWrapper(pvThis, aIID); + if (pExisting2) + { + UpWrapperBase::upUnLock(); + delete pWrapper; + pWrapper = pExisting2; + dprintf(("%s: Reusing existing wrapper %p/%p for %p!", pszFunction, pWrapper, pWrapper->getInterfacePointer(), pvThis)); + } + else + { + pWrapper->upInsertWrapper(); + UpWrapperBase::upUnLock(); + dprintf(("%s: Successfully create wrapper %p/%p for %p!", pszFunction, pWrapper, pWrapper->getInterfacePointer(), pvThis)); + } + + *ppvResult = pWrapper->getInterfacePointer(); + return rc; + } + + + /* + * What's wrong? + */ + if (!fFound) + { + ReleaseInt3(0xbaddbeef, 11, aIID.m0); + dprintf(("%s: Unsupported interface!!!", pszFunction)); + rc = NS_ERROR_NOT_IMPLEMENTED; + } + else + { + dprintf(("%s: new failed! (how is that possible?)", pszFunction)); + rc = NS_ERROR_OUT_OF_MEMORY; + } + } + else + dprintf(("%s: The passed in rc means failure (rc=%x)", pszFunction, rc)); + *ppvResult = nsnull; + } + else + dprintf(("%s: *ppvResult (=%p) is invalid (rc=%x)", pszFunction, *ppvResult, rc)); + } + else + dprintf(("%s: ppvResult (=%p) is invalid (rc=%x)", pszFunction, ppvResult, rc)); + + return rc; +} + + +/** + * Create a wrapper for an Interface - simple version. + * + * @returns Pointer to the crated interface wrapper. + * @returns NULL on if unsupported interface. + * @returns NULL on failure. + * @returns NULL if pvThis is NULL. + * @param pvThis Pointer to the interface. + * @param aIID Reference to Interface ID. + */ +void * upCreateWrapper2(void *pvThis, REFNSIID aIID) +{ +// DEBUG_FUNCTIONNAME(); + void * pvResult = pvThis; + nsresult rc = upCreateWrapper(&pvResult, aIID, NS_OK); + if (NS_SUCCEEDED(rc)) + return pvResult; + return NULL; +} + + +/** + * Create a JNIEnv wrapper for sending up to mozilla. + * @returns rc on success + * @returns rc or othere error code on failure. + * @param ppJNIEnv Where to get and store the JNIEnv wrapper. + * @param rc Current rc. + */ +int upCreateJNIEnvWrapper(JNIEnv **ppJNIEnv, int rc) +{ + DEBUG_FUNCTIONNAME(); + dprintf(("%s: ppJNIEnv=%x, rc=%x", pszFunction, ppJNIEnv, rc)); + + if (VALID_PTR(ppJNIEnv)) + { + if (VALID_PTR(*ppJNIEnv)) + { + if (NS_SUCCEEDED(rc)) + { + /* + * Success! + */ + return rc; + } + else + dprintf(("%s: The query method failed with rc=%x", pszFunction, rc)); + *ppJNIEnv = nsnull; + } + else if (*ppJNIEnv || rc != NS_OK) /* don't complain about the obvious.. we use this combination. */ + dprintf(("%s: *ppJNIEnv (=%p) is invalid (rc=%x)", pszFunction, *ppJNIEnv, rc)); + } + else + dprintf(("%s: ppJNIEnv (=%p) is invalid (rc=%x)", pszFunction, ppJNIEnv, rc)); + + return rc; +} + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsISupports +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +nsresult VFTCALL downQueryInterface(void *pvThis, REFNSIID aIID, void** aInstancePtr) +{ + DOWN_ENTER_RC(pvThis, nsISupports); + DPRINTF_NSID(aIID); + + /* + * Is this a supported interface? + */ + const void *pvVFT = downIsSupportedInterface(aIID); + if (pvVFT) + { + dprintf(("%s: Supported interface. Calling the real QueryInterface...", pszFunction)); + rc = pMozI->QueryInterface(aIID, aInstancePtr); + rc = downCreateWrapper(aInstancePtr, pvVFT, rc); + } + else + { + dprintf(("%s: Unsupported interface!!!", pszFunction)); + rc = NS_NOINTERFACE; + if (aInstancePtr) + *aInstancePtr = nsnull; + ReleaseInt3(0xbaddbeef, 1, aIID.m0); + } + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * nsISupport::AddRef() wrapper. + */ +nsrefcnt VFTCALL downAddRef(void *pvThis) +{ + DOWN_ENTER(pvThis, nsISupports); + nsrefcnt c = pMozI->AddRef(); + DOWN_LEAVE_INT(pvThis, c); + return c; +} + +/** + * nsISupport::Release() wrapper. + */ +nsrefcnt VFTCALL downRelease(void *pvThis) +{ + DOWN_ENTER(pvThis, nsISupports); + nsrefcnt c = pMozI->Release(); + if (!c) + { + dprintf(("%s: c=0! deleting wrapper structure!", pszFunction)); + + #ifdef DO_DELETE + /** + * Unchain the wrapper first. + */ + DOWN_LOCK(); + int fUnchained; + PDOWNTHIS pDown, pPrev; + for (pDown = (PDOWNTHIS)gpDownHead, pPrev = NULL, fUnchained = 0; + pDown; + pPrev = pDown, pDown = (PDOWNTHIS)pDown->pNext) + { + if (pDown == pvThis) + { + if (pPrev) + pPrev->pNext = pDown->pNext; + else + gpDownHead = pDown->pNext; + + #ifdef DEBUG + /* paranoid as always */ + if (fUnchained) + { + dprintf(("%s: pvThis=%x was linked twice!", pszFunction, pvThis)); + DebugInt3(); + } + fUnchained = 1; + #else + fUnchained = 1; + break; + #endif + } + } + DOWN_UNLOCK(); + + if (fUnchained) + { /** @todo concider a delayed freeing, meaning we inster the them in + * a FIFO and at a certain threshold we'll start killing them. + * This will require the up/downCreateWrapper to also search the FIFO + * before creating the a new wrapper. + */ + pDown = (PDOWNTHIS)pvThis; + memset(pDown, 0, sizeof(*pDown)); + delete pDown; + } + else + { /* + * Allready unchained? This shouldn't ever happen... + * The only possible case is that two threads calls hlpRelease() + * a the same time. So, we will *not* touch this node now. + */ + dprintf(("%s: pvThis=%p not found in the list !!!!", pszFunction, pvThis)); + DebugInt3(); + } + #endif + pvThis = NULL; + } + DOWN_LEAVE_INT(pvThis, c); + return c; +} + + +/** VFT for the nsISupports Wrapper. */ +MAKE_SAFE_VFT(VFTnsISupports, downVFTnsISupports) +{ + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + +} +SAFE_VFT_ZEROS(); + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIServiceManager +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * getServiceByContractID + * + * Returns the instance that implements aClass or aContractID and the + * interface aIID. This may result in the instance being created. + * + * @param aClass or aContractID : aClass or aContractID of object + * instance requested + * @param aIID : IID of interface requested + * @param result : resulting service + */ +/* void getService (in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +nsresult VFTCALL downGetService(void *pvThis, const nsCID & aClass, const nsIID & aIID, void * *result) +{ + DOWN_ENTER_RC(pvThis, nsIServiceManager); + DPRINTF_NSID(aClass); + DPRINTF_NSID(aIID); + + /* + * Is this a supported interface? + */ + const void *pvVFT = downIsSupportedInterface(&aIID ? aIID : kSupportsIID); + if (pvVFT) + { + dprintf(("%s: Supported interface. Calling the real GetService...", pszFunction)); + rc = pMozI->GetService(aClass, aIID, result); + rc = downCreateWrapper(result, pvVFT, rc); + } + else + { + dprintf(("%s: Unsupported interface!!!", pszFunction)); + rc = NS_NOINTERFACE; + if (result) + *result = nsnull; + ReleaseInt3(0xbaddbeef, 2, aIID.m0); + } + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/* void getServiceByContractID (in string aContractID, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +nsresult VFTCALL downGetServiceByContractID(void *pvThis, const char *aContractID, const nsIID & aIID, void * *result) +{ + //@todo Check UNICODE vs. UTF8 vs. Codepage issues here. + DOWN_ENTER_RC(pvThis, nsIServiceManager); + DPRINTF_CONTRACTID(aContractID); + DPRINTF_NSID(aIID); + + /* + * Is this a supported interface? + */ + const void *pvVFT = downIsSupportedInterface(&aIID ? aIID : kSupportsIID); + if (pvVFT) + { + dprintf(("%s: Supported interface. Calling the real GetServiceByContractID...", pszFunction)); + rc = pMozI->GetServiceByContractID(aContractID, aIID, result); + rc = downCreateWrapper(result, pvVFT, rc); + } + else + { + dprintf(("%s: Unsupported interface!!!", pszFunction)); + rc = NS_NOINTERFACE; + if (result) + *result = nsnull; + ReleaseInt3(0xbaddbeef, 3, aIID.m0); + } + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * isServiceInstantiated + * + * isServiceInstantiated will return a true if the service has already + * been created, otherwise false + * + * @param aClass or aContractID : aClass or aContractID of object + * instance requested + * @param aIID : IID of interface requested + * @param aIID : IID of interface requested + */ +/* boolean isServiceInstantiated (in nsCIDRef aClass, in nsIIDRef aIID); */ +nsresult VFTCALL downIsServiceInstantiated(void *pvThis, const nsCID & aClass, const nsIID & aIID, PRBool *_retval) +{ + DOWN_ENTER_RC(pvThis, nsIServiceManager); + DPRINTF_NSID(aClass); + DPRINTF_NSID(aIID); + rc = pMozI->IsServiceInstantiated(aClass, aIID, _retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d", pszFunction, *_retval)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/* boolean isServiceInstantiatedByContractID (in string aContractID, in nsIIDRef aIID); */ +nsresult VFTCALL downIsServiceInstantiatedByContractID(void *pvThis, const char *aContractID, const nsIID & aIID, PRBool *_retval) +{ + //@todo Check UNICODE vs. UTF8 vs. Codepage issues here. + DOWN_ENTER_RC(pvThis, nsIServiceManager); + DPRINTF_CONTRACTID(aContractID); + DPRINTF_NSID(aIID); + rc = pMozI->IsServiceInstantiatedByContractID(aContractID, aIID, _retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d", pszFunction, *_retval)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +/** VFT for the nsIServerManager Wrapper. */ +MAKE_SAFE_VFT(VFTnsIServiceManager, downVFTnsIServiceManager) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downGetService, VFTDELTA_VAL() + downGetServiceByContractID, VFTDELTA_VAL() + downIsServiceInstantiated, VFTDELTA_VAL() + downIsServiceInstantiatedByContractID, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIServiceManagerObsolete +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +/** + * RegisterService may be called explicitly to register a service + * with the service manager. If a service is not registered explicitly, + * the component manager will be used to create an instance according + * to the class ID specified. + */ +nsresult VFTCALL downISMORegisterService(void *pvThis, const nsCID& aClass, nsISupports* aService) +{ + DOWN_ENTER_RC(pvThis, nsIServiceManagerObsolete); + DPRINTF_NSID(aClass); + + nsISupports *pupService = aService; + rc = upCreateWrapper((void**)&pupService, kSupportsIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->RegisterService(aClass, pupService); + else + dprintf(("%s: Unable to create wrapper for nsISupports!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Requests a service to be shut down, possibly unloading its DLL. + * + * @returns NS_OK - if shutdown was successful and service was unloaded, + * @returns NS_ERROR_SERVICE_NOT_FOUND - if shutdown failed because + * the service was not currently loaded + * @returns NS_ERROR_SERVICE_IN_USE - if shutdown failed because some + * user of the service wouldn't voluntarily release it by using + * a shutdown listener. + */ +nsresult VFTCALL downISMOUnregisterService(void *pvThis, const nsCID& aClass) +{ + DOWN_ENTER_RC(pvThis, nsIServiceManagerObsolete); + DPRINTF_NSID(aClass); + rc = pMozI->UnregisterService(aClass); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +nsresult VFTCALL downISMOGetService(void *pvThis, const nsCID& aClass, const nsIID& aIID, + nsISupports* *result, + nsIShutdownListener* shutdownListener/* = nsnull*/) +{ + DOWN_ENTER_RC(pvThis, nsIServiceManagerObsolete); + DPRINTF_NSID(aClass); + DPRINTF_NSID(aIID); + + /* + * Is this a supported interface? + */ + const void *pvVFT = downIsSupportedInterface(&aIID ? aIID : kSupportsIID); + if (pvVFT) + { + dprintf(("%s: Supported interface. Calling the real downISMOGetService...", pszFunction)); + nsIShutdownListener *pupShutdownListener = shutdownListener; + rc = upCreateWrapper((void**)&pupShutdownListener, kShutdownListenerIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->GetService(aClass, aIID, result, pupShutdownListener); + rc = downCreateWrapper((void**)result, pvVFT, rc); + } + else + dprintf(("%s: Unable to create 'UP' wrapper for nsIShutdownListener!", pszFunction)); + } + else + { + dprintf(("%s: Unsupported interface!!!", pszFunction)); + rc = NS_NOINTERFACE; + if (result) + *result = nsnull; + ReleaseInt3(0xbaddbeef, 4, aIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +/* OBSOLETE: use NS_RELEASE(service) instead. */ +nsresult VFTCALL downISMOReleaseService(void *pvThis, const nsCID& aClass, nsISupports* service, + nsIShutdownListener* shutdownListener/* = nsnull*/) +{ + DOWN_ENTER_RC(pvThis, nsIServiceManagerObsolete); + DPRINTF_NSID(aClass); + + nsISupports *pupService = service; + rc = upCreateWrapper((void**)&pupService, kSupportsIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsIShutdownListener *pupShutdownListener = shutdownListener; + rc = upCreateWrapper((void**)&pupShutdownListener, kShutdownListenerIID, rc); + if (NS_SUCCEEDED(rc)) + rc = pMozI->ReleaseService(aClass, pupService, pupShutdownListener); + else + dprintf(("%s: Unable to create 'UP' wrapper for nsIShutdownListener!", pszFunction)); + } + else + dprintf(("%s: Unable to create 'UP' wrapper for nsISupports!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; + +} + + +//////////////////////////////////////////////////////////////////////////// +// let's do it again, this time with ContractIDs... + +nsresult VFTCALL downISMORegisterServiceByContractID(void *pvThis, const char* aContractID, nsISupports* aService) +{ + DOWN_ENTER_RC(pvThis, nsIServiceManagerObsolete); + DPRINTF_CONTRACTID(aContractID); + + nsISupports *pupService = aService; + rc = upCreateWrapper((void**)&pupService, kSupportsIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->RegisterService(aContractID, pupService); + else + dprintf(("%s: Unable to create wrapper for nsISupports!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +nsresult VFTCALL downISMOUnregisterServiceByContractID(void *pvThis, const char* aContractID) +{ + DOWN_ENTER_RC(pvThis, nsIServiceManagerObsolete); + DPRINTF_CONTRACTID(aContractID); + rc = pMozI->UnregisterService(aContractID); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +nsresult VFTCALL downISMOGetServiceByContractID(void *pvThis, const char* aContractID, const nsIID& aIID, + nsISupports* *result, + nsIShutdownListener* shutdownListener/* = nsnull */) +{ + DOWN_ENTER_RC(pvThis, nsIServiceManagerObsolete); + DPRINTF_CONTRACTID(aContractID); + DPRINTF_NSID(aIID); + + /* + * Is this a supported interface? + */ + const void *pvVFT = downIsSupportedInterface(&aIID ? aIID : kSupportsIID); + if (pvVFT) + { + nsIShutdownListener *pupShutdownListener = shutdownListener; + rc = upCreateWrapper((void**)&pupShutdownListener, kShutdownListenerIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->GetService(aContractID, aIID, result, pupShutdownListener); + rc = downCreateWrapper((void**)result, pvVFT, rc); + } + else + dprintf(("%s: Unable to create 'UP' wrapper for nsIShutdownListener!", pszFunction)); + } + else + { + dprintf(("%s: Unsupported interface!!!", pszFunction)); + rc = NS_NOINTERFACE; + ReleaseInt3(0xbaddbeef, 5, aIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +/* OBSOLETE */ +nsresult VFTCALL downISMOReleaseServiceByContractID(void *pvThis, const char* aContractID, nsISupports* service, + nsIShutdownListener* shutdownListener/* = nsnull*/) +{ + DOWN_ENTER_RC(pvThis, nsIServiceManagerObsolete); + DPRINTF_CONTRACTID(aContractID); + + nsISupports *pupService = service; + rc = upCreateWrapper((void**)&pupService, kSupportsIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsIShutdownListener *pupShutdownListener = shutdownListener; + rc = upCreateWrapper((void**)&pupShutdownListener, kShutdownListenerIID, rc); + if (NS_SUCCEEDED(rc)) + rc = pMozI->ReleaseService(aContractID, pupService, pupShutdownListener); + else + dprintf(("%s: Unable to create 'UP' wrapper for nsIShutdownListener!", pszFunction)); + } + else + dprintf(("%s: Unable to create 'UP' wrapper for nsISupports!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; + +} + + +MAKE_SAFE_VFT(VFTnsIServiceManagerObsolete, downVFTnsIServiceManagerObsolete) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, +#ifdef VFT_VAC365 + downISMORegisterService, VFTDELTA_VAL() + downISMORegisterServiceByContractID, VFTDELTA_VAL() + downISMOUnregisterService, VFTDELTA_VAL() + downISMOUnregisterServiceByContractID, VFTDELTA_VAL() + downISMOGetService, VFTDELTA_VAL() + downISMOGetServiceByContractID, VFTDELTA_VAL() + downISMOReleaseService, VFTDELTA_VAL() + downISMOReleaseServiceByContractID, VFTDELTA_VAL() +#else + downISMORegisterServiceByContractID, VFTDELTA_VAL() + downISMORegisterService, VFTDELTA_VAL() + downISMOUnregisterServiceByContractID, VFTDELTA_VAL() + downISMOUnregisterService, VFTDELTA_VAL() + downISMOGetServiceByContractID, VFTDELTA_VAL() + downISMOGetService, VFTDELTA_VAL() + downISMOReleaseServiceByContractID, VFTDELTA_VAL() + downISMOReleaseService, VFTDELTA_VAL() +#endif +} +SAFE_VFT_ZEROS(); + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIPluginManager +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * Returns the value of a variable associated with the plugin manager. + * + * (Corresponds to NPN_GetValue.) + * + * @param variable - the plugin manager variable to get + * @param value - the address of where to store the resulting value + * @result - NS_OK if this operation was successful + */ +/* [noscript] void GetValue (in nsPluginManagerVariable variable, in nativeVoid value); */ +nsresult VFTCALL downIPMGetValue(void *pvThis, nsPluginManagerVariable variable, void * value) +{ /* kso: this is not doing anything on NO_X11 platforms */ + DOWN_ENTER_RC(pvThis, nsIPluginManager); + dprintf(("%s: variable=%d value=%x", pszFunction, variable, value)); + rc = pMozI->GetValue(variable, value); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Causes the plugins directory to be searched again for new plugin + * libraries. + * + * (Corresponds to NPN_ReloadPlugins.) + * + * @param reloadPages - indicates whether currently visible pages should + * also be reloaded + */ +/* void reloadPlugins (in boolean reloadPages); */ +nsresult VFTCALL downIPMReloadPlugins(void *pvThis, PRBool reloadPages) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager); + dprintf(("%s: reloadPages=%d", pszFunction, reloadPages)); + rc = pMozI->ReloadPlugins(reloadPages); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Returns the user agent string for the browser. + * + * (Corresponds to NPN_UserAgent.) + * + * @param resultingAgentString - the resulting user agent string + */ +/* [noscript] void UserAgent (in nativeChar resultingAgentString); */ +nsresult VFTCALL downIPMUserAgent(void *pvThis, const char * * resultingAgentString) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager); + dprintf(("%s: resultingAgentString=%p", pszFunction, resultingAgentString)); + rc = pMozI->UserAgent(resultingAgentString); + if (NS_SUCCEEDED(rc) && VALID_PTR(resultingAgentString)) + DPRINTF_STR(*resultingAgentString); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Fetches a URL. + * + * (Corresponds to NPN_GetURL and NPN_GetURLNotify.) + * + * @param pluginInst - the plugin making the request. If NULL, the URL + * is fetched in the background. + * @param url - the URL to fetch + * @param target - the target window into which to load the URL, or NULL if + * the data should be returned to the plugin via streamListener. + * @param streamListener - a stream listener to be used to return data to + * the plugin. May be NULL if target is not NULL. + * @param altHost - an IP-address string that will be used instead of the + * host specified in the URL. This is used to prevent DNS-spoofing + * attacks. Can be defaulted to NULL meaning use the host in the URL. + * @param referrer - the referring URL (may be NULL) + * @param forceJSEnabled - forces JavaScript to be enabled for 'javascript:' + * URLs, even if the user currently has JavaScript disabled (usually + * specify PR_FALSE) + * @result - NS_OK if this operation was successful + */ +nsresult VFTCALL downIPMGetURL(void *pvThis, nsISupports* pluginInst, const char* url, const char* target = NULL, + nsIPluginStreamListener* streamListener = NULL, const char* altHost = NULL, const char* referrer = NULL, + PRBool forceJSEnabled = PR_FALSE) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager); + dprintf(("%s: pluginInst=%x streamListener=%p forceJSEnabled=%d", + pszFunction, pluginInst, streamListener, forceJSEnabled)); + DPRINTF_STR(url); + DPRINTF_STR(target); + DPRINTF_STR(altHost); + DPRINTF_STR(referrer); + + nsIPluginStreamListener *pupStreamListener = streamListener; + rc = upCreateWrapper((void**)&pupStreamListener, kPluginStreamListenerIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports * pupPluginInst = pluginInst; + rc = upCreateWrapper((void**)&pupPluginInst, kSupportsIID, rc); + if (rc == NS_OK) + rc = pMozI->GetURL(pupPluginInst, url, target, pupStreamListener, altHost, referrer, forceJSEnabled); + else + dprintf(("%s: Failed to create wrapper for nsISupports (pluginInst=%p)!!!!", pszFunction, pluginInst)); + } + else + dprintf(("%s: Failed to create wrapper for nsIPluginStreamListener!!!!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Posts to a URL with post data and/or post headers. + * + * (Corresponds to NPN_PostURL and NPN_PostURLNotify.) + * + * @param pluginInst - the plugin making the request. If NULL, the URL + * is fetched in the background. + * @param url - the URL to fetch + * @param postDataLength - the length of postData (if non-NULL) + * @param postData - the data to POST. NULL specifies that there is not post + * data + * @param isFile - whether the postData specifies the name of a file to + * post instead of data. The file will be deleted afterwards. + * @param target - the target window into which to load the URL, or NULL if + * the data should be returned to the plugin via streamListener. + * @param streamListener - a stream listener to be used to return data to + * the plugin. May be NULL if target is not NULL. + * @param altHost - an IP-address string that will be used instead of the + * host specified in the URL. This is used to prevent DNS-spoofing + * attacks. Can be defaulted to NULL meaning use the host in the URL. + * @param referrer - the referring URL (may be NULL) + * @param forceJSEnabled - forces JavaScript to be enabled for 'javascript:' + * URLs, even if the user currently has JavaScript disabled (usually + * specify PR_FALSE) + * @param postHeadersLength - the length of postHeaders (if non-NULL) + * @param postHeaders - the headers to POST. Must be in the form of + * "HeaderName: HeaderValue\r\n". Each header, including the last, + * must be followed by "\r\n". NULL specifies that there are no + * post headers + * @result - NS_OK if this operation was successful + */ +nsresult VFTCALL downIPMPostURL(void *pvThis, nsISupports* pluginInst, const char* url, PRUint32 postDataLen, const char* postData, + PRBool isFile = PR_FALSE, const char* target = NULL, nsIPluginStreamListener* streamListener = NULL, + const char* altHost = NULL, const char* referrer = NULL, PRBool forceJSEnabled = PR_FALSE, + PRUint32 postHeadersLength = 0, const char* postHeaders = NULL) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager); + dprintf(("%s: pluginInst=%x postDataLen=%d postData='%.*s' (%p) isFile=%d, streamListener=%p", + pszFunction, pluginInst, postDataLen, postDataLen, postData, postData, isFile, streamListener)); + dprintf(("%s: forceJSEnabled=%d postHeadersLength=%d postHeaders='%*.s' (%p)", + pszFunction, forceJSEnabled, postHeadersLength, postHeadersLength, postHeaders, postHeaders)); + DPRINTF_STR(url); + DPRINTF_STR(target); + DPRINTF_STR(altHost); + DPRINTF_STR(referrer); + + nsIPluginStreamListener *pupStreamListener = streamListener; + rc = upCreateWrapper((void**)&pupStreamListener, kPluginStreamListenerIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports * pupPluginInst = pluginInst; + rc = upCreateWrapper((void**)&pupPluginInst, kSupportsIID, rc); + if (rc == NS_OK) + rc = pMozI->PostURL(pupPluginInst, url, postDataLen, postData, isFile, target, pupStreamListener, + altHost, referrer, forceJSEnabled, postHeadersLength, postHeaders); + else + dprintf(("%s: Failed to create wrapper for nsISupports (pluginInst=%p)!!!!", pszFunction, pluginInst)); + } + else + dprintf(("%s: Failed to create wrapper for nsIPluginStreamListener!!!!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Persistently register a plugin with the plugin + * manager. aMimeTypes, aMimeDescriptions, and aFileExtensions are + * parallel arrays that contain information about the MIME types + * that the plugin supports. + * + * @param aCID - the plugin's CID + * @param aPluginName - the plugin's name + * @param aDescription - a description of the plugin + * @param aMimeTypes - an array of MIME types that the plugin + * is prepared to handle + * @param aMimeDescriptions - an array of descriptions for the + * MIME types that the plugin can handle. + * @param aFileExtensions - an array of file extensions for + * the MIME types that the plugin can handle. + * @param aCount - the number of elements in the aMimeTypes, + * aMimeDescriptions, and aFileExtensions arrays. + * @result - NS_OK if the operation was successful. + */ +/* [noscript] void RegisterPlugin (in REFNSIID aCID, in string aPluginName, in string aDescription, in nativeChar aMimeTypes, in nativeChar aMimeDescriptions, in nativeChar aFileExtensions, in long aCount); */ +nsresult VFTCALL downIPMRegisterPlugin(void *pvThis, REFNSIID aCID, const char *aPluginName, const char *aDescription, const char * * aMimeTypes, + const char * * aMimeDescriptions, const char * * aFileExtensions, PRInt32 aCount) +{ + //@todo TEXT: aMimeDescriptions? aDescription? Doesn't apply to java plugin I think. + DOWN_ENTER_RC(pvThis, nsIPluginManager); + dprintf(("%s: aCount=%d", pszFunction, aCount)); + DPRINTF_NSID(aCID); + DPRINTF_STR(aPluginName); + DPRINTF_STR(aDescription); + + for (int i = 0; i < aCount; i++) + dprintf(("%s: aMimeTypes[%d]='%s' (%p) aMimeDescriptions[%d]='%s' (%p) aFileExtensions[%d]='%s' (%p)", + pszFunction, i, aMimeTypes[i], aMimeTypes[i], + i, aMimeDescriptions[i], aMimeDescriptions[i], + i, aFileExtensions[i], aFileExtensions[i])); + rc = pMozI->RegisterPlugin(aCID, aPluginName, aDescription, aMimeTypes, aMimeDescriptions, aFileExtensions, aCount); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Unregister a plugin from the plugin manager + * + * @param aCID the CID of the plugin to unregister. + * @result - NS_OK if the operation was successful. + */ +/* [noscript] void UnregisterPlugin (in REFNSIID aCID); */ +nsresult VFTCALL downIPMUnregisterPlugin(void *pvThis, REFNSIID aCID) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager); + DPRINTF_NSID(aCID); + rc = pMozI->UnregisterPlugin(aCID); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Fetches a URL, with Headers + * @see GetURL. Identical except for additional params headers and + * headersLen + * @param getHeadersLength - the length of getHeaders (if non-NULL) + * @param getHeaders - the headers to GET. Must be in the form of + * "HeaderName: HeaderValue\r\n". Each header, including the last, + * must be followed by "\r\n". NULL specifies that there are no + * get headers + * @result - NS_OK if this operation was successful + */ +nsresult VFTCALL downIPMGetURLWithHeaders(void *pvThis, nsISupports* pluginInst, const char* url, const char* target = NULL, + nsIPluginStreamListener* streamListener = NULL, const char* altHost = NULL, const char* referrer = NULL, + PRBool forceJSEnabled = PR_FALSE, PRUint32 getHeadersLength = 0, const char* getHeaders = NULL) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager); + dprintf(("%s: pluginInst=%x streamListener=%p forceJSEnabled=%d getHeadersLength=%d getHeaders='%.*s' (%p)", + pszFunction, pluginInst, streamListener, forceJSEnabled, getHeadersLength, getHeadersLength, getHeaders, getHeaders)); + DPRINTF_STR(url); + DPRINTF_STR(target); + DPRINTF_STR(altHost); + DPRINTF_STR(referrer); + + nsIPluginStreamListener *pupStreamListener = streamListener; + rc = upCreateWrapper((void**)&pupStreamListener, kPluginStreamListenerIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports * pupPluginInst = pluginInst; + rc = upCreateWrapper((void**)&pupPluginInst, kSupportsIID, rc); + if (rc == NS_OK) + rc = pMozI->GetURLWithHeaders(pupPluginInst, url, target, pupStreamListener, altHost, referrer, forceJSEnabled, getHeadersLength, getHeaders); + else + dprintf(("%s: Failed to create wrapper for nsISupports (pluginInst=%p)!!!!", pszFunction, pluginInst)); + } + else + dprintf(("%s: Failed to create wrapper for nsIPluginStreamListener!!!!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsIPluginManager, downVFTnsIPluginManager) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downIPMGetValue, VFTDELTA_VAL() + downIPMReloadPlugins, VFTDELTA_VAL() + downIPMUserAgent, VFTDELTA_VAL() + downIPMGetURL, VFTDELTA_VAL() + downIPMPostURL, VFTDELTA_VAL() + downIPMRegisterPlugin, VFTDELTA_VAL() + downIPMUnregisterPlugin, VFTDELTA_VAL() + downIPMGetURLWithHeaders, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIPluginManager2 +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * Puts up a wait cursor. + * + * @result - NS_OK if this operation was successful + */ +/* void beginWaitCursor (); */ +nsresult VFTCALL downIPM2BeginWaitCursor(void *pvThis) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager2); + rc = pMozI->BeginWaitCursor(); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Restores the previous (non-wait) cursor. + * + * @result - NS_OK if this operation was successful + */ +/* void endWaitCursor (); */ +nsresult VFTCALL downIPM2EndWaitCursor(void *pvThis) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager2); + rc = pMozI->EndWaitCursor(); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Returns true if a URL protocol (e.g. "http") is supported. + * + * @param aProtocol - the protocol name + * @param aResult - true if the protocol is supported + * @result - NS_OK if this operation was successful + */ +/* void supportsURLProtocol (in string aProtocol, out boolean aResult); */ +nsresult VFTCALL downIPM2SupportsURLProtocol(void *pvThis, const char *aProtocol, PRBool *aResult) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager2); + DPRINTF_STR(aProtocol); + + rc = pMozI->SupportsURLProtocol(aProtocol, aResult); + if (NS_SUCCEEDED(rc) && VALID_PTR(aResult)) + dprintf(("%s: *aResult=%d", pszFunction, *aResult)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * This method may be called by the plugin to indicate that an error + * has occurred, e.g. that the plugin has failed or is shutting down + * spontaneously. This allows the browser to clean up any plugin-specific + * state. + * + * @param aPlugin - the plugin whose status is changing + * @param aStatus - the error status value + * @result - NS_OK if this operation was successful + */ +/* void notifyStatusChange (in nsIPlugin aPlugin, in nsresult aStatus); */ +nsresult VFTCALL downIPM2NotifyStatusChange(void *pvThis, nsIPlugin *aPlugin, nsresult aStatus) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager2); + dprintf(("%s: aPlugin=%x aStatus=%d", pszFunction, aPlugin, aStatus)); + + nsIPlugin * pupPlugin = aPlugin; + rc = upCreateWrapper((void**)&pupPlugin, kPluginIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->NotifyStatusChange(pupPlugin, aStatus); + else + dprintf(("%s: failed to create up wrapper for aPlugin=%x!!!", pszFunction, aPlugin)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Returns the proxy info for a given URL. The caller is required to + * free the resulting memory with nsIMalloc::Free. The result will be in the + * following format + * + * i) "DIRECT" -- no proxy + * ii) "PROXY xxx.xxx.xxx.xxx" -- use proxy + * iii) "SOCKS xxx.xxx.xxx.xxx" -- use SOCKS + * iv) Mixed. e.g. "PROXY 111.111.111.111;PROXY 112.112.112.112", + * "PROXY 111.111.111.111;SOCKS 112.112.112.112".... + * + * Which proxy/SOCKS to use is determined by the plugin. + */ +/* void findProxyForURL (in string aURL, out string aResult); */ +nsresult VFTCALL downIPM2FindProxyForURL(void *pvThis, const char *aURL, char **aResult) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager2); + DPRINTF_STR(aURL); + rc = pMozI->FindProxyForURL(aURL, aResult); + if (NS_SUCCEEDED(rc) && VALID_PTR(aResult) && VALID_PTR(*aResult)) + { + DPRINTF_STR(*aResult); + + /* I have a feeling that the ibm plugin is cheating here. or that nsIMalloc::Free + * isn't well implemented... + * + * !!HACKALLERT!! + * For npoji16.dll we will allocate this string using it's own CRT. + * First we must detect if this is npoji16.dll + */ + char szModName[9]; + HMODULE hmod; + ULONG iObj; + ULONG offObj; + if (!DosQueryModFromEIP(&hmod, &iObj, sizeof(szModName), &szModName[0], &offObj, ((unsigned *)(void*)&pvThis)[-1])) + { + if (!stricmp(szModName, "NPOJI6")) + { + if (!DosQueryModuleHandle("JV12MI36", &hmod)) + { + char *(*_Optlink pfnstrdup)(const char *); + /* we might have to dosloadmodule (verb) the stupid thing */ + int rc2 = DosQueryProcAddr(hmod, 0, "strdup", (PFN*)&pfnstrdup); + if ( rc2 == ERROR_INVALID_HANDLE + && !DosLoadModule(NULL, 0, "JV12MI36", &hmod)) + rc2 = DosQueryProcAddr(hmod, 0, "strdup", (PFN*)&pfnstrdup); + if (!rc2) + { + char *psz = pfnstrdup(*aResult); + if (psz) + { + free(*aResult); /* We're using the right CRT.. */ + *aResult = psz; + } + } + } + } + } + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Registers a top-level window with the browser. Events received by that + * window will be dispatched to the event handler specified. + * + * @param aHandler - the event handler for the window + * @param aWindow - the platform window reference + * @result - NS_OK if this operation was successful + */ +/* void registerWindow (in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); */ +nsresult VFTCALL downIPM2RegisterWindow(void *pvThis, nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager2); + dprintf(("%s: Incomplete!!!", pszFunction)); + dprintf(("%s: aHandler=%p aWindow=%x", pszFunction, aHandler, aWindow)); + + nsIEventHandler * pupHandler = aHandler; + rc = upCreateWrapper((void**)&pupHandler, kEventHandlerIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + //@todo wrap window handle somehow... + DebugInt3(); + nsPluginPlatformWindowRef os2Window = aWindow; + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->RegisterWindow(pupHandler, os2Window); + } + else + dprintf(("%s: failed to create window handle wrapper for %x!!!", pszFunction, aWindow)); + } + else + dprintf(("%s: failed to create up wrapper for nsIEventHandler %x!!!", pszFunction, aHandler)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Unregisters a top-level window with the browser. The handler and window pair + * should be the same as that specified to RegisterWindow. + * + * @param aHandler - the event handler for the window + * @param aWindow - the platform window reference + * @result - NS_OK if this operation was successful + */ +/* void unregisterWindow (in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); */ +nsresult VFTCALL downIPM2UnregisterWindow(void *pvThis, nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager2); + dprintf(("%s: Incomplete!!!", pszFunction)); + dprintf(("%s: aHandler=%p aWindow=%x", pszFunction, aHandler, aWindow)); + + nsIEventHandler * pupHandler = aHandler; + rc = upCreateWrapper((void**)&pupHandler, kEventHandlerIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + //@todo wrap window handle somehow... + DebugInt3(); + nsPluginPlatformWindowRef os2Window = aWindow; + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->UnregisterWindow(pupHandler, os2Window); + } + else + dprintf(("%s: failed to create window handle wrapper for %x!!!", pszFunction, aWindow)); + } + else + dprintf(("%s: failed to create up wrapper for nsIEventHandler %x!!!", pszFunction, aHandler)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Allocates a new menu ID (for the Mac). + * + * @param aHandler - the event handler for the window + * @param aIsSubmenu - whether this is a sub-menu ID or not + * @param aResult - the resulting menu ID + * @result - NS_OK if this operation was successful + */ +/* void allocateMenuID (in nsIEventHandler aHandler, in boolean aIsSubmenu, out short aResult); */ +nsresult VFTCALL downIPM2AllocateMenuID(void *pvThis, nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager2); + dprintf(("%s: Incomplete!!!", pszFunction)); + dprintf(("%s: aHandler=%p aIsSubmenu=%d aResult=%p", pszFunction, aHandler, aIsSubmenu, aResult)); + + nsIEventHandler * pupHandler = aHandler; + rc = upCreateWrapper((void**)&pupHandler, kEventHandlerIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->AllocateMenuID(pupHandler, aIsSubmenu, aResult); + if (NS_SUCCEEDED(rc) && VALID_PTR(aResult)) + dprintf(("%s: *aResult=%d (0x%x)", pszFunction, *aResult, *aResult)); + } + else + dprintf(("%s: failed to create up wrapper for nsIEventHandler %x !!!", pszFunction, aHandler)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Deallocates a menu ID (for the Mac). + * + * @param aHandler - the event handler for the window + * @param aMenuID - the menu ID + * @result - NS_OK if this operation was successful + */ +/* void deallocateMenuID (in nsIEventHandler aHandler, in short aMenuID); */ +nsresult VFTCALL downIPM2DeallocateMenuID(void *pvThis, nsIEventHandler *aHandler, PRInt16 aMenuID) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager2); + dprintf(("%s: aHandler=%p aMenuID=%d", pszFunction, aHandler, aMenuID)); + + nsIEventHandler * pupHandler = aHandler; + rc = upCreateWrapper((void**)&pupHandler, kEventHandlerIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->DeallocateMenuID(pupHandler, aMenuID); + else + dprintf(("%s: failed to create up wrapper for nsIEventHandler %x !!!", pszFunction, aHandler)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Indicates whether this event handler has allocated the given menu ID. + * + * @param aHandler - the event handler for the window + * @param aMenuID - the menu ID + * @param aResult - returns PR_TRUE if the menu ID is allocated + * @result - NS_OK if this operation was successful + */ +/* void hasAllocatedMenuID (in nsIEventHandler aHandler, in short aMenuID, out boolean aResult); */ +nsresult VFTCALL downIPM2HasAllocatedMenuID(void *pvThis, nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult) +{ + DOWN_ENTER_RC(pvThis, nsIPluginManager2); + dprintf(("%s: aHandler=%p aMenuID=%d aResult=%p", pszFunction, aHandler, aMenuID, aResult)); + + nsIEventHandler * pupHandler = aHandler; + rc = upCreateWrapper((void**)&pupHandler, kEventHandlerIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->HasAllocatedMenuID(pupHandler, aMenuID, aResult); + if (NS_SUCCEEDED(rc) && VALID_PTR(aResult)) + dprintf(("%s: *aResult=%d", pszFunction, *aResult)); + } + else + dprintf(("%s: failed to create up wrapper for nsIEventHandler %x !!!", pszFunction, aHandler)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsIPluginManager2, downVFTnsIPluginManager2) +{ + { + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downIPMGetValue, VFTDELTA_VAL() + downIPMReloadPlugins, VFTDELTA_VAL() + downIPMUserAgent, VFTDELTA_VAL() + downIPMGetURL, VFTDELTA_VAL() + downIPMPostURL, VFTDELTA_VAL() + downIPMRegisterPlugin, VFTDELTA_VAL() + downIPMUnregisterPlugin, VFTDELTA_VAL() + downIPMGetURLWithHeaders, VFTDELTA_VAL() + }, + downIPM2BeginWaitCursor, VFTDELTA_VAL() + downIPM2EndWaitCursor, VFTDELTA_VAL() + downIPM2SupportsURLProtocol, VFTDELTA_VAL() + downIPM2NotifyStatusChange, VFTDELTA_VAL() + downIPM2FindProxyForURL, VFTDELTA_VAL() + downIPM2RegisterWindow, VFTDELTA_VAL() + downIPM2UnregisterWindow, VFTDELTA_VAL() + downIPM2AllocateMenuID, VFTDELTA_VAL() + downIPM2DeallocateMenuID, VFTDELTA_VAL() + downIPM2HasAllocatedMenuID, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIPluginInstancePeer +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** +* Returns the value of a variable associated with the plugin manager. +* +* (Corresponds to NPN_GetValue.) +* +* @param aVariable - the plugin manager variable to get +* @param aValue - the address of where to store the resulting value +* @result - NS_OK if this operation was successful +*/ +/* void getValue (in nsPluginInstancePeerVariable aVariable, in voidPtr aValue); */ +nsresult VFTCALL downIPIPGetValue(void *pvThis, nsPluginInstancePeerVariable aVariable, void * aValue) +{ + DOWN_ENTER_RC(pvThis, nsIPluginInstancePeer); + dprintf(("%s: aVariable=%d aValue=%p", pszFunction, aVariable, aValue)); + rc = pMozI->GetValue(aVariable, aValue); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Returns the MIME type of the plugin instance. + * + * (Corresponds to NPP_New's MIMEType argument.) + * +* @param aMIMEType - resulting MIME type +* @result - NS_OK if this operation was successful + */ +/* readonly attribute nsMIMEType MIMEType; */ +nsresult VFTCALL downIPIPGetMIMEType(void *pvThis, nsMIMEType *aMIMEType) +{ + DOWN_ENTER_RC(pvThis, nsIPluginInstancePeer); + dprintf(("%s: aMIMEType=%p", pszFunction, aMIMEType)); + rc = pMozI->GetMIMEType(aMIMEType); + if (NS_SUCCEEDED(rc) && VALID_PTR(aMIMEType) && VALID_PTR(*aMIMEType)) + DPRINTF_STR(*aMIMEType); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Returns the mode of the plugin instance, i.e. whether the plugin is + * embedded in the html, or full page. + * + * (Corresponds to NPP_New's mode argument.) + * +* @param result - the resulting mode +* @result - NS_OK if this operation was successful + */ +/* readonly attribute nsPluginMode mode; */ +nsresult VFTCALL downIPIPGetMode(void *pvThis, nsPluginMode *aMode) +{ + DOWN_ENTER_RC(pvThis, nsIPluginInstancePeer); + dprintf(("%s: aMode=%p", pszFunction, aMode)); + rc = pMozI->GetMode(aMode); + if (NS_SUCCEEDED(rc) && VALID_PTR(aMode)) + dprintf(("%s: *aMode=%d", pszFunction, *aMode)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * This operation is called by the plugin instance when it wishes to send + * a stream of data to the browser. It constructs a new output stream to which + * the plugin may send the data. When complete, the Close and Release methods + * should be called on the output stream. + * + * (Corresponds to NPN_NewStream.) + * + * @param aType - MIME type of the stream to create + * @param aTarget - the target window name to receive the data + * @param aResult - the resulting output stream + * @result - NS_OK if this operation was successful + */ +/* void newStream (in nsMIMEType aType, in string aTarget, out nsIOutputStream aResult); */ +nsresult VFTCALL downIPIPNewStream(void *pvThis, nsMIMEType aType, const char *aTarget, nsIOutputStream **aResult) +{ + //@todo TEXT: aTarget? Doesn't apply to java plugin I think. + DOWN_ENTER_RC(pvThis, nsIPluginInstancePeer); + dprintf(("%s: aResult=%p", pszFunction, aResult)); + DPRINTF_STR(aType); + DPRINTF_STR(aTarget); + + const void *pvVFT = downIsSupportedInterface(kOutputStreamIID); + if (pvVFT) + { + rc = pMozI->NewStream(aType, aTarget, aResult); + rc = downCreateWrapper((void**)aResult, pvVFT, rc); + } + else + { + dprintf(("%s: Unsupported Interface!!!", pszFunction)); + rc = NS_NOINTERFACE; + ReleaseInt3(0xbaddbeef, 21, kOutputStreamIID.m0); + } + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * This operation causes status information to be displayed on the window + * associated with the plugin instance. + * + * (Corresponds to NPN_Status.) + * + * @param aMessage - the status message to display + * @result - NS_OK if this operation was successful + */ +/* void showStatus (in string aMessage); */ +nsresult VFTCALL downIPIPShowStatus(void *pvThis, const char *aMessage) +{ + //@todo TEXT: aMessage? This must be further tested! + DOWN_ENTER_RC(pvThis, nsIPluginInstancePeer); + DPRINTF_STR(aMessage); + verifyAndFixUTF8String(aMessage, XPFUNCTION); + rc = pMozI->ShowStatus(aMessage); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Set the desired size of the window in which the plugin instance lives. + * + * @param aWidth - new window width + * @param aHeight - new window height + * @result - NS_OK if this operation was successful + */ +/* void setWindowSize (in unsigned long aWidth, in unsigned long aHeight); */ +nsresult VFTCALL downIPIPSetWindowSize(void *pvThis, PRUint32 aWidth, PRUint32 aHeight) +{ + DOWN_ENTER_RC(pvThis, nsIPluginInstancePeer); + dprintf(("%s: aWidth=%d aHeight=%d", pszFunction, aWidth, aHeight)); + rc = pMozI->SetWindowSize(aWidth, aHeight); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsIPluginInstancePeer, downVFTnsIPluginInstancePeer) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downIPIPGetValue, VFTDELTA_VAL() + downIPIPGetMIMEType, VFTDELTA_VAL() + downIPIPGetMode, VFTDELTA_VAL() + downIPIPNewStream, VFTDELTA_VAL() + downIPIPShowStatus, VFTDELTA_VAL() + downIPIPSetWindowSize, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIPluginInstancePeer2 +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +/** + * Get the JavaScript window object corresponding to this plugin instance. + * + * @param aJSWindow - the resulting JavaScript window object + * @result - NS_OK if this operation was successful + */ +/* readonly attribute JSObjectPtr JSWindow; */ +nsresult VFTCALL downIPIP2GetJSWindow(void *pvThis, JSObject * *aJSWindow) +{ + DOWN_ENTER_RC(pvThis, nsIPluginInstancePeer2); + rc = pMozI->GetJSWindow(aJSWindow); + if (NS_SUCCEEDED(rc) && VALID_PTR(aJSWindow)) + { + //@todo wrap aJSWindow? + dprintf(("%s: aJSWindow=%p - not really wrapped !!!", pszFunction, aJSWindow)); + DebugInt3(); + } + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Get the JavaScript execution thread corresponding to this plugin instance. + * + * @param aJSThread - the resulting JavaScript thread id + * @result - NS_OK if this operation was successful + */ +/* readonly attribute unsigned long JSThread; */ +nsresult VFTCALL downIPIP2GetJSThread(void *pvThis, PRUint32 *aJSThread) +{ + DOWN_ENTER_RC(pvThis, nsIPluginInstancePeer2); + rc = pMozI->GetJSThread(aJSThread); + if (NS_SUCCEEDED(rc) && VALID_PTR(aJSThread)) + dprintf(("%s: aJSThread=%u", pszFunction, aJSThread)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Get the JavaScript context to this plugin instance. + * + * @param aJSContext - the resulting JavaScript context + * @result - NS_OK if this operation was successful + */ +/* readonly attribute JSContextPtr JSContext; */ +nsresult VFTCALL downIPIP2GetJSContext(void *pvThis, JSContext * *aJSContext) +{ + DOWN_ENTER_RC(pvThis, nsIPluginInstancePeer2); + rc = pMozI->GetJSContext(aJSContext); + if (NS_SUCCEEDED(rc) && VALID_PTR(aJSContext)) + { + //@todo wrap aJSContext? + dprintf(("%s: aJSContext=%p - not really wrapped !!!", pszFunction, aJSContext)); + DebugInt3(); + } + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +MAKE_SAFE_VFT(VFTnsIPluginInstancePeer2, downVFTnsIPluginInstancePeer2) +{ + { + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downIPIPGetValue, VFTDELTA_VAL() + downIPIPGetMIMEType, VFTDELTA_VAL() + downIPIPGetMode, VFTDELTA_VAL() + downIPIPNewStream, VFTDELTA_VAL() + downIPIPShowStatus, VFTDELTA_VAL() + downIPIPSetWindowSize, VFTDELTA_VAL() + }, + downIPIP2GetJSWindow, VFTDELTA_VAL() + downIPIP2GetJSThread, VFTDELTA_VAL() + downIPIP2GetJSContext, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** +* QueryInterface on nsIPluginInstancePeer to get this. +* +* (Corresponds to NPP_New's argc, argn, and argv arguments.) +* Get a ptr to the paired list of attribute names and values, +* returns the length of the array. +* +* Each name or value is a null-terminated string. +*/ +/* void getAttributes (in PRUint16Ref aCount, in constCharStarConstStar aNames, in constCharStarConstStar aValues); */ +nsresult VFTCALL downIPTIGetAttributes(void *pvThis, PRUint16 & aCount, const char* const* & aNames, const char* const* & aValues) +{ + DOWN_ENTER_RC(pvThis, nsIPluginTagInfo); + rc = pMozI->GetAttributes(aCount, aNames, aValues); + if (NS_SUCCEEDED(rc)) + { + dprintf(("%s: aCount=%d", pszFunction, aCount)); + for (int i = 0; i < aCount; i++) + dprintf(("%s: aNames[%d]='%s' (%p) aValues[%d]='%s' (%p)", pszFunction, + i, aNames[i], aNames[i], i, aValues[i], aValues[i])); + } + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Gets the value for the named attribute. + * +* @param aName - the name of the attribute to find +* @param aResult - the resulting attribute + * @result - NS_OK if this operation was successful, NS_ERROR_FAILURE if + * this operation failed. result is set to NULL if the attribute is not found + * else to the found value. + */ +/* void getAttribute (in string aName, out constCharPtr aResult); */ +nsresult VFTCALL downIPTIGetAttribute(void *pvThis, const char *aName, const char * *aResult) +{ + //@todo TEXT: aName? aResult? I believe that this one works as the text format is that of the document. + DOWN_ENTER_RC(pvThis, nsIPluginTagInfo); + DPRINTF_STR(aName); + rc = pMozI->GetAttribute(aName, aResult); + if (NS_SUCCEEDED(rc) && VALID_PTR(aResult) && VALID_PTR(*aResult)) + DPRINTF_STR(*aResult); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsIPluginTagInfo, downVFTnsIPluginTagInfo) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downIPTIGetAttributes, VFTDELTA_VAL() + downIPTIGetAttribute, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * Get the type of the HTML tag that was used ot instantiate this + * plugin. Currently supported tags are EMBED, OBJECT and APPLET. + */ +/* readonly attribute nsPluginTagType tagType; */ +nsresult VFTCALL downIPTI2GetTagType(void *pvThis, nsPluginTagType *aTagType) +{ + DOWN_ENTER_RC(pvThis, nsIPluginTagInfo2); + rc = pMozI->GetTagType(aTagType); + if (NS_SUCCEEDED(rc) && VALID_PTR(aTagType)) + dprintf(("%s: *aTagType=%d", pszFunction, *aTagType)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** +* Get the complete text of the HTML tag that was used to instantiate this plugin. + */ +/* void getTagText (out constCharPtr aTagText); */ +nsresult VFTCALL downIPTI2GetTagText(void *pvThis, const char * *aTagText) +{ + //@todo TEXT: aTagText? Can't find any usage, but I guess this is also in the format of the document. + DOWN_ENTER_RC(pvThis, nsIPluginTagInfo2); + rc = pMozI->GetTagText(aTagText); + if (NS_SUCCEEDED(rc) && VALID_PTR(aTagText) && VALID_PTR(*aTagText)) + DPRINTF_STR(*aTagText); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Get a ptr to the paired list of parameter names and values, + * returns the length of the array. + * + * Each name or value is a null-terminated string. + */ +/* void getParameters (in PRUint16Ref aCount, in constCharStarConstStar aNames, in constCharStarConstStar aValues); */ +nsresult VFTCALL downIPTI2GetParameters(void *pvThis, PRUint16 & aCount, const char* const* & aNames, const char* const* & aValues) +{ + //@todo TEXT: aNames? aValues? I believe that this one works as the text format is that of the document. + // kmelektronik uses this successfully. + DOWN_ENTER_RC(pvThis, nsIPluginTagInfo2); + rc = pMozI->GetParameters(aCount, aNames, aValues); + if (NS_SUCCEEDED(rc)) + { + dprintf(("%s: aCount=%d", pszFunction, aCount)); + for (int i = 0; i < aCount; i++) + dprintf(("%s: aNames[%d]='%s' (%p) aValues[%d]='%s' (%p)", pszFunction, + i, aNames[i], aNames[i], i, aValues[i], aValues[i])); + } + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Get the value for the named parameter. Returns null + * if the parameter was not set. +* +* @param aName - name of the parameter +* @param aResult - parameter value +* @result - NS_OK if this operation was successful + */ +/* void getParameter (in string aName, out constCharPtr aResult); */ +nsresult VFTCALL downIPTI2GetParameter(void *pvThis, const char *aName, const char * *aResult) +{ + //@todo TEXT: aName? aResult? Can't find any usage, but I guess this is also in the format of the document. + DOWN_ENTER_RC(pvThis, nsIPluginTagInfo2); + DPRINTF_STR(aName); + rc = pMozI->GetParameter(aName, aResult); + if (NS_SUCCEEDED(rc) && VALID_PTR(aResult) && VALID_PTR(*aResult)) + DPRINTF_STR(*aResult); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** +* Get the document base +*/ +/* void getDocumentBase (out constCharPtr aDocumentBase); */ +nsresult VFTCALL downIPTI2GetDocumentBase(void *pvThis, const char * *aDocumentBase) +{ + //@todo TEXT: aDocumentBase? This is just getting the URL. Need further investigation. + DOWN_ENTER_RC(pvThis, nsIPluginTagInfo2); + rc = pMozI->GetDocumentBase(aDocumentBase); + if (NS_SUCCEEDED(rc) && VALID_PTR(aDocumentBase) && VALID_PTR(*aDocumentBase)) + DPRINTF_STR(*aDocumentBase); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Return an encoding whose name is specified in: + * http://java.sun.com/products/jdk/1.1/docs/guide/intl/intl.doc.html#25303 + */ +/* void getDocumentEncoding (out constCharPtr aDocumentEncoding); */ +nsresult VFTCALL downIPTI2GetDocumentEncoding(void *pvThis, const char * *aDocumentEncoding) +{ + DOWN_ENTER_RC(pvThis, nsIPluginTagInfo2); + rc = pMozI->GetDocumentEncoding(aDocumentEncoding); + if (NS_SUCCEEDED(rc) && VALID_PTR(aDocumentEncoding) && VALID_PTR(*aDocumentEncoding)) + DPRINTF_STR(*aDocumentEncoding); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** +* Get object alignment +*/ +/* void getAlignment (out constCharPtr aElignment); */ +nsresult VFTCALL downIPTI2GetAlignment(void *pvThis, const char * *aElignment) +{ + DOWN_ENTER_RC(pvThis, nsIPluginTagInfo2); + rc = pMozI->GetAlignment(aElignment); + if (NS_SUCCEEDED(rc) && VALID_PTR(aElignment) && VALID_PTR(*aElignment)) + DPRINTF_STR(*aElignment); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** +* Get object width +*/ +/* readonly attribute unsigned long width; */ +nsresult VFTCALL downIPTI2GetWidth(void *pvThis, PRUint32 *aWidth) +{ + DOWN_ENTER_RC(pvThis, nsIPluginTagInfo2); + rc = pMozI->GetWidth(aWidth); + if (NS_SUCCEEDED(rc) && VALID_PTR(aWidth)) + dprintf(("%s: *aWidth=%d", pszFunction, *aWidth)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** +* Get object height +*/ +/* readonly attribute unsigned long height; */ +nsresult VFTCALL downIPTI2GetHeight(void *pvThis, PRUint32 *aHeight) +{ + DOWN_ENTER_RC(pvThis, nsIPluginTagInfo2); + rc = pMozI->GetHeight(aHeight); + if (NS_SUCCEEDED(rc) && VALID_PTR(aHeight)) + dprintf(("%s: *aHeight=%d", pszFunction, *aHeight)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** +* Get border vertical space +*/ +/* readonly attribute unsigned long borderVertSpace; */ +nsresult VFTCALL downIPTI2GetBorderVertSpace(void *pvThis, PRUint32 *aBorderVertSpace) +{ + DOWN_ENTER_RC(pvThis, nsIPluginTagInfo2); + rc = pMozI->GetBorderVertSpace(aBorderVertSpace); + if (NS_SUCCEEDED(rc) && VALID_PTR(aBorderVertSpace)) + dprintf(("%s: *aBorderVertSpace=%d", pszFunction, *aBorderVertSpace)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** +* Get border horizontal space +*/ +/* readonly attribute unsigned long borderHorizSpace; */ +nsresult VFTCALL downIPTI2GetBorderHorizSpace(void *pvThis, PRUint32 *aBorderHorizSpace) +{ + DOWN_ENTER_RC(pvThis, nsIPluginTagInfo2); + rc = pMozI->GetBorderHorizSpace(aBorderHorizSpace); + if (NS_SUCCEEDED(rc) && VALID_PTR(aBorderHorizSpace)) + dprintf(("%s: *aBorderHorizSpace=%d", pszFunction, *aBorderHorizSpace)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** +* Returns a unique id for the current document containing plugin + */ +/* readonly attribute unsigned long uniqueID; */ +nsresult VFTCALL downIPTI2GetUniqueID(void *pvThis, PRUint32 *aUniqueID) +{ + DOWN_ENTER_RC(pvThis, nsIPluginTagInfo2); + rc = pMozI->GetUniqueID(aUniqueID); + if (NS_SUCCEEDED(rc) && VALID_PTR(aUniqueID)) + dprintf(("%s: *aUniqueID=%d", pszFunction, *aUniqueID)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Returns the DOM element corresponding to the tag which references + * this plugin in the document. + * +* @param aDOMElement - resulting DOM element + * @result - NS_OK if this operation was successful + */ +/* readonly attribute nsIDOMElement DOMElement; */ +nsresult VFTCALL downIPTI2GetDOMElement(void *pvThis, nsIDOMElement * *aDOMElement) +{ + DOWN_ENTER_RC(pvThis, nsIPluginTagInfo2); + + const void *pvVFT = downIsSupportedInterface(kDOMElementIID); + if (pvVFT) + { + rc = pMozI->GetDOMElement(aDOMElement); + rc = downCreateWrapper((void**)aDOMElement, pvVFT, rc); + } + else + { + dprintf(("%s: Unsupported Interface!!!", pszFunction)); + rc = NS_NOINTERFACE; + ReleaseInt3(0xbaddbeef, 14, kDOMElementIID.m0); + } + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + + +MAKE_SAFE_VFT(VFTnsIPluginTagInfo2, downVFTnsIPluginTagInfo2) +{ + { + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downIPTIGetAttributes, VFTDELTA_VAL() + downIPTIGetAttribute, VFTDELTA_VAL() + }, + downIPTI2GetTagType, VFTDELTA_VAL() + downIPTI2GetTagText, VFTDELTA_VAL() + downIPTI2GetParameters, VFTDELTA_VAL() + downIPTI2GetParameter, VFTDELTA_VAL() + downIPTI2GetDocumentBase, VFTDELTA_VAL() + downIPTI2GetDocumentEncoding, VFTDELTA_VAL() + downIPTI2GetAlignment, VFTDELTA_VAL() + downIPTI2GetWidth, VFTDELTA_VAL() + downIPTI2GetHeight, VFTDELTA_VAL() + downIPTI2GetBorderVertSpace, VFTDELTA_VAL() + downIPTI2GetBorderHorizSpace, VFTDELTA_VAL() + downIPTI2GetUniqueID, VFTDELTA_VAL() + downIPTI2GetDOMElement, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsICookieStorage +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * Retrieves a cookie from the browser's persistent cookie store. + * @param aCookieURL - URL string to look up cookie with. + * @param aCookieBuffer - buffer large enough to accomodate cookie data. + * @param aCookieSize - on input, size of the cookie buffer, on output cookie's size. + */ +/* void getCookie (in string aCookieURL, in voidPtr aCookieBuffer, in PRUint32Ref aCookieSize); */ +nsresult VFTCALL downICSGetCookie(void *pvThis, const char *aCookieURL, void * aCookieBuffer, PRUint32 & aCookieSize) +{ + DOWN_ENTER_RC(pvThis, nsICookieStorage); + dprintf(("%s: aCookieURL=%x aCookieBuffer=%x aCookieSize=%x", + pszFunction, aCookieURL, aCookieBuffer, VALID_REF(aCookieSize) ? aCookieSize : 0xdeadbeef)); + DPRINTF_STR(aCookieURL); + rc = pMozI->GetCookie(aCookieURL, aCookieBuffer, aCookieSize); + if (NS_SUCCEEDED(rc) && VALID_REF(aCookieSize)) + dprintf(("%s: aCookieSize=%d", pszFunction, aCookieSize)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Stores a cookie in the browser's persistent cookie store. + * @param aCookieURL - URL string store cookie with. + * @param aCookieBuffer - buffer containing cookie data. + * @param aCookieSize - specifies size of cookie data. + */ +/* void setCookie (in string aCookieURL, in constVoidPtr aCookieBuffer, in unsigned long aCookieSize); */ +nsresult VFTCALL downICSSetCookie(void *pvThis, const char *aCookieURL, const void * aCookieBuffer, PRUint32 aCookieSize) +{ + DOWN_ENTER_RC(pvThis, nsICookieStorage); + dprintf(("%s: aCookieURL=%x aCookieBuffer=%x aCookieSize=%x", + pszFunction, aCookieURL, aCookieBuffer, aCookieSize)); + DPRINTF_STR(aCookieURL); + rc = pMozI->SetCookie(aCookieURL, aCookieBuffer, aCookieSize); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsICookieStorage, downVFTnsICookieStorage) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downICSGetCookie, VFTDELTA_VAL() + downICSSetCookie, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIJVMThreadManager +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * Returns a unique identifier for the "current" system thread. + */ +#ifdef IPLUGINW_OUTOFTREE +nsresult VFTCALL downITMGetCurrentThread(void *pvThis, nsPluginThread* *threadID) +#else +nsresult VFTCALL downITMGetCurrentThread(void *pvThis, PRThread **threadID) +#endif +{ + DOWN_ENTER_RC(pvThis, nsIJVMThreadManager); + rc = pMozI->GetCurrentThread(threadID); + if (NS_SUCCEEDED(rc) && VALID_PTR(threadID)) + dprintf(("%s: *threadID=%d (0x%x)", pszFunction, *threadID, *threadID)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Pauses the current thread for the specified number of milliseconds. + * If milli is zero, then merely yields the CPU if another thread of + * greater or equal priority. + */ +nsresult VFTCALL downITMSleep(void *pvThis, PRUint32 milli/* = 0*/) +{ + DOWN_ENTER_RC(pvThis, nsIJVMThreadManager); + dprintf(("%s: milli=%d", pszFunction, milli)); + rc = pMozI->Sleep(milli); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Creates a unique monitor for the specified address, and makes the + * current system thread the owner of the monitor. + */ +nsresult VFTCALL downITMEnterMonitor(void *pvThis, void* address) +{ + DOWN_ENTER_RC(pvThis, nsIJVMThreadManager); + dprintf(("%s: address=%p", pszFunction, address)); + rc = pMozI->EnterMonitor(address); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Exits the monitor associated with the address. + */ +nsresult VFTCALL downITMExitMonitor(void *pvThis, void* address) +{ + DOWN_ENTER_RC(pvThis, nsIJVMThreadManager); + dprintf(("%s: address=%p", pszFunction, address)); + rc = pMozI->ExitMonitor(address); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Waits on the monitor associated with the address (must be entered already). + * If milli is 0, wait indefinitely. + */ +nsresult VFTCALL downITMWait(void *pvThis, void* address, PRUint32 milli/* = 0*/) +{ + DOWN_ENTER_RC(pvThis, nsIJVMThreadManager); + dprintf(("%s: address=%p milli=%u", pszFunction, address, milli)); + rc = pMozI->Wait(address, milli); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Notifies a single thread waiting on the monitor associated with the address (must be entered already). + */ +nsresult VFTCALL downITMNotify(void *pvThis, void* address) +{ + DOWN_ENTER_RC(pvThis, nsIJVMThreadManager); + dprintf(("%s: address=%p", pszFunction, address)); + rc = pMozI->Notify(address); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Notifies all threads waiting on the monitor associated with the address (must be entered already). + */ +nsresult VFTCALL downITMNotifyAll(void *pvThis, void* address) +{ + DOWN_ENTER_RC(pvThis, nsIJVMThreadManager); + dprintf(("%s: address=%p", pszFunction, address)); + rc = pMozI->NotifyAll(address); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Creates a new thread, calling the specified runnable's Run method (a la Java). + */ +#ifdef IPLUGINW_OUTOFTREE +nsresult VFTCALL downITMCreateThread(void *pvThis, PRUint32* threadID, nsIRunnable* runnable) +#else +nsresult VFTCALL downITMCreateThread(void *pvThis, PRThread **threadID, nsIRunnable* runnable) +#endif +{ + DOWN_ENTER_RC(pvThis, nsIJVMThreadManager); + dprintf(("%s: threadID=%p runnable=%p", pszFunction, threadID, runnable)); + + nsIRunnable * pupRunnable = runnable; + rc = upCreateWrapper((void**)&pupRunnable, kRunnableIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->CreateThread(threadID, pupRunnable); + if (NS_SUCCEEDED(rc) && VALID_PTR(threadID)) + dprintf(("%s: *threadID=%d", pszFunction, *threadID)); + } + else + dprintf(("%s: failed to create up wrapper for nsIRunnable %x !!!", pszFunction, runnable)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Posts an event to specified thread, calling the runnable from that thread. + * @param threadID thread to call runnable from + * @param runnable object to invoke from thread + * @param async if true, won't block current thread waiting for result + */ +#ifdef IPLUGINW_OUTOFTREE +nsresult VFTCALL downITMPostEvent(void *pvThis, PRUint32 threadID, nsIRunnable* runnable, PRBool async) +#else +nsresult VFTCALL downITMPostEvent(void *pvThis, PRThread *threadID, nsIRunnable* runnable, PRBool async) +#endif +{ + DOWN_ENTER_RC(pvThis, nsIJVMThreadManager); + dprintf(("%s: threadID=%d runnable=%p async=%d", pszFunction, threadID, runnable, async)); + + nsIRunnable * pupRunnable = runnable; + rc = upCreateWrapper((void**)&pupRunnable, kRunnableIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->PostEvent(threadID, pupRunnable, async); + else + dprintf(("%s: failed to create up wrapper for nsIRunnable %x !!!", pszFunction, runnable)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + + +MAKE_SAFE_VFT(VFTnsIJVMThreadManager, downVFTnsIJVMThreadManager) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downITMGetCurrentThread, VFTDELTA_VAL() + downITMSleep, VFTDELTA_VAL() + downITMEnterMonitor, VFTDELTA_VAL() + downITMExitMonitor, VFTDELTA_VAL() + downITMWait, VFTDELTA_VAL() + downITMNotify, VFTDELTA_VAL() + downITMNotifyAll, VFTDELTA_VAL() + downITMCreateThread, VFTDELTA_VAL() + downITMPostEvent, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIJVMManager +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * Creates a proxy JNI with an optional secure environment (which can be NULL). + * There is a one-to-one correspondence between proxy JNIs and threads, so + * calling this method multiple times from the same thread will return + * the same proxy JNI. + */ +nsresult VFTCALL downCreateProxyJNI(void *pvThis, nsISecureEnv *secureEnv, JNIEnv * *outProxyEnv) +{ + DOWN_ENTER_RC(pvThis, nsIJVMManager); + + nsISecureEnv *pupSecureEnv = secureEnv; + rc = upCreateWrapper((void**)&pupSecureEnv, kSecureEnvIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->CreateProxyJNI(pupSecureEnv, outProxyEnv); + rc = downCreateJNIEnvWrapper(outProxyEnv, rc); + } + else + dprintf(("%s: failed to create up wrapper for kSecureEnvIID %x !!!", pszFunction, secureEnv)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Returns the proxy JNI associated with the current thread, or NULL if no + * such association exists. + */ +nsresult VFTCALL downGetProxyJNI(void *pvThis, JNIEnv * *outProxyEnv) +{ + DOWN_ENTER_RC(pvThis, nsIJVMManager); + + rc = pMozI->GetProxyJNI(outProxyEnv); + rc = downCreateJNIEnvWrapper(outProxyEnv, rc); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +/** + * Called from Java Console menu item. + */ +nsresult VFTCALL downShowJavaConsole(void *pvThis) +{ + DOWN_ENTER_RC(pvThis, nsIJVMManager); + + dprintf(("%s", pszFunction)); + rc = pMozI->ShowJavaConsole(); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * isAllPermissionGranted [Deprecated Sep-10-2000] + */ +nsresult VFTCALL downIsAllPermissionGranted(void *pvThis, const char *lastFingerprint, const char *lastCommonName, const char *rootFingerprint, const char *rootCommonName, PRBool *_retval) +{ + //@todo TEXT: lastFingerprint? lastFingerprint? lastCommonName? rootCommonName? No idea. Need find usage. + DOWN_ENTER_RC(pvThis, nsIJVMManager); + dprintf(("%s _retval=%x", pszFunction, _retval)); + DPRINTF_STR(lastFingerprint); + DPRINTF_STR(lastCommonName); + DPRINTF_STR(rootFingerprint); + DPRINTF_STR(rootCommonName); + + rc = pMozI->IsAllPermissionGranted(lastFingerprint, lastCommonName, rootFingerprint, rootCommonName, _retval); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * isAppletTrusted + */ +nsresult VFTCALL downIsAppletTrusted(void *pvThis, const char *aRSABuf, PRUint32 aRSABufLen, const char *aPlaintext, PRUint32 aPlaintextLen, PRBool *isTrusted, nsIPrincipal **_retval) +{ + //@todo TEXT: aRSABuf? aPlaintext? No idea. Need find usage. + DOWN_ENTER_RC(pvThis, nsIJVMManager); + + dprintf(("%s aRSABuf=%x aRSABufLen=%d aPlaintext=%x aPlaintextLen=%d isTrusted=%x _retval=%x", pszFunction, aRSABuf, aRSABufLen, aPlaintext, aPlaintextLen, isTrusted, _retval)); + rc = pMozI->IsAppletTrusted(aRSABuf, aRSABufLen, aPlaintext, aPlaintextLen, isTrusted, _retval); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * The JavaEnabled variable to see if Java is Enabled or not + */ +nsresult VFTCALL downGetJavaEnabled(void *pvThis, PRBool *aJavaEnabled) +{ + DOWN_ENTER_RC(pvThis, nsIJVMManager); + + dprintf(("%s aJavaEnabled=%x", pszFunction, aJavaEnabled)); + rc = pMozI->GetJavaEnabled(aJavaEnabled); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsIJVMManager, downVFTnsIJVMManager) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downCreateProxyJNI, VFTDELTA_VAL() + downGetProxyJNI, VFTDELTA_VAL() + downShowJavaConsole, VFTDELTA_VAL() + downIsAllPermissionGranted, VFTDELTA_VAL() + downIsAppletTrusted, VFTDELTA_VAL() + downGetJavaEnabled, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsILiveconnect +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * get member of a Native JSObject for a given name. + * + * @param obj - A Native JS Object. + * @param name - Name of a member. + * @param pjobj - return parameter as a java object representing + * the member. If it is a basic data type it is converted to + * a corresponding java type. If it is a NJSObject, then it is + * wrapped up as java wrapper netscape.javascript.JSObject. + */ +nsresult VFTCALL downGetMember(void *pvThis, JNIEnv *jEnv, jsobject jsobj, const jchar *name, jsize length, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports, jobject *pjobj) +{ + DOWN_ENTER_RC(pvThis, nsILiveconnect); + dprintf(("%s: jEnv=%p jsobj=%p name=%p length=%d principalsArray=%p numPrincipals=%d securitySupports=%p pjobj=%p", + pszFunction, jEnv, jsobj, name, length, principalsArray, numPrincipals, securitySupports, pjobj)); + if (VALID_PTR(name)) + dprintf(("%s: name=%ls", pszFunction, name)); + + if (numPrincipals) + { + /** @todo check out what this array contains. (not used by oji plugin I believe) + * Guess it's of type nsIPrincipal or some decendant, can't see mozilla caring much about it... + */ + dprintf(("%s: numPrincipals/princiapalsArray isn't supported !!!", pszFunction)); + ReleaseInt3(0xdead0000, 0, 7); + } + + JNIEnv * pupJNIEnv = jEnv; + rc = upCreateJNIEnvWrapper(&pupJNIEnv, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports *pupSecuritySupports = securitySupports; + rc = upCreateWrapper((void**)&pupSecuritySupports, kSupportsIID, rc); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->GetMember(pupJNIEnv, jsobj, name, length, principalsArray, numPrincipals, pupSecuritySupports, pjobj); + if (NS_SUCCEEDED(rc) && VALID_PTR(pjobj)) + dprintf(("%s: *pjobj=%p", pszFunction, *pjobj)); + } + else + dprintf(("%s: Failed make up wrapper for nsISupports !!!", pszFunction)); + } + else + dprintf(("%s: Failed make up wrapper for JNIEnv !!!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * get member of a Native JSObject for a given index. + * + * @param obj - A Native JS Object. + * @param slot - Index of a member. + * @param pjobj - return parameter as a java object representing + * the member. + */ +nsresult VFTCALL downGetSlot(void *pvThis, JNIEnv *jEnv, jsobject jsobj, jint slot, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports, jobject *pjobj) +{ + DOWN_ENTER_RC(pvThis, nsILiveconnect); + dprintf(("%s: jEnv=%p jsobj=%p slot=%p principalsArray=%p numPrincipals=%d securitySupports=%p pjobj=%p", + pszFunction, jEnv, jsobj, slot, principalsArray, numPrincipals, securitySupports, pjobj)); + + if (numPrincipals) + { + /** @todo check out what this array contains. (not used by oji plugin I believe) + * Guess it's of type nsIPrincipal or some decendant, can't see mozilla caring much about it... + */ + dprintf(("%s: numPrincipals/princiapalsArray isn't supported !!!", pszFunction)); + ReleaseInt3(0xdead0000, 0, 8); + } + + JNIEnv * pupJNIEnv = jEnv; + rc = upCreateJNIEnvWrapper(&pupJNIEnv, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports *pupSecuritySupports = securitySupports; + rc = upCreateWrapper((void**)&pupSecuritySupports, kSupportsIID, rc); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->GetSlot(pupJNIEnv, jsobj, slot, principalsArray, numPrincipals, pupSecuritySupports, pjobj); + if (NS_SUCCEEDED(rc) && VALID_PTR(pjobj)) + dprintf(("%s: *pjobj=%p", pszFunction, *pjobj)); + } + else + dprintf(("%s: Failed make up wrapper for nsISupports !!!", pszFunction)); + } + else + dprintf(("%s: Failed make up wrapper for JNIEnv !!!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * set member of a Native JSObject for a given name. + * + * @param obj - A Native JS Object. + * @param name - Name of a member. + * @param jobj - Value to set. If this is a basic data type, it is converted + * using standard JNI calls but if it is a wrapper to a JSObject + * then a internal mapping is consulted to convert to a NJSObject. + */ +nsresult VFTCALL downSetMember(void *pvThis, JNIEnv *jEnv, jsobject jsobj, const jchar* name, jsize length, jobject jobj, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports) +{ + DOWN_ENTER_RC(pvThis, nsILiveconnect); + dprintf(("%s: jEnv=%p jsobj=%p name=%p length=%d jobj=%p principalsArray=%p numPrincipals=%d securitySupports=%p", + pszFunction, jEnv, jsobj, name, length, jobj, principalsArray, numPrincipals, securitySupports)); + DPRINTF_STR(name); + + if (numPrincipals) + { + /** @todo check out what this array contains. (not used by oji plugin I believe) + * Guess it's of type nsIPrincipal or some decendant, can't see mozilla caring much about it... + */ + dprintf(("%s: numPrincipals/princiapalsArray isn't supported !!!", pszFunction)); + ReleaseInt3(0xdead0000, 0, 9); + } + + JNIEnv * pupJNIEnv = jEnv; + rc = upCreateJNIEnvWrapper(&pupJNIEnv, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports *pupSecuritySupports = securitySupports; + rc = upCreateWrapper((void**)&pupSecuritySupports, kSupportsIID, rc); + if (NS_SUCCEEDED(rc)) + rc = pMozI->SetMember(pupJNIEnv, jsobj, name, length, jobj, principalsArray, numPrincipals, pupSecuritySupports); + else + dprintf(("%s: Failed make up wrapper for nsISupports !!!", pszFunction)); + } + else + dprintf(("%s: Failed make up wrapper for JNIEnv !!!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * set member of a Native JSObject for a given index. + * + * @param obj - A Native JS Object. + * @param index - Index of a member. + * @param jobj - Value to set. If this is a basic data type, it is converted + * using standard JNI calls but if it is a wrapper to a JSObject + * then a internal mapping is consulted to convert to a NJSObject. + */ +nsresult VFTCALL downSetSlot(void *pvThis, JNIEnv *jEnv, jsobject jsobj, jint slot, jobject jobj, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports) +{ + DOWN_ENTER_RC(pvThis, nsILiveconnect); + dprintf(("%s: jEnv=%p jsobj=%p slot=%p jobj=%p principalsArray=%p numPrincipals=%d securitySupports=%p", + pszFunction, jEnv, jsobj, slot, jobj, principalsArray, numPrincipals, securitySupports)); + + if (numPrincipals) + { + /** @todo check out what this array contains. (not used by oji plugin I believe) + * Guess it's of type nsIPrincipal or some decendant, can't see mozilla caring much about it... + */ + dprintf(("%s: numPrincipals/princiapalsArray isn't supported !!!", pszFunction)); + ReleaseInt3(0xdead0000, 0, 8); + } + + JNIEnv * pupJNIEnv = jEnv; + rc = upCreateJNIEnvWrapper(&pupJNIEnv, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports *pupSecuritySupports = securitySupports; + rc = upCreateWrapper((void**)&pupSecuritySupports, kSupportsIID, rc); + if (NS_SUCCEEDED(rc)) + rc = pMozI->SetSlot(pupJNIEnv, jsobj, slot, jobj, principalsArray, numPrincipals, pupSecuritySupports); + else + dprintf(("%s: Failed make up wrapper for nsISupports !!!", pszFunction)); + } + else + dprintf(("%s: Failed make up wrapper for JNIEnv !!!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * remove member of a Native JSObject for a given name. + * + * @param obj - A Native JS Object. + * @param name - Name of a member. + */ +nsresult VFTCALL downRemoveMember(void *pvThis, JNIEnv *jEnv, jsobject jsobj, const jchar* name, jsize length, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports) +{ + DOWN_ENTER_RC(pvThis, nsILiveconnect); + dprintf(("%s: jEnv=%p jsobj=%p name=%p length=%d principalsArray=%p numPrincipals=%d securitySupports=%p", + pszFunction, jEnv, jsobj, name, length, principalsArray, numPrincipals, securitySupports)); + if (VALID_PTR(name)) + dprintf(("%s: name=%ls", pszFunction, name)); + + if (numPrincipals) + { + /** @todo check out what this array contains. (not used by oji plugin I believe) + * Guess it's of type nsIPrincipal or some decendant, can't see mozilla caring much about it... + */ + dprintf(("%s: numPrincipals/princiapalsArray isn't supported !!!", pszFunction)); + ReleaseInt3(0xdead0000, 0, 10); + } + + JNIEnv * pupJNIEnv = jEnv; + rc = upCreateJNIEnvWrapper(&pupJNIEnv, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports *pupSecuritySupports = securitySupports; + rc = upCreateWrapper((void**)&pupSecuritySupports, kSupportsIID, rc); + if (NS_SUCCEEDED(rc)) + rc = pMozI->RemoveMember(pupJNIEnv, jsobj, name, length, principalsArray, numPrincipals, pupSecuritySupports); + else + dprintf(("%s: Failed make up wrapper for nsISupports !!!", pszFunction)); + } + else + dprintf(("%s: Failed make up wrapper for JNIEnv !!!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * call a method of Native JSObject. + * + * @param obj - A Native JS Object. + * @param name - Name of a method. + * @param jobjArr - Array of jobjects representing parameters of method being caled. + * @param pjobj - return value. + */ +nsresult VFTCALL downCall(void *pvThis, JNIEnv *jEnv, jsobject jsobj, const jchar* name, jsize length, jobjectArray jobjArr, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports, jobject *pjobj) +{ + DOWN_ENTER_RC(pvThis, nsILiveconnect); + dprintf(("%s: jEnv=%p jsobj=%p name=%p length=%d jobjArr=%p principalsArray=%p numPrincipals=%d securitySupports=%p pjobj=%p", + pszFunction, jEnv, jsobj, name, length, jobjArr, principalsArray, numPrincipals, securitySupports, pjobj)); + if (VALID_PTR(name)) + dprintf(("%s: name=%ls", pszFunction, name)); + + if (numPrincipals) + { + /** @todo check out what this array contains. (not used by oji plugin I believe) + * Guess it's of type nsIPrincipal or some decendant, can't see mozilla caring much about it... + */ + dprintf(("%s: numPrincipals/princiapalsArray isn't supported !!!", pszFunction)); + ReleaseInt3(0xdead0000, 0, 11); + } + + JNIEnv * pupJNIEnv = jEnv; + rc = upCreateJNIEnvWrapper(&pupJNIEnv, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports *pupSecuritySupports = securitySupports; + rc = upCreateWrapper((void**)&pupSecuritySupports, kSupportsIID, rc); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->Call(pupJNIEnv, jsobj, name, length, jobjArr, principalsArray, numPrincipals, pupSecuritySupports, pjobj); + if (NS_SUCCEEDED(rc) && VALID_PTR(pjobj)) + dprintf(("%s: *pjobj=%p", pszFunction, *pjobj)); + } + else + dprintf(("%s: Failed make up wrapper for nsISupports !!!", pszFunction)); + } + else + dprintf(("%s: Failed make up wrapper for JNIEnv !!!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Evaluate a script with a Native JS Object representing scope. + * + * @param jsobj - A Native JS Object. + * @param principalsArray - Array of principals to be used to compare privileges. + * @param numPrincipals - Number of principals being passed. + * @param script - Script to be executed. + * @param pjobj - return value. + */ +nsresult VFTCALL downEval(void *pvThis, JNIEnv *jEnv, jsobject jsobj, const jchar *script, jsize length, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports, jobject *pjobj) +{ + DOWN_ENTER_RC(pvThis, nsILiveconnect); + dprintf(("%s: jEnv=%p jsobj=%p script=%p length=%d principalsArray=%p numPrincipals=%d securitySupports=%p pjobj=%p", + pszFunction, jEnv, jsobj, script, length, principalsArray, numPrincipals, securitySupports, pjobj)); + if (VALID_PTR(script)) + dprintf(("%s: script=%ls", pszFunction, script)); + + if (numPrincipals) + { + /** @todo check out what this array contains. (not used by oji plugin I believe) + * Guess it's of type nsIPrincipal or some decendant, can't see mozilla caring much about it... + */ + dprintf(("%s: numPrincipals/princiapalsArray isn't supported !!!", pszFunction)); + ReleaseInt3(0xdead0000, 0, 12); + } + + JNIEnv * pupJNIEnv = jEnv; + rc = upCreateJNIEnvWrapper(&pupJNIEnv, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports *pupSecuritySupports = securitySupports; + rc = upCreateWrapper((void**)&pupSecuritySupports, kSupportsIID, rc); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->Eval(pupJNIEnv, jsobj, script, length, principalsArray, numPrincipals, pupSecuritySupports, pjobj); + if (NS_SUCCEEDED(rc) && VALID_PTR(pjobj)) + dprintf(("%s: *pjobj=%p", pszFunction, *pjobj)); + } + else + dprintf(("%s: Failed make up wrapper for nsISupports !!!", pszFunction)); + } + else + dprintf(("%s: Failed make up wrapper for JNIEnv !!!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Get the window object for a plugin instance. + * + * @param pJavaObject - Either a jobject or a pointer to a plugin instance + * representing the java object. + * @param pjobj - return value. This is a native js object + * representing the window object of a frame + * in which a applet/bean resides. + */ +nsresult VFTCALL downGetWindow(void *pvThis, JNIEnv *jEnv, void *pJavaObject, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports, jsobject *pobj) +{ + DOWN_ENTER_RC(pvThis, nsILiveconnect); + dprintf(("%s: jEnv=%p pJavaObject=%p principalsArray=%p numPrincipals=%d securitySupports=%p pObj=%p", + pszFunction, jEnv, pJavaObject, principalsArray, numPrincipals, securitySupports, pobj)); + if (numPrincipals) + { + //@todo check out what this array contains. (not used by oji plugin I believe) + dprintf(("%s: numPrincipals/princiapalsArray isn't supported !!!", pszFunction)); + ReleaseInt3(0xdead0000, 0, 6); + } + + /* + * JNI Wrapper + */ + JNIEnv * pupJNIEnv = jEnv; + rc = upCreateJNIEnvWrapper(&pupJNIEnv, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports *pupSecuritySupports = securitySupports; + rc = upCreateWrapper((void**)&pupSecuritySupports, kSupportsIID, rc); + if (NS_SUCCEEDED(rc)) + { + /** + * @todo: how can we distinguish between a java and instance object?? + * the java plugin seems to only use an instance pointer for calling + * this function + * kso: Good question, but it seems like assuming nsIPluginInstance should + * work for us. At least looking at the code path of GetWindow. + * It ends up casting the pJavaObject to nsIPluginInstance in + * map_jsj_thread_to_js_context_impl() mozilla\modules\oji\src\Icglue.cpp. + */ + nsIPluginInstance *pupIPluginInstance = (nsIPluginInstance *)pJavaObject; + rc = upCreateWrapper((void**)&pupIPluginInstance, kPluginInstanceIID, rc); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->GetWindow(pupJNIEnv, pupIPluginInstance, principalsArray, numPrincipals, pupSecuritySupports, pobj); + if (NS_SUCCEEDED(rc) && VALID_PTR(pobj)) + //@todo ilink crash with this code! f**k ilink/icc!!! + //dprintf(("%s: *pobj=%d (0x%x)", pszFunction, *pobj, *pobj)); + dprintf(("%s: *pobj=%d (0x%x)", XPFUNCTION, *pobj, *pobj)); + } + else + dprintf(("%s: Failed to create up wrapper for nsISupports %p !!!", pszFunction, securitySupports)); + } + else + dprintf(("%s: Failed to create up wrapper for nsISupports %p !!!", pszFunction, securitySupports)); + } + else + { + dprintf(("%s: Failed to make up wrapper for JNIEnv !!!", pszFunction)); + rc = NS_ERROR_UNEXPECTED; + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Get the window object for a plugin instance. + * + * @param jEnv - JNIEnv on which the call is being made. + * @param obj - A Native JS Object. + */ +nsresult VFTCALL downFinalizeJSObject(void *pvThis, JNIEnv *jEnv, jsobject jsobj) +{ + DOWN_ENTER_RC(pvThis, nsILiveconnect); + dprintf(("%s: jEnv=%p jsobj=%p", pszFunction, jEnv, jsobj)); + + JNIEnv * pupJNIEnv = jEnv; + rc = upCreateJNIEnvWrapper(&pupJNIEnv, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->FinalizeJSObject(pupJNIEnv, jsobj); + else + dprintf(("%s: Failed make up wrapper for JNIEnv !!!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Get the window object for a plugin instance. + * + * @param jEnv - JNIEnv on which the call is being made. + * @param obj - A Native JS Object. + * @param jstring - Return value as a jstring representing a JS object. + */ +nsresult VFTCALL downToString(void *pvThis, JNIEnv *jEnv, jsobject obj, jstring *pjstring) +{ + DOWN_ENTER_RC(pvThis, nsILiveconnect); + dprintf(("%s: jEnv=%p obj=%p pjstring=%p", pszFunction, jEnv, obj, pjstring)); + + JNIEnv * pupJNIEnv = jEnv; + rc = upCreateJNIEnvWrapper(&pupJNIEnv, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->ToString(pupJNIEnv, obj, pjstring); + if (NS_SUCCEEDED(rc) && VALID_PTR(pjstring)) + dprintf(("%s: *pjstring=%p", pszFunction, pjstring)); + } + else + dprintf(("%s: Failed make up wrapper for JNIEnv !!!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsILiveconnect, downVFTnsILiveconnect) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downGetMember, VFTDELTA_VAL() + downGetSlot, VFTDELTA_VAL() + downSetMember, VFTDELTA_VAL() + downSetSlot, VFTDELTA_VAL() + downRemoveMember, VFTDELTA_VAL() + downCall, VFTDELTA_VAL() + downEval, VFTDELTA_VAL() + downGetWindow, VFTDELTA_VAL() + downFinalizeJSObject, VFTDELTA_VAL() + downToString, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsISecureLiveconnect +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * Evaluate a script with a Native JS Object representing scope. + * + * @param jEnv - JNIEnv pointer + * @param jsobj - A Native JS Object. + * @param script - JavaScript to be executed. + * @param pNSIPrincipaArray - Array of principals to be used to compare privileges. + * @param numPrincipals - Number of principals being passed. + * @param context - Security context. + * @param pjobj - return value. + */ +nsresult VFTCALL downSecureLiveConnectEval( + void *pvThis, JNIEnv *jEnv, jsobject jsobj, const jchar *script, jsize length, void **pNSIPrincipaArray, + int numPrincipals, void *pNSISecurityContext, jobject *pjobj) +{ + DOWN_ENTER_RC(pvThis, nsISecureLiveconnect); + dprintf(("%s: jEnv=%p jsobj=%p script=%p length=%d principalsArray=%p numPrincipals=%d pNSISecurityContext=%p pjobj=%p", + pszFunction, jEnv, jsobj, script, length, pNSIPrincipaArray, numPrincipals, pNSISecurityContext, pjobj)); + if (VALID_PTR(script)) + dprintf(("%s: script=%ls", pszFunction, script)); + + /**@todo I believe this interface isn't implemented in Mozilla (yet). Can't find + * any references to use of it. So, I'm very curious about a few details. + */ + DebugInt3(); + + if (numPrincipals) + { + /** @todo check out what this array contains. (not used by oji plugin I believe) + * Guess it's of type nsIPrincipal or some decendant, can't see mozilla caring much about it... + */ + dprintf(("%s: numPrincipals/princiapalsArray isn't supported !!!", pszFunction)); + ReleaseInt3(0xdead0000, 0, 14); + } + + JNIEnv * pupJNIEnv = jEnv; + rc = upCreateJNIEnvWrapper(&pupJNIEnv, NS_OK); + if (NS_SUCCEEDED(rc)) + { + DebugInt3(); //@todo check that following wrapper is correct!!! + nsISecurityContext *pupSecurityContext = (nsISecurityContext*)pNSISecurityContext; + rc = upCreateWrapper((void**)&pupSecurityContext, kSecurityContextIID, rc); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->Eval(pupJNIEnv, jsobj, script, length, pNSIPrincipaArray, numPrincipals, pupSecurityContext, pjobj); + if (NS_SUCCEEDED(rc) && VALID_PTR(pjobj)) + dprintf(("%s: *pjobj=%p", pszFunction, *pjobj)); + } + else + dprintf(("%s: Failed make up wrapper for nsISupports !!!", pszFunction)); + } + else + dprintf(("%s: Failed make up wrapper for JNIEnv !!!", pszFunction)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +MAKE_SAFE_VFT(VFTnsISecureLiveconnect, downVFTnsISecureLiveconnect) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downSecureLiveConnectEval, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsISecurityContext +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * Get the security context to be used in LiveConnect. + * This is used for JavaScript <--> Java. + * + * @param target -- Possible target. + * @param action -- Possible action on the target. + * @return -- NS_OK if the target and action is permitted on the security context. + * -- NS_FALSE otherwise. + */ +nsresult VFTCALL downImplies(void *pvThis, const char* target, const char* action, PRBool *bAllowedAccess) +{ + DOWN_ENTER_RC(pvThis, nsISecurityContext); + dprintf(("%s: target=%x action=%x bAllowedAccess=%x", pszFunction, target, action, bAllowedAccess)); + DPRINTF_STR(target); + DPRINTF_STR(action); + + rc = pMozI->Implies(target, action, bAllowedAccess); + if (/*NS_SUCCEEDED(rc) && */VALID_PTR(bAllowedAccess)) + dprintf(("%s: *bAllowedAccess=%d", pszFunction, *bAllowedAccess)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Get the origin associated with the context. + * + * @param buf -- Result buffer (managed by the caller.) + * @param len -- Buffer length. + * @return -- NS_OK if the codebase string was obtained. + * -- NS_FALSE otherwise. + */ +nsresult VFTCALL downGetOrigin(void *pvThis, char* buf, int len) +{ + DOWN_ENTER_RC(pvThis, nsISecurityContext); + dprintf(("%s: buf=%p len=%d", pszFunction, buf, len)); + + rc = pMozI->GetOrigin(buf, len); + if (NS_SUCCEEDED(rc) && VALID_PTR(buf)) + DPRINTF_STR(buf); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Get the certificate associated with the context. + * + * @param buf -- Result buffer (managed by the caller.) + * @param len -- Buffer length. + * @return -- NS_OK if the codebase string was obtained. + * -- NS_FALSE otherwise. + */ +nsresult VFTCALL downGetCertificateID(void *pvThis, char* buf, int len) +{ + DOWN_ENTER_RC(pvThis, nsISecurityContext); + dprintf(("%s: buf=%p len=%d", pszFunction, buf, len)); + + rc = pMozI->GetCertificateID(buf, len); + if (NS_SUCCEEDED(rc) && VALID_PTR(buf)) + DPRINTF_STR(buf); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsISecurityContext, downVFTnsISecurityContext) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downImplies, VFTDELTA_VAL() + downGetOrigin, VFTDELTA_VAL() + downGetCertificateID, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIComponentManagerObsolete +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * findFactory + * + * Returns the factory object that can be used to create instances of + * CID aClass + * + * @param aClass The classid of the factory that is being requested + */ +/* nsIFactory findFactory (in nsCIDRef aClass); */ +nsresult VFTCALL downFindFactory(void *pvThis, const nsCID & aClass, nsIFactory **_retval) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_NSID(aClass); + + const void * pvVFT = downIsSupportedInterface(kFactoryIID); + if (pvVFT) + { + rc = pMozI->FindFactory(aClass, _retval); + rc = downCreateWrapper((void**)_retval, pvVFT, rc); + } + else + { + dprintf(("%s: Unsupported down interface kFactoryIID!!!", pszFunction)); + rc = NS_NOINTERFACE; + ReleaseInt3(0xbaddbeef, 29, kFactoryIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * getClassObject + * + * @param aClass : CID of the class whose class object is requested + * @param aIID : IID of an interface that the class object is known to + * to implement. nsISupports and nsIFactory are known to + * be implemented by the class object. + */ +/* [noscript] voidPtr getClassObject (in nsCIDRef aClass, in nsIIDRef aIID); */ +nsresult VFTCALL downGetClassObject(void *pvThis, const nsCID & aClass, const nsIID & aIID, void * *_retval) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_NSID(aClass); + DPRINTF_NSID(aIID); + + /* + * Supported interface requested? + */ + const void * pvVFT = downIsSupportedInterface(aIID); + if (pvVFT) + { + rc = pMozI->GetClassObject(aClass, aIID, _retval); + rc = downCreateWrapper(_retval, pvVFT, rc); + } + else + { + dprintf(("%s: Unsupported down interface !!!", pszFunction)); + rc = NS_NOINTERFACE; + ReleaseInt3(0xbaddbeef, 27, aIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * contractIDToClassID + * + * Get the ClassID for a given ContractID. Many ClassIDs may implement a + * ContractID. In such a situation, this returns the preferred ClassID, which + * happens to be the last registered ClassID. + * + * @param aContractID : Contractid for which ClassID is requested + * @return aClass : ClassID return + */ +/* [notxpcom] nsresult contractIDToClassID (in string aContractID, out nsCID aClass); */ +nsresult VFTCALL downContractIDToClassID(void *pvThis, const char *aContractID, nsCID *aClass) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_CONTRACTID(aContractID); + + rc = pMozI->ContractIDToClassID(aContractID, aClass); + if (NS_SUCCEEDED(rc)) + DPRINTF_NSID(*aClass); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * classIDToContractid + * + * Get the ContractID for a given ClassID. A ClassIDs may implement multiple + * ContractIDs. This function return the last registered ContractID. + * + * @param aClass : ClassID for which ContractID is requested. + * @return aClassName : returns class name asssociated with aClass + * @return : ContractID last registered for aClass + */ +/* string CLSIDToContractID (in nsCIDRef aClass, out string aClassName); */ +nsresult VFTCALL downCLSIDToContractID(void *pvThis, const nsCID & aClass, char **aClassName, char **_retval) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_NSID(aClass); + + rc = pMozI->CLSIDToContractID(aClass, aClassName, _retval); + if (NS_SUCCEEDED(rc)) + { + if (VALID_PTR(aClassName)) + DPRINTF_STR(aClassName); + if (VALID_PTR(_retval)) + DPRINTF_STR(_retval); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * createInstance + * + * Create an instance of the CID aClass and return the interface aIID. + * + * @param aClass : ClassID of object instance requested + * @param aDelegate : Used for aggregation + * @param aIID : IID of interface requested + */ +/* [noscript] voidPtr createInstance (in nsCIDRef aClass, in nsISupports aDelegate, in nsIIDRef aIID); */ +nsresult VFTCALL downCreateInstance(void *pvThis, const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *_retval) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_NSID(aClass); + DPRINTF_NSID(aIID); + dprintf(("%s: aDelegate=%p _retval=%p", pszFunction, aDelegate, _retval)); + + + /* + * Supported interface requested? + */ + const void * pvVFT = downIsSupportedInterface(aIID); + if (pvVFT) + { + /* + * Wrap the aDelegate. + * (Pray this isn't supposed to be the same kind of wrapper as nsIID. + * Haven't found any examples using aDelegate unfortunately.) + */ + nsISupports * pupOuter = aDelegate; + rc = upCreateWrapper((void**)&pupOuter, kSupportsIID, NS_OK); + if (rc == NS_OK) + { + rc = pMozI->CreateInstance(aClass, pupOuter, aIID, _retval); + rc = downCreateWrapper(_retval, pvVFT, rc); + } + else + dprintf(("%s: failed to create up wrapper for kSupportsIID %x !!!", pszFunction, aDelegate)); + } + else + { + dprintf(("%s: Unsupported down interface!!!", pszFunction)); + rc = NS_NOINTERFACE; + ReleaseInt3(0xbaddbeef, 9, aIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * createInstanceByContractID + * + * Create an instance of the CID that implements aContractID and return the + * interface aIID. This is a convenience function that effectively does + * ContractIDToClassID() followed by CreateInstance(). + * + * @param aContractID : aContractID of object instance requested + * @param aDelegate : Used for aggregation + * @param aIID : IID of interface requested + */ +/* [noscript] voidPtr createInstanceByContractID (in string aContractID, in nsISupports aDelegate, in nsIIDRef IID); */ +nsresult VFTCALL downCreateInstanceByContractID(void *pvThis, const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *_retval) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_CONTRACTID(aContractID); + DPRINTF_NSID(aIID); + dprintf(("%s: aDelegate=%p _retval=%p", pszFunction, aDelegate, _retval)); + + + /* + * Supported interface requested? + */ + const void * pvVFT = downIsSupportedInterface(aIID); + if (pvVFT) + { + /* + * Wrap the aDelegate. + * (Pray this isn't supposed to be the same kind of wrapper as nsIID. + * Haven't found any examples using aDelegate unfortunately.) + */ + nsISupports * pupOuter = aDelegate; + rc = upCreateWrapper((void**)&pupOuter, kSupportsIID, NS_OK); + if (rc == NS_OK) + { + rc = pMozI->CreateInstanceByContractID(aContractID, pupOuter, aIID, _retval); + rc = downCreateWrapper(_retval, pvVFT, rc); + } + else + dprintf(("%s: failed to create up wrapper for kSupportsIID %x !!!", pszFunction, aDelegate)); + } + else + { + dprintf(("%s: Unsupported down interface!!!", pszFunction)); + ReleaseInt3(0xbaddbeef, 30, aIID.m0); + rc = NS_NOINTERFACE; + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * registryLocationForSpec + * + * Given a file specification, return the registry representation of + * the filename. Files that are found relative to the components + * directory will have a registry representation + * "rel:" while filenames that are not, will have + * "abs:". + */ +/* string registryLocationForSpec (in nsIFile aSpec); */ +nsresult VFTCALL downRegistryLocationForSpec(void *pvThis, nsIFile *aSpec, char **_retval) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + dprintf(("%s: aSpec=%p _retval=%p", pszFunction, aSpec, _retval)); + + nsIFile * pupFile = aSpec; + rc = upCreateWrapper((void**)&pupFile, kFileIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->RegistryLocationForSpec(pupFile, _retval); + if (NS_SUCCEEDED(rc) && VALID_PTR(_retval) && VALID_PTR(*_retval)) + DPRINTF_STR(*_retval); + } + else + { + dprintf(("%s: Unsupported up interface nsIFile !!!", pszFunction)); + ReleaseInt3(0xbaddbeef, 20, kFileIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * specForRegistyLocation + * + * Create a file specification for the registry representation (rel:/abs:) + * got via registryLocationForSpec. + */ +/* nsIFile specForRegistryLocation (in string aLocation); */ +nsresult VFTCALL downSpecForRegistryLocation(void *pvThis, const char *aLocation, nsIFile **_retval) +{ + //@todo TEXT: aLocation? Yes. Do java use this? + //Sources say: i18n: assuming aLocation is encoded for the current locale + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_STR(aLocation); + dprintf(("%s: _retval=%p", pszFunction, _retval)); + + const void *pvVFT = downIsSupportedInterface(kFileIID); + if (pvVFT) + { + rc = pMozI->SpecForRegistryLocation(aLocation, _retval); + rc = downCreateWrapper((void**)_retval, pvVFT, rc); + } + else + { + dprintf(("%s: Unsupported down interface nsIFile !!!", pszFunction)); + ReleaseInt3(0xbaddbeef, 22, kFileIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * registerFactory + * + * Register a factory and ContractID associated with CID aClass + * + * @param aClass : CID of object + * @param aClassName : Class Name of CID + * @param aContractID : ContractID associated with CID aClass + * @param aFactory : Factory that will be registered for CID aClass + * @param aReplace : Boolean that indicates whether to replace a previous + * registration for the CID aClass. + */ +/* void registerFactory (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFactory aFactory, in boolean aReplace); */ +nsresult VFTCALL downRegisterFactory(void *pvThis, const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFactory *aFactory, PRBool aReplace) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_NSID(aClass); + DPRINTF_CONTRACTID(aContractID); + DPRINTF_STR(aClassName); + dprintf(("%s: aFactory=%p aReplace=%d", pszFunction, aFactory, aReplace)); + + nsIFactory *pupFactory = aFactory; + rc = upCreateWrapper((void**)&pupFactory, kFactoryIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->RegisterFactory(aClass, aClassName, aContractID, pupFactory, aReplace); + else + { + dprintf(("%s: Failed to make up wrapper for nsIFactoryIID %p !!!", pszFunction, aFactory)); + ReleaseInt3(0xbaddbeef, 13, kFactoryIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * registerComponent + * + * Register a native dll module via its registry representation as returned + * by registryLocationForSpec() as the container of CID implemenation + * aClass and associate aContractID and aClassName to the CID aClass. Native + * dll component type is assumed. + * + * @param aClass : CID implemenation contained in module + * @param aClassName : Class name associated with CID aClass + * @param aContractID : ContractID associated with CID aClass + * @param aLocation : Location of module (dll). Format of this is the + * registry representation as returned by + * registryLocationForSpec() + * @param aReplace : Boolean that indicates whether to replace a previous + * module registration for aClass. + * @param aPersist : Remember this registration across sessions. + */ +/* void registerComponent (in nsCIDRef aClass, in string aClassName, in string aContractID, in string aLocation, in boolean aReplace, in boolean aPersist); */ +nsresult VFTCALL downRegisterComponent(void *pvThis, const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aLocation, PRBool aReplace, PRBool aPersist) +{ + //@todo TEXT: location? Yes. Don't think java uses this. + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_NSID(aClass); + DPRINTF_CONTRACTID(aContractID); + DPRINTF_STR(aClassName); + DPRINTF_STR(aLocation); + dprintf(("%s: aReplace=%d aPersist=%d", pszFunction, aReplace, aPersist)); + + rc = pMozI->RegisterComponent(aClass, aClassName, aContractID, aLocation, aReplace, aPersist); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * registerComponentWithType + * + * Register a module's location via its registry representation + * as returned by registryLocationForSpec() as the container of CID implemenation + * aClass of type aType and associate aContractID and aClassName to the CID aClass. + * + * @param aClass : CID implemenation contained in module + * @param aClassName : Class name associated with CID aClass + * @param aContractID : ContractID associated with CID aClass + * @param aSpec : Filename spec for module's location. + * @param aLocation : Location of module of type aType. Format of this string + * is the registry representation as returned by + * registryLocationForSpec() + * @param aReplace : Boolean that indicates whether to replace a previous + * loader registration for aClass. + * @param aPersist : Remember this registration across sessions. + * @param aType : Component Type of CID aClass. + */ +/* void registerComponentWithType (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFile aSpec, in string aLocation, in boolean aReplace, in boolean aPersist, in string aType); */ +nsresult VFTCALL downRegisterComponentWithType(void *pvThis, const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aSpec, const char *aLocation, PRBool aReplace, PRBool aPersist, const char *aType) +{ + //@todo TEXT: aLocation? Yes. Don't think java uses this. + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_NSID(aClass); + DPRINTF_CONTRACTID(aContractID); + DPRINTF_STR(aClassName); + DPRINTF_STR(aLocation); + DPRINTF_STR(aType); + dprintf(("%s: aReplace=%d aPersist=%d", pszFunction, aReplace, aPersist)); + + rc = pMozI->RegisterComponentWithType(aClass, aClassName, aContractID, aSpec, aLocation, aReplace, aPersist, aType); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * registerComponentSpec + * + * Register a native dll module via its file specification as the container + * of CID implemenation aClass and associate aContractID and aClassName to the + * CID aClass. Native dll component type is assumed. + * + * @param aClass : CID implemenation contained in module + * @param aClassName : Class name associated with CID aClass + * @param aContractID : ContractID associated with CID aClass + * @param aLibrary : File specification Location of module (dll). + * @param aReplace : Boolean that indicates whether to replace a previous + * module registration for aClass. + * @param aPersist : Remember this registration across sessions. + */ +/* void registerComponentSpec (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFile aLibrary, in boolean aReplace, in boolean aPersist); */ +nsresult VFTCALL downRegisterComponentSpec(void *pvThis, const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aLibrary, PRBool aReplace, PRBool aPersist) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_NSID(aClass); + DPRINTF_CONTRACTID(aContractID); + DPRINTF_STR(aClassName); + DPRINTF_STR(aLibrary); + dprintf(("%s: aReplace=%d aPersist=%d", pszFunction, aReplace, aPersist)); + + nsIFile *pupLibrary = aLibrary; + rc = upCreateWrapper((void**)&pupLibrary, kFileIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->RegisterComponentSpec(aClass, aClassName, aContractID, pupLibrary, aReplace, aPersist); + else + { + dprintf(("%s: Failed to make up wrapper for nsIFile %p !!!", pszFunction, aLibrary)); + ReleaseInt3(0xbaddbeef, 23, kFileIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * registerComponentLib + * + * Register a native dll module via its dll name (not full path) as the + * container of CID implemenation aClass and associate aContractID and aClassName + * to the CID aClass. Native dll component type is assumed and the system + * services will be used to load this dll. + * + * @param aClass : CID implemenation contained in module + * @param aClassName : Class name associated with CID aClass + * @param aContractID : ContractID associated with CID aClass + * @param aDllNameLocation : Dll name of module. + * @param aReplace : Boolean that indicates whether to replace a previous + * module registration for aClass. + * @param aPersist : Remember this registration across sessions. + */ +/* void registerComponentLib (in nsCIDRef aClass, in string aClassName, in string aContractID, in string aDllName, in boolean aReplace, in boolean aPersist); */ +nsresult VFTCALL downRegisterComponentLib(void *pvThis, const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aDllName, PRBool aReplace, PRBool aPersist) +{ + //@todo TEXT: aDllName? Yes. Don't think java uses this. + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_NSID(aClass); + DPRINTF_CONTRACTID(aContractID); + DPRINTF_STR(aClassName); + DPRINTF_STR(aDllName); + dprintf(("%s: aReplace=%d aPersist=%d", pszFunction, aReplace, aPersist)); + + rc = pMozI->RegisterComponentLib(aClass, aClassName, aContractID, aDllName, aReplace, aPersist); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * unregisterFactory + * + * Unregister a factory associated with CID aClass. + * + * @param aClass : ClassID being unregistered + * @param aFactory : Factory previously registered to create instances of + * ClassID aClass. + */ +/* void unregisterFactory (in nsCIDRef aClass, in nsIFactory aFactory); */ +nsresult VFTCALL downUnregisterFactory(void *pvThis, const nsCID & aClass, nsIFactory *aFactory) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_NSID(aClass); + dprintf(("%s: aFactory=%p", pszFunction, aFactory)); + + nsIFactory *pupFactory = aFactory; + rc = upCreateWrapper((void**)&pupFactory, kFactoryIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->UnregisterFactory(aClass, pupFactory); + else + { + dprintf(("%s: Failed to make up wrapper for nsIFactory %p !!!", pszFunction, aFactory)); + ReleaseInt3(0xbaddbeef, 15, kFactoryIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * unregisterComponent + * + * Disassociate module aLocation represented as registry location as returned + * by registryLocationForSpec() as containing ClassID aClass. + * + * @param aClass : ClassID being unregistered + * @param aLocation : Location of module. Format of this is the registry + * representation as returned by registryLocationForSpec(). + * Components of any type will be unregistered. + */ +/* void unregisterComponent (in nsCIDRef aClass, in string aLocation); */ +nsresult VFTCALL downUnregisterComponent(void *pvThis, const nsCID & aClass, const char *aLocation) +{ + //@todo TEXT: aLocation? Yes. Don't think java uses this. + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_NSID(aClass); + DPRINTF_STR(aLocation); + + rc = pMozI->UnregisterComponent(aClass, aLocation); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * unregisterComponentSpec + * + * Disassociate module references by file specification aLibrarySpec as + * containing ClassID aClass. + */ +/* void unregisterComponentSpec (in nsCIDRef aClass, in nsIFile aLibrarySpec); */ +nsresult VFTCALL downUnregisterComponentSpec(void *pvThis, const nsCID & aClass, nsIFile *aLibrarySpec) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_NSID(aClass); + dprintf(("%s: aLibrarySpec=%p", pszFunction, aLibrarySpec)); + + nsIFile * pupLibrarySpec = aLibrarySpec; + rc = upCreateWrapper((void**)&pupLibrarySpec, kFileIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->UnregisterComponentSpec(aClass, pupLibrarySpec); + else + { + dprintf(("%s: Failed to make up wrapper for nsIFile %p !!!", pszFunction, aLibrarySpec)); + ReleaseInt3(0xbaddbeef, 16, kFileIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * freeLibraries + * + * Enumerates all loaded modules and unloads unused modules. + */ +/* void freeLibraries (); */ +nsresult VFTCALL downFreeLibraries(void *pvThis) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + + rc = pMozI->FreeLibraries(); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * autoRegister + * + * Enumerates directory looking for modules of all types and registers + * modules who have changed (modtime or size) since the last time + * autoRegister() was invoked. + * + * @param when : ID values of when the call is being made. + * @param directory : Directory the will be enumerated. + */ +/* void autoRegister (in long when, in nsIFile directory); */ +nsresult VFTCALL downAutoRegister(void *pvThis, PRInt32 when, nsIFile *directory) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + dprintf(("%s: when=%d directory=%p", pszFunction, when, directory)); + + nsIFile * pupDirectory = directory; + rc = upCreateWrapper((void**)&pupDirectory, kFileIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->AutoRegister(when, pupDirectory); + else + { + dprintf(("%s: Failed to make up wrapper for nsIFile %p !!!", pszFunction, directory)); + ReleaseInt3(0xbaddbeef, 24, kFileIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * autoRegisterComponent + * + * Loads module using appropriate loader and gives it an opportunity to + * register its CIDs if module's modtime or size changed since the last + * time this was called. + * + * @param when : ID values of when the call is being made. + * @param aFileLocation : File specification of module. + */ +/* void autoRegisterComponent (in long when, in nsIFile aFileLocation); */ +nsresult VFTCALL downAutoRegisterComponent(void *pvThis, PRInt32 when, nsIFile *aFileLocation) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + dprintf(("%s: when=%d aFileLocation=%p", pszFunction, when, aFileLocation)); + + nsIFile * pupFileLocation = aFileLocation; + rc = upCreateWrapper((void**)&pupFileLocation, kFileIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->AutoRegisterComponent(when, pupFileLocation); + else + { + dprintf(("%s: Failed to make up wrapper for nsIFile %p !!!", pszFunction, aFileLocation)); + ReleaseInt3(0xbaddbeef, 25, kFileIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * autoUnregisterComponent + * + * Loads module using approriate loader and gives it an opportunity to + * unregister its CIDs + */ +/* void autoUnregisterComponent (in long when, in nsIFile aFileLocation); */ +nsresult VFTCALL downAutoUnregisterComponent(void *pvThis, PRInt32 when, nsIFile *aFileLocation) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + dprintf(("%s: when=%d aFileLocation=%p", pszFunction, when, aFileLocation)); + + nsIFile * pupFileLocation = aFileLocation; + rc = upCreateWrapper((void**)&pupFileLocation, kFileIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->AutoUnregisterComponent(when, aFileLocation); + else + { + dprintf(("%s: Failed to make up wrapper for nsIFile %p !!!", pszFunction, aFileLocation)); + ReleaseInt3(0xbaddbeef, 26, kFileIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * isRegistered + * + * Returns true if a factory or module is registered for CID aClass. + * + * @param aClass : ClassID queried for registeration + * @return : true if a factory or module is registered for CID aClass. + * false otherwise. + */ +/* boolean isRegistered (in nsCIDRef aClass); */ +nsresult VFTCALL downIsRegistered(void *pvThis, const nsCID & aClass, PRBool *_retval) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + DPRINTF_NSID(aClass); + + rc = pMozI->IsRegistered(aClass, _retval); + if (NS_SUCCEEDED(rc) && VALID_PTR(_retval)) + dprintf(("%s: _retval=%d", pszFunction, *_retval)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * enumerateCLSIDs + * + * Enumerate the list of all registered ClassIDs. + * + * @return : enumerator for ClassIDs. + */ +/* nsIEnumerator enumerateCLSIDs (); */ +nsresult VFTCALL downEnumerateCLSIDs(void *pvThis, nsIEnumerator **_retval) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + + const void *pvVFT = downIsSupportedInterface(kEnumeratorIID); + if (pvVFT) + { + rc = pMozI->EnumerateCLSIDs(_retval); + rc = downCreateWrapper((void**)_retval, pvVFT, rc); + } + else + { + dprintf(("%s: Unsupported down interface nsIEnumerator !!!", pszFunction)); + ReleaseInt3(0xbaddbeef, 17, kEnumeratorIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * enumerateContractIDs + * + * Enumerate the list of all registered ContractIDs. + * + * @return : enumerator for ContractIDs. + */ +/* nsIEnumerator enumerateContractIDs (); */ +nsresult VFTCALL downEnumerateContractIDs(void *pvThis, nsIEnumerator **_retval) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManagerObsolete); + + const void *pvVFT = downIsSupportedInterface(kEnumeratorIID); + if (pvVFT) + { + rc = pMozI->EnumerateContractIDs(_retval); + rc = downCreateWrapper((void**)_retval, pvVFT, rc); + } + else + { + dprintf(("%s: Unsupported down interface nsIEnumerator !!!", pszFunction)); + ReleaseInt3(0xbaddbeef, 18, kEnumeratorIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsIComponentManagerObsolete, downVFTnsIComponentManagerObsolete) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downFindFactory, VFTDELTA_VAL() + downGetClassObject, VFTDELTA_VAL() + downContractIDToClassID, VFTDELTA_VAL() + downCLSIDToContractID, VFTDELTA_VAL() + downCreateInstance, VFTDELTA_VAL() + downCreateInstanceByContractID, VFTDELTA_VAL() + downRegistryLocationForSpec, VFTDELTA_VAL() + downSpecForRegistryLocation, VFTDELTA_VAL() + downRegisterFactory, VFTDELTA_VAL() + downRegisterComponent, VFTDELTA_VAL() + downRegisterComponentWithType, VFTDELTA_VAL() + downRegisterComponentSpec, VFTDELTA_VAL() + downRegisterComponentLib, VFTDELTA_VAL() + downUnregisterFactory, VFTDELTA_VAL() + downUnregisterComponent, VFTDELTA_VAL() + downUnregisterComponentSpec, VFTDELTA_VAL() + downFreeLibraries, VFTDELTA_VAL() + downAutoRegister, VFTDELTA_VAL() + downAutoRegisterComponent, VFTDELTA_VAL() + downAutoUnregisterComponent, VFTDELTA_VAL() + downIsRegistered, VFTDELTA_VAL() + downEnumerateCLSIDs, VFTDELTA_VAL() + downEnumerateContractIDs, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIComponentManager +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * getClassObject + * + * Returns the factory object that can be used to create instances of + * CID aClass + * + * @param aClass The classid of the factory that is being requested + */ +/* void getClassObject (in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +nsresult VFTCALL downCMGetClassObject(void *pvThis, const nsCID & aClass, const nsIID & aIID, void * *result) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManager); + DPRINTF_NSID(aClass); + DPRINTF_NSID(aIID); + + /* + * Supported interface requested? + */ + const void * pvVFT = downIsSupportedInterface(aIID); + if (pvVFT) + { + rc = pMozI->GetClassObject(aClass, aIID, result); + rc = downCreateWrapper(result, pvVFT, rc); + } + else + { + dprintf(("%s: Unsupported down interface !!!", pszFunction)); + rc = NS_NOINTERFACE; + ReleaseInt3(0xbaddbeef, 28, aIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +/** + * getClassObjectByContractID + * + * Returns the factory object that can be used to create instances of + * CID aClass + * + * @param aClass The classid of the factory that is being requested + */ +/* void getClassObjectByContractID (in string aContractID, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +nsresult VFTCALL downCMGetClassObjectByContractID(void *pvThis, const char *aContractID, const nsIID & aIID, void * *result) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManager); + DPRINTF_CONTRACTID(aContractID); + DPRINTF_NSID(aIID); + + /* + * Supported interface requested? + */ + const void * pvVFT = downIsSupportedInterface(aIID); + if (pvVFT) + { + rc = pMozI->GetClassObjectByContractID(aContractID, aIID, result); + rc = downCreateWrapper(result, pvVFT, rc); + } + else + { + dprintf(("%s: Unsupported down interface !!!", pszFunction)); + rc = NS_NOINTERFACE; + ReleaseInt3(0xbaddbeef, 19, aIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * createInstance + * + * Create an instance of the CID aClass and return the interface aIID. + * + * @param aClass : ClassID of object instance requested + * @param aDelegate : Used for aggregation + * @param aIID : IID of interface requested + */ +/* void createInstance (in nsCIDRef aClass, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +nsresult VFTCALL downCMCreateInstance(void *pvThis, const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManager); + DPRINTF_NSID(aClass); + DPRINTF_NSID(aIID); + dprintf(("%s: aDelegate=%p result=%p", pszFunction, aDelegate, result)); + + + /* + * Supported interface requested? + */ + const void * pvVFT = downIsSupportedInterface(aIID); + if (pvVFT) + { + /* + * Wrap the aDelegate. + * (Pray this isn't supposed to be the same kind of wrapper as nsIID. + * Haven't found any examples using aDelegate unfortunately.) + */ + nsISupports * pupOuter = aDelegate; + rc = upCreateWrapper((void**)&pupOuter, kSupportsIID, NS_OK); + if (rc == NS_OK) + { + rc = pMozI->CreateInstance(aClass, pupOuter, aIID, result); + rc = downCreateWrapper(result, pvVFT, rc); + } + else + dprintf(("%s: failed to create up wrapper for kSupportsIID %x !!!", pszFunction, aDelegate)); + } + else + { + dprintf(("%s: Unsupported down interface!!!", pszFunction)); + rc = NS_NOINTERFACE; + ReleaseInt3(0xbaddbeef, 31, aIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +/** + * createInstanceByContractID + * + * Create an instance of the CID that implements aContractID and return the + * interface aIID. + * + * @param aContractID : aContractID of object instance requested + * @param aDelegate : Used for aggregation + * @param aIID : IID of interface requested + */ +/* void createInstanceByContractID (in string aContractID, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +nsresult VFTCALL downCMCreateInstanceByContractID(void *pvThis, const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result) +{ + DOWN_ENTER_RC(pvThis, nsIComponentManager); + DPRINTF_CONTRACTID(aContractID); + DPRINTF_NSID(aIID); + dprintf(("%s: aDelegate=%p result=%p", pszFunction, aDelegate, result)); + + + /* + * Supported interface requested? + */ + const void * pvVFT = downIsSupportedInterface(aIID); + if (pvVFT) + { + /* + * Wrap the aDelegate. + * (Pray this isn't supposed to be the same kind of wrapper as nsIID. + * Haven't found any examples using aDelegate unfortunately.) + */ + nsISupports * pupOuter = aDelegate; + rc = upCreateWrapper((void**)&pupOuter, kSupportsIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->CreateInstanceByContractID(aContractID, pupOuter, aIID, result); + rc = downCreateWrapper(result, pvVFT, rc); + } + else + dprintf(("%s: failed to create up wrapper for kSupportsIID %x !!!", pszFunction, aDelegate)); + } + else + { + dprintf(("%s: Unsupported down interface!!!", pszFunction)); + rc = NS_NOINTERFACE; + ReleaseInt3(0xbaddbeef, 10, aIID.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + + + +MAKE_SAFE_VFT(VFTnsIComponentManager, downVFTnsIComponentManager) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downCMGetClassObject, VFTDELTA_VAL() + downCMGetClassObjectByContractID, VFTDELTA_VAL() + downCMCreateInstance, VFTDELTA_VAL() + downCMCreateInstanceByContractID, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIEnumerator +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + + +/** First will reset the list. will return NS_FAILED if no items + */ +/* void first (); */ +nsresult VFTCALL downEFirst(void *pvThis) +{ + DOWN_ENTER_RC(pvThis, nsIEnumerator); + rc = pMozI->First(); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** Next will advance the list. will return failed if already at end + */ +/* void next (); */ +nsresult VFTCALL downENext(void *pvThis) +{ + DOWN_ENTER_RC(pvThis, nsIEnumerator); + rc = pMozI->Next(); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** CurrentItem will return the CurrentItem item it will fail if the + * list is empty + */ +/* nsISupports currentItem (); */ +nsresult VFTCALL downECurrentItem(void *pvThis, nsISupports **_retval) +{ + DOWN_ENTER_RC(pvThis, nsIEnumerator); + rc = pMozI->First(); + rc = downCreateWrapper((void**)_retval, kSupportsIID, rc); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** return if the collection is at the end. that is the beginning following + * a call to Prev and it is the end of the list following a call to next + */ +/* void isDone (); */ +nsresult VFTCALL downEIsDone(void *pvThis) +{ + DOWN_ENTER_RC(pvThis, nsIEnumerator); + rc = pMozI->IsDone(); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsIEnumerator, downVFTnsIEnumerator) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downEFirst, VFTDELTA_VAL() + downENext, VFTDELTA_VAL() + downECurrentItem, VFTDELTA_VAL() + downEIsDone, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIFactory +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + + +/** + * Creates an instance of a component. + * + * @param aOuter Pointer to a component that wishes to be aggregated + * in the resulting instance. This will be nsnull if no + * aggregation is requested. + * @param iid The IID of the interface being requested in + * the component which is being currently created. + * @param result [out] Pointer to the newly created instance, if successful. + * @return NS_OK - Component successfully created and the interface + * being requested was successfully returned in result. + * NS_NOINTERFACE - Interface not accessible. + * NS_ERROR_NO_AGGREGATION - if an 'outer' object is supplied, but the + * component is not aggregatable. + * NS_ERROR* - Method failure. + */ +/* void createInstance (in nsISupports aOuter, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */ +nsresult VFTCALL downFactory_CreateInstance(void *pvThis, nsISupports *aOuter, const nsIID & iid, void * *result) +{ + DOWN_ENTER_RC(pvThis, nsIFactory); + dprintf(("%s: aOuter result=%p", pszFunction, aOuter, result)); + DPRINTF_NSID(iid); + + /* + * Supported interface requested? + */ + const void * pvVFT = downIsSupportedInterface(iid); + if (pvVFT) + { + /* + * Wrap the aOuter. + * (Pray this isn't supposed to be the same kind of wrapper as nsIID. + * Haven't found any examples using aDelegate unfortunately.) + */ + nsISupports * pupOuter = aOuter; + rc = upCreateWrapper((void**)&pupOuter, kSupportsIID, NS_OK); + if (rc == NS_OK) + { + rc = pMozI->CreateInstance(pupOuter, iid, result); + rc = downCreateWrapper(result, pvVFT, rc); + } + else + dprintf(("%s: failed to create up wrapper for kSupportsIID %x !!!", pszFunction, aOuter)); + } + else + { + dprintf(("%s: Unsupported down interface!!!", pszFunction)); + rc = NS_NOINTERFACE; + ReleaseInt3(0xbaddbeef, 33, iid.m0); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +/** + * LockFactory provides the client a way to keep the component + * in memory until it is finished with it. The client can call + * LockFactory(PR_TRUE) to lock the factory and LockFactory(PR_FALSE) + * to release the factory. + * + * @param lock - Must be PR_TRUE or PR_FALSE + * @return NS_OK - If the lock operation was successful. + * NS_ERROR* - Method failure. + */ +/* void lockFactory (in PRBool lock); */ +nsresult VFTCALL downFactory_LockFactory(void *pvThis, PRBool lock) +{ + DOWN_ENTER_RC(pvThis, nsIFactory); + dprintf(("%s: lock=%d\n", pszFunction, lock)); + rc = pMozI->LockFactory(lock); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsIFactory, downVFTnsIFactory) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downFactory_CreateInstance, VFTDELTA_VAL() + downFactory_LockFactory, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIInputStream +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + + +nsresult VFTCALL downInputStream_Close(void *pvThis) +{ + DOWN_ENTER_RC(pvThis, nsIInputStream); + rc = pMozI->Close(); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +/** + * @return number of bytes currently available in the stream + */ +/* unsigned long available (); */ +nsresult VFTCALL downInputStream_Available(void *pvThis, PRUint32 *_retval) +{ + DOWN_ENTER_RC(pvThis, nsIInputStream); + dprintf(("%s: _retval=%p\n", pszFunction, _retval)); + rc = pMozI->Available(_retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d\n", pszFunction, *_retval)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Read data from the stream. + * + * @param aBuf the buffer into which the data is to be read + * @param aCount the maximum number of bytes to be read + * + * @return number of bytes read (may be less than aCount). + * @return 0 if reached end of file + * + * @throws NS_BASE_STREAM_WOULD_BLOCK if reading from the input stream would + * block the calling thread (non-blocking mode only) + * @throws on failure + */ +/* [noscript] unsigned long read (in charPtr aBuf, in unsigned long aCount); */ +nsresult VFTCALL downInputStream_Read(void *pvThis, char * aBuf, PRUint32 aCount, PRUint32 *_retval) +{ + DOWN_ENTER_RC(pvThis, nsIInputStream); + dprintf(("%s: aBuf=%p aCount=%d _retval=%p\n", pszFunction, aBuf, aCount, _retval)); + rc = pMozI->Read(aBuf, aCount, _retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d\n", pszFunction, *_retval)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + + +/** + * Special wrapper function which get called from a little stub we create + * in downInputStream_ReadSegments. The stub pushed the entry point of + * the original function before calling us. + */ +nsresult __cdecl downOutputStream_nsWriteSegmentWrapper( + nsresult (VFTCALL pfnOrg)(nsIInputStream *aInStream, void *aClosure, const char *aFromSegment, PRUint32 aToOffset, PRUint32 aCount, PRUint32 *aWriteCount), + void *pvRet, + nsIInputStream *aInStream, void *aClosure, const char *aFromSegment, + PRUint32 aToOffset, PRUint32 aCount, PRUint32 *aWriteCount) +{ + DEBUG_FUNCTIONNAME(); + nsresult rc; + dprintf(("%s: pfnOrg=%p pvRet=%p aInStream=%p aClosure=%p aFromSegment=%p aToOffset=%d aCount=%d aWriteCount=%p\n", + pszFunction, pfnOrg, pvRet, aInStream, aClosure, aFromSegment, aToOffset, aCount, aWriteCount)); + + nsIInputStream * pDownInStream = aInStream; + rc = downCreateWrapper((void**)&pDownInStream, kInputStreamIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = pfnOrg(pDownInStream, aClosure, aFromSegment, aToOffset, aCount, aWriteCount); + if (VALID_PTR(aWriteCount)) + dprintf(("%s: *aWriteCount=%d\n", pszFunction, *aWriteCount)); + } + + dprintf(("%s: rc=%d\n", pszFunction, rc)); + return rc; +} + +/** + * Low-level read method that has access to the stream's underlying buffer. + * The writer function may be called multiple times for segmented buffers. + * ReadSegments is expected to keep calling the writer until either there is + * nothing left to read or the writer returns an error. ReadSegments should + * not call the writer with zero bytes to consume. + * + * @param aWriter the "consumer" of the data to be read + * @param aClosure opaque parameter passed to writer + * @param aCount the maximum number of bytes to be read + * + * @return number of bytes read (may be less than aCount) + * @return 0 if reached end of file (or if aWriter refused to consume data) + * + * @throws NS_BASE_STREAM_WOULD_BLOCK if reading from the input stream would + * block the calling thread (non-blocking mode only) + * @throws on failure + * + * NOTE: this function may be unimplemented if a stream has no underlying + * buffer (e.g., socket input stream). + */ +/* [noscript] unsigned long readSegments (in nsWriteSegmentFun aWriter, in voidPtr aClosure, in unsigned long aCount); */ +nsresult VFTCALL downInputStream_ReadSegments(void *pvThis, nsWriteSegmentFun aWriter, void * aClosure, PRUint32 aCount, PRUint32 *_retval) +{ + DOWN_ENTER_RC(pvThis, nsIInputStream); + dprintf(("%s: aWriter=%p aClosure=%p aCount=%d _retval=%p", pszFunction, aWriter, aClosure, aCount, _retval)); + + + int i; + char achWrapper[32]; + + /* push aReader */ + achWrapper[0] = 0x68; + *((unsigned*)&achWrapper[1]) = (unsigned)aWriter; + i = 5; + +#ifdef __IBMCPP__ + /* optlink - mov [ebp + 08h], eax */ + achWrapper[i++] = 0x89; + achWrapper[i++] = 0x45; + achWrapper[i++] = 0x08; + /* optlink - mov [ebp + 0ch], edx */ + achWrapper[i++] = 0x89; + achWrapper[i++] = 0x55; + achWrapper[i++] = 0x0c; + /* optlink - mov [ebp + 10h], ecx */ + achWrapper[i++] = 0x89; + achWrapper[i++] = 0x4d; + achWrapper[i++] = 0x10; +#endif + /* call UpOutputStream_nsReadSegmentWrapper */ + achWrapper[i] = 0xe8; + *((unsigned*)&achWrapper[i+1]) = (unsigned)downOutputStream_nsWriteSegmentWrapper - (unsigned)&achWrapper[i+5]; + i += 5; + + /* add esp, 4 */ + achWrapper[i++] = 0x83; + achWrapper[i++] = 0xc4; + achWrapper[i++] = 0x04; + + /* ret */ + achWrapper[i++] = 0xc3; + + achWrapper[i] = 0xcc; + achWrapper[i] = 0xcc; + + /* do call - this better not be asynchronous stuff. */ + rc = pMozI->ReadSegments((nsWriteSegmentFun)((void*)&achWrapper[0]), aClosure, aCount, _retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d\n", pszFunction, *_retval)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +/** + * @return true if stream is non-blocking + */ +/* boolean isNonBlocking (); */ +nsresult VFTCALL downInputStream_IsNonBlocking(void *pvThis, PRBool *_retval) +{ + DOWN_ENTER_RC(pvThis, nsIInputStream); + dprintf(("%s: _retval=%p\n", pszFunction, _retval)); + rc = pMozI->IsNonBlocking(_retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d\n", pszFunction, *_retval)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + + + +MAKE_SAFE_VFT(VFTnsIInputStream, downVFTnsIInputStream) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downInputStream_Close, VFTDELTA_VAL() + downInputStream_Available, VFTDELTA_VAL() + downInputStream_Read, VFTDELTA_VAL() + downInputStream_ReadSegments, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIOutputStream +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * Close the stream. Forces the output stream to flush any buffered data. + * + * @throws NS_BASE_STREAM_WOULD_BLOCK if unable to flush without blocking + * the calling thread (non-blocking mode only) + */ +/* void close (); */ +nsresult VFTCALL downOutputStream_Close(void *pvThis) +{ + DOWN_ENTER_RC(pvThis, nsIOutputStream); + rc = pMozI->Close(); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Flush the stream. + * + * @throws NS_BASE_STREAM_WOULD_BLOCK if unable to flush without blocking + * the calling thread (non-blocking mode only) + */ +/* void flush (); */ +nsresult VFTCALL downOutputStream_Flush(void *pvThis) +{ + DOWN_ENTER_RC(pvThis, nsIOutputStream); + rc = pMozI->Flush(); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Write data into the stream. + * + * @param aBuf the buffer containing the data to be written + * @param aCount the maximum number of bytes to be written + * + * @return number of bytes written (may be less than aCount) + * + * @throws NS_BASE_STREAM_WOULD_BLOCK if writing to the output stream would + * block the calling thread (non-blocking mode only) + * @throws on failure + */ +/* unsigned long write (in string aBuf, in unsigned long aCount); */ +nsresult VFTCALL downOutputStream_Write(void *pvThis, const char *aBuf, PRUint32 aCount, PRUint32 *_retval) +{ + DOWN_ENTER_RC(pvThis, nsIOutputStream); + dprintf(("%s: aBuf=%p aCount=%d _retval=%p\n", pszFunction, aBuf, aCount, _retval)); + rc = pMozI->Write(aBuf, aCount, _retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d\n", pszFunction, *_retval)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Writes data into the stream from an input stream. + * + * @param aFromStream the stream containing the data to be written + * @param aCount the maximum number of bytes to be written + * + * @return number of bytes written (may be less than aCount) + * + * @throws NS_BASE_STREAM_WOULD_BLOCK if writing to the output stream would + * block the calling thread (non-blocking mode only) + * @throws on failure + * + * NOTE: This method is defined by this interface in order to allow the + * output stream to efficiently copy the data from the input stream into + * its internal buffer (if any). If this method was provided as an external + * facility, a separate char* buffer would need to be used in order to call + * the output stream's other Write method. + */ +/* unsigned long writeFrom (in nsIInputStream aFromStream, in unsigned long aCount); */ +nsresult VFTCALL downOutputStream_WriteFrom(void *pvThis, nsIInputStream *aFromStream, PRUint32 aCount, PRUint32 *_retval) +{ + DOWN_ENTER_RC(pvThis, nsIOutputStream); + dprintf(("%s: aFromStream=%p aCount=%d _retval=%p\n", pszFunction, aFromStream, aCount, _retval)); + + nsIInputStream *pUpFromStream = aFromStream; + rc = upCreateWrapper((void**)&pUpFromStream, kInputStreamIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = pMozI->WriteFrom(pUpFromStream, aCount, _retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d\n", pszFunction, *_retval)); + } + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +/** + * Special wrapper function which get called from a little stub we create + * in UpOutputStream::WriteSegments. The stub pushed the entry point of + * the original function before calling us. + */ +nsresult __cdecl downOutputStream_nsReadSegmentWrapper(nsReadSegmentFun pfnOrg, void *pvRet, + nsIOutputStream *aOutStream, void *aClosure, char *aToSegment, + PRUint32 aFromOffset, PRUint32 aCount, PRUint32 *aReadCount) +{ + DEBUG_FUNCTIONNAME(); + nsresult rc; + dprintf(("%s: pfnOrg=%p pvRet=%p aOutStream=%p aClosure=%p aToSegment=%p aFromOffset=%d aCount=%d aReadCount=%p\n", + pszFunction, pfnOrg, pvRet, aOutStream, aClosure, aToSegment, aFromOffset, aCount, aReadCount)); + + nsIOutputStream * pupOutStream = aOutStream; + rc = upCreateWrapper((void**)&pupOutStream, kOutputStreamIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + rc = pfnOrg(pupOutStream, aClosure, aToSegment, aFromOffset, aCount, aReadCount); + if (VALID_PTR(aReadCount)) + dprintf(("%s: *aReadCount=%d\n", pszFunction, *aReadCount)); + } + + dprintf(("%s: rc=%d\n", pszFunction, rc)); + return rc; +} + + +/** + * Low-level write method that has access to the stream's underlying buffer. + * The reader function may be called multiple times for segmented buffers. + * WriteSegments is expected to keep calling the reader until either there + * is nothing left to write or the reader returns an error. WriteSegments + * should not call the reader with zero bytes to provide. + * + * @param aReader the "provider" of the data to be written + * @param aClosure opaque parameter passed to reader + * @param aCount the maximum number of bytes to be written + * + * @return number of bytes written (may be less than aCount) + * + * @throws NS_BASE_STREAM_WOULD_BLOCK if writing to the output stream would + * block the calling thread (non-blocking mode only) + * @throws on failure + * + * NOTE: this function may be unimplemented if a stream has no underlying + * buffer (e.g., socket output stream). + */ +/* [noscript] unsigned long writeSegments (in nsReadSegmentFun aReader, in voidPtr aClosure, in unsigned long aCount); */ +nsresult VFTCALL downOutputStream_WriteSegments(void *pvThis, nsReadSegmentFun aReader, void * aClosure, PRUint32 aCount, PRUint32 *_retval) +{ + DOWN_ENTER_RC(pvThis, nsIOutputStream); + dprintf(("%s: aReader=%p aClosure=%p aCount=%d _retval=%p", pszFunction, aReader, aClosure, aCount, _retval)); + + int i; + char achWrapper[32]; + + /* push aReader */ + achWrapper[0] = 0x68; + *((unsigned*)&achWrapper[1]) = (unsigned)aReader; + i = 5; + +#ifdef __IBMCPP__ + + /* optlink - mov [ebp + 08h], eax */ + achWrapper[i++] = 0x89; + achWrapper[i++] = 0x45; + achWrapper[i++] = 0x08; + /* optlink - mov [ebp + 0ch], edx */ + achWrapper[i++] = 0x89; + achWrapper[i++] = 0x55; + achWrapper[i++] = 0x0c; + /* optlink - mov [ebp + 10h], ecx */ + achWrapper[i++] = 0x89; + achWrapper[i++] = 0x4d; + achWrapper[i++] = 0x10; +#endif + /* call UpOutputStream_nsReadSegmentWrapper */ + achWrapper[i] = 0xe8; + *((unsigned*)&achWrapper[i+1]) = (unsigned)downOutputStream_nsReadSegmentWrapper - (unsigned)&achWrapper[i+5]; + i += 5; + + /* add esp, 4 */ + achWrapper[i++] = 0x83; + achWrapper[i++] = 0xc4; + achWrapper[i++] = 0x04; + + /* _Optlink - ret */ + achWrapper[i++] = 0xc3; + achWrapper[i++] = 0xcc; + achWrapper[i] = 0xcc; + + /* do call - this better not be asynchronous stuff. */ + rc = pMozI->WriteSegments((nsReadSegmentFun)((void*)&achWrapper[0]), aClosure, aCount, _retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d\n", pszFunction, *_retval)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * @return true if stream is non-blocking + * + * NOTE: writing to a blocking output stream will block the calling thread + * until all given data can be consumed by the stream. + */ +/* boolean isNonBlocking (); */ +nsresult VFTCALL downOutputStream_IsNonBlocking(void *pvThis, PRBool *_retval) +{ + DOWN_ENTER_RC(pvThis, nsIOutputStream); + dprintf(("%s: _retval=%p\n", pszFunction, _retval)); + rc = pMozI->IsNonBlocking(_retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d\n", pszFunction, *_retval)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsIOutputStream, downVFTnsIOutputStream) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downOutputStream_Close, VFTDELTA_VAL() + downOutputStream_Flush, VFTDELTA_VAL() + downOutputStream_Write, VFTDELTA_VAL() + downOutputStream_WriteFrom, VFTDELTA_VAL() + downOutputStream_WriteSegments, VFTDELTA_VAL() + downOutputStream_IsNonBlocking, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIInterfaceRequestor +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + + +/** + * Retrieves the specified interface pointer. + * + * @param uuid The IID of the interface being requested. + * @param result [out] The interface pointer to be filled in if + * the interface is accessible. + * @return NS_OK - interface was successfully returned. + * NS_NOINTERFACE - interface not accessible. + * NS_ERROR* - method failure. + */ +/* void getInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */ +nsresult VFTCALL downInterfaceRequestor_GetInterface(void *pvThis, const nsIID & uuid, void * *result) +{ + DOWN_ENTER_RC(pvThis, nsIInterfaceRequestor); + DPRINTF_NSID(uuid); + + /* + * Is this a supported interface? + */ + const void *pvVFT = downIsSupportedInterface(uuid); + if (pvVFT) + { + rc = pMozI->GetInterface(uuid, result); + rc = downCreateWrapper(result, pvVFT, rc); + } + else + { + dprintf(("%s: Unsupported interface!!!", pszFunction)); + rc = NS_NOINTERFACE; + if (result) + *result = nsnull; + ReleaseInt3(0xbaddbeef, 34, uuid.m0); + } + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + + +MAKE_SAFE_VFT(VFTnsIInterfaceRequestor, downVFTnsIInterfaceRequestor) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downInterfaceRequestor_GetInterface, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIRequest +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * The name of the request. Often this is the URI of the request. + */ +/* readonly attribute AUTF8String name; */ +nsresult VFTCALL downRequest_GetName(void *pvThis, nsACString & aName) +{ + DOWN_ENTER_RC(pvThis, nsIRequest); + dprintf(("%s: &aName=%p", pszFunction, &aName)); + /** @todo Wrap nsACString */ + dprintf(("%s: nsACString wrapping isn't supported.", pszFunction)); + ReleaseInt3(0xbaddbeef, 35, 0); + + rc = pMozI->GetName(aName); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * @return TRUE if the request has yet to reach completion. + * @return FALSE if the request has reached completion (e.g., after + * OnStopRequest has fired). + * Suspended requests are still considered pending. + */ +/* boolean isPending (); */ +nsresult VFTCALL downRequest_IsPending(void *pvThis, PRBool *_retval) +{ + DOWN_ENTER_RC(pvThis, nsIRequest); + dprintf(("%s: _retval=%p\n", pszFunction, _retval)); + rc = pMozI->IsPending(_retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d\n", pszFunction, *_retval)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * The error status associated with the request. + */ +/* readonly attribute nsresult status; */ +nsresult VFTCALL downRequest_GetStatus(void *pvThis, nsresult *aStatus) +{ + DOWN_ENTER_RC(pvThis, nsIRequest); + dprintf(("%s: aStatus=%p\n", pszFunction, aStatus)); + rc = pMozI->GetStatus(aStatus); + if (VALID_PTR(aStatus)) + dprintf(("%s: *aStatus=%#x\n", pszFunction, *aStatus)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Cancels the current request. This will close any open input or + * output streams and terminate any async requests. Users should + * normally pass NS_BINDING_ABORTED, although other errors may also + * be passed. The error passed in will become the value of the + * status attribute. + * + * @param aStatus the reason for canceling this request. + * + * NOTE: most nsIRequest implementations expect aStatus to be a + * failure code; however, some implementations may allow aStatus to + * be a success code such as NS_OK. In general, aStatus should be + * a failure code. + */ +/* void cancel (in nsresult aStatus); */ +nsresult VFTCALL downRequest_Cancel(void *pvThis, nsresult aStatus) +{ + DOWN_ENTER_RC(pvThis, nsIRequest); + dprintf(("%s: aStatus=%#x\n", pszFunction, aStatus)); + rc = pMozI->Cancel(aStatus); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Suspends the current request. This may have the effect of closing + * any underlying transport (in order to free up resources), although + * any open streams remain logically opened and will continue delivering + * data when the transport is resumed. + * + * NOTE: some implementations are unable to immediately suspend, and + * may continue to deliver events already posted to an event queue. In + * general, callers should be capable of handling events even after + * suspending a request. + */ +/* void suspend (); */ +nsresult VFTCALL downRequest_Suspend(void *pvThis) +{ + DOWN_ENTER_RC(pvThis, nsIRequest); + rc = pMozI->Suspend(); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Resumes the current request. This may have the effect of re-opening + * any underlying transport and will resume the delivery of data to + * any open streams. + */ +/* void resume (); */ +nsresult VFTCALL downRequest_Resume(void *pvThis) +{ + DOWN_ENTER_RC(pvThis, nsIRequest); + rc = pMozI->Resume(); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * The load group of this request. While pending, the request is a + * member of the load group. It is the responsibility of the request + * to implement this policy. + */ +/* attribute nsILoadGroup loadGroup; */ +nsresult VFTCALL downRequest_GetLoadGroup(void *pvThis, nsILoadGroup * *aLoadGroup) +{ + DOWN_ENTER_RC(pvThis, nsIRequest); + dprintf(("%s: aLoadGroup=%p\n", pszFunction, aLoadGroup)); + + rc = pMozI->GetLoadGroup(aLoadGroup); + rc = downCreateWrapper((void**)aLoadGroup, kLoadGroupIID, rc); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +nsresult VFTCALL downRequest_SetLoadGroup(void *pvThis, nsILoadGroup * aLoadGroup) +{ + DOWN_ENTER_RC(pvThis, nsIRequest); + dprintf(("%s: aLoadGroup=%p\n", pszFunction, aLoadGroup)); + + nsILoadGroup * pUpLoadGroup = aLoadGroup; + rc = upCreateWrapper((void**)&pUpLoadGroup, kLoadGroupIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->SetLoadGroup(pUpLoadGroup); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * The load flags of this request. Bits 0-15 are reserved. + * + * When added to a load group, this request's load flags are merged with + * the load flags of the load group. + */ +/* attribute nsLoadFlags loadFlags; */ +nsresult VFTCALL downRequest_GetLoadFlags(void *pvThis, nsLoadFlags *aLoadFlags) +{ + DOWN_ENTER_RC(pvThis, nsIRequest); + dprintf(("%s: aLoadFlags=%p\n", pszFunction, aLoadFlags)); + rc = pMozI->GetLoadFlags(aLoadFlags); + if (VALID_PTR(aLoadFlags)) + dprintf(("%s: *aLoadFlags=%#x\n", pszFunction, *aLoadFlags)); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +nsresult VFTCALL downRequest_SetLoadFlags(void *pvThis, nsLoadFlags aLoadFlags) +{ + DOWN_ENTER_RC(pvThis, nsIRequest); + dprintf(("%s: aLoadFlags=%p\n", pszFunction, aLoadFlags)); + rc = pMozI->SetLoadFlags(aLoadFlags); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsIRequest, downVFTnsIRequest) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downRequest_GetName, VFTDELTA_VAL() + downRequest_IsPending, VFTDELTA_VAL() + downRequest_GetStatus, VFTDELTA_VAL() + downRequest_Cancel, VFTDELTA_VAL() + downRequest_Suspend, VFTDELTA_VAL() + downRequest_Resume, VFTDELTA_VAL() + downRequest_GetLoadGroup, VFTDELTA_VAL() + downRequest_SetLoadGroup, VFTDELTA_VAL() + downRequest_GetLoadFlags, VFTDELTA_VAL() + downRequest_SetLoadFlags, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsILoadGroup +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** + * The group observer is notified when requests are added to and removed + * from this load group. The groupObserver is weak referenced. + */ +/* attribute nsIRequestObserver groupObserver; */ +nsresult VFTCALL downLoadGroup_GetGroupObserver(void *pvThis, nsIRequestObserver * *aGroupObserver) +{ + DOWN_ENTER_RC(pvThis, nsILoadGroup); + dprintf(("%s: aGroupObserver=%p\n", pszFunction, aGroupObserver)); + + rc = pMozI->GetGroupObserver(aGroupObserver); + rc = downCreateWrapper((void**)aGroupObserver, kRequestObserverIID, rc); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +nsresult VFTCALL downLoadGroup_SetGroupObserver(void *pvThis, nsIRequestObserver * aGroupObserver) +{ + DOWN_ENTER_RC(pvThis, nsILoadGroup); + dprintf(("%s: aGroupObserver=%p\n", pszFunction, aGroupObserver)); + + nsIRequestObserver * pUpGroupObserver = aGroupObserver; + rc = upCreateWrapper((void**)&pUpGroupObserver, kRequestObserverIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->SetGroupObserver(pUpGroupObserver); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Accesses the default load request for the group. Each time a number + * of requests are added to a group, the defaultLoadRequest may be set + * to indicate that all of the requests are related to a base request. + * + * The load group inherits its load flags from the default load request. + * If the default load request is NULL, then the group's load flags are + * not changed. + */ +/* attribute nsIRequest defaultLoadRequest; */ +nsresult VFTCALL downLoadGroup_GetDefaultLoadRequest(void *pvThis, nsIRequest * *aDefaultLoadRequest) +{ + DOWN_ENTER_RC(pvThis, nsILoadGroup); + dprintf(("%s: aDefaultLoadRequest=%p\n", pszFunction, aDefaultLoadRequest)); + + rc = pMozI->GetDefaultLoadRequest(aDefaultLoadRequest); + rc = downCreateWrapper((void**)aDefaultLoadRequest, kRequestIID, rc); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; + +} + +nsresult VFTCALL downLoadGroup_SetDefaultLoadRequest(void *pvThis, nsIRequest * aDefaultLoadRequest) +{ + DOWN_ENTER_RC(pvThis, nsILoadGroup); + dprintf(("%s: aDefaultLoadRequest=%p\n", pszFunction, aDefaultLoadRequest)); + + nsIRequest * pUpDefaultLoadRequest = aDefaultLoadRequest; + rc = upCreateWrapper((void**)&pUpDefaultLoadRequest, kRequestIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->SetDefaultLoadRequest(pUpDefaultLoadRequest); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Adds a new request to the group. This will cause the default load + * flags to be applied to the request. If this is a foreground + * request then the groupObserver's onStartRequest will be called. + * + * If the request is the default load request or if the default load + * request is null, then the load group will inherit its load flags from + * the request. + */ +/* void addRequest (in nsIRequest aRequest, in nsISupports aContext); */ +nsresult VFTCALL downLoadGroup_AddRequest(void *pvThis, nsIRequest *aRequest, nsISupports *aContext) +{ + DOWN_ENTER_RC(pvThis, nsILoadGroup); + dprintf(("%s: aRequest=%p aContext=%p\n", pszFunction, aRequest, aContext)); + + nsIRequest * pUpRequest = aRequest; + rc = upCreateWrapper((void**)&pUpRequest, kRequestIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports * pUpContext = aContext; + rc = upCreateWrapper((void**)&pUpContext, kSupportsIID, rc); + if (NS_SUCCEEDED(rc)) + rc = pMozI->AddRequest(pUpRequest, pUpContext); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Removes a request from the group. If this is a foreground request + * then the groupObserver's onStopRequest will be called. + */ +/* void removeRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatus); */ +nsresult VFTCALL downLoadGroup_RemoveRequest(void *pvThis, nsIRequest *aRequest, nsISupports *aContext, nsresult aStatus) +{ + DOWN_ENTER_RC(pvThis, nsILoadGroup); + dprintf(("%s: aRequest=%p aContext=%p aStatus=%#x\n", pszFunction, aRequest, aContext, aStatus)); + + nsIRequest * pUpRequest = aRequest; + rc = upCreateWrapper((void**)&pUpRequest, kRequestIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports * pUpContext = aContext; + rc = upCreateWrapper((void**)&pUpContext, kSupportsIID, rc); + if (NS_SUCCEEDED(rc)) + rc = pMozI->RemoveRequest(pUpRequest, pUpContext, aStatus); + } + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Returns the requests contained directly in this group. + * Enumerator element type: nsIRequest. + */ +/* readonly attribute nsISimpleEnumerator requests; */ +nsresult VFTCALL downLoadGroup_GetRequests(void *pvThis, nsISimpleEnumerator * *aRequests) +{ + DOWN_ENTER_RC(pvThis, nsILoadGroup); + dprintf(("%s: aRequests=%p\n", pszFunction, aRequests)); + + rc = pMozI->GetRequests(aRequests); + rc = downCreateWrapper((void**)aRequests, kSimpleEnumeratorIID, rc); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Returns the count of "active" requests (ie. requests without the + * LOAD_BACKGROUND bit set). + */ +/* readonly attribute unsigned long activeCount; */ +nsresult VFTCALL downLoadGroup_GetActiveCount(void *pvThis, PRUint32 *aActiveCount) +{ + DOWN_ENTER_RC(pvThis, nsILoadGroup); + dprintf(("%s: aActiveCount=%p\n", pszFunction, aActiveCount)); + + rc = pMozI->GetActiveCount(aActiveCount); + if (VALID_PTR(aActiveCount)) + dprintf(("%s: *aActiveCount=%d\n", pszFunction, aActiveCount)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Notification callbacks for the load group. + */ +/* attribute nsIInterfaceRequestor notificationCallbacks; */ +nsresult VFTCALL downLoadGroup_GetNotificationCallbacks(void *pvThis, nsIInterfaceRequestor * *aNotificationCallbacks) +{ + DOWN_ENTER_RC(pvThis, nsILoadGroup); + dprintf(("%s: aNotificationCallbacks=%p\n", pszFunction, aNotificationCallbacks)); + + rc = pMozI->GetNotificationCallbacks(aNotificationCallbacks); + rc = downCreateWrapper((void**)aNotificationCallbacks, kInterfaceRequestorIID, rc); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +nsresult VFTCALL downLoadGroup_SetNotificationCallbacks(void *pvThis, nsIInterfaceRequestor * aNotificationCallbacks) +{ + DOWN_ENTER_RC(pvThis, nsILoadGroup); + dprintf(("%s: aNotificationCallbacks=%p\n", pszFunction, aNotificationCallbacks)); + + nsIInterfaceRequestor * pUpNotificationCallbacks = aNotificationCallbacks; + rc = upCreateWrapper((void**)&pUpNotificationCallbacks, kInterfaceRequestorIID, rc); + rc = pMozI->SetNotificationCallbacks(pUpNotificationCallbacks); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsILoadGroup, downVFTnsILoadGroup) +{ + { + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + /* */ + downRequest_GetName, VFTDELTA_VAL() + downRequest_IsPending, VFTDELTA_VAL() + downRequest_GetStatus, VFTDELTA_VAL() + downRequest_Cancel, VFTDELTA_VAL() + downRequest_Suspend, VFTDELTA_VAL() + downRequest_Resume, VFTDELTA_VAL() + downRequest_GetLoadGroup, VFTDELTA_VAL() + downRequest_SetLoadGroup, VFTDELTA_VAL() + downRequest_GetLoadFlags, VFTDELTA_VAL() + downRequest_SetLoadFlags, VFTDELTA_VAL() + }, + downLoadGroup_GetGroupObserver, VFTDELTA_VAL() + downLoadGroup_SetGroupObserver, VFTDELTA_VAL() + downLoadGroup_GetDefaultLoadRequest, VFTDELTA_VAL() + downLoadGroup_SetDefaultLoadRequest, VFTDELTA_VAL() + downLoadGroup_AddRequest, VFTDELTA_VAL() + downLoadGroup_RemoveRequest, VFTDELTA_VAL() + downLoadGroup_GetRequests, VFTDELTA_VAL() + downLoadGroup_GetActiveCount, VFTDELTA_VAL() + downLoadGroup_GetNotificationCallbacks, VFTDELTA_VAL() + downLoadGroup_SetNotificationCallbacks, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIPluginStreamInfo +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/* readonly attribute nsMIMEType contentType; */ +nsresult VFTCALL downPluginStreamInfo_GetContentType(void *pvThis, nsMIMEType *aContentType) +{ + DOWN_ENTER_RC(pvThis, nsIPluginStreamInfo); + dprintf(("%s: aContentType=%p\n", pszFunction, aContentType)); + + rc = pMozI->GetContentType(aContentType); + if (VALID_PTR(aContentType)) + DPRINTF_STR(*aContentType); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/* void isSeekable (out boolean aSeekable); */ +nsresult VFTCALL downPluginStreamInfo_IsSeekable(void *pvThis, PRBool *aSeekable) +{ + DOWN_ENTER_RC(pvThis, nsIPluginStreamInfo); + dprintf(("%s: aSeekable=%p\n", pszFunction, aSeekable)); + + rc = pMozI->IsSeekable(aSeekable); + if (VALID_PTR(aSeekable)) + dprintf(("%s: *aSeekable=%d\n", pszFunction, *aSeekable)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/* readonly attribute unsigned long length; */ +nsresult VFTCALL downPluginStreamInfo_GetLength(void *pvThis, PRUint32 *aLength) +{ + DOWN_ENTER_RC(pvThis, nsIPluginStreamInfo); + dprintf(("%s: aLength=%p\n", pszFunction, aLength)); + + rc = pMozI->GetLength(aLength); + if (VALID_PTR(aLength)) + dprintf(("%s: *aLength=%d\n", pszFunction, *aLength)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/* readonly attribute unsigned long lastModified; */ +nsresult VFTCALL downPluginStreamInfo_GetLastModified(void *pvThis, PRUint32 *aLastModified) +{ + DOWN_ENTER_RC(pvThis, nsIPluginStreamInfo); + dprintf(("%s: aLastModified=%p\n", pszFunction, aLastModified)); + + rc = pMozI->GetLastModified(aLastModified); + if (VALID_PTR(aLastModified)) + dprintf(("%s: *aLastModified=%d\n", pszFunction, *aLastModified)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/* void getURL (out constCharPtr aURL); */ +nsresult VFTCALL downPluginStreamInfo_GetURL(void *pvThis, const char * *aURL) +{ + DOWN_ENTER_RC(pvThis, nsIPluginStreamInfo); + dprintf(("%s: aURL=%p\n", pszFunction, aURL)); + + rc = pMozI->GetURL(aURL); + if (VALID_PTR(aURL)) + DPRINTF_STR(*aURL); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/* void requestRead (in nsByteRangePtr aRangeList); */ +nsresult VFTCALL downPluginStreamInfo_RequestRead(void *pvThis, nsByteRange * aRangeList) +{ + DOWN_ENTER_RC(pvThis, nsIPluginStreamInfo); + dprintf(("%s: aRangeList=%p\n", pszFunction, aRangeList)); + rc = pMozI->RequestRead(aRangeList); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/* attribute long streamOffset; */ +nsresult VFTCALL downPluginStreamInfo_GetStreamOffset(void *pvThis, PRInt32 *aStreamOffset) +{ + DOWN_ENTER_RC(pvThis, nsIPluginStreamInfo); + dprintf(("%s: aStreamOffset=%p\n", pszFunction, aStreamOffset)); + + rc = pMozI->GetStreamOffset(aStreamOffset); + if (VALID_PTR(aStreamOffset)) + dprintf(("%s: *aStreamOffset=%p\n", pszFunction, *aStreamOffset)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +nsresult VFTCALL downPluginStreamInfo_SetStreamOffset(void *pvThis, PRInt32 aStreamOffset) +{ + DOWN_ENTER_RC(pvThis, nsIPluginStreamInfo); + dprintf(("%s: aStreamOffset=%d\n", pszFunction, aStreamOffset)); + rc = pMozI->SetStreamOffset(aStreamOffset); + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + + +MAKE_SAFE_VFT(VFTnsIPluginStreamInfo, downVFTnsIPluginStreamInfo) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downPluginStreamInfo_GetContentType, VFTDELTA_VAL() + downPluginStreamInfo_IsSeekable, VFTDELTA_VAL() + downPluginStreamInfo_GetLength, VFTDELTA_VAL() + downPluginStreamInfo_GetLastModified, VFTDELTA_VAL() + downPluginStreamInfo_GetURL, VFTDELTA_VAL() + downPluginStreamInfo_RequestRead, VFTDELTA_VAL() + downPluginStreamInfo_GetStreamOffset, VFTDELTA_VAL() + downPluginStreamInfo_SetStreamOffset, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIRequestObserver +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + + + +/** + * Called to signify the beginning of an asynchronous request. + * + * @param aRequest request being observed + * @param aContext user defined context + * + * An exception thrown from onStartRequest has the side-effect of + * causing the request to be canceled. + */ +/* void onStartRequest (in nsIRequest aRequest, in nsISupports aContext); */ +nsresult VFTCALL downRequestObserver_OnStartRequest(void *pvThis, nsIRequest *aRequest, nsISupports *aContext) +{ + DOWN_ENTER_RC(pvThis, nsIRequestObserver); + dprintf(("%s: aRequest=%p aContext=%p\n", pszFunction, aRequest, aContext)); + + nsIRequest *pUpRequest = aRequest; + rc = upCreateWrapper((void**)&pUpRequest, kRequestIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports *pUpContext = aContext; + rc = upCreateWrapper((void**)&pUpContext, kSupportsIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->OnStartRequest(pUpRequest, pUpContext); + } + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Called to signify the end of an asynchronous request. This + * call is always preceded by a call to onStartRequest. + * + * @param aRequest request being observed + * @param aContext user defined context + * @param aStatusCode reason for stopping (NS_OK if completed successfully) + * + * An exception thrown from onStopRequest is generally ignored. + */ +/* void onStopRequest (in nsIRequest aRequest, in nsISupports aContext, in nsresult aStatusCode); */ +nsresult VFTCALL downRequestObserver_OnStopRequest(void *pvThis, nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode) +{ + DOWN_ENTER_RC(pvThis, nsIRequestObserver); + dprintf(("%s: aRequest=%p aContext=%p aStatusCode=%d\n", pszFunction, aRequest, aContext, aStatusCode)); + + nsIRequest *pUpRequest = aRequest; + rc = upCreateWrapper((void**)&pUpRequest, kRequestIID, NS_OK); + if (NS_SUCCEEDED(rc)) + { + nsISupports *pUpContext = aContext; + rc = upCreateWrapper((void**)&pUpContext, kSupportsIID, NS_OK); + if (NS_SUCCEEDED(rc)) + rc = pMozI->OnStopRequest(pUpRequest, pUpContext, aStatusCode); + } + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsIRequestObserver, downVFTnsIRequestObserver) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downRequestObserver_OnStartRequest, VFTDELTA_VAL() + downRequestObserver_OnStopRequest, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsISimpleEnumerator +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + + +/** + * Called to determine whether or not the enumerator has + * any elements that can be returned via getNext(). This method + * is generally used to determine whether or not to initiate or + * continue iteration over the enumerator, though it can be + * called without subsequent getNext() calls. Does not affect + * internal state of enumerator. + * + * @see getNext() + * @return PR_TRUE if there are remaining elements in the enumerator. + * PR_FALSE if there are no more elements in the enumerator. + */ +/* boolean hasMoreElements (); */ +nsresult VFTCALL downSimpleEnumerator_HasMoreElements(void *pvThis, PRBool *_retval) +{ + DOWN_ENTER_RC(pvThis, nsISimpleEnumerator); + dprintf(("%s: _retval=%p\n", pszFunction, _retval)); + + rc = pMozI->HasMoreElements(_retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d\n", pszFunction, *_retval)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * Called to retrieve the next element in the enumerator. The "next" + * element is the first element upon the first call. Must be + * pre-ceeded by a call to hasMoreElements() which returns PR_TRUE. + * This method is generally called within a loop to iterate over + * the elements in the enumerator. + * + * @see hasMoreElements() + * @return NS_OK if the call succeeded in returning a non-null + * value through the out parameter. + * NS_ERROR_FAILURE if there are no more elements + * to enumerate. + * @return the next element in the enumeration. + */ +/* nsISupports getNext (); */ +nsresult VFTCALL downSimpleEnumerator_GetNext(void *pvThis, nsISupports **_retval) +{ + DOWN_ENTER_RC(pvThis, nsISimpleEnumerator); + dprintf(("%s: _retval=%p\n", pszFunction, _retval)); + + rc = pMozI->GetNext(_retval); + rc = downCreateWrapper((void**)_retval, kSupportsIID, rc); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + + +MAKE_SAFE_VFT(VFTnsISimpleEnumerator, downVFTnsISimpleEnumerator) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downSimpleEnumerator_HasMoreElements, VFTDELTA_VAL() + downSimpleEnumerator_GetNext, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: FlashIObject7 +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + + +/** + * Notify the observer that the URL has started to load. This method is + * called only once, at the beginning of a URL load.

+ * + * @param aPluginInfo - plugin stream info + * @return - the return value is currently ignored, in the future + * it may be used to cancel the URL load.. + */ +/* void onStartBinding (in nsIPluginStreamInfo aPluginInfo); */ +nsresult VFTCALL downFlashIObject7_Evaluate(void *pvThis, const char *aString, FlashIObject7 **aFlashObject) +{ + DOWN_ENTER_RC(pvThis, FlashIObject7); + dprintf(("%s: aString=%p aFlashObject=%p", pszFunction, aString, aFlashObject)); + DPRINTF_STR(aString); + + rc = pMozI->Evaluate(aString, aFlashObject); + rc = downCreateWrapper((void**)aFlashObject, kFlashIObject7IID, NS_OK); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + + + +MAKE_SAFE_VFT(VFTFlashIObject7, downVFTFlashIObject7) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downFlashIObject7_Evaluate, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIHTTPHeaderListener +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + + +/** + * Called for each HTTP Response header. + * NOTE: You must copy the values of the params. + */ +/* void newResponseHeader (in string headerName, in string headerValue); */ +nsresult VFTCALL downHTTPHeaderListener_NewResponseHeader(void *pvThis, const char *headerName, const char *headerValue) +{ + DOWN_ENTER_RC(pvThis, nsIHTTPHeaderListener); + DPRINTF_STR(headerName); + DPRINTF_STR(headerValue); + + rc = pMozI->NewResponseHeader(headerName, headerValue); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + + +MAKE_SAFE_VFT(VFTnsIHTTPHeaderListener, downVFTnsIHTTPHeaderListener) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downHTTPHeaderListener_NewResponseHeader, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN: nsIMemory +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + + +/** + * Allocates a block of memory of a particular size. If the memory + * cannot be allocated (because of an out-of-memory condition), null + * is returned. + * + * @param size - the size of the block to allocate + * @result the block of memory + */ +/* [noscript, notxpcom] voidPtr alloc (in size_t size); */ +void * VFTCALL downMemory_Alloc(void *pvThis, size_t size) +{ + DOWN_ENTER_NORET(pvThis, nsIMemory); + dprintf(("%s: size=%d\n", pszFunction, size)); + + void *pv = pMozI->Alloc(size); + + DOWN_LEAVE_INT(pvThis, (unsigned)pv); + return pv; +} + +/** + * Reallocates a block of memory to a new size. + * + * @param ptr - the block of memory to reallocate + * @param size - the new size + * @result the reallocated block of memory + * + * If ptr is null, this function behaves like malloc. + * If s is the size of the block to which ptr points, the first + * min(s, size) bytes of ptr's block are copied to the new block. + * If the allocation succeeds, ptr is freed and a pointer to the + * new block returned. If the allocation fails, ptr is not freed + * and null is returned. The returned value may be the same as ptr. + */ +/* [noscript, notxpcom] voidPtr realloc (in voidPtr ptr, in size_t newSize); */ +void * VFTCALL downMemory_Realloc(void *pvThis, void * ptr, size_t newSize) +{ + DOWN_ENTER_NORET(pvThis, nsIMemory); + dprintf(("%s: ptr=%p newSize=%d\n", pszFunction, ptr, newSize)); + + void *pv = pMozI->Realloc(ptr, newSize); + + DOWN_LEAVE_INT(pvThis, (unsigned)pv); + return pv; +} + +/** + * Frees a block of memory. Null is a permissible value, in which case + * nothing happens. + * + * @param ptr - the block of memory to free + */ +/* [noscript, notxpcom] void free (in voidPtr ptr); */ +void VFTCALL downMemory_Free(void *pvThis, void * ptr) +{ + DOWN_ENTER_NORET(pvThis, nsIMemory); + dprintf(("%s: ptr=%p\n", pszFunction, ptr)); + + pMozI->Free(ptr); + + DOWN_LEAVE(pvThis); + return; +} + +/** + * Attempts to shrink the heap. + * @param immediate - if true, heap minimization will occur + * immediately if the call was made on the main thread. If + * false, the flush will be scheduled to happen when the app is + * idle. + * @return NS_ERROR_FAILURE if 'immediate' is set an the call + * was not on the application's main thread. + */ +/* void heapMinimize (in boolean immediate); */ +nsresult VFTCALL downMemory_HeapMinimize(void *pvThis, PRBool immediate) +{ + DOWN_ENTER_RC(pvThis, nsIMemory); + dprintf(("%s: immediate=%d\n", pszFunction, immediate)); + + rc = pMozI->HeapMinimize(immediate); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +/** + * This predicate can be used to determine if we're in a low-memory + * situation (what constitutes low-memory is platform dependent). This + * can be used to trigger the memory pressure observers. + */ +/* boolean isLowMemory (); */ +nsresult VFTCALL downMemory_IsLowMemory(void *pvThis, PRBool *_retval) +{ + DOWN_ENTER_RC(pvThis, nsIMemory); + dprintf(("%s: _retval=%p\n", pszFunction, _retval)); + + rc = pMozI->IsLowMemory(_retval); + if (VALID_PTR(_retval)) + dprintf(("%s: *_retval=%d", pszFunction, *_retval)); + + DOWN_LEAVE_INT(pvThis, rc); + return rc; +} + +MAKE_SAFE_VFT(VFTnsIMemory, downVFTnsIMemory) +{ + { + VFTFIRST_VAL() + downQueryInterface, VFTDELTA_VAL() + downAddRef, VFTDELTA_VAL() + downRelease, VFTDELTA_VAL() + }, + downMemory_Alloc, VFTDELTA_VAL() + downMemory_Realloc, VFTDELTA_VAL() + downMemory_Free, VFTDELTA_VAL() + downMemory_HeapMinimize, VFTDELTA_VAL() + downMemory_IsLowMemory, VFTDELTA_VAL() +} +SAFE_VFT_ZEROS(); + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// DOWN Helpers +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + +/** Supported Interface for downQueryInterface(). */ +static struct SupportedInterface_Down +{ + /** Interface ID. */ + const nsIID * pIID; + /** Virtual Function Table. */ + const void * pvVFT; +} aDownInterfaces[] = +{ + { &kServiceManagerIID, &downVFTnsIServiceManager }, + { &kServiceManagerObsoleteIID, &downVFTnsIServiceManagerObsolete }, + { &kSupportsIID, &downVFTnsISupports }, + { &kPluginManagerIID, &downVFTnsIPluginManager }, + { &kPluginManager2IID, &downVFTnsIPluginManager2 }, + { &kPluginInstancePeerIID, &downVFTnsIPluginInstancePeer }, + { &kPluginInstancePeer2IID, &downVFTnsIPluginInstancePeer2 }, + { &kPluginTagInfoIID, &downVFTnsIPluginTagInfo }, + { &kPluginTagInfo2IID, &downVFTnsIPluginTagInfo2 }, + { &kCookieStorageIID, &downVFTnsICookieStorage }, + { &kJVMThreadManagerIID, &downVFTnsIJVMThreadManager }, + { &kJVMManagerIID, &downVFTnsIJVMManager }, + { &kLiveconnectIID, &downVFTnsILiveconnect }, + { &kSecureLiveconnectIID, &downVFTnsISecureLiveconnect }, + { &kComponentManagerIID, &downVFTnsIComponentManager }, + { &kComponentManagerObsoleteIID,&downVFTnsIComponentManagerObsolete }, + { &kSecurityContextIID, &downVFTnsISecurityContext }, + { &kEnumeratorIID, &downVFTnsIEnumerator }, + { &kFactoryIID, &downVFTnsIFactory }, + { &kInputStreamIID, &downVFTnsIInputStream }, + { &kOutputStreamIID, &downVFTnsIOutputStream }, + { &kInterfaceRequestorIID, &downVFTnsIInterfaceRequestor }, + { &kRequestIID, &downVFTnsIRequest }, + { &kLoadGroupIID, &downVFTnsILoadGroup }, + { &kPluginStreamInfoIID, &downVFTnsIPluginStreamInfo }, + { &kRequestObserverIID, &downVFTnsIRequestObserver }, + { &kSimpleEnumeratorIID, &downVFTnsISimpleEnumerator }, + { &kFlashIObject7IID, &downVFTFlashIObject7 }, + { &kHTTPHeaderListenerIID, &downVFTnsIHTTPHeaderListener }, + { &kMemoryIID, &downVFTnsIMemory }, +}; + +/** + * Checks if the specified Interface ID is supported by the 'down' + * wrappers. + * + * @returns Pointer to the virtual function table for the wrapper if supported. + * @returns NULL if not supported. + * @param aIID Reference to the Interface ID. + * + */ +const void * downIsSupportedInterface(REFNSIID aIID) +{ + for (unsigned iInterface = 0; iInterface < sizeof(aDownInterfaces) / sizeof(aDownInterfaces[0]); iInterface++) + if (aDownInterfaces[iInterface].pIID->Equals(aIID)) + return aDownInterfaces[iInterface].pvVFT; + return NULL; +} + +/** + * Creates a 'down' wrapper - a wrapper object which is presented down to the + * Win32 plugin. + * + * @returns rcOrg on success. + * @returns Appropriate error message on failure. + * + * @param pvVFT Pointer to the wrapper VFT. + * @param ppvResult Where the caller have requested the interface pointer + * to be stored. + * On entry this is the pointer to create wrapper for. + * On exit this will point to the created wrapper. + * @param rc The RC returned by the original method, this is + * returned on success. + */ +nsresult downCreateWrapper(void **ppvResult, const void *pvVFT, nsresult rc) +{ + DEBUG_FUNCTIONNAME(); + dprintf(("%s: pvvResult=%x, pvVFT=%x, rc=%x", pszFunction, pvVFT, ppvResult, rc)); + #ifdef DEBUG + for (unsigned iInterface = 0; iInterface < sizeof(aDownInterfaces) / sizeof(aDownInterfaces[0]); iInterface++) + if (aDownInterfaces[iInterface].pvVFT == pvVFT) + { + DPRINTF_NSID(*aDownInterfaces[iInterface].pIID); + break; + } + #endif + + if (VALID_PTR(ppvResult)) + { + if (VALID_PTR(*ppvResult)) + { + if (pvVFT) + { + if (NS_SUCCEEDED(rc)) + { + void *pvThis = *ppvResult; + + /* + * First check if the object returned actually is an up wrapper. + */ + void *pvNoWrapper = UpWrapperBase::findUpWrapper(pvThis); + if (pvNoWrapper) + { + dprintf(("%s: COOL! pvThis(%x) is an up wrapper, no wrapping needed. returns real obj=%x", + pszFunction, pvThis, pvNoWrapper)); + *ppvResult = pvNoWrapper; + return rc; + } + + #if 1 //did this to minimize heap calls + /* + * Check if exists before trying to create one. + */ + DOWN_LOCK(); + for (PDOWNTHIS pDown = (PDOWNTHIS)gpDownHead; pDown; pDown = (PDOWNTHIS)pDown->pNext) + if (pDown->pvThis == pvThis) + { + if (pDown->pvVFT == pvVFT) + { + DOWN_UNLOCK(); + dprintf(("%s: Found existing wrapper %x for %x.", pszFunction, pDown, pvThis)); + *ppvResult = pDown; + return rc; + } + } + DOWN_UNLOCK(); + #endif + + /* + * Create the wrapper. + * See upCreateWrapper for explanation of why this is done this way. + */ + PDOWNTHIS pWrapper = new DOWNTHIS; + if (pWrapper) + { + pWrapper->initialize(pvThis, pvVFT); + + /* + * Check if there is any existing down wrapper for this object/pvVFT. + */ + DOWN_LOCK(); + for (PDOWNTHIS pDown = (PDOWNTHIS)gpDownHead; pDown; pDown = (PDOWNTHIS)pDown->pNext) + if (pDown->pvThis == pvThis) + { + if (pDown->pvVFT == pvVFT) + { + DOWN_UNLOCK(); + delete pWrapper; + dprintf(("%s: Found existing wrapper %x for %x. (2)", pszFunction, pDown, pvThis)); + *ppvResult = pDown; + return rc; + } + } + /* + * Ok, no existing wrapper, insert the new one. + */ + pWrapper->pNext = gpDownHead; + gpDownHead = pWrapper; + DOWN_UNLOCK(); + + dprintf(("%s: Created wrapper %x for %x.", pszFunction, pWrapper, pvThis)); + *ppvResult = pWrapper; + return rc; + } + dprintf(("new failed!!")); + rc = NS_ERROR_OUT_OF_MEMORY; + } + else + dprintf(("%s: Passed in rc means failure, (rc=%x)", pszFunction, rc)); + } + else + { + dprintf(("%s: No VFT, that can only mean that it's an Unsupported interface!!!", pszFunction)); + rc = NS_ERROR_NOT_IMPLEMENTED; + ReleaseInt3(0xbaddbeef, 6, 0); + } + *ppvResult = nsnull; + } + else if (*ppvResult || rc != NS_OK) /* don't complain about the obvious.. we use this combination. */ + dprintf(("%s: *ppvResult (=%p) is invalid (rc=%x)", pszFunction, *ppvResult, rc)); + } + else + dprintf(("%s: ppvResult (=%p) is invalid (rc=%x)", pszFunction, ppvResult, rc)); + + return rc; +} + +/** + * Create down wrapper by Interface Id. + */ +nsresult downCreateWrapper(void **ppvResult, REFNSIID aIID, nsresult rc) +{ + return downCreateWrapper(ppvResult, downIsSupportedInterface(aIID), rc); +} + + +/** + * Create a JNIEnv wrapper for sending down to the plugin. + * @returns rc on success + * @returns rc or othere error code on failure. + * @param ppJNIEnv Where to get and store the JNIEnv wrapper. + * @param rc Current rc. + */ +int downCreateJNIEnvWrapper(JNIEnv **ppJNIEnv, int rc) +{ + DEBUG_FUNCTIONNAME(); + dprintf(("%s: ppJNIEnv=%x, rc=%x", pszFunction, ppJNIEnv, rc)); + + if (VALID_PTR(ppJNIEnv)) + { + if (VALID_PTR(*ppJNIEnv)) + { + if (NS_SUCCEEDED(rc)) + { + /* + * Success! + */ + return rc; + } + else + dprintf(("%s: The query method failed with rc=%x", pszFunction, rc)); + *ppJNIEnv = nsnull; + } + else if (*ppJNIEnv || rc != NS_OK) /* don't complain about the obvious.. we use this combination. */ + dprintf(("%s: *ppJNIEnv (=%p) is invalid (rc=%x)", pszFunction, *ppJNIEnv, rc)); + } + else + dprintf(("%s: ppJNIEnv (=%p) is invalid (rc=%x)", pszFunction, ppJNIEnv, rc)); + + return rc; +} + + + +/** + * Lock the down wrapper list. + */ +void downLock(void) +{ + DEBUG_FUNCTIONNAME(); + + if (!ghmtxDown) + { + int rc = DosCreateMutexSem(NULL, &ghmtxDown, 0, TRUE); + if (rc) + { + dprintf(("%s: DosCreateMutexSem failed with rc=%d.", pszFunction, rc)); + ReleaseInt3(0xdeadbee1, 0xd000, rc); + } + } + else + { + int rc = DosRequestMutexSem(ghmtxDown, SEM_INDEFINITE_WAIT); + if (rc) + { + dprintf(("%s: DosRequestMutexSem failed with rc=%d.", pszFunction, rc)); + ReleaseInt3(0xdeadbee1, 0xd001, rc); + } + //@todo handle cases with the holder dies. + } +} + +/** + * UnLock the down wrapper list. + */ +void downUnLock(void) +{ + DEBUG_FUNCTIONNAME(); + + int rc = DosReleaseMutexSem(ghmtxDown); + if (rc) + { + dprintf(("%s: DosRequestMutexSem failed with rc=%d.", pszFunction, rc)); + ReleaseInt3(0xdeadbee1, 0xd002, rc); + } + //@todo handle cases with the holder dies. +} + + + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// Misc Helpers +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + + +/** + * Looks up the understable name corresponding to the specified nsID. + * @returns name string if found. + * @returns "" if not found. + * @param aIIDorCID IID or CID to lookup. + */ +const char * getIIDCIDName(REFNSIID aIIDorCID) +{ + for (unsigned i = 0; i < sizeof(aIDNameLookup) / sizeof(aIDNameLookup[0]); i++) + if (aIDNameLookup[i].pID->Equals(aIIDorCID)) + return aIDNameLookup[i].pszName; + + return ""; +} + + +/** + * Get NSID from string. + * + * @returns pointer to NSID. + * @returns NULL if not found. + * @param aIIDorCID IID or CID to lookup. + */ +const nsID * getIIDCIDFromName(const char *pszStrID) +{ + for (unsigned i = 0; i < sizeof(aIDStrIDLookup) / sizeof(aIDStrIDLookup[0]); i++) + if (!stricmp(aIDStrIDLookup[i].pszStrID, pszStrID)) + return aIDStrIDLookup[i].pID; + + return NULL; +} + + + +/** + * This is a hack to fix problems occuring when a plugin send the browser a non + * UTF-8 when a UTF-8 string is expected. + * + * This is only experimental stuff. + * + * @param pszString String to validate and hack. + * @param pszFunction Function we're called from. + */ +void verifyAndFixUTF8String(const char *pszString, const char *pszFunction) +{ + /* Fix for stupid Mozilla+IBM: + * The interface doesn't say UTF8, but mozilla expects it. + * The IBM guys didn't check the mozilla sources and sends it + * a string in the current code page. + * We'll work around this by spacing out all characaters which + * aren't valid UTF8. + */ + unsigned char *pszString2 = *(unsigned char**)((void*)&pszString); + for (unsigned char *pch = pszString2; *pch; pch++) + { + unsigned ch = *pch; + if (ch > 0x7f) + { + /* + U-00000000 - U-0000007F: 0xxxxxxx + U-00000080 - U-000007FF: 110xxxxx 10xxxxxx + U-00000800 - U-0000FFFF: 1110xxxx 10xxxxxx 10xxxxxx + U-00010000 - U-001FFFFF: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + U-00200000 - U-03FFFFFF: 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx + U-04000000 - U-7FFFFFFF: 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx + */ + unsigned val; + unsigned min; + unsigned c; + unsigned i; + if ((ch & 0xe0) == 0xc0) + { + c = 1; + min = 0x80; + val = ch & ~0xc0; + } + else if ((ch & 0xf0) == 0xe0) + { + c = 2; + min = 0x800; + val = ch & ~0xe0; + } + else if ((ch & 0xf8) == 0xf0) + { + c = 3; + min = 0x1000; + val = ch & ~0xf0; + } + else if ((ch & 0xfc) == 0xf8) + { + c = 4; + min = 0x20000; + val = ch & ~0xf8; + } + else if ((ch & 0xfe) == 0xfc) + { + c = 5; + min = 0x400000; + val = ch & ~0xfc; + } + else + goto invalid; + + for (i = 1; i <= c; i++) + { + unsigned chPart = pch[i]; + if ((chPart & 0xc0) != 0x80) + goto invalid; + val <<= 6; + val |= chPart & 0x3f; + } + if (val < min) + goto invalid; + pch += c; + continue; + + invalid: + *pch = ' '; + } + } +} + +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// +// Exported Generic Plugin Wrapper interfaces. +//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\// + + + +nsresult npXPCOMGenericGetFactory(nsIServiceManagerObsolete *aServMgr, + REFNSIID aClass, + const char *aClassName, + const char *aContractID, + PRLibrary * aLibrary, + nsIPlugin **aResult) +{ + DEBUG_FUNCTIONNAME(); + typedef nsresult (* _Optlink nsLegacyFactorProc)(PDOWNTHIS aServMgr, const nsCID &aClass, const char *aClassName, const char *aContractID, nsIPlugin **aResult); + nsresult rc; + nsLegacyFactorProc pfnGetFactory; + + dprintf(("%s: enter", pszFunction)); + DPRINTF_STR(aClassName); + DPRINTF_NSID(aClass); + DPRINTF_CONTRACTID(aContractID); + + /* + * find the NSGetFactory() export. + */ + pfnGetFactory = (nsLegacyFactorProc)PR_FindSymbol(aLibrary, "NSGetFactory"); + if (!pfnGetFactory) + { + dprintf(("%s: Could not find NSGetFactory.", pszFunction)); + return NS_ERROR_FAILURE; + } + + + /* + * Make wrapper for the aServMgr argument. + */ + PDOWNTHIS pDownServMgr = (PDOWNTHIS)aServMgr; + rc = downCreateWrapper((void**)&pDownServMgr, downIsSupportedInterface(kSupportsIID), NS_OK); + if (NS_FAILED(rc)) + { + dprintf(("%s: NSGetFactory failed.", pszFunction)); + *aResult = nsnull; + return rc; + } + + + /* + * Call the legacy NSGetFactory. + */ + rc = pfnGetFactory(pDownServMgr, aClass, aClassName, aContractID, aResult); + if (NS_FAILED(rc)) + { + dprintf(("%s: NSGetFactory failed.", pszFunction)); + *aResult = nsnull; + return rc; + } + + + /* + * Make wrapper for the plugin factory interface (aResult). + */ + dprintf(("%s: pfnNSGetFactory succeeded!", pszFunction)); + rc = upCreateWrapper((void**)aResult, kPluginIID, rc); + + return rc; +} + + + + +/** + * Create a wrapper for the given interface if it's a legacy interface. + * @returns NS_OK on success. + * @returns NS_ERROR_NO_INTERFACE if aIID isn't supported. aOut is nsnull. + * @returns NS_ERROR_FAILURE on other error. aOut undefined. + * @param aIID Interface Identifier of aIn and aOut. + * @param aIn Interface of type aIID which may be a legacy interface + * requiring a wrapper. + * @param aOut The native interface. + * If aIn is a legacy interface, this will be a wrappre. + * If aIn is not a legacy interface, this is aIn. + * @remark Typically used for the flash plugin. + */ +nsresult npXPCOMGenericMaybeWrap(REFNSIID aIID, nsISupports *aIn, nsISupports **aOut) +{ + DEBUG_FUNCTIONNAME(); + + dprintf(("%s: Enter. aIn=%p aOut=%p", pszFunction, aIn, aOut)); + DPRINTF_NSID(aIID); + + /* + * Is this an VAC interface? + * + * We'll verify this by checking the AddRef(), Release() and QueryInterface() + * entries of the VFT. The first two entries in the VFT is usually NULL I think, + * but we don't relie on them because we don't know. We'll just check that every + * second entry starting [2] is code, and every second entry starting [3] is an + * not pointing to valid code. + * + * Code is range 0x10000 to 0xc0000000 (Damed be anyone who implements module loading + * above 3GB). + * + */ + if (!VALID_PTR(aIn)) + { + dprintf(("%s: Invalid aIn pointer %p!!!", pszFunction, aIn)); + return NS_ERROR_FAILURE; + } + VFTnsISupports * pVFT = (VFTnsISupports *)(*(void**)aIn); + if ( VALID_PTR(pVFT->QueryInterface) + && !VALID_PTR(pVFT->uDeltaQueryInterface) + && VALID_PTR(pVFT->AddRef) + && !VALID_PTR(pVFT->uDeltaAddRef) + && VALID_PTR(pVFT->Release) + && !VALID_PTR(pVFT->uDeltaRelease) + ) + { + dprintf(("%s: Detected VAC VFT.", pszFunction)); + + /* + * Is the interface supported? + * @todo: It seems that our flash 5 plugin doesn't do this right. + * So, I'm not going to support this interface (nsIFlash) till we + * know it's right or can work around the problem in a good manner. + */ + if (1) //if (upIsSupportedInterface(aIID)) //@todo: remove hack! + { + *aOut = aIn; + nsresult rc = upCreateWrapper((void**)aOut, /*aIID*/ kSupportsIID, NS_OK); /* @todo: fix aIID hack */ + if (NS_SUCCEEDED(rc)) + { + dprintf(("%s: Successfully created wrapper.", pszFunction)); + } + else + { + dprintf(("%s: failed to create wrapper for known interface!!!", pszFunction)); + ReleaseInt3(0xdeadbee2, 0xdead0001, rc); + return rc; + } + } + else + { + dprintf(("%s: Unsupported Interface !!!", pszFunction)); + *aOut = nsnull; + ReleaseInt3(0xdeadbee2, aIID.m0, aIID.m1); + return NS_ERROR_NO_INTERFACE; + } + } + else + { + dprintf(("%s: Not a VAC VFT assuming native VFT which doesn't need wrapping!", pszFunction)); + *aOut = aIn; + } + + return NS_OK; +} + + + +/** + * Initiates the semaphores we use. + * This function cannot fail. + */ +void npXPCOMInitSems(void) +{ + DOWN_LOCK(); + DOWN_UNLOCK(); + UpWrapperBase::upLock(); + UpWrapperBase::upUnLock(); +} diff --git a/mozilla/modules/plugin/os2wrapper/wrap_XPCOM_3rdparty.h b/mozilla/modules/plugin/os2wrapper/wrap_XPCOM_3rdparty.h new file mode 100644 index 00000000000..0b4c0d09045 --- /dev/null +++ b/mozilla/modules/plugin/os2wrapper/wrap_XPCOM_3rdparty.h @@ -0,0 +1,135 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is InnoTek Plugin Wrapper code. + * + * The Initial Developer of the Original Code is + * InnoTek Systemberatung GmbH. + * Portions created by the Initial Developer are Copyright (C) 2003-2005 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * InnoTek Systemberatung GmbH / Knut St. Osmundsen + * Peter Weilbacher + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/* + * This is hand written classes based on XPT files. + */ + +#ifndef __wrap_XPCOM_3rdparty_h__ +#define __wrap_XPCOM_3rdparty_h__ + + +/* starting interface: FlashIObject7 */ +#define FLASH_IOBJECT7_IID_STR "42b1d5a4-6c2b-11d6-8063-0005029bc257" +#define FLASH_IOBJECT7_IID {0x42b1d5a4, 0x6c2b, 0x11d6, { 0x80, 0x63, 0x00, 0x05, 0x02, 0x9b, 0xc2, 0x57 }} + +class NS_NO_VTABLE FlashIObject7 : public nsISupports +{ +public: + NS_IMETHOD Evaluate(const char *aString, FlashIObject7 ** aFlashObject) = 0; +}; + + +/* starting interface: FlashIScriptablePlugin7 */ +#define FLASH_ISCRIPTABLEPLUGIN7_IID_STR "d458fe9c-518c-11d6-84cb-0005029bc257" +#define FLASH_ISCRIPTABLEPLUGIN7_IID {0xd458fe9c, 0x518c, 0x11d6, { 0x84, 0xcb, 0x00, 0x05, 0x02, 0x9b, 0xc2, 0x57 }} +class NS_NO_VTABLE FlashIScriptablePlugin7 : public nsISupports +{ +public: + NS_IMETHOD IsPlaying(PRBool *aretval) = 0; + NS_IMETHOD Play(void) = 0; + NS_IMETHOD StopPlay(void) = 0; + NS_IMETHOD TotalFrames(PRInt32 *aretval) = 0; + NS_IMETHOD CurrentFrame(PRInt32 *aretval) = 0; + NS_IMETHOD GotoFrame(PRInt32 aFrame) = 0; + NS_IMETHOD Rewind(void) = 0; + NS_IMETHOD Back(void) = 0; + NS_IMETHOD Forward(void) = 0; + NS_IMETHOD Pan(PRInt32 aX, PRInt32 aY, PRInt32 aMode) = 0; /* version 7 moved this */ + NS_IMETHOD PercentLoaded(PRInt32 *aretval) = 0; + NS_IMETHOD FrameLoaded(PRInt32 aFrame, PRBool *aretval) = 0; + NS_IMETHOD FlashVersion(PRInt32 *aretval) = 0; + NS_IMETHOD Zoom(PRInt32 aPercent) = 0; + NS_IMETHOD SetZoomRect(PRInt32 aLeft, PRInt32 aTop, PRInt32 aRight, PRInt32 aBottom) = 0; + NS_IMETHOD LoadMovie(PRInt32 aLayer, PRUnichar *aURL) = 0; + NS_IMETHOD TGotoFrame(PRUnichar *aTarget, PRInt32 aFrameNumber) = 0; + NS_IMETHOD TGotoLabel(PRUnichar *aTarget, PRUnichar *aLabel) = 0; + NS_IMETHOD TCurrentFrame(PRUnichar *aTarget, PRInt32 *aretval) = 0; + NS_IMETHOD TCurrentLabel(PRUnichar *aTarget, PRUnichar **aretval) = 0; + NS_IMETHOD TPlay(PRUnichar *aTarget) = 0; + NS_IMETHOD TStopPlay(PRUnichar *aTarget) = 0; + NS_IMETHOD SetVariable(PRUnichar *aVariable, PRUnichar *aValue) = 0; + NS_IMETHOD GetVariable(PRUnichar *aVariable, PRUnichar **aretval) = 0; + NS_IMETHOD TSetProperty(PRUnichar *aTarget, PRInt32 aProperty, PRUnichar *aValue) = 0; + NS_IMETHOD TGetProperty(PRUnichar *aTarget, PRInt32 aProperty, PRUnichar **aretval) = 0; + NS_IMETHOD TGetPropertyAsNumber(PRUnichar *aTarget, PRInt32 aProperty, double **aretval) = 0; + NS_IMETHOD TCallLabel(PRUnichar *aTarget, PRUnichar *aLabel) = 0; + NS_IMETHOD TCallFrame(PRUnichar *aTarget, PRInt32 aFrame) = 0; + NS_IMETHOD SetWindow(FlashIObject7 *aFlashObject, PRInt32 a1) = 0; +}; + + +/* starting interface: nsIPlugin5 */ +#define NS_IFLASH5_IID_STR "d27cdb6e-ae6d-11cf-96b8-444553540000" +#define NS_IFLASH5_IID {0xd27cdb6e, 0xae6d, 0x11cf, { 0x96, 0xb8, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00 }} +class NS_NO_VTABLE nsIFlash5 : public nsISupports +{ +public: + NS_IMETHOD IsPlaying(PRBool *aretval) = 0; + NS_IMETHOD Play(void) = 0; + NS_IMETHOD StopPlay(void) = 0; + NS_IMETHOD TotalFrames(PRInt32 *aretval) = 0; + NS_IMETHOD CurrentFrame(PRInt32 *aretval) = 0; + NS_IMETHOD GotoFrame(PRInt32 aPosition) = 0; + NS_IMETHOD Rewind(void) = 0; + NS_IMETHOD Back(void) = 0; + NS_IMETHOD Forward(void) = 0; + NS_IMETHOD PercentLoaded(PRInt32 *aretval) = 0; + NS_IMETHOD FrameLoaded(PRInt32 aFrame, PRBool *aretval) = 0; + NS_IMETHOD FlashVersion(PRInt32 *aretval) = 0; + NS_IMETHOD Pan(PRInt32 aX, PRInt32 aY, PRInt32 aMode) = 0; + NS_IMETHOD Zoom(PRInt32 aPercent) = 0; + NS_IMETHOD SetZoomRect(PRInt32 aLeft, PRInt32 aTop, PRInt32 aRight, PRInt32 aBottom) = 0; + NS_IMETHOD LoadMovie(PRInt32 aLayer, const char *aURL) = 0; + NS_IMETHOD TGotoFrame(const char *aTarget, PRInt32 frameNum) = 0; + NS_IMETHOD TGotoLabel(const char *aTarget, const char *aLabel) = 0; + NS_IMETHOD TCurrentFrame(const char *aTarget, PRInt32 *aretval) = 0; + NS_IMETHOD TCurrentLabel(const char *aTarget, char **aretval) = 0; + NS_IMETHOD TPlay(const char *aTarget) = 0; + NS_IMETHOD TStopPlay(const char *aTarget) = 0; + NS_IMETHOD SetVariable(const char *aName, const char *aValue) = 0; + NS_IMETHOD GetVariable(const char *aName, char **aretval) = 0; + NS_IMETHOD TSetProperty(const char *aTarget, PRInt32 aProperty, const char *value) = 0; + NS_IMETHOD TGetProperty(const char *aTarget, PRInt32 aProperty, char **aretval) = 0; + NS_IMETHOD TCallFrame(const char *aTarget, PRInt32 aFrame) = 0; + NS_IMETHOD TCallLabel(const char *aTarget, const char *aLabel) = 0; + NS_IMETHOD TGetPropertyAsNumber(const char *aTarget, PRInt32 aProperty, double *aretval) = 0; + NS_IMETHOD TSetPropertyAsNumber(const char *aTarget, PRInt32 aProperty, double aValue) = 0; +}; + +#endif