Remove os2wrapper and associated files. b=499367 r=Peter Weilbacher

This commit is contained in:
Josh Aas 2009-06-22 17:25:07 -04:00
parent b00127e6ac
commit 8286b5c500
17 changed files with 0 additions and 23920 deletions

View File

@ -86,10 +86,6 @@ XPIDLSRCS = \
nsIPluginDocument.idl \
$(NULL)
ifeq ($(OS_ARCH),OS2)
XPIDLSRCS += nsILegacyPluginWrapperOS2.idl
endif
# Just build headers if we don't want plugins support
ifndef MOZ_PLUGINS
NO_GEN_XPT=1

View File

@ -1,87 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** 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 the Mozilla.org code.
*
* The Initial Developer of the Original Code is
* InnoTek Systemberatung GmbH.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* InnoTek Systemberatung GmbH / Knut St. Osmundsen
*
* 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 ***** */
#include "nsISupports.idl"
#include "nspluginroot.idl"
%{C++
#include "nsplugindefs.h"
// {7c4f689b-8c2a-11d7-911e-0003ffba5169}
#define NS_LEGACY_PLUGIN_WRAPPER_CID \
{ 0x7c4f689b, 0x8c2a, 0x11d7, { 0x91, 0x1e, 0x00, 0x03, 0xff, 0xba, 0x51, 0x69 } }
#define NS_LEGACY_PLUGIN_WRAPPER_CONTRACTID "@mozilla.org/plugin/legacypluginwrapper;1"
struct PRLibrary;
%}
interface nsIServiceManagerObsolete;
interface nsIPlugin;
[ptr] native PRLibraryPtr(PRLibrary);
[uuid(7c4f689b-8c2a-11d7-911e-0003ffba5169)]
interface nsILegacyPluginWrapperOS2 : nsISupports
{
/**
* PR_FindSymbol(,"NSGetFactory") + NSGetFactory().
*/
void getFactory(in nsIServiceManagerObsolete aServMgr,
in REFNSIID aClass,
in string aClassName,
in string aContractID,
in PRLibraryPtr aLibrary,
out nsIPlugin aResult);
/**
* 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.
*/
void maybeWrap(in REFNSIID aIID, in nsISupports aIn, out nsISupports aOut);
};

View File

@ -55,10 +55,6 @@
#include "nsJSNPRuntime.h"
#ifdef XP_OS2
#include "nsILegacyPluginWrapperOS2.h"
#endif
static NS_DEFINE_IID(kCPluginManagerCID, NS_PLUGINMANAGER_CID); // needed for NS_TRY_SAFE_CALL
static NS_DEFINE_IID(kIPluginStreamListenerIID, NS_IPLUGINSTREAMLISTENER_IID);

View File

@ -169,10 +169,6 @@
#include <mach-o/fat.h>
#endif
#ifdef XP_OS2
#include "nsILegacyPluginWrapperOS2.h"
#endif
// this is the name of the directory which will be created
// to cache temporary files.
#define kPluginTmpDirName NS_LITERAL_CSTRING("plugtmp")

View File

@ -1,99 +0,0 @@
# ***** 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 <mozilla@weilbacher.org>
# Walter Meinl <wuno@lsvw.de>
#
# 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

View File

@ -1 +0,0 @@
Plugin wrapper for OS/2 to enable old plugins to work with GCC-compiled builds.

View File

@ -1,183 +0,0 @@
/* ***** 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 <mozilla@weilbacher.org>
*
* 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 <mozilla@weilbacher.org>'
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);

File diff suppressed because it is too large Load Diff

View File

@ -1,970 +0,0 @@
#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
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
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
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
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
nsIEventQueue
nsIEventQueueService
nsIException
nsIExceptionService
nsIExpatSink
nsIExternalHelperAppService
nsIExternalProtocolHandler
nsIExternalProtocolService
nsIFactory
nsIFastLoadFileControl
nsIFastLoadService
nsIFile
nsIFileChannel
nsIFilePicker
nsIFileProtocolHandler
nsIFileSpec
nsIFileStreams
nsIFileURL
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
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
nsIRelativeFilePref
nsIRequest
nsIRequestObserver
nsIRequestObserverProxy
nsIResProtocolHandler
nsIResumableChannel
nsIResumableEntityID
nsIRollupListener
nsIRunnable
nsISample
nsISaveAsCharset
nsISchema
nsISchemaLoader
nsIScreen
nsIScreenManager
nsIScriptableDateFormat
nsIScriptableInputStream
nsIScriptableInterfaces
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

View File

@ -1,109 +0,0 @@
/* ***** 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 <mozilla@weilbacher.org>
*
* 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

View File

@ -1,363 +0,0 @@
/* ***** 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 <mozilla@weilbacher.org>
*
* 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 <os2.h>
#endif
#ifdef DEBUG
#include <stdio.h>
#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<nsILegacyPluginWrapperOS2>
#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

View File

@ -1,132 +0,0 @@
/* ***** 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 <mozilla@weilbacher.org>
*
* 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 <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef __IBMC__
#include <builtin.h>
#endif
#define INCL_BASE
#include <os2.h>
#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
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,135 +0,0 @@
/* ***** 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 <mozilla@weilbacher.org>
*
* 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

View File

@ -61,14 +61,6 @@ LOCAL_INCLUDES = -I$(srcdir)/../build
CPPSRCS = nsXPComStub.cpp
ifndef MOZ_ENABLE_LIBXUL
ifeq ($(OS_TARGET),OS2)
ifndef MOZ_OS2_HIGH_MEMORY
CPPSRCS += nsOS2VACLegacy.cpp
endif
endif
endif
# If we have an import library, then copy that to the SDK. Otherwise,
# copy the shared library.
ifneq (,$(filter OS2 WINCE WINNT,$(OS_ARCH)))

View File

@ -1,753 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** 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 the Mozilla.org code.
*
* The Initial Developer of the Original Code is
* InnoTek Systemberatung GmbH.
* Portions created by the Initial Developer are Copyright (C) 2003
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* InnoTek Systemberatung GmbH / Knut St. Osmundsen
*
* 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 module contains wrappers for a handful of XPCOM methods which someone
* have been so kind as to link their plugins against. This module will only
* provide the minimum of what necessary to make legacy plugins work with
* the GCC based mozilla. Luckily this only means the IBM oji JAVA plugins.
*
* Actually, I haven't seen npoji6 calling any of these yet.
*/
/*******************************************************************************
* 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,
/** @} */
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include "nscore.h"
#include "nsServiceManagerUtils.h"
/*******************************************************************************
* Structures and Typedefs *
*******************************************************************************/
#ifndef __cplusplus
typedef struct nsID
{
PRUint32 m0;
PRUint16 m1;
PRUint16 m2;
PRUint8 m3[8];
} nsID, nsCID, nsIID;
#define REFNSIID const nsIID *
typedef PRUint32 nsrefcnt;
#endif
/**
* 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;
/**
* nsGetServiceByCID::nsCOMPtr_helper vftable.
*/
typedef struct vftable_nsGetServiceByCID_nsCOMPtr_helper
{
VFTFIRST_DECL;
/* virtual nsresult operator()( const nsIID&, void** ) const; */
nsresult (*VFTCALL __operator_paratheses)(void *pvThis, REFNSIID aIID, void** aInstancePtr);
VFTDELTA_DECL(__operator_paratheses);
void * (*VFTCALL __destructor)(void *pvThis, unsigned __dtorFlags, unsigned __vtt);
VFTDELTA_DECL(__destructor);
} VFTnsGetServiceByCID_nsCOMPtr_helper;
/**
* nsQueryInterface::nsCOMPtr_helper vftable.
*/
typedef struct vftable_nsQueryInterface_nsCOMPtr_helper
{
VFTFIRST_DECL;
nsresult (*VFTCALL __operator_paratheses)(void *pvThis, REFNSIID aIID, void** aInstancePtr);
VFTDELTA_DECL(__operator_paratheses);
} VFTnsQueryInterface_nsCOMPtr_helper;
/**
* nsISupport object.
*/
typedef struct obj_nsISupports
{
VFTnsISupports *pVFT;
} obj_nsISupports;
/**
* nsCOMPtr_base object.
*/
typedef struct obj_nsCOMPtr_base
{
obj_nsISupports *mRawPtr;
} obj_nsCOMPtr_base;
/**
* nsGetServiceByCID_nsCOMPtr_helper object.
*/
typedef struct obj_nsGetServiceByCID_nsCOMPtr_helper
{
VFTnsGetServiceByCID_nsCOMPtr_helper *pVFT; /* ?? */
nsID *mCID; /* const nsCID& */
void *mServiceManager;/* nsCOMPtr<nsIServiceManager> */
nsresult *mErrorPtr;
} obj_nsGetServiceByCID_nsCOMPtr_helper;
/**
* nsQueryInterface_nsCOMPtr_helper object.
*/
typedef struct obj_nsQueryInterface_nsCOMPtr_helper
{
VFTnsQueryInterface_nsCOMPtr_helper *pVFT; /* ?? */
obj_nsISupports *mRawPtr; /* const nsCID& */
nsresult *mErrorPtr;
} obj_nsQueryInterface_nsCOMPtr_helper;
/**
* nsCOMPtr_base::~nsCOMPtr_base()
*
* @remark This guys doing the oji plugin have been very unfortunate to link in this
* without any similar new operator. The object is thus created in the plugin
* but freed by xpcom.dll. As the plugin and mozilla have different CRTs this
* is a good way of asking for trouble. But, they guys've been lucky, the VAC
* CRT might just handle this ok.
* However, we cannot perform this delete as we have no VAC CRT around, and
* hence we will leak this object.
* ----
* assembly:
public __dt__13nsCOMPtr_baseFv
__dt__13nsCOMPtr_baseFv proc
push ebp
mov ebp,esp
sub esp,08h
mov [ebp+08h],eax; this
mov [ebp+0ch],edx; __dtorFlags
; 63 if ( mRawPtr )
mov eax,[ebp+08h]; this
cmp dword ptr [eax],0h
je @BLBL4
; 64 NSCAP_RELEASE(this, mRawPtr);
mov ecx,[ebp+08h]; this
mov ecx,[ecx]
mov ecx,[ecx]
mov eax,[ebp+08h]; this
mov eax,[eax]
add eax,[ecx+01ch]
mov ecx,[ebp+08h]; this
mov ecx,[ecx]
mov ecx,[ecx]
call dword ptr [ecx+018h]
@BLBL4:
; 65 }
test byte ptr [ebp+0ch],01h; __dtorFlags
je @BLBL6
mov eax,[ebp+08h]; this
call __dl__FPv
@BLBL6:
mov eax,[ebp+08h]; this
add esp,08h
pop ebp
ret
__dt__13nsCOMPtr_baseFv endp
*/
extern "C" void * VFTCALL __dt__13nsCOMPtr_baseFv(void *pvThis, unsigned __dtorFlags)
{
obj_nsCOMPtr_base *pThis = (obj_nsCOMPtr_base*)pvThis;
//asm("int $3");
if (pThis->mRawPtr)
{
/* NSCAP_RELEASE(this, mRawPtr); */
pThis->mRawPtr->pVFT->Release((char*)pThis->mRawPtr + pThis->mRawPtr->pVFT->uDeltaRelease);
}
/*
* Delete the object...
* (As memtioned before we'll rather leak this.)
*/
#if 0
if (!(__dtorFlags & 1))
__dl__FPv(this)
#endif
return pvThis;
}
/** workaround for _Optlink bug.. */
extern "C" void * VFTCALL _dt__13nsCOMPtr_baseFv(void *pvThis, unsigned __dtorFlags)
{
return __dt__13nsCOMPtr_baseFv(pvThis, __dtorFlags);
}
/**
*
* -----
* assembly:
; 92 nsGetServiceByCID::operator()( const nsIID& aIID, void** aInstancePtr ) const
align 010h
public __cl__17nsGetServiceByCIDCFRC4nsIDPPv
__cl__17nsGetServiceByCIDCFRC4nsIDPPv proc
push ebp
mov ebp,esp
sub esp,014h
push ebx
sub esp,08h
mov [ebp+08h],eax; this
mov [ebp+0ch],edx; aIID
mov [ebp+010h],ecx; aInstancePtr
; 94 nsresult status = NS_ERROR_FAILURE;
mov dword ptr [ebp-04h],080004005h; status
; 95 if ( mServiceManager ) {
mov eax,[ebp+08h]; this
add eax,08h
call __opP13nsDerivedSafeXT17nsIServiceManager___8nsCOMPtrXT17nsIServiceManager_CFv
test eax,eax
je @BLBL13
; 96 status = mServiceManager->GetService(mCID, aIID, (void**)aInstancePtr);
mov eax,[ebp+08h]; this
add eax,08h
call __rf__8nsCOMPtrXT17nsIServiceManager_CFv
mov [ebp-08h],eax; __212
mov eax,[ebp+010h]; aInstancePtr
push eax
mov ecx,[ebp+0ch]; aIID
mov edx,[ebp+08h]; this
mov edx,[edx+04h]
mov ebx,[ebp-08h]; __212
mov ebx,[ebx]
mov eax,[ebp-08h]; __212
add eax,[ebx+024h]
sub esp,0ch
mov ebx,[ebp-08h]; __212
mov ebx,[ebx]
call dword ptr [ebx+020h]
add esp,010h
mov [ebp-04h],eax; status
; 97 } else {
jmp @BLBL14
align 010h
@BLBL13:
; 95 if ( mServiceManager ) {
; 98 nsCOMPtr<nsIServiceManager> mgr;
lea eax,[ebp-0ch]; mgr
call __ct__8nsCOMPtrXT17nsIServiceManager_Fv
; 99 NS_GetServiceManager(getter_AddRefs(mgr));
lea edx,[ebp-0ch]; mgr
lea eax,[ebp-010h]; __216
call getter_AddRefs__FR8nsCOMPtrXT17nsIServiceManager_
sub esp,04h
lea eax,[ebp-010h]; __216
sub esp,04h
call __opPP17nsIServiceManager__15nsGetterAddRefsXT17nsIServiceManager_Fv
add esp,08h
call NS_GetServiceManager
mov edx,02h
lea eax,[ebp-010h]; __216
call __dt__15nsGetterAddRefsXT17nsIServiceManager_Fv
; 100 if (mgr)
lea eax,[ebp-0ch]; mgr
call __opP13nsDerivedSafeXT17nsIServiceManager___8nsCOMPtrXT17nsIServiceManager_CFv
test eax,eax
je @BLBL15
; 101 status = mgr->GetService(mCID, aIID, (void**)aInstancePtr);
lea eax,[ebp-0ch]; mgr
call __rf__8nsCOMPtrXT17nsIServiceManager_CFv
mov [ebp-014h],eax; __217
mov eax,[ebp+010h]; aInstancePtr
push eax
mov ecx,[ebp+0ch]; aIID
mov edx,[ebp+08h]; this
mov edx,[edx+04h]
mov ebx,[ebp-014h]; __217
mov ebx,[ebx]
mov eax,[ebp-014h]; __217
add eax,[ebx+024h]
sub esp,0ch
mov ebx,[ebp-014h]; __217
mov ebx,[ebx]
call dword ptr [ebx+020h]
add esp,010h
mov [ebp-04h],eax; status
@BLBL15:
; 102 }
mov edx,02h
lea eax,[ebp-0ch]; mgr
call __dt__8nsCOMPtrXT17nsIServiceManager_Fv
@BLBL14:
; 103 if ( NS_FAILED(status) )
test byte ptr [ebp-01h],080h; status
je @BLBL16
; 104 *aInstancePtr = 0;
mov eax,[ebp+010h]; aInstancePtr
mov dword ptr [eax],0h
@BLBL16:
; 106 if ( mErrorPtr )
mov eax,[ebp+08h]; this
cmp dword ptr [eax+0ch],0h
je @BLBL17
; 107 *mErrorPtr = status;
mov eax,[ebp+08h]; this
mov eax,[eax+0ch]
mov ebx,[ebp-04h]; status
mov [eax],ebx
@BLBL17:
; 108 return status;
mov eax,[ebp-04h]; status
add esp,08h
pop ebx
mov esp,ebp
pop ebp
ret
__cl__17nsGetServiceByCIDCFRC4nsIDPPv endp
* -----
* C++ Code:
nsresult
nsGetServiceByCID::operator()( const nsIID& aIID, void** aInstancePtr ) const
{
nsresult status = NS_ERROR_FAILURE;
if ( mServiceManager ) {
status = mServiceManager->GetService(mCID, aIID, (void**)aInstancePtr);
} else {
nsCOMPtr<nsIServiceManager> mgr;
NS_GetServiceManager(getter_AddRefs(mgr));
if (mgr)
status = mgr->GetService(mCID, aIID, (void**)aInstancePtr);
}
if ( NS_FAILED(status) )
*aInstancePtr = 0;
if ( mErrorPtr )
*mErrorPtr = status;
return status;
}
*/
extern "C" nsresult VFTCALL GSBC_COM__operator_paratheses(void *pvThis, REFNSIID aIID, void** aInstancePtr)
{
obj_nsGetServiceByCID_nsCOMPtr_helper *pThis = (obj_nsGetServiceByCID_nsCOMPtr_helper *)pvThis;
nsresult status = NS_ERROR_FAILURE;
//asm("int $3");
/* For convenience we don't use mServiceManager here because it's a wrapped object.
* We ASSUME that there is only one service manager floating around....
*/
nsCOMPtr<nsIServiceManager> mgr;
NS_GetServiceManager(getter_AddRefs(mgr));
if (mgr)
status = mgr->GetService(*pThis->mCID, aIID, (void**)aInstancePtr);
if (NS_FAILED(status))
*aInstancePtr = 0;
if (pThis->mErrorPtr)
*pThis->mErrorPtr = status;
return status;
}
/**
* Just a destructor.
* -----
* assembly:
; 59 virtual ~nsGetServiceByCID() {};
align 010h
__dt__17nsGetServiceByCIDFv proc
push ebp
mov ebp,esp
sub esp,08h
mov [ebp+08h],eax; this
mov [ebp+0ch],edx; __dtorFlags
mov [ebp+010h],ecx; __vtt
mov eax,[ebp+08h]; this
mov dword ptr [eax],offset FLAT:__vft17nsGetServiceByCID15nsCOMPtr_helper
mov edx,02h
mov eax,[ebp+08h]; this
add eax,08h
call __dt__8nsCOMPtrXT17nsIServiceManager_Fv
test byte ptr [ebp+0ch],01h; __dtorFlags
je @BLBL24
mov eax,[ebp+08h]; this
call __dl__FPv
@BLBL24:
mov eax,[ebp+08h]; this
add esp,08h
pop ebp
ret
__dt__17nsGetServiceByCIDFv endp
*/
extern "C" void * VFTCALL GSBC_COM__destructor(void *pvThis, unsigned __dtorFlags, unsigned __vtt)
{
obj_nsGetServiceByCID_nsCOMPtr_helper *pThis = (obj_nsGetServiceByCID_nsCOMPtr_helper *)pvThis;
//asm("int $3");
/*
* Because previously mentioned issues with VAC heaps, we'll
* not do anything in here.
* (We will then skip destruction of all parents and such, but
* I don't think that will hurt anyone.)
*/
__dtorFlags = __dtorFlags;
__vtt = __vtt;
return pThis;
}
/**
* VFT for nsGetServiceByCID::nsCOMPtr_helper or something like that.
* It's just implementing an operator() and the destructor.
*
* @remark We need to skip an underscore to get the name right.
* ----
* assembly:
__vft17nsGetServiceByCID15nsCOMPtr_helper dd 0
db 0h,0h,0h,0h
dd offset FLAT:__cl__17nsGetServiceByCIDCFRC4nsIDPPv
db 0h,0h,0h,0h
dd offset FLAT:__dt__17nsGetServiceByCIDFv
db 0h,0h,0h,0h
*/
extern const VFTnsGetServiceByCID_nsCOMPtr_helper _vft17nsGetServiceByCID15nsCOMPtr_helper =
{
VFTFIRST_VAL()
GSBC_COM__operator_paratheses, VFTDELTA_VAL()
GSBC_COM__destructor, VFTDELTA_VAL()
};
/**
*
* -----
* assembly
; 42 nsQueryInterface::operator()( const nsIID& aIID, void** answer ) const
align 010h
public __cl__16nsQueryInterfaceCFRC4nsIDPPv
__cl__16nsQueryInterfaceCFRC4nsIDPPv proc
push ebp
mov ebp,esp
sub esp,08h
push ebx
sub esp,0ch
mov [ebp+08h],eax; this
mov [ebp+0ch],edx; aIID
mov [ebp+010h],ecx; answer
; 45 if ( mRawPtr )
mov eax,[ebp+08h]; this
cmp dword ptr [eax+04h],0h
je @BLBL1
; 46 {
; 47 status = mRawPtr->QueryInterface(aIID, answer);
mov ecx,[ebp+010h]; answer
mov edx,[ebp+0ch]; aIID
mov ebx,[ebp+08h]; this
mov ebx,[ebx+04h]
mov ebx,[ebx]
mov eax,[ebp+08h]; this
mov eax,[eax+04h]
add eax,[ebx+0ch]
mov ebx,[ebp+08h]; this
mov ebx,[ebx+04h]
mov ebx,[ebx]
call dword ptr [ebx+08h]
mov [ebp-04h],eax; status
; 48 #ifdef NSCAP_FEATURE_TEST_NONNULL_QUERY_SUCCEEDS
; 49 NS_ASSERTION(NS_SUCCEEDED(status), "interface not found---were you expecting that?");
; 50 #endif
; 51 }
jmp @BLBL2
align 010h
@BLBL1:
; 45 if ( mRawPtr )
; 53 status = NS_ERROR_NULL_POINTER;
mov dword ptr [ebp-04h],080004003h; status
@BLBL2:
; 55 if ( mErrorPtr )
mov eax,[ebp+08h]; this
cmp dword ptr [eax+08h],0h
je @BLBL3
; 56 *mErrorPtr = status;
mov eax,[ebp+08h]; this
mov eax,[eax+08h]
mov ebx,[ebp-04h]; status
mov [eax],ebx
@BLBL3:
; 57 return status;
mov eax,[ebp-04h]; status
add esp,0ch
pop ebx
mov esp,ebp
pop ebp
ret
__cl__16nsQueryInterfaceCFRC4nsIDPPv endp
* -----
* C++ Code:
nsresult
nsQueryInterface::operator()( const nsIID& aIID, void** answer ) const
{
nsresult status;
if ( mRawPtr )
{
status = mRawPtr->QueryInterface(aIID, answer);
#ifdef NSCAP_FEATURE_TEST_NONNULL_QUERY_SUCCEEDS
NS_ASSERTION(NS_SUCCEEDED(status), "interface not found---were you expecting that?");
#endif
}
else
status = NS_ERROR_NULL_POINTER;
if ( mErrorPtr )
*mErrorPtr = status;
return status;
}
*/
extern "C" nsresult VFTCALL QI_COM__operator_paratheses(void *pvThis, REFNSIID aIID, void** aInstancePtr)
{
obj_nsQueryInterface_nsCOMPtr_helper *pThis = (obj_nsQueryInterface_nsCOMPtr_helper *)pvThis;
nsresult status = NS_ERROR_NULL_POINTER;
//asm("int $3");
if (pThis->mRawPtr)
{
status = pThis->mRawPtr->pVFT->QueryInterface(pThis->mRawPtr, aIID, aInstancePtr);
/* don't care about warnings, do we? */
}
if (pThis->mErrorPtr)
*pThis->mErrorPtr = status;
return status;
}
/**
* VFT for nsQueryInterface::nsCOMPtr_helper or something like that.
* No destructor, only an operator().
*
* @remark We need to skip an underscore to get the name right.
* -----
* assembly:
__vft16nsQueryInterface15nsCOMPtr_helper dd 0
db 0h,0h,0h,0h
dd offset FLAT:__cl__16nsQueryInterfaceCFRC4nsIDPPv
db 0h,0h,0h,0h
*/
extern const VFTnsQueryInterface_nsCOMPtr_helper _vft16nsQueryInterface15nsCOMPtr_helper =
{
VFTFIRST_VAL()
QI_COM__operator_paratheses, VFTDELTA_VAL()
};
/**
*
* -----
* C++ Code:
void
assign_assuming_AddRef( nsISupports* newPtr )
{
/ *
|AddRef()|ing the new value (before entering this function) before
|Release()|ing the old lets us safely ignore the self-assignment case.
We must, however, be careful only to |Release()| _after_ doing the
assignment, in case the |Release()| leads to our _own_ destruction,
which would, in turn, cause an incorrect second |Release()| of our old
pointer. Thank <waterson@netscape.com> for discovering this.
* /
nsISupports* oldPtr = mRawPtr;
mRawPtr = newPtr;
NSCAP_LOG_ASSIGNMENT(this, newPtr);
NSCAP_LOG_RELEASE(this, oldPtr);
if ( oldPtr )
NSCAP_RELEASE(this, oldPtr);
}
*/
extern "C" void VFTCALL assign_assuming_AddRef__13nsCOMPtr_baseFP11nsISupports(void *pvThis, obj_nsISupports *newPtr)
{
obj_nsCOMPtr_base *pThis = (obj_nsCOMPtr_base *)pvThis;
obj_nsISupports *oldPtr;
oldPtr = pThis->mRawPtr;
pThis->mRawPtr = newPtr;
if (oldPtr)
{
/* NSCAP_RELEASE(this, oldPtr); */
pThis->mRawPtr->pVFT->Release(oldPtr + oldPtr->pVFT->uDeltaRelease);
}
}
/**
*
* -----
* Assembly:
; 77 nsCOMPtr_base::assign_from_helper( const nsCOMPtr_helper& helper, const nsIID& iid )
align 010h
public assign_from_helper__13nsCOMPtr_baseFRC15nsCOMPtr_helperRC4nsID
assign_from_helper__13nsCOMPtr_baseFRC15nsCOMPtr_helperRC4nsID proc
push ebp
mov ebp,esp
sub esp,08h
push ebx
sub esp,0ch
mov [ebp+08h],eax; this
mov [ebp+0ch],edx; helper
mov [ebp+010h],ecx; iid
; 80 if ( NS_FAILED( helper(iid, reinterpret_cast<void**>(&newRawPtr)) ) )
lea ecx,[ebp-04h]; newRawPtr
mov edx,[ebp+010h]; iid
mov ebx,[ebp+0ch]; helper
mov ebx,[ebx]
mov eax,[ebp+0ch]; helper
add eax,[ebx+0ch]
mov ebx,[ebp+0ch]; helper
mov ebx,[ebx]
call dword ptr [ebx+08h]
test eax,080000000h
je @BLBL8
; 81 newRawPtr = 0;
mov dword ptr [ebp-04h],0h; newRawPtr
@BLBL8:
; 82 assign_assuming_AddRef(newRawPtr);
mov edx,[ebp-04h]; newRawPtr
mov eax,[ebp+08h]; this
call assign_assuming_AddRef__13nsCOMPtr_baseFP11nsISupports
add esp,0ch
pop ebx
mov esp,ebp
pop ebp
ret
assign_from_helper__13nsCOMPtr_baseFRC15nsCOMPtr_helperRC4nsID endp
* -----
* C Code:
void
nsCOMPtr_base::assign_from_helper( const nsCOMPtr_helper& helper, const nsIID& iid )
{
nsISupports* newRawPtr;
if ( NS_FAILED( helper(iid, reinterpret_cast<void**>(&newRawPtr)) ) )
newRawPtr = 0;
assign_assuming_AddRef(newRawPtr);
}
*/
extern "C" void VFTCALL assign_from_helper__13nsCOMPtr_baseFRC15nsCOMPtr_helperRC4nsID(
void *pvThis, void * helper, REFNSIID iid)
{
obj_nsCOMPtr_base *pThis = (obj_nsCOMPtr_base *)pvThis;
obj_nsISupports* newRawPtr = NULL;
nsresult status = NS_ERROR_FAILURE;
//asm("int $3");
/* this may or may not be correct but the layout is the same. */
obj_nsQueryInterface_nsCOMPtr_helper * pHelper = (obj_nsQueryInterface_nsCOMPtr_helper*)helper;
/* if ( NS_FAILED( helper(iid, reinterpret_cast<void**>(&newRawPtr)) ) ) */
status = pHelper->pVFT->__operator_paratheses((char*)pHelper + pHelper->pVFT->uDelta__operator_paratheses,
iid, (void**)&newRawPtr);
if (NS_FAILED(status))
newRawPtr = 0;
/* assign_assuming_AddRef(newRawPtr); */
assign_assuming_AddRef__13nsCOMPtr_baseFP11nsISupports(pThis, newRawPtr);
}